Author: mguevara                     Date: Wed Jan 10 01:33:00 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixes problems with workqueue interface change in 2.6.20

---- Files affected:
SOURCES:
   madwifi-ng-2.6.20.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/madwifi-ng-2.6.20.patch
diff -u /dev/null SOURCES/madwifi-ng-2.6.20.patch:1.1
--- /dev/null   Wed Jan 10 02:33:00 2007
+++ SOURCES/madwifi-ng-2.6.20.patch     Wed Jan 10 02:32:55 2007
@@ -0,0 +1,69 @@
+The attached patch fix the compilation problem caused by the workqueue
+interface changes in the recent kernels (2.6.20).
+
+Signed-off-by: Shahar Frank <[EMAIL PROTECTED]>
+
+Index: ath/if_ath.c
+===================================================================
+--- ath/if_ath.c       (revision 1871)
++++ ath/if_ath.c       (working copy)
+@@ -118,7 +118,7 @@
+ static void ath_rxorn_tasklet(TQUEUE_ARG);
+ static void ath_bmiss_tasklet(TQUEUE_ARG);
+ static void ath_bstuck_tasklet(TQUEUE_ARG);
+-static void ath_radar_task(TQUEUE_ARG);
++static void ath_radar_task(ATH_WORK_ARG data);
+ static void ath_dfs_test_return(unsigned long);
+ 
+ static int ath_stop_locked(struct net_device *);
+@@ -1737,9 +1737,10 @@
+ }
+ 
+ static void
+-ath_radar_task(TQUEUE_ARG data)
++ath_radar_task(ATH_WORK_ARG data)
+ {
+-      struct net_device *dev = (struct net_device *)data;
++      struct ATH_WORK_THREAD *t = container_of(data, struct ATH_WORK_THREAD, 
worker);
++      struct net_device *dev = (struct net_device *)t->data;
+       struct ath_softc *sc = dev->priv;
+       struct ath_hal *ah = sc->sc_ah;
+       struct ieee80211com *ic = &sc->sc_ic;
+Index: ath/if_athvar.h
+===================================================================
+--- ath/if_athvar.h    (revision 1871)
++++ ath/if_athvar.h    (working copy)
+@@ -80,14 +80,31 @@
+       (t)->data=(void *) (d);                 \
+ } while (0)
+ #define ATH_FLUSH_TASKS                       flush_scheduled_tasks
+-#else
++#define ATH_WORK_ARG                  TQUEUE_ARG
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ #include <linux/workqueue.h>
+ #define ATH_SCHEDULE_TASK(t)          schedule_work((t))
+ 
+ #define ATH_INIT_SCHED_TASK(_t, _f, _d)       INIT_WORK((_t), (void (*)(void 
*))(_f), (void *)(_d));
+ 
+ #define ATH_WORK_THREAD                       work_struct
+-#define       ATH_FLUSH_TASKS                 flush_scheduled_work
++#define ATH_FLUSH_TASKS                       flush_scheduled_work
++#define ATH_WORK_ARG                  TQUEUE_ARG
++#else
++#include <linux/workqueue.h>
++struct ath_work_struct {
++      struct work_struct worker;
++      void *data;
++}; 
++#define ATH_WORK_THREAD                       ath_work_struct
++#define ATH_WORK_ARG                  struct work_struct *
++#define ATH_INIT_SCHED_TASK(_t, _f, _d)       do {\
++              INIT_WORK(&(_t)->worker, (void (*)(ATH_WORK_ARG))(_f));\
++              (_t)->data = dev;\
++      } while (0);\
++              
++#define ATH_FLUSH_TASKS                       flush_scheduled_work
++#define ATH_SCHEDULE_TASK(t)          schedule_work(&(t)->worker)
+ #endif /* KERNEL_VERSION < 2.5.41 */
+ 
+ /*
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to