diff options
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r-- | net/wireless/ibss.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 27941d5db72..9b9551e4a6f 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -100,9 +100,9 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, | |||
100 | * 11a for maximum compatibility. | 100 | * 11a for maximum compatibility. |
101 | */ | 101 | */ |
102 | struct ieee80211_supported_band *sband = | 102 | struct ieee80211_supported_band *sband = |
103 | rdev->wiphy.bands[params->channel->band]; | 103 | rdev->wiphy.bands[params->chandef.chan->band]; |
104 | int j; | 104 | int j; |
105 | u32 flag = params->channel->band == IEEE80211_BAND_5GHZ ? | 105 | u32 flag = params->chandef.chan->band == IEEE80211_BAND_5GHZ ? |
106 | IEEE80211_RATE_MANDATORY_A : | 106 | IEEE80211_RATE_MANDATORY_A : |
107 | IEEE80211_RATE_MANDATORY_B; | 107 | IEEE80211_RATE_MANDATORY_B; |
108 | 108 | ||
@@ -118,11 +118,11 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, | |||
118 | 118 | ||
119 | wdev->ibss_fixed = params->channel_fixed; | 119 | wdev->ibss_fixed = params->channel_fixed; |
120 | #ifdef CONFIG_CFG80211_WEXT | 120 | #ifdef CONFIG_CFG80211_WEXT |
121 | wdev->wext.ibss.channel = params->channel; | 121 | wdev->wext.ibss.chandef = params->chandef; |
122 | #endif | 122 | #endif |
123 | wdev->sme_state = CFG80211_SME_CONNECTING; | 123 | wdev->sme_state = CFG80211_SME_CONNECTING; |
124 | 124 | ||
125 | err = cfg80211_can_use_chan(rdev, wdev, params->channel, | 125 | err = cfg80211_can_use_chan(rdev, wdev, params->chandef.chan, |
126 | params->channel_fixed | 126 | params->channel_fixed |
127 | ? CHAN_MODE_SHARED | 127 | ? CHAN_MODE_SHARED |
128 | : CHAN_MODE_EXCLUSIVE); | 128 | : CHAN_MODE_EXCLUSIVE); |
@@ -251,7 +251,9 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | |||
251 | wdev->wext.ibss.beacon_interval = 100; | 251 | wdev->wext.ibss.beacon_interval = 100; |
252 | 252 | ||
253 | /* try to find an IBSS channel if none requested ... */ | 253 | /* try to find an IBSS channel if none requested ... */ |
254 | if (!wdev->wext.ibss.channel) { | 254 | if (!wdev->wext.ibss.chandef.chan) { |
255 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; | ||
256 | |||
255 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 257 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { |
256 | struct ieee80211_supported_band *sband; | 258 | struct ieee80211_supported_band *sband; |
257 | struct ieee80211_channel *chan; | 259 | struct ieee80211_channel *chan; |
@@ -266,15 +268,15 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | |||
266 | continue; | 268 | continue; |
267 | if (chan->flags & IEEE80211_CHAN_DISABLED) | 269 | if (chan->flags & IEEE80211_CHAN_DISABLED) |
268 | continue; | 270 | continue; |
269 | wdev->wext.ibss.channel = chan; | 271 | wdev->wext.ibss.chandef.chan = chan; |
270 | break; | 272 | break; |
271 | } | 273 | } |
272 | 274 | ||
273 | if (wdev->wext.ibss.channel) | 275 | if (wdev->wext.ibss.chandef.chan) |
274 | break; | 276 | break; |
275 | } | 277 | } |
276 | 278 | ||
277 | if (!wdev->wext.ibss.channel) | 279 | if (!wdev->wext.ibss.chandef.chan) |
278 | return -EINVAL; | 280 | return -EINVAL; |
279 | } | 281 | } |
280 | 282 | ||
@@ -336,7 +338,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | |||
336 | return -EINVAL; | 338 | return -EINVAL; |
337 | } | 339 | } |
338 | 340 | ||
339 | if (wdev->wext.ibss.channel == chan) | 341 | if (wdev->wext.ibss.chandef.chan == chan) |
340 | return 0; | 342 | return 0; |
341 | 343 | ||
342 | wdev_lock(wdev); | 344 | wdev_lock(wdev); |
@@ -349,7 +351,8 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | |||
349 | return err; | 351 | return err; |
350 | 352 | ||
351 | if (chan) { | 353 | if (chan) { |
352 | wdev->wext.ibss.channel = chan; | 354 | wdev->wext.ibss.chandef.chan = chan; |
355 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; | ||
353 | wdev->wext.ibss.channel_fixed = true; | 356 | wdev->wext.ibss.channel_fixed = true; |
354 | } else { | 357 | } else { |
355 | /* cfg80211_ibss_wext_join will pick one if needed */ | 358 | /* cfg80211_ibss_wext_join will pick one if needed */ |
@@ -379,8 +382,8 @@ int cfg80211_ibss_wext_giwfreq(struct net_device *dev, | |||
379 | wdev_lock(wdev); | 382 | wdev_lock(wdev); |
380 | if (wdev->current_bss) | 383 | if (wdev->current_bss) |
381 | chan = wdev->current_bss->pub.channel; | 384 | chan = wdev->current_bss->pub.channel; |
382 | else if (wdev->wext.ibss.channel) | 385 | else if (wdev->wext.ibss.chandef.chan) |
383 | chan = wdev->wext.ibss.channel; | 386 | chan = wdev->wext.ibss.chandef.chan; |
384 | wdev_unlock(wdev); | 387 | wdev_unlock(wdev); |
385 | 388 | ||
386 | if (chan) { | 389 | if (chan) { |