Skip to contentSkip to conversation

cfg80211: fix warning when using WEXT for IBSS

PATCH Applied Bruno Randolf 2 participants 2 messages Sep 26, 2013 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfg80211: fix warning when using WEXT for IBSS

Fix kernel warning when using WEXT for configuring ad-hoc mode, e.g. "iwconfig wlan0 essid test channel 1"

[ 1003.460000] WARNING: at net/wireless/chan.c:373

cfg80211_chandef_usable+0x50/0x21c [cfg80211]()

The warning is caused by an uninitialized variable center_freq1.

---
 net/wireless/ibss.c | 2 ++
 1 file changed, 2 insertions(+)
net/wireless/ibss.c +2 -0
index 39bff7d..a096e2c 100644
@@ -263,6 +263,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
 				if (chan->flags & IEEE80211_CHAN_DISABLED)
 					continue;
 				wdev->wext.ibss.chandef.chan = chan;
+				wdev->wext.ibss.chandef.center_freq1 = chan->center_freq;
 				break;
 			}
 
@@ -347,6 +348,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
 	if (chan) {
 		wdev->wext.ibss.chandef.chan = chan;
 		wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
+		wdev->wext.ibss.chandef.center_freq1 = freq;
 		wdev->wext.ibss.channel_fixed = true;
 	} else {
 		/* cfg80211_ibss_wext_join will pick one if needed */
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 7 lines · Bruno Randolf

Fix kernel warning when using WEXT for configuring ad-hoc mode, e.g. "iwconfig wlan0 essid test channel 1"

[ 1003.460000] WARNING: at net/wireless/chan.c:373

cfg80211_chandef_usable+0x50/0x21c [cfg80211]()

The warning is caused by an uninitialized variable center_freq1.

Applied.

johannes