aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/ibss.c
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2013-09-26 11:55:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-12 22:05:31 -0500
commite83301f88258e3f204392cf59b0ffd706a051a26 (patch)
tree55428113c5fd1b0cd7f9f5f42b2de804f075a7f8 /net/wireless/ibss.c
parentfc756d89ff073a9c7fb8e4788fa63705d3d8f2a2 (diff)
cfg80211: fix warning when using WEXT for IBSS
commit f478f33a93f9353dcd1fe55445343d76b1c3f84a upstream. Fix kernel warning when using WEXT for configuring ad-hoc mode, e.g. "iwconfig wlan0 essid test channel 1" WARNING: at net/wireless/chan.c:373 cfg80211_chandef_usable+0x50/0x21c [cfg80211]() The warning is caused by an uninitialized variable center_freq1. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r--net/wireless/ibss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index d80e47194d49..e62c1ad4e4c9 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -269,6 +269,8 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
269 if (chan->flags & IEEE80211_CHAN_DISABLED) 269 if (chan->flags & IEEE80211_CHAN_DISABLED)
270 continue; 270 continue;
271 wdev->wext.ibss.chandef.chan = chan; 271 wdev->wext.ibss.chandef.chan = chan;
272 wdev->wext.ibss.chandef.center_freq1 =
273 chan->center_freq;
272 break; 274 break;
273 } 275 }
274 276
@@ -353,6 +355,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
353 if (chan) { 355 if (chan) {
354 wdev->wext.ibss.chandef.chan = chan; 356 wdev->wext.ibss.chandef.chan = chan;
355 wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; 357 wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
358 wdev->wext.ibss.chandef.center_freq1 = freq;
356 wdev->wext.ibss.channel_fixed = true; 359 wdev->wext.ibss.channel_fixed = true;
357 } else { 360 } else {
358 /* cfg80211_ibss_wext_join will pick one if needed */ 361 /* cfg80211_ibss_wext_join will pick one if needed */