summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2016-07-01 10:19:34 +0900
committerJohannes Berg <johannes.berg@intel.com>2016-07-06 15:04:52 +0200
commit7d27a0ba7adc8ef30c2aae7592fce4c162aee4df (patch)
tree812a316e526787def38a11a74c99f009006ba008 /net/wireless
parent92b3a28a2b4b2fb777b64f0891a4d3388f617c15 (diff)
cfg80211: Add mesh peer AID setting API
Previously, mesh power management functionality works only with kernel MPM. Because user space MPM did not report mesh peer AID to kernel, the kernel could not identify the bit in TIM element. So this patch adds mesh peer AID setting API. Signed-off-by: Masashi Honma <masashi.honma@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c53b5462ed00..5782f718d567 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4446,6 +4446,12 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]);
if (params.plink_state >= NUM_NL80211_PLINK_STATES)
return -EINVAL;
+ if (info->attrs[NL80211_ATTR_MESH_PEER_AID]) {
+ params.peer_aid = nla_get_u16(
+ info->attrs[NL80211_ATTR_MESH_PEER_AID]);
+ if (params.peer_aid > IEEE80211_MAX_AID)
+ return -EINVAL;
+ }
params.sta_modify_mask |= STATION_PARAM_APPLY_PLINK_STATE;
}