diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-01-07 14:39:02 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-07 14:39:16 +0100 |
commit | 3a4b0c948d286523ba062985c03487b55326eaae (patch) | |
tree | 8c61bbeb09f9d810d3132919c22e8effcc4e545c /net/wireless/reg.c | |
parent | fa44b988d2da58334ecbcf3e00f9acccbdeace6c (diff) | |
parent | 1e359a5de861a57aa04d92bb620f52a5c1d7f8b1 (diff) | |
download | linux-3a4b0c948d286523ba062985c03487b55326eaae.tar.gz linux-3a4b0c948d286523ba062985c03487b55326eaae.tar.bz2 linux-3a4b0c948d286523ba062985c03487b55326eaae.zip |
Merge branch 'mac80211' into mac80211-next
Merge mac80211.git to get some changes that would otherwise
cause conflicts with new changes coming here.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 9a5411cdf5e8..8d232b904210 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1552,9 +1552,15 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev) ret = cfg80211_reg_can_beacon(wiphy, &wdev->chandef, wdev->iftype); break; + case NL80211_IFTYPE_ADHOC: + if (!wdev->ssid_len) + goto out; + + ret = cfg80211_reg_can_beacon(wiphy, + &wdev->chandef, wdev->iftype); + break; case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_P2P_CLIENT: - case NL80211_IFTYPE_ADHOC: if (!wdev->current_bss || !wdev->current_bss->pub.channel) goto out; @@ -1920,7 +1926,7 @@ static enum reg_request_treatment reg_process_hint_driver(struct wiphy *wiphy, struct regulatory_request *driver_request) { - const struct ieee80211_regdomain *regd; + const struct ieee80211_regdomain *regd, *tmp; enum reg_request_treatment treatment; treatment = __reg_process_hint_driver(driver_request); @@ -1940,7 +1946,10 @@ reg_process_hint_driver(struct wiphy *wiphy, reg_free_request(driver_request); return REG_REQ_IGNORE; } + + tmp = get_wiphy_regdom(wiphy); rcu_assign_pointer(wiphy->regd, regd); + rcu_free_regdom(tmp); } @@ -1999,11 +2008,8 @@ __reg_process_hint_country_ie(struct wiphy *wiphy, return REG_REQ_IGNORE; return REG_REQ_ALREADY_SET; } - /* - * Two consecutive Country IE hints on the same wiphy. - * This should be picked up early by the driver/stack - */ - if (WARN_ON(regdom_changes(country_ie_request->alpha2))) + + if (regdom_changes(country_ie_request->alpha2)) return REG_REQ_OK; return REG_REQ_ALREADY_SET; } |