Skip to contentSkip to conversation

mac80211: Don't access managed mode bits in non-managed mode

PATCH New Vasanthakumar Thiagarajan 1 participant 1 message Mar 27, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Don't access managed mode bits in non-managed mode

This fixes a stupid bug introduced in 25f85c31d4f..

---
 net/mac80211/wext.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/wext.c +1 -1
index deb4ece..8a2d5b1 100644
@@ -650,7 +650,7 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
 		!sdata->default_key,
 		keybuf, erq->length);
 
-	if (!ret) {
+	if (!ret && sdata->vif.type == NL80211_IFTYPE_STATION) {
 		if (remove)
 			sdata->u.mgd.flags &= ~IEEE80211_STA_TKIP_WEP_USED;
 		else
Signature · 1 line
1.5.5.1