aboutsummaryrefslogtreecommitdiff
path: root/net/ieee80211/softmac/ieee80211softmac_io.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2006-09-27 15:26:33 +0300
committerJohn W. Linville <linville@tuxdriver.com>2006-10-16 20:09:47 -0400
commit7c28ad2d83ecc637237fe684659a6afbce0bb2a8 (patch)
tree4bdbe26516d2d8aa195f97eae9cd120d47521ab6 /net/ieee80211/softmac/ieee80211softmac_io.c
parent3693ec670b3bb4d11295856bea3592dd8f37f9a5 (diff)
[PATCH] softmac: Fix WX and association related races
This fixes some race conditions in the WirelessExtension handling and association handling code. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/softmac/ieee80211softmac_io.c')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_io.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_io.c b/net/ieee80211/softmac/ieee80211softmac_io.c
index 82bfddbf33a..e8419cfb058 100644
--- a/net/ieee80211/softmac/ieee80211softmac_io.c
+++ b/net/ieee80211/softmac/ieee80211softmac_io.c
@@ -475,8 +475,13 @@ int ieee80211softmac_handle_beacon(struct net_device *dev,
{
struct ieee80211softmac_device *mac = ieee80211_priv(dev);
- if (mac->associated && memcmp(network->bssid, mac->associnfo.bssid, ETH_ALEN) == 0)
- ieee80211softmac_process_erp(mac, network->erp_value);
+ /* This might race, but we don't really care and it's not worth
+ * adding heavyweight locking in this fastpath.
+ */
+ if (mac->associnfo.associated) {
+ if (memcmp(network->bssid, mac->associnfo.bssid, ETH_ALEN) == 0)
+ ieee80211softmac_process_erp(mac, network->erp_value);
+ }
return 0;
}