{nl,cfg}80211: Peer STA VHT caps
To save STAs VHT caps in AP mode Change-Id: I1930ec05a3e079733c00837c93bda615289fceda CRs-fixed: 452921 Signed-off-by: Mahesh Palivela <maheshp@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Iliyan Malchev
parent
0ad86a6a16
commit
b672fbac86
@@ -1221,6 +1221,22 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds
|
||||
* or 0 to disable background scan.
|
||||
*
|
||||
* @NL80211_ATTR_USER_REG_HINT_TYPE: type of regulatory hint passed from
|
||||
* userspace. If unset it is assumed the hint comes directly from
|
||||
* a user. If set code could specify exactly what type of source
|
||||
* was used to provide the hint. For the different types of
|
||||
* allowed user regulatory hints see nl80211_user_reg_hint_type.
|
||||
*
|
||||
* @NL80211_ATTR_CONN_FAILED_REASON: The reason for which AP has rejected
|
||||
* the connection request from a station. nl80211_connect_failed_reason
|
||||
* enum has different reasons of connection failure.
|
||||
*
|
||||
* @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
|
||||
* with the Authentication transaction sequence number field.
|
||||
*
|
||||
* @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
|
||||
* association request when used with NL80211_CMD_NEW_STATION)
|
||||
*
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1472,6 +1488,16 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_BG_SCAN_PERIOD,
|
||||
|
||||
NL80211_ATTR_WDEV,
|
||||
|
||||
NL80211_ATTR_USER_REG_HINT_TYPE,
|
||||
|
||||
NL80211_ATTR_CONN_FAILED_REASON,
|
||||
|
||||
NL80211_ATTR_SAE_DATA,
|
||||
|
||||
NL80211_ATTR_VHT_CAPABILITY,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -1515,6 +1541,7 @@ enum nl80211_attrs {
|
||||
#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
|
||||
#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
|
||||
#define NL80211_HT_CAPABILITY_LEN 26
|
||||
#define NL80211_VHT_CAPABILITY_LEN 12
|
||||
|
||||
#define NL80211_MAX_NR_CIPHER_SUITES 5
|
||||
#define NL80211_MAX_NR_AKM_SUITES 2
|
||||
|
||||
@@ -488,6 +488,7 @@ enum station_parameters_apply_mask {
|
||||
* @plink_action: plink action to take
|
||||
* @plink_state: set the peer link state for a station
|
||||
* @ht_capa: HT capabilities of station
|
||||
* @vht_capa: VHT capabilities of station
|
||||
* @uapsd_queues: bitmap of queues configured for uapsd. same format
|
||||
* as the AC bitmap in the QoS info field
|
||||
* @max_sp: max Service Period. same format as the MAX_SP in the
|
||||
@@ -507,6 +508,7 @@ struct station_parameters {
|
||||
u8 plink_action;
|
||||
u8 plink_state;
|
||||
struct ieee80211_ht_cap *ht_capa;
|
||||
struct ieee80211_vht_cap *vht_capa;
|
||||
u8 uapsd_queues;
|
||||
u8 max_sp;
|
||||
};
|
||||
|
||||
@@ -206,6 +206,10 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
|
||||
[NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 },
|
||||
[NL80211_ATTR_INACTIVITY_TIMEOUT] = { .type = NLA_U16 },
|
||||
[NL80211_ATTR_BG_SCAN_PERIOD] = { .type = NLA_U16 },
|
||||
[NL80211_ATTR_WDEV] = { .type = NLA_U64 },
|
||||
[NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, },
|
||||
[NL80211_ATTR_VHT_CAPABILITY] = { .len = NL80211_VHT_CAPABILITY_LEN },
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -2831,6 +2835,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
||||
params.ht_capa =
|
||||
nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
|
||||
|
||||
if (info->attrs[NL80211_ATTR_VHT_CAPABILITY])
|
||||
params.vht_capa =
|
||||
nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]);
|
||||
|
||||
if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
|
||||
params.plink_action =
|
||||
nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);
|
||||
|
||||
Reference in New Issue
Block a user