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
498498 * @plink_action: plink action to take
499499 * @plink_state: set the peer link state for a station
500500 * @ht_capa: HT capabilities of station
501+ * @vht_capa: VHT capabilities of station
501502 * @uapsd_queues: bitmap of queues configured for uapsd. same format
502503 * as the AC bitmap in the QoS info field
503504 * @max_sp: max Service Period. same format as the MAX_SP in the
@@ -517,6 +518,7 @@ struct station_parameters { · 13 unmodified lines
517518 u8 plink_action;
518519 u8 plink_state;
519520 struct ieee80211_ht_cap *ht_capa;
521+ struct ieee80211_vht_cap *vht_capa;
520522 u8 uapsd_queues;
521523 u8 max_sp;
522524 };
include/uapi/linux/nl80211.h+6−0
@@ -1276,6 +1276,9 @@ enum nl80211_commands { · 1275 unmodified lines
12761276 * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
12771277 * with the Authentication transaction sequence number field.
12781278 *
1279+ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
1280+ * association request when used with NL80211_CMD_NEW_STATION)
1281+ *
12791282 * @NL80211_ATTR_MAX: highest attribute number currently defined
12801283 * @__NL80211_ATTR_AFTER_LAST: internal use
12811284 */
@@ -1535,6 +1538,8 @@ enum nl80211_attrs { · 253 unmodified lines
15351538
15361539 NL80211_ATTR_SAE_DATA,
15371540
1541+ NL80211_ATTR_VHT_CAPABILITY,
1542+
15381543 /* add attributes here, update the policy in nl80211.c */
15391544
15401545 __NL80211_ATTR_AFTER_LAST,
@@ -1578,6 +1583,7 @@ enum nl80211_attrs { · 37 unmodified lines
15781583 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
15791584 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
15801585 #define NL80211_HT_CAPABILITY_LEN 26
1586+#define NL80211_VHT_CAPABILITY_LEN 12
15811587
15821588 #define NL80211_MAX_NR_CIPHER_SUITES 5
15831589 #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
11571157 params->ht_capa,
11581158 &sta->sta.ht_cap);
11591159
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+
11601165 if (ieee80211_vif_is_mesh(&sdata->vif)) {
11611166 #ifdef CONFIG_MAC80211_MESH
11621167 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
355355 [NL80211_ATTR_WDEV] = { .type = NLA_U64 },
356356 [NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },
357357 [NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, },
358+ [NL80211_ATTR_VHT_CAPABILITY] = { .len = NL80211_VHT_CAPABILITY_LEN },
358359 };
359360
360361 /* 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
32233224 params.ht_capa =
32243225 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
32253226
3227+ if (info->attrs[NL80211_ATTR_VHT_CAPABILITY])
3228+ params.vht_capa =
3229+ nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]);
3230+
32263231 if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
32273232 params.plink_action =
32283233 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);