diff options
| -rw-r--r-- | include/net/cfg80211.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/nl80211.h | 5 | ||||
| -rw-r--r-- | net/mac80211/cfg.c | 1 | ||||
| -rw-r--r-- | net/wireless/nl80211.c | 6 |
4 files changed, 14 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index e2658e392a1f..9c23f4d33e06 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -780,6 +780,7 @@ enum station_parameters_apply_mask { | |||
| 780 | * (bitmask of BIT(NL80211_STA_FLAG_...)) | 780 | * (bitmask of BIT(NL80211_STA_FLAG_...)) |
| 781 | * @listen_interval: listen interval or -1 for no change | 781 | * @listen_interval: listen interval or -1 for no change |
| 782 | * @aid: AID or zero for no change | 782 | * @aid: AID or zero for no change |
| 783 | * @peer_aid: mesh peer AID or zero for no change | ||
| 783 | * @plink_action: plink action to take | 784 | * @plink_action: plink action to take |
| 784 | * @plink_state: set the peer link state for a station | 785 | * @plink_state: set the peer link state for a station |
| 785 | * @ht_capa: HT capabilities of station | 786 | * @ht_capa: HT capabilities of station |
| @@ -811,6 +812,7 @@ struct station_parameters { | |||
| 811 | u32 sta_modify_mask; | 812 | u32 sta_modify_mask; |
| 812 | int listen_interval; | 813 | int listen_interval; |
| 813 | u16 aid; | 814 | u16 aid; |
| 815 | u16 peer_aid; | ||
| 814 | u8 supported_rates_len; | 816 | u8 supported_rates_len; |
| 815 | u8 plink_action; | 817 | u8 plink_action; |
| 816 | u8 plink_state; | 818 | u8 plink_state; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index b39ccab45333..220694151434 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -1864,6 +1864,9 @@ enum nl80211_commands { | |||
| 1864 | * mandatory. If this flag is not set, the duration is the maximum duration | 1864 | * mandatory. If this flag is not set, the duration is the maximum duration |
| 1865 | * and the actual measurement duration may be shorter. | 1865 | * and the actual measurement duration may be shorter. |
| 1866 | * | 1866 | * |
| 1867 | * @NL80211_ATTR_MESH_PEER_AID: Association ID for the mesh peer (u16). This is | ||
| 1868 | * used to pull the stored data for mesh peer in power save state. | ||
| 1869 | * | ||
| 1867 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 1870 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 1868 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1871 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1869 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1872 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2256,6 +2259,8 @@ enum nl80211_attrs { | |||
| 2256 | NL80211_ATTR_MEASUREMENT_DURATION, | 2259 | NL80211_ATTR_MEASUREMENT_DURATION, |
| 2257 | NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY, | 2260 | NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY, |
| 2258 | 2261 | ||
| 2262 | NL80211_ATTR_MESH_PEER_AID, | ||
| 2263 | |||
| 2259 | /* add attributes here, update the policy in nl80211.c */ | 2264 | /* add attributes here, update the policy in nl80211.c */ |
| 2260 | 2265 | ||
| 2261 | __NL80211_ATTR_AFTER_LAST, | 2266 | __NL80211_ATTR_AFTER_LAST, |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0c12e4001f19..47e99ab8d97a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -997,6 +997,7 @@ static void sta_apply_mesh_params(struct ieee80211_local *local, | |||
| 997 | if (sta->mesh->plink_state != NL80211_PLINK_ESTAB) | 997 | if (sta->mesh->plink_state != NL80211_PLINK_ESTAB) |
| 998 | changed = mesh_plink_inc_estab_count(sdata); | 998 | changed = mesh_plink_inc_estab_count(sdata); |
| 999 | sta->mesh->plink_state = params->plink_state; | 999 | sta->mesh->plink_state = params->plink_state; |
| 1000 | sta->mesh->aid = params->peer_aid; | ||
| 1000 | 1001 | ||
| 1001 | ieee80211_mps_sta_status_update(sta); | 1002 | ieee80211_mps_sta_status_update(sta); |
| 1002 | changed |= ieee80211_mps_set_sta_local_pm(sta, | 1003 | changed |= ieee80211_mps_set_sta_local_pm(sta, |
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) | |||
| 4446 | nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]); | 4446 | nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]); |
| 4447 | if (params.plink_state >= NUM_NL80211_PLINK_STATES) | 4447 | if (params.plink_state >= NUM_NL80211_PLINK_STATES) |
| 4448 | return -EINVAL; | 4448 | return -EINVAL; |
| 4449 | if (info->attrs[NL80211_ATTR_MESH_PEER_AID]) { | ||
| 4450 | params.peer_aid = nla_get_u16( | ||
| 4451 | info->attrs[NL80211_ATTR_MESH_PEER_AID]); | ||
| 4452 | if (params.peer_aid > IEEE80211_MAX_AID) | ||
| 4453 | return -EINVAL; | ||
| 4454 | } | ||
| 4449 | params.sta_modify_mask |= STATION_PARAM_APPLY_PLINK_STATE; | 4455 | params.sta_modify_mask |= STATION_PARAM_APPLY_PLINK_STATE; |
| 4450 | } | 4456 | } |
| 4451 | 4457 | ||
