summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-04-12 10:43:49 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-04-13 13:41:37 +0200
commitb0265024b8b5fb35d1e1a1da6be65399e33e122e (patch)
treea4e9c2969fbfc0a9f0aaf717aa3eec7691e40741 /net
parent30841f5cdeccd24c4a68b9df681b3ef11b0dda53 (diff)
downloadblackbird-op-linux-b0265024b8b5fb35d1e1a1da6be65399e33e122e.tar.gz
blackbird-op-linux-b0265024b8b5fb35d1e1a1da6be65399e33e122e.zip
cfg80211: allow leaving MU-MIMO monitor configuration unchanged
When changing monitor parameters, not setting the MU-MIMO attributes should mean that they're not changed - it's documented that to turn the feature off it's necessary to set all-zero group membership and an invalid follow-address. This isn't implemented. Fix this by making the parameters pointers, stop reusing the macaddr struct member, and documenting that NULL pointers mean unchanged. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c8
-rw-r--r--net/wireless/nl80211.c8
2 files changed, 7 insertions, 9 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8bc3d3669348..ef7de9eb94b1 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -80,8 +80,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
u32 mu_mntr_cap_flag = NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER;
monitor_sdata = rtnl_dereference(local->monitor_sdata);
- if (monitor_sdata &&
- wiphy_ext_feature_isset(wiphy, mu_mntr_cap_flag)) {
+ if (monitor_sdata && params->vht_mumimo_groups) {
memcpy(monitor_sdata->vif.bss_conf.mu_group.membership,
params->vht_mumimo_groups, WLAN_MEMBERSHIP_LEN);
memcpy(monitor_sdata->vif.bss_conf.mu_group.position,
@@ -90,10 +89,11 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
monitor_sdata->vif.mu_mimo_owner = true;
ieee80211_bss_info_change_notify(monitor_sdata,
BSS_CHANGED_MU_GROUPS);
+ }
+ if (monitor_sdata && params->vht_mumimo_follow_addr)
ether_addr_copy(monitor_sdata->u.mntr.mu_follow_addr,
- params->macaddr);
- }
+ params->vht_mumimo_follow_addr);
if (!flags)
return 0;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9910aae08f1a..5cdb0f9b0168 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2832,8 +2832,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
(mumimo_groups[VHT_MUMIMO_GROUPS_DATA_LEN - 1] & BIT(0)))
return -EINVAL;
- memcpy(params.vht_mumimo_groups, mumimo_groups,
- VHT_MUMIMO_GROUPS_DATA_LEN);
+ params.vht_mumimo_groups = mumimo_groups;
change = true;
}
@@ -2843,9 +2842,8 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
if (!wiphy_ext_feature_isset(&rdev->wiphy, cap_flag))
return -EOPNOTSUPP;
- nla_memcpy(params.macaddr,
- info->attrs[NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR],
- ETH_ALEN);
+ params.vht_mumimo_follow_addr =
+ nla_data(info->attrs[NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR]);
change = true;
}
OpenPOWER on IntegriCloud