diff options
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 35e4f94d7ba1..741445e498b0 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -262,7 +262,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
262 | /* make a copy of the chandef, it could be modified below. */ | 262 | /* make a copy of the chandef, it could be modified below. */ |
263 | chandef = *req_chandef; | 263 | chandef = *req_chandef; |
264 | chan = chandef.chan; | 264 | chan = chandef.chan; |
265 | if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) { | 265 | if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef, |
266 | NL80211_IFTYPE_ADHOC)) { | ||
266 | if (chandef.width == NL80211_CHAN_WIDTH_5 || | 267 | if (chandef.width == NL80211_CHAN_WIDTH_5 || |
267 | chandef.width == NL80211_CHAN_WIDTH_10 || | 268 | chandef.width == NL80211_CHAN_WIDTH_10 || |
268 | chandef.width == NL80211_CHAN_WIDTH_20_NOHT || | 269 | chandef.width == NL80211_CHAN_WIDTH_20_NOHT || |
@@ -274,7 +275,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
274 | chandef.width = NL80211_CHAN_WIDTH_20; | 275 | chandef.width = NL80211_CHAN_WIDTH_20; |
275 | chandef.center_freq1 = chan->center_freq; | 276 | chandef.center_freq1 = chan->center_freq; |
276 | /* check again for downgraded chandef */ | 277 | /* check again for downgraded chandef */ |
277 | if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) { | 278 | if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef, |
279 | NL80211_IFTYPE_ADHOC)) { | ||
278 | sdata_info(sdata, | 280 | sdata_info(sdata, |
279 | "Failed to join IBSS, beacons forbidden\n"); | 281 | "Failed to join IBSS, beacons forbidden\n"); |
280 | return; | 282 | return; |
@@ -861,7 +863,8 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
861 | goto disconnect; | 863 | goto disconnect; |
862 | } | 864 | } |
863 | 865 | ||
864 | if (!cfg80211_reg_can_beacon(sdata->local->hw.wiphy, ¶ms.chandef)) { | 866 | if (!cfg80211_reg_can_beacon(sdata->local->hw.wiphy, ¶ms.chandef, |
867 | NL80211_IFTYPE_ADHOC)) { | ||
865 | sdata_info(sdata, | 868 | sdata_info(sdata, |
866 | "IBSS %pM switches to unsupported channel (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n", | 869 | "IBSS %pM switches to unsupported channel (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n", |
867 | ifibss->bssid, | 870 | ifibss->bssid, |