diff options
author | Sara Sharon <sara.sharon@intel.com> | 2019-01-16 16:03:25 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-08 07:56:37 -0500 |
commit | caf56338c22f00098bf2acd646b0ddc691c80c24 (patch) | |
tree | b86354b7e9976e1cfbaa0e269176af1515ba8f4d /net | |
parent | 78ac51f81532c1e361a31ac112c1fea470ea9036 (diff) |
mac80211: indicate support for multiple BSSID
Set multi-bssid support flags according to driver support.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs.c | 4 | ||||
-rw-r--r-- | net/mac80211/main.c | 13 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 15 |
3 files changed, 30 insertions, 2 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 343ad0a915e4..2d43bc127043 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> | 4 | * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> |
5 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 5 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
6 | * Copyright (C) 2018 Intel Corporation | 6 | * Copyright (C) 2018 - 2019 Intel Corporation |
7 | * | 7 | * |
8 | * GPLv2 | 8 | * GPLv2 |
9 | * | 9 | * |
@@ -219,6 +219,8 @@ static const char *hw_flag_names[] = { | |||
219 | FLAG(SUPPORTS_VHT_EXT_NSS_BW), | 219 | FLAG(SUPPORTS_VHT_EXT_NSS_BW), |
220 | FLAG(STA_MMPDU_TXQ), | 220 | FLAG(STA_MMPDU_TXQ), |
221 | FLAG(TX_STATUS_NO_AMPDU_LEN), | 221 | FLAG(TX_STATUS_NO_AMPDU_LEN), |
222 | FLAG(SUPPORTS_MULTI_BSSID), | ||
223 | FLAG(SUPPORTS_ONLY_HE_MULTI_BSSID), | ||
222 | #undef FLAG | 224 | #undef FLAG |
223 | }; | 225 | }; |
224 | 226 | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 71005b6dfcd1..5055aeba5c5a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
5 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 5 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
6 | * Copyright (C) 2017 Intel Deutschland GmbH | 6 | * Copyright (C) 2017 Intel Deutschland GmbH |
7 | * Copyright (C) 2018 Intel Corporation | 7 | * Copyright (C) 2018 - 2019 Intel Corporation |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -1112,6 +1112,17 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
1112 | if (ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA)) | 1112 | if (ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA)) |
1113 | local->ext_capa[0] |= WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING; | 1113 | local->ext_capa[0] |= WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING; |
1114 | 1114 | ||
1115 | /* mac80211 supports multi BSSID, if the driver supports it */ | ||
1116 | if (ieee80211_hw_check(&local->hw, SUPPORTS_MULTI_BSSID)) { | ||
1117 | local->hw.wiphy->support_mbssid = true; | ||
1118 | if (ieee80211_hw_check(&local->hw, | ||
1119 | SUPPORTS_ONLY_HE_MULTI_BSSID)) | ||
1120 | local->hw.wiphy->support_only_he_mbssid = true; | ||
1121 | else | ||
1122 | local->ext_capa[2] |= | ||
1123 | WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT; | ||
1124 | } | ||
1125 | |||
1115 | local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CSA_COUNTERS_NUM; | 1126 | local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CSA_COUNTERS_NUM; |
1116 | 1127 | ||
1117 | result = wiphy_register(local->hw.wiphy); | 1128 | result = wiphy_register(local->hw.wiphy); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 64b6ddb67456..a49fbb3f3ed7 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -813,6 +813,21 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
813 | } | 813 | } |
814 | } | 814 | } |
815 | 815 | ||
816 | /* Set MBSSID support for HE AP if needed */ | ||
817 | if (ieee80211_hw_check(&local->hw, SUPPORTS_ONLY_HE_MULTI_BSSID) && | ||
818 | !(ifmgd->flags & IEEE80211_STA_DISABLE_HE) && assoc_data->ie_len) { | ||
819 | struct element *elem; | ||
820 | |||
821 | /* we know it's writable, cast away the const */ | ||
822 | elem = (void *)cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, | ||
823 | assoc_data->ie, | ||
824 | assoc_data->ie_len); | ||
825 | |||
826 | /* We can probably assume both always true */ | ||
827 | if (elem && elem->datalen >= 3) | ||
828 | elem->data[2] |= WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT; | ||
829 | } | ||
830 | |||
816 | /* if present, add any custom IEs that go before HT */ | 831 | /* if present, add any custom IEs that go before HT */ |
817 | if (assoc_data->ie_len) { | 832 | if (assoc_data->ie_len) { |
818 | static const u8 before_ht[] = { | 833 | static const u8 before_ht[] = { |