staging/wlan-ng: Switch from wext to cfg80211
PATCH 1/1 staging/wlan-ng: Switch from wext to cfg80211
Switch driver over from wext to cfg80211 interface.
---
Some Notes:
- Applies against linux-next (as of 20100602), tested on my system
- This patch moves the driver wholesale from wext to cfg80211. Wext support is still provided through the cfg80211 provided wext compatability layer.
- Currently only infrastructure mode is implemented. Ad hoc mode is not yet implemented, but can be added.
- It does not support connecting to a specified bssid, instead roaming is handled by the card itself. This matches the behaviour of the existing driver.
- It has been tested using NetworkManager (via wpa_supplicant) configured to use the wext compatability layer, and then again with the native nl80211 layer.
drivers/staging/wlan-ng/Makefile +0 -1
@@ -4,5 +4,4 @@ prism2_usb-objs := prism2usb.o \ p80211conv.o \ p80211req.o \ p80211wep.o \ - p80211wext.o \ p80211netdev.o
drivers/staging/wlan-ng/hfa384x.h +2 -0
@@ -1284,6 +1284,8 @@ typedef struct hfa384x {u16 link_status_new;struct sk_buff_head authq; +u32 txrate; +/* And here we have stuff that used to be in priv */ /* State variables */
drivers/staging/wlan-ng/p80211metastruct.h +2 -0
@@ -113,6 +113,7 @@ typedef struct p80211msg_dot11req_scan_rp80211item_uint32_t cfpollable;p80211item_uint32_t cfpollreq;p80211item_uint32_t privacy; +p80211item_uint32_t capinfo;p80211item_uint32_t basicrate1;p80211item_uint32_t basicrate2;p80211item_uint32_t basicrate3;
@@ -209,6 +210,7 @@ typedef struct p80211msg_lnxreq_commsquap80211item_uint32_t link;p80211item_uint32_t level;p80211item_uint32_t noise; +p80211item_uint32_t txrate; } __attribute__ ((packed)) p80211msg_lnxreq_commsquality_t; typedef struct p80211msg_lnxreq_autojoin {
drivers/staging/wlan-ng/p80211netdev.c +31 -16
93 lines not on this page · raw message
drivers/staging/wlan-ng/p80211netdev.h +2 -1
@@ -148,6 +148,7 @@ int p80211wext_event_associated(struct w#define MAX_KEYLEN 32#define HOSTWEP_DEFAULTKEY_MASK (BIT(1)|BIT(0)) +#define HOSTWEP_SHAREDKEY BIT(3)#define HOSTWEP_DECRYPT BIT(4)#define HOSTWEP_ENCRYPT BIT(5)#define HOSTWEP_PRIVACYINVOKED BIT(6)
@@ -233,7 +234,7 @@ int wep_decrypt(wlandevice_t *wlandev, uint wep_encrypt (wlandevice_t *wlandev,u8 *buf,u8 *dst,u32 len,int keynum,u8 *iv,u8 *icv); -int wlan_setup (wlandevice_t *wlandev); +int wlan_setup (wlandevice_t *wlandev,struct device *physdev);int wlan_unsetup (wlandevice_t *wlandev);int register_wlandev (wlandevice_t *wlandev);int unregister_wlandev (wlandevice_t *wlandev);
drivers/staging/wlan-ng/prism2mgmt.c +2 -0
@@ -463,6 +463,8 @@ int prism2mgmt_scan_results(wlandevice_t/* capinfo bits */ count =le16_to_cpu (item->capinfo); + req->capinfo.status = P80211ENUM_msgitem_status_data_ok; + req->capinfo.data = count;/* privacy flag */ req->privacy.status = P80211ENUM_msgitem_status_data_ok;
drivers/staging/wlan-ng/prism2sta.c +49 -15
123 lines not on this page · raw message
drivers/staging/wlan-ng/prism2usb.c +1 -1
@@ -119,7 +119,7 @@ static int prism2sta_probe_usb(struct us } hw = wlandev->priv; -if (wlan_setup (wlandev) !=0 ) { +if (wlan_setup (wlandev, &(interface->dev)) !=0 ) {printk (KERN_ERR "%s: wlan_setup() failed.\n" , dev_info); result = -EIO ; goto failed;
drivers/staging/wlan-ng/cfg80211.c +735 -0
735 lines not on this page · raw message
drivers/staging/wlan-ng/p80211wext.c +0 -1690
1,690 lines not on this page · raw message
Quoted 1 line · Karl Relton
Switch driver over from wext to cfg80211 interface.
Wow! Nice job, I'll queue this up in my tree for inclusion in linux-next after 2.6.35-rc2 comes out.
thanks,
greg k-h