aa569925bd
git-svn-id: http://svn.sabayonlinux.org/overlay@1097 d7aec97c-591d-0410-af39-a8856400b30a
131 lines
4.7 KiB
Diff
131 lines
4.7 KiB
Diff
Index: src/include/wlan/wlan_compat.h
|
|
===================================================================
|
|
--- src/include/wlan/wlan_compat.h (revision 1815)
|
|
+++ src/include/wlan/wlan_compat.h (working copy)
|
|
@@ -490,6 +490,12 @@
|
|
} while (0)
|
|
#endif
|
|
|
|
+#ifndef container_of
|
|
+#define container_of(ptr, type, member) ({ \
|
|
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
|
+ (type *)( (char *)__mptr - offsetof(type,member) );})
|
|
+#endif
|
|
+
|
|
#ifndef INIT_WORK
|
|
#define work_struct tq_struct
|
|
|
|
@@ -500,11 +506,19 @@
|
|
#endif
|
|
|
|
#define flush_scheduled_work flush_scheduled_tasks
|
|
-#define INIT_WORK(_wq, _routine, _data) INIT_TQUEUE(_wq, _routine, _data)
|
|
-#define PREPARE_WORK(_wq, _routine, _data) PREPARE_TQUEUE(_wq, _routine, _data)
|
|
+#define INIT_WORK2(_wq, _routine) INIT_TQUEUE(_wq, (void (*)(void *))_routine, _wq)
|
|
#endif
|
|
-#endif // < 2.5 kernel
|
|
|
|
+#else // >= 2.5 kernel
|
|
+
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
|
|
+#define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, (void (*)(void *))_routine, _wq)
|
|
+#else
|
|
+#define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, _routine)
|
|
+#endif
|
|
+
|
|
+#endif // >= 2.5 kernel
|
|
+
|
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38))
|
|
typedef struct device netdevice_t;
|
|
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4))
|
|
Index: src/prism2/include/prism2/prism2mgmt.h
|
|
===================================================================
|
|
--- src/prism2/include/prism2/prism2mgmt.h (revision 1815)
|
|
+++ src/prism2/include/prism2/prism2mgmt.h (working copy)
|
|
@@ -168,9 +168,9 @@
|
|
UINT8 *prism2buf, p80211pstrd_t *pstr, hfa384x_t *priv );
|
|
int prism2mgmt_get_grpaddr_index( UINT32 did );
|
|
|
|
-void prism2sta_processing_defer(void *data);
|
|
+void prism2sta_processing_defer(struct work_struct *data);
|
|
|
|
-void prism2sta_commsqual_defer(void *data);
|
|
+void prism2sta_commsqual_defer(struct work_struct *data);
|
|
void prism2sta_commsqual_timer(unsigned long data);
|
|
|
|
/*=============================================================*/
|
|
Index: src/prism2/driver/hfa384x_usb.c
|
|
===================================================================
|
|
--- src/prism2/driver/hfa384x_usb.c (revision 1815)
|
|
+++ src/prism2/driver/hfa384x_usb.c (working copy)
|
|
@@ -711,8 +711,8 @@
|
|
tasklet_init(&hw->completion_bh,
|
|
hfa384x_usbctlx_completion_task,
|
|
(unsigned long)hw);
|
|
- INIT_WORK(&hw->link_bh, prism2sta_processing_defer, hw);
|
|
- INIT_WORK(&hw->usb_work, hfa384x_usb_defer, hw);
|
|
+ INIT_WORK2(&hw->link_bh, prism2sta_processing_defer);
|
|
+ INIT_WORK2(&hw->usb_work, hfa384x_usb_defer);
|
|
|
|
init_timer(&hw->throttle);
|
|
hw->throttle.function = hfa384x_usb_throttlefn;
|
|
@@ -733,7 +733,7 @@
|
|
hw->link_status = HFA384x_LINK_NOTCONNECTED;
|
|
hw->state = HFA384x_STATE_INIT;
|
|
|
|
- INIT_WORK(&hw->commsqual_bh, prism2sta_commsqual_defer, hw);
|
|
+ INIT_WORK2(&hw->commsqual_bh, prism2sta_commsqual_defer);
|
|
init_timer(&hw->commsqual_timer);
|
|
hw->commsqual_timer.data = (unsigned long) hw;
|
|
hw->commsqual_timer.function = prism2sta_commsqual_timer;
|
|
Index: src/prism2/driver/prism2sta.c
|
|
===================================================================
|
|
--- src/prism2/driver/prism2sta.c (revision 1815)
|
|
+++ src/prism2/driver/prism2sta.c (working copy)
|
|
@@ -1438,9 +1438,9 @@
|
|
return;
|
|
}
|
|
|
|
-void prism2sta_processing_defer(void *data)
|
|
+void prism2sta_processing_defer(struct work_struct *data)
|
|
{
|
|
- hfa384x_t *hw = (hfa384x_t *) data;
|
|
+ hfa384x_t *hw = container_of(data, struct hfa384x, link_bh);
|
|
wlandevice_t *wlandev = hw->wlandev;
|
|
hfa384x_bytestr32_t ssid;
|
|
int result;
|
|
@@ -1540,7 +1540,7 @@
|
|
WLAN_MACMODE_IBSS_STA : WLAN_MACMODE_ESS_STA;
|
|
|
|
/* Get the ball rolling on the comms quality stuff */
|
|
- prism2sta_commsqual_defer(hw);
|
|
+ prism2sta_commsqual_defer(&hw->commsqual_bh);
|
|
}
|
|
break;
|
|
|
|
@@ -2413,7 +2413,7 @@
|
|
}
|
|
#endif
|
|
|
|
-void prism2sta_commsqual_defer(void *data)
|
|
+void prism2sta_commsqual_defer(struct work_struct *data)
|
|
{
|
|
hfa384x_t *hw = (hfa384x_t *) data;
|
|
wlandevice_t *wlandev = hw->wlandev;
|
|
Index: src/prism2/driver/hfa384x.c
|
|
===================================================================
|
|
--- src/prism2/driver/hfa384x.c (revision 1815)
|
|
+++ src/prism2/driver/hfa384x.c (working copy)
|
|
@@ -352,9 +352,9 @@
|
|
/* Init the auth queue head */
|
|
skb_queue_head_init(&hw->authq);
|
|
|
|
- INIT_WORK(&hw->link_bh, prism2sta_processing_defer, hw);
|
|
+ INIT_WORK2(&hw->link_bh, prism2sta_processing_defer);
|
|
|
|
- INIT_WORK(&hw->commsqual_bh, prism2sta_commsqual_defer, hw);
|
|
+ INIT_WORK2(&hw->commsqual_bh, prism2sta_commsqual_defer);
|
|
|
|
init_timer(&hw->commsqual_timer);
|
|
hw->commsqual_timer.data = (unsigned long) hw;
|