History

{nl,cfg}80211: Peer STA VHT caps

To save STAs VHT caps in AP mode

Mahesh Palivela committed 14 years ago

Commit f461be31 parent 818255e4 files · +18 −0Browse files

Unified · Split

4 files
  1. include/net/cfg80211.h +2 −0
  2. include/uapi/linux/nl80211.h +6 −0
  3. net/mac80211/cfg.c +5 −0
  4. net/wireless/nl80211.c +5 −0
include/net/cfg80211.h+2−0
@@ -498,6 +498,7 @@ enum station_parameters_apply_mask { · 497 unmodified lines
498 * @plink_action: plink action to take498 * @plink_action: plink action to take
499 * @plink_state: set the peer link state for a station499 * @plink_state: set the peer link state for a station
500 * @ht_capa: HT capabilities of station500 * @ht_capa: HT capabilities of station
501 * @vht_capa: VHT capabilities of station
501 * @uapsd_queues: bitmap of queues configured for uapsd. same format502 * @uapsd_queues: bitmap of queues configured for uapsd. same format
502 * as the AC bitmap in the QoS info field503 * as the AC bitmap in the QoS info field
503 * @max_sp: max Service Period. same format as the MAX_SP in the504 * @max_sp: max Service Period. same format as the MAX_SP in the
@@ -517,6 +518,7 @@ struct station_parameters { · 13 unmodified lines
517 u8 plink_action;518 u8 plink_action;
518 u8 plink_state;519 u8 plink_state;
519 struct ieee80211_ht_cap *ht_capa;520 struct ieee80211_ht_cap *ht_capa;
521 struct ieee80211_vht_cap *vht_capa;
520 u8 uapsd_queues;522 u8 uapsd_queues;
521 u8 max_sp;523 u8 max_sp;
522};524};
include/uapi/linux/nl80211.h+6−0
@@ -1276,6 +1276,9 @@ enum nl80211_commands { · 1275 unmodified lines
1276 * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts1276 * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
1277 * with the Authentication transaction sequence number field.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 * @NL80211_ATTR_MAX: highest attribute number currently defined1282 * @NL80211_ATTR_MAX: highest attribute number currently defined
1280 * @__NL80211_ATTR_AFTER_LAST: internal use1283 * @__NL80211_ATTR_AFTER_LAST: internal use
1281 */1284 */
@@ -1535,6 +1538,8 @@ enum nl80211_attrs { · 253 unmodified lines
1535 1538
1536 NL80211_ATTR_SAE_DATA,1539 NL80211_ATTR_SAE_DATA,
1537 1540
1541 NL80211_ATTR_VHT_CAPABILITY,
1542
1538 /* add attributes here, update the policy in nl80211.c */1543 /* add attributes here, update the policy in nl80211.c */
1539 1544
1540 __NL80211_ATTR_AFTER_LAST,1545 __NL80211_ATTR_AFTER_LAST,
@@ -1578,6 +1583,7 @@ enum nl80211_attrs { · 37 unmodified lines
1578#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 161583#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
1579#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 241584#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
1580#define NL80211_HT_CAPABILITY_LEN 261585#define NL80211_HT_CAPABILITY_LEN 26
1586#define NL80211_VHT_CAPABILITY_LEN 12
1581 1587
1582#define NL80211_MAX_NR_CIPHER_SUITES 51588#define NL80211_MAX_NR_CIPHER_SUITES 5
1583#define NL80211_MAX_NR_AKM_SUITES 21589#define NL80211_MAX_NR_AKM_SUITES 2
net/mac80211/cfg.c+5−0
@@ -1157,6 +1157,11 @@ static int sta_apply_parameters(struct ieee80211_local *local, · 1156 unmodified lines
1157 params->ht_capa,1157 params->ht_capa,
1158 &sta->sta.ht_cap);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 if (ieee80211_vif_is_mesh(&sdata->vif)) {1165 if (ieee80211_vif_is_mesh(&sdata->vif)) {
1161#ifdef CONFIG_MAC80211_MESH1166#ifdef CONFIG_MAC80211_MESH
1162 if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)1167 if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
net/wireless/nl80211.c+5−0
@@ -355,6 +355,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { · 354 unmodified lines
355 [NL80211_ATTR_WDEV] = { .type = NLA_U64 },355 [NL80211_ATTR_WDEV] = { .type = NLA_U64 },
356 [NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },356 [NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },
357 [NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, },357 [NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, },
358 [NL80211_ATTR_VHT_CAPABILITY] = { .len = NL80211_VHT_CAPABILITY_LEN },
358};359};
359 360
360/* policy for the key attributes */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 params.ht_capa =3224 params.ht_capa =
3224 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);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 if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])3231 if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
3227 params.plink_action =3232 params.plink_action =
3228 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);3233 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);