WE-21 for bcm43xx (wireless-2.6 git)
Subsystems (3)
PATCH 1/1 WE-21 for bcm43xx (wireless-2.6 git)
John,
Please apply Jean's patch to wireless-2.6. It should apply cleanly to the version you pushed earlier today (8/30). I have compiled and tested. For complete operation with WE-21, it also needs the patch entitled [PATCH 2.6.18] WE-21 support (core API) at
(http://www.spinics.net/lists/netdev/msg13599.html). It works without that second patch, just at WE-20.
Thanks,
Larry
-------------------
Patch to update bcm43xx-SoftMAC for WE-21.
-------------------------------------------------------------
net/ieee80211/softmac/ieee80211softmac_wx.c +10 -4
@@ -63,6 +63,12 @@ ieee80211softmac_wx_get_scan_results(str }EXPORT_SYMBOL_GPL (ieee80211softmac_wx_get_scan_results); +#if WIRELESS_EXT >20 +#define IW_ESSID_FIX 0 +#else +#define IW_ESSID_FIX 1 +#endif + int ieee80211softmac_wx_set_essid(struct net_device *net_dev, struct iw_request_info *info,
@@ -80,10 +86,10 @@ ieee80211softmac_wx_set_essid(struct net* If it's our network, ignore the change, we're already doing it! */ if ((sm->associnfo.associating || sm->associated) && - (data->essid.flags && data->essid.length && extra)) { + (data->essid.flags && data->essid.length)) {/* Get the associating network */ n =ieee80211softmac_get_network_by_bssid (sm, sm->associnfo.bssid); -if (n && n->essid.len == (data->essid.length -1 ) && +if (n && n->essid.len == (data->essid.length -IW_ESSID_FIX ) && !memcmp (n->essid.data, extra, n->essid.len)) { dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n", MAC_ARG(sm->associnfo.bssid));
@@ -109,8 +115,8 @@ ieee80211softmac_wx_set_essid(struct net sm->associnfo.static_essid =0 ; sm->associnfo.assoc_wait =0 ; -if (data->essid.flags && data->essid.length && extra/*required?*/ ) { - length =min (data->essid.length -1 ,IW_ESSID_MAX_SIZE ); +if (data->essid.flags && data->essid.length) { + length =min ((int ) data->essid.length -IW_ESSID_FIX ,IW_ESSID_MAX_SIZE );if (length) {memcpy (sm->associnfo.req_essid.data, extra, length); sm->associnfo.static_essid =1 ;
drivers/net/wireless/bcm43xx/bcm43xx_wx.c +4 -0
@@ -334,7 +334,11 @@ static int bcm43xx_wx_get_nick(struct nesize_t len;mutex_lock (&bcm->mutex); +#if WIRELESS_EXT >20 + len =strlen (bcm->nick); +#else len =strlen (bcm->nick) +1 ; +#endif memcpy (extra, bcm->nick, len); data->data.length = (__u16 )len; data->data.flags =1 ;
=======
Quoted 25 lines · Larry Finger
John,
Please apply Jean's patch to wireless-2.6. It should apply cleanly to the version you pushed earlier today (8/30). I have compiled and tested. For complete operation with WE-21, it also needs the patch entitled [PATCH 2.6.18] WE-21 support (core API) at
(http://www.spinics.net/lists/netdev/msg13599.html). It works without that second patch, just at WE-20.Thanks,
Larry
-------------------
Patch to update bcm43xx-SoftMAC for WE-21.
Signed-off-by Jean Tourrilhes <[email protected]>Signed-off-by Michael Buesch <[email protected]>Signed-off-by Larry Finger <[email protected]>-------------------------------------------------------------
diff -u
a/net/ieee80211/softmac/ieee80211softmac_wx.cb/net/ieee80211/softmac/ieee80211softmac_wx.c
net/ieee80211/softmac/ieee80211softmac_wx.c ieee80211softmac_wx_get_scan_results(str · line 70
Quoted 8 lines
net/ieee80211/softmac/ieee80211softmac_wx.c +5
-0@@ -63,6 +63,12 @@ ieee80211softmac_wx_get_scan_results(str }EXPORT_SYMBOL_GPL (ieee80211softmac_wx_get_scan_results); +#if WIRELESS_EXT >20 +#define IW_ESSID_FIX 0 +#else +#define IW_ESSID_FIX 1 +#endif
Eh, was this useless #if in the original patch I signed-off, too? Because I want to revert my sign-off. :)
This #if is useless, because we always deal with only one single WE version in the kernel. #if WIRELESS_EXT will always be true. So remove this and also remove the other #if below.
Quoted 46 lines
net/ieee80211/softmac/ieee80211softmac_wx.c +4
-4int ieee80211softmac_wx_set_essid(struct net_device *net_dev, struct iw_request_info *info,@@ -80,10 +86,10 @@ ieee80211softmac_wx_set_essid(struct net* If it's our network, ignore the change, we're already doing it! */ if ((sm->associnfo.associating || sm->associated) && - (data->essid.flags && data->essid.length && extra)) { + (data->essid.flags && data->essid.length)) {/* Get the associating network */ n =ieee80211softmac_get_network_by_bssid (sm, sm->associnfo.bssid); -if (n && n->essid.len == (data->essid.length -1 ) && +if (n && n->essid.len == (data->essid.length -IW_ESSID_FIX ) && !memcmp (n->essid.data, extra, n->essid.len)) { dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n", MAC_ARG(sm->associnfo.bssid));@@ -109,8 +115,8 @@ ieee80211softmac_wx_set_essid(struct net sm->associnfo.static_essid =0 ; sm->associnfo.assoc_wait =0 ; -if (data->essid.flags && data->essid.length && extra/*required?*/ ) { - length =min (data->essid.length -1 ,IW_ESSID_MAX_SIZE ); +if (data->essid.flags && data->essid.length) { + length =min ((int ) data->essid.length -IW_ESSID_FIX ,IW_ESSID_MAX_SIZE );if (length) {memcpy (sm->associnfo.req_essid.data, extra, length); sm->associnfo.static_essid =1 ;diff -u
a/drivers/net/wireless/bcm43xx/bcm43xx_wx.cb/drivers/net/wireless/bcm43xx/bcm43xx_wx.cdrivers/net/wireless/bcm43xx/bcm43xx_wx.c +4
-0@@ -334,7 +334,11 @@ static int bcm43xx_wx_get_nick(struct nesize_t len;mutex_lock (&bcm->mutex); +#if WIRELESS_EXT >20 + len =strlen (bcm->nick); +#else len =strlen (bcm->nick) +1 ; +#endif memcpy (extra, bcm->nick, len); data->data.length = (__u16 )len; data->data.flags =1 ;=======
Signature · 1 line
Greetings Michael.
Quoted 14 lines · Michael Buesch
net/ieee80211/softmac/ieee80211softmac_wx.c ieee80211softmac_wx_get_scan_results(str · line 70
Quoted 6 lines · Larry Finger
net/ieee80211/softmac/ieee80211softmac_wx.c +5
-0+#if WIRELESS_EXT >20 +#define IW_ESSID_FIX 0 +#else +#define IW_ESSID_FIX 1 +#endif Eh, was this useless #if in the original patch I signed-off, too? Because I want to revert my sign-off. :)
This #if is useless, because we always deal with only one single WE version in the kernel. #ifWIRELESS_EXTwill always be true. So remove this and also remove the other #if below.
Yes, it was. I saw this, but left it in because I cannot control the inclusion of the other patch that brings the NET components up to WE-21, and it seemed that the behavior could be wrong if the kernel were at WE-20. I'm quite certain that the patch will _NOT_ be included in 2.6.18 as it is clearly not a bug fix. Once I see WE-21 in the kernel, I'll remove these #ifdef's and eliminate IW_ESSID_FIX.
If I missed something, please let me know, and I'll resubmit the patch now.
John, have you merged, or do you plan to merge, "[PATCH 2.6.18] WE-21 support (core API)" into wireless-2.6?
Larry
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Larry Finger
John, have you merged, or do you plan to merge, "[PATCH 2.6.18] WE-21 support (core API)" into wireless-2.6?
I guess that is still up for discussion. It looks like at least part of it is desirable, but maybe not other parts.
Perhaps you should post the patch w/o WE-20 support. I'll make sure they all get in at the same time (if at all).
John
Signature · 2 lines
John W. Linville [email protected]
Quoted 7 lines · John W. Linville
Quoted 2 lines · Larry Finger
John, have you merged, or do you plan to merge, "[PATCH 2.6.18] WE-21 support (core API)" into wireless-2.6?
I guess that is still up for discussion. It looks like at least part of it is desirable, but maybe not other parts.
More details ?
Quoted 2 lines
Perhaps you should post the patch w/o WE-20 support. I'll make sure they all get in at the same time (if at all).
It does not really make sense has this patch only adds WE-21
support to the driver.
Quoted 1 line
John
Have fun... Jean