diff options
author | Arend van Spriel <arend@broadcom.com> | 2016-03-02 20:37:18 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-04-05 10:56:34 +0200 |
commit | 38de03d2a28925b489c11546804e2f5418cc17a4 (patch) | |
tree | dd54c49467ce3993f5e916862de528df873e984b /net/wireless/core.c | |
parent | f59374eb427fb1377fdb7b8b3691c48e0c77a3c4 (diff) | |
download | op-kernel-dev-38de03d2a28925b489c11546804e2f5418cc17a4.zip op-kernel-dev-38de03d2a28925b489c11546804e2f5418cc17a4.tar.gz |
nl80211: add feature for BSS selection support
Introducing a new feature that the driver can use to
indicate the driver/firmware supports configuration of BSS
selection criteria upon CONNECT command. This can be useful
when multiple BSS-es are found belonging to the same ESS,
ie. Infra-BSS with same SSID. The criteria can then be used to
offload selection of a preferred BSS.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Lei Zhang <leizh@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
[move wiphy support check into parse_bss_select()]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 9f1c4aa..5327e4b 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -626,6 +626,13 @@ int wiphy_register(struct wiphy *wiphy) !rdev->ops->set_mac_acl))) return -EINVAL; + /* assure only valid behaviours are flagged by driver + * hence subtract 2 as bit 0 is invalid. + */ + if (WARN_ON(wiphy->bss_select_support && + (wiphy->bss_select_support & ~(BIT(__NL80211_BSS_SELECT_ATTR_AFTER_LAST) - 2)))) + return -EINVAL; + if (wiphy->addresses) memcpy(wiphy->perm_addr, wiphy->addresses[0].addr, ETH_ALEN); |