To save STAs VHT caps in AP mode
Unified · Split
| @@ -498,6 +498,7 @@ enum station_parameters_apply_mask { · 497 unmodified lines | ||
| 498 | 498 | * @plink_action: plink action to take |
| 499 | 499 | * @plink_state: set the peer link state for a station |
| 500 | 500 | * @ht_capa: HT capabilities of station |
| 501 | + * @vht_capa: VHT capabilities of station | |
| 501 | 502 | * @uapsd_queues: bitmap of queues configured for uapsd. same format |
| 502 | 503 | * as the AC bitmap in the QoS info field |
| 503 | 504 | * @max_sp: max Service Period. same format as the MAX_SP in the |
| @@ -517,6 +518,7 @@ struct station_parameters { · 13 unmodified lines | ||
| 517 | 518 | u8 plink_action; |
| 518 | 519 | u8 plink_state; |
| 519 | 520 | struct ieee80211_ht_cap *ht_capa; |
| 521 | + struct ieee80211_vht_cap *vht_capa; | |
| 520 | 522 | u8 uapsd_queues; |
| 521 | 523 | u8 max_sp; |
| 522 | 524 | }; |
| @@ -1276,6 +1276,9 @@ enum nl80211_commands { · 1275 unmodified lines | ||
| 1276 | 1276 | * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts |
| 1277 | 1277 | * with the Authentication transaction sequence number field. |
| 1278 | 1278 | * |
| 1279 | + * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from | |
| 1280 | + * association request when used with NL80211_CMD_NEW_STATION) | |
| 1281 | + * | |
| 1279 | 1282 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1280 | 1283 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1281 | 1284 | */ |
| @@ -1535,6 +1538,8 @@ enum nl80211_attrs { · 253 unmodified lines | ||
| 1535 | 1538 | |
| 1536 | 1539 | NL80211_ATTR_SAE_DATA, |
| 1537 | 1540 | |
| 1541 | + NL80211_ATTR_VHT_CAPABILITY, | |
| 1542 | + | |
| 1538 | 1543 | /* add attributes here, update the policy in nl80211.c */ |
| 1539 | 1544 | |
| 1540 | 1545 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1578,6 +1583,7 @@ enum nl80211_attrs { · 37 unmodified lines | ||
| 1578 | 1583 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 |
| 1579 | 1584 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
| 1580 | 1585 | #define NL80211_HT_CAPABILITY_LEN 26 |
| 1586 | +#define NL80211_VHT_CAPABILITY_LEN 12 | |
| 1581 | 1587 | |
| 1582 | 1588 | #define NL80211_MAX_NR_CIPHER_SUITES 5 |
| 1583 | 1589 | #define NL80211_MAX_NR_AKM_SUITES 2 |
| @@ -1157,6 +1157,11 @@ static int sta_apply_parameters(struct ieee80211_local *local, · 1156 unmodified lines | ||
| 1157 | 1157 | params->ht_capa, |
| 1158 | 1158 | &sta->sta.ht_cap); |
| 1159 | 1159 | |
| 1160 | + if (params->vht_capa) | |
| 1161 | + ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, | |
| 1162 | + params->vht_capa, | |
| 1163 | + &sta->sta.vht_cap); | |
| 1164 | + | |
| 1160 | 1165 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
| 1161 | 1166 | #ifdef CONFIG_MAC80211_MESH |
| 1162 | 1167 | if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED) |
| @@ -355,6 +355,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { · 354 unmodified lines | ||
| 355 | 355 | [NL80211_ATTR_WDEV] = { .type = NLA_U64 }, |
| 356 | 356 | [NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 }, |
| 357 | 357 | [NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, }, |
| 358 | + [NL80211_ATTR_VHT_CAPABILITY] = { .len = NL80211_VHT_CAPABILITY_LEN }, | |
| 358 | 359 | }; |
| 359 | 360 | |
| 360 | 361 | /* policy for the key attributes */ |
| @@ -3223,6 +3224,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) · 2862 unmodified lines | ||
| 3223 | 3224 | params.ht_capa = |
| 3224 | 3225 | nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]); |
| 3225 | 3226 | |
| 3227 | + if (info->attrs[NL80211_ATTR_VHT_CAPABILITY]) | |
| 3228 | + params.vht_capa = | |
| 3229 | + nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]); | |
| 3230 | + | |
| 3226 | 3231 | if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION]) |
| 3227 | 3232 | params.plink_action = |
| 3228 | 3233 | nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]); |