diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-01-07 08:39:02 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-07 08:39:16 -0500 |
commit | 3a4b0c948d286523ba062985c03487b55326eaae (patch) | |
tree | 8c61bbeb09f9d810d3132919c22e8effcc4e545c /net/wireless | |
parent | fa44b988d2da58334ecbcf3e00f9acccbdeace6c (diff) | |
parent | 1e359a5de861a57aa04d92bb620f52a5c1d7f8b1 (diff) |
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')
-rw-r--r-- | net/wireless/chan.c | 9 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 2 | ||||
-rw-r--r-- | net/wireless/reg.c | 20 |
3 files changed, 20 insertions, 11 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 85506f1d0789..7aaf7415dc4c 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
@@ -603,7 +603,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, | |||
603 | { | 603 | { |
604 | struct ieee80211_sta_ht_cap *ht_cap; | 604 | struct ieee80211_sta_ht_cap *ht_cap; |
605 | struct ieee80211_sta_vht_cap *vht_cap; | 605 | struct ieee80211_sta_vht_cap *vht_cap; |
606 | u32 width, control_freq; | 606 | u32 width, control_freq, cap; |
607 | 607 | ||
608 | if (WARN_ON(!cfg80211_chandef_valid(chandef))) | 608 | if (WARN_ON(!cfg80211_chandef_valid(chandef))) |
609 | return false; | 609 | return false; |
@@ -643,7 +643,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, | |||
643 | return false; | 643 | return false; |
644 | break; | 644 | break; |
645 | case NL80211_CHAN_WIDTH_80P80: | 645 | case NL80211_CHAN_WIDTH_80P80: |
646 | if (!(vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)) | 646 | cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK; |
647 | if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) | ||
647 | return false; | 648 | return false; |
648 | case NL80211_CHAN_WIDTH_80: | 649 | case NL80211_CHAN_WIDTH_80: |
649 | if (!vht_cap->vht_supported) | 650 | if (!vht_cap->vht_supported) |
@@ -654,7 +655,9 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, | |||
654 | case NL80211_CHAN_WIDTH_160: | 655 | case NL80211_CHAN_WIDTH_160: |
655 | if (!vht_cap->vht_supported) | 656 | if (!vht_cap->vht_supported) |
656 | return false; | 657 | return false; |
657 | if (!(vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)) | 658 | cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK; |
659 | if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && | ||
660 | cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) | ||
658 | return false; | 661 | return false; |
659 | prohibited_flags |= IEEE80211_CHAN_NO_160MHZ; | 662 | prohibited_flags |= IEEE80211_CHAN_NO_160MHZ; |
660 | width = 160; | 663 | width = 160; |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 049f505e5660..ad3e294acabe 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -6128,7 +6128,7 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
6128 | } | 6128 | } |
6129 | 6129 | ||
6130 | /* there was no other matchset, so the RSSI one is alone */ | 6130 | /* there was no other matchset, so the RSSI one is alone */ |
6131 | if (i == 0) | 6131 | if (i == 0 && n_match_sets) |
6132 | request->match_sets[0].rssi_thold = default_match_rssi; | 6132 | request->match_sets[0].rssi_thold = default_match_rssi; |
6133 | 6133 | ||
6134 | request->min_rssi_thold = INT_MAX; | 6134 | request->min_rssi_thold = INT_MAX; |
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) | |||
1552 | ret = cfg80211_reg_can_beacon(wiphy, | 1552 | ret = cfg80211_reg_can_beacon(wiphy, |
1553 | &wdev->chandef, wdev->iftype); | 1553 | &wdev->chandef, wdev->iftype); |
1554 | break; | 1554 | break; |
1555 | case NL80211_IFTYPE_ADHOC: | ||
1556 | if (!wdev->ssid_len) | ||
1557 | goto out; | ||
1558 | |||
1559 | ret = cfg80211_reg_can_beacon(wiphy, | ||
1560 | &wdev->chandef, wdev->iftype); | ||
1561 | break; | ||
1555 | case NL80211_IFTYPE_STATION: | 1562 | case NL80211_IFTYPE_STATION: |
1556 | case NL80211_IFTYPE_P2P_CLIENT: | 1563 | case NL80211_IFTYPE_P2P_CLIENT: |
1557 | case NL80211_IFTYPE_ADHOC: | ||
1558 | if (!wdev->current_bss || | 1564 | if (!wdev->current_bss || |
1559 | !wdev->current_bss->pub.channel) | 1565 | !wdev->current_bss->pub.channel) |
1560 | goto out; | 1566 | goto out; |
@@ -1920,7 +1926,7 @@ static enum reg_request_treatment | |||
1920 | reg_process_hint_driver(struct wiphy *wiphy, | 1926 | reg_process_hint_driver(struct wiphy *wiphy, |
1921 | struct regulatory_request *driver_request) | 1927 | struct regulatory_request *driver_request) |
1922 | { | 1928 | { |
1923 | const struct ieee80211_regdomain *regd; | 1929 | const struct ieee80211_regdomain *regd, *tmp; |
1924 | enum reg_request_treatment treatment; | 1930 | enum reg_request_treatment treatment; |
1925 | 1931 | ||
1926 | treatment = __reg_process_hint_driver(driver_request); | 1932 | treatment = __reg_process_hint_driver(driver_request); |
@@ -1940,7 +1946,10 @@ reg_process_hint_driver(struct wiphy *wiphy, | |||
1940 | reg_free_request(driver_request); | 1946 | reg_free_request(driver_request); |
1941 | return REG_REQ_IGNORE; | 1947 | return REG_REQ_IGNORE; |
1942 | } | 1948 | } |
1949 | |||
1950 | tmp = get_wiphy_regdom(wiphy); | ||
1943 | rcu_assign_pointer(wiphy->regd, regd); | 1951 | rcu_assign_pointer(wiphy->regd, regd); |
1952 | rcu_free_regdom(tmp); | ||
1944 | } | 1953 | } |
1945 | 1954 | ||
1946 | 1955 | ||
@@ -1999,11 +2008,8 @@ __reg_process_hint_country_ie(struct wiphy *wiphy, | |||
1999 | return REG_REQ_IGNORE; | 2008 | return REG_REQ_IGNORE; |
2000 | return REG_REQ_ALREADY_SET; | 2009 | return REG_REQ_ALREADY_SET; |
2001 | } | 2010 | } |
2002 | /* | 2011 | |
2003 | * Two consecutive Country IE hints on the same wiphy. | 2012 | if (regdom_changes(country_ie_request->alpha2)) |
2004 | * This should be picked up early by the driver/stack | ||
2005 | */ | ||
2006 | if (WARN_ON(regdom_changes(country_ie_request->alpha2))) | ||
2007 | return REG_REQ_OK; | 2013 | return REG_REQ_OK; |
2008 | return REG_REQ_ALREADY_SET; | 2014 | return REG_REQ_ALREADY_SET; |
2009 | } | 2015 | } |