mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
Some relatively small changes:
* typo fixes in docs * APIs for station separation using VLAN tags rather than separate wifi netdevs * some preparations for upcoming features (802.3 offload and airtime queue limits (AQL) * stack reduction in ieee80211_assoc_success() * use DEFINE_DEBUGFS_ATTRIBUTE in hwsim -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEH1e1rEeCd0AIMq6MB8qZga/fl8QFAl3FYNEACgkQB8qZga/f l8TQig//aZIXq2qlrci+Tzydi5clhrog8mzGBOECRUrgAFUZB9Q1qSD0IvqQrU8o 3xY+9lDxYvaOYKAm83oyk2st8FIgGXwPmrfPMEodFlFWla4Dkev/n8+CdbVgJDGI 9j0+9tPsQFwvIIOwD1OUKzJyRUIwmJ7+f8DRhMZ8LlkHZwSx217yD1RGq8zbyXUf tIndHM2yAY0H9ip1GPaTiGMyWN9wbpcllNq6h126OJZ0kGRLbY9X9ySoMIw8zSPF ul1qofvhcdN8BEOqCd97JIsDF6d3fG/LZyNm+UM415C/Se9bSG1O9i9AakGkk2SW zqSjkhqeBK5DUfMqGlh6uxx+1CH46vTZhBKuYIe2uWrdia14d88qkQE88R4cRcir dTJHUP90XOXXh3DrDSgEsfb341E5/IMVgUIIu6U72efNqZ8eMCbsXnp8Bnpervtw sBPYC4aTzU5wBWbl8XDgm0KWx+nh06Ah5+PXW7gzkKZQpW8qOJp4ATcDkqHrMPBf OFd8zhYKULBVRH8dsshzXdeVOurNwazJnEN/h72U1eZTa7ZxFL+CMShpY20d4t9I ldh6EG//b/D7WjBIpbs3VBBQ6fnblwtq41GUS0TgndoDUD1wmBf3mJL9ZvEsYHwC OmsTaAcsAkHBPdOZDpSyyGYddxXp7YNCT6ua3lNdRAbVn5Y0A/8= =gDUI -----END PGP SIGNATURE----- Merge tag 'mac80211-next-for-net-next-2019-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Some relatively small changes: * typo fixes in docs * APIs for station separation using VLAN tags rather than separate wifi netdevs * some preparations for upcoming features (802.3 offload and airtime queue limits (AQL) * stack reduction in ieee80211_assoc_success() * use DEFINE_DEBUGFS_ATTRIBUTE in hwsim ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
5bd2ce6aa5
@ -769,8 +769,8 @@ static int hwsim_fops_ps_write(void *dat, u64 val)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_ps, hwsim_fops_ps_read, hwsim_fops_ps_write,
|
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_fops_ps, hwsim_fops_ps_read, hwsim_fops_ps_write,
|
||||||
"%llu\n");
|
"%llu\n");
|
||||||
|
|
||||||
static int hwsim_write_simulate_radar(void *dat, u64 val)
|
static int hwsim_write_simulate_radar(void *dat, u64 val)
|
||||||
{
|
{
|
||||||
@ -781,8 +781,8 @@ static int hwsim_write_simulate_radar(void *dat, u64 val)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_SIMPLE_ATTRIBUTE(hwsim_simulate_radar, NULL,
|
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_simulate_radar, NULL,
|
||||||
hwsim_write_simulate_radar, "%llu\n");
|
hwsim_write_simulate_radar, "%llu\n");
|
||||||
|
|
||||||
static int hwsim_fops_group_read(void *dat, u64 *val)
|
static int hwsim_fops_group_read(void *dat, u64 *val)
|
||||||
{
|
{
|
||||||
@ -798,9 +798,9 @@ static int hwsim_fops_group_write(void *dat, u64 val)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_group,
|
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_fops_group,
|
||||||
hwsim_fops_group_read, hwsim_fops_group_write,
|
hwsim_fops_group_read, hwsim_fops_group_write,
|
||||||
"%llx\n");
|
"%llx\n");
|
||||||
|
|
||||||
static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
|
static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
|
||||||
struct net_device *dev)
|
struct net_device *dev)
|
||||||
|
@ -565,6 +565,7 @@ struct vif_params {
|
|||||||
* with the get_key() callback, must be in little endian,
|
* with the get_key() callback, must be in little endian,
|
||||||
* length given by @seq_len.
|
* length given by @seq_len.
|
||||||
* @seq_len: length of @seq.
|
* @seq_len: length of @seq.
|
||||||
|
* @vlan_id: vlan_id for VLAN group key (if nonzero)
|
||||||
* @mode: key install mode (RX_TX, NO_TX or SET_TX)
|
* @mode: key install mode (RX_TX, NO_TX or SET_TX)
|
||||||
*/
|
*/
|
||||||
struct key_params {
|
struct key_params {
|
||||||
@ -572,6 +573,7 @@ struct key_params {
|
|||||||
const u8 *seq;
|
const u8 *seq;
|
||||||
int key_len;
|
int key_len;
|
||||||
int seq_len;
|
int seq_len;
|
||||||
|
u16 vlan_id;
|
||||||
u32 cipher;
|
u32 cipher;
|
||||||
enum nl80211_key_mode mode;
|
enum nl80211_key_mode mode;
|
||||||
};
|
};
|
||||||
@ -1124,6 +1126,7 @@ struct sta_txpwr {
|
|||||||
* (bitmask of BIT(%NL80211_STA_FLAG_...))
|
* (bitmask of BIT(%NL80211_STA_FLAG_...))
|
||||||
* @listen_interval: listen interval or -1 for no change
|
* @listen_interval: listen interval or -1 for no change
|
||||||
* @aid: AID or zero for no change
|
* @aid: AID or zero for no change
|
||||||
|
* @vlan_id: VLAN ID for station (if nonzero)
|
||||||
* @peer_aid: mesh peer AID or zero for no change
|
* @peer_aid: mesh peer AID or zero for no change
|
||||||
* @plink_action: plink action to take
|
* @plink_action: plink action to take
|
||||||
* @plink_state: set the peer link state for a station
|
* @plink_state: set the peer link state for a station
|
||||||
@ -1159,6 +1162,7 @@ struct station_parameters {
|
|||||||
u32 sta_modify_mask;
|
u32 sta_modify_mask;
|
||||||
int listen_interval;
|
int listen_interval;
|
||||||
u16 aid;
|
u16 aid;
|
||||||
|
u16 vlan_id;
|
||||||
u16 peer_aid;
|
u16 peer_aid;
|
||||||
u8 supported_rates_len;
|
u8 supported_rates_len;
|
||||||
u8 plink_action;
|
u8 plink_action;
|
||||||
|
@ -312,7 +312,7 @@ struct ieee80211_vif_chanctx_switch {
|
|||||||
* @BSS_CHANGED_KEEP_ALIVE: keep alive options (idle period or protected
|
* @BSS_CHANGED_KEEP_ALIVE: keep alive options (idle period or protected
|
||||||
* keep alive) changed.
|
* keep alive) changed.
|
||||||
* @BSS_CHANGED_MCAST_RATE: Multicast Rate setting changed for this interface
|
* @BSS_CHANGED_MCAST_RATE: Multicast Rate setting changed for this interface
|
||||||
* @BSS_CHANGED_FTM_RESPONDER: fime timing reasurement request responder
|
* @BSS_CHANGED_FTM_RESPONDER: fine timing measurement request responder
|
||||||
* functionality changed for this BSS (AP mode).
|
* functionality changed for this BSS (AP mode).
|
||||||
* @BSS_CHANGED_TWT: TWT status changed
|
* @BSS_CHANGED_TWT: TWT status changed
|
||||||
* @BSS_CHANGED_HE_OBSS_PD: OBSS Packet Detection status changed.
|
* @BSS_CHANGED_HE_OBSS_PD: OBSS Packet Detection status changed.
|
||||||
@ -967,6 +967,7 @@ ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate)
|
|||||||
* @band: the band to transmit on (use for checking for races)
|
* @band: the band to transmit on (use for checking for races)
|
||||||
* @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
|
* @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
|
||||||
* @ack_frame_id: internal frame ID for TX status, used internally
|
* @ack_frame_id: internal frame ID for TX status, used internally
|
||||||
|
* @tx_time_est: TX time estimate in units of 4us, used internally
|
||||||
* @control: union part for control data
|
* @control: union part for control data
|
||||||
* @control.rates: TX rates array to try
|
* @control.rates: TX rates array to try
|
||||||
* @control.rts_cts_rate_idx: rate for RTS or CTS
|
* @control.rts_cts_rate_idx: rate for RTS or CTS
|
||||||
@ -1007,7 +1008,8 @@ struct ieee80211_tx_info {
|
|||||||
|
|
||||||
u8 hw_queue;
|
u8 hw_queue;
|
||||||
|
|
||||||
u16 ack_frame_id;
|
u16 ack_frame_id:6;
|
||||||
|
u16 tx_time_est:10;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -1059,7 +1061,7 @@ struct ieee80211_tx_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct ieee80211_tx_status - extended tx staus info for rate control
|
* struct ieee80211_tx_status - extended tx status info for rate control
|
||||||
*
|
*
|
||||||
* @sta: Station that the packet was transmitted for
|
* @sta: Station that the packet was transmitted for
|
||||||
* @info: Basic tx status information
|
* @info: Basic tx status information
|
||||||
@ -1702,7 +1704,7 @@ struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif);
|
|||||||
* %IEEE80211_KEY_FLAG_SW_MGMT_TX flag to encrypt such frames in SW.
|
* %IEEE80211_KEY_FLAG_SW_MGMT_TX flag to encrypt such frames in SW.
|
||||||
* @IEEE80211_KEY_FLAG_GENERATE_IV_MGMT: This flag should be set by the
|
* @IEEE80211_KEY_FLAG_GENERATE_IV_MGMT: This flag should be set by the
|
||||||
* driver for a CCMP/GCMP key to indicate that is requires IV generation
|
* driver for a CCMP/GCMP key to indicate that is requires IV generation
|
||||||
* only for managment frames (MFP).
|
* only for management frames (MFP).
|
||||||
* @IEEE80211_KEY_FLAG_RESERVE_TAILROOM: This flag should be set by the
|
* @IEEE80211_KEY_FLAG_RESERVE_TAILROOM: This flag should be set by the
|
||||||
* driver for a key to indicate that sufficient tailroom must always
|
* driver for a key to indicate that sufficient tailroom must always
|
||||||
* be reserved for ICV or MIC, even when HW encryption is enabled.
|
* be reserved for ICV or MIC, even when HW encryption is enabled.
|
||||||
@ -1998,7 +2000,7 @@ struct ieee80211_sta {
|
|||||||
*
|
*
|
||||||
* * If the skb is transmitted as part of a BA agreement, the
|
* * If the skb is transmitted as part of a BA agreement, the
|
||||||
* A-MSDU maximal size is min(max_amsdu_len, 4065) bytes.
|
* A-MSDU maximal size is min(max_amsdu_len, 4065) bytes.
|
||||||
* * If the skb is not part of a BA aggreement, the A-MSDU maximal
|
* * If the skb is not part of a BA agreement, the A-MSDU maximal
|
||||||
* size is min(max_amsdu_len, 7935) bytes.
|
* size is min(max_amsdu_len, 7935) bytes.
|
||||||
*
|
*
|
||||||
* Both additional HT limits must be enforced by the low level
|
* Both additional HT limits must be enforced by the low level
|
||||||
@ -2626,7 +2628,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
|
|||||||
* @hw: the hardware
|
* @hw: the hardware
|
||||||
* @skb: the skb
|
* @skb: the skb
|
||||||
*
|
*
|
||||||
* Free a transmit skb. Use this funtion when some failure
|
* Free a transmit skb. Use this function when some failure
|
||||||
* to transmit happened and thus status cannot be reported.
|
* to transmit happened and thus status cannot be reported.
|
||||||
*/
|
*/
|
||||||
void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
|
void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
|
||||||
@ -3187,13 +3189,13 @@ enum ieee80211_rate_control_changed {
|
|||||||
*
|
*
|
||||||
* With the support for multi channel contexts and multi channel operations,
|
* With the support for multi channel contexts and multi channel operations,
|
||||||
* remain on channel operations might be limited/deferred/aborted by other
|
* remain on channel operations might be limited/deferred/aborted by other
|
||||||
* flows/operations which have higher priority (and vise versa).
|
* flows/operations which have higher priority (and vice versa).
|
||||||
* Specifying the ROC type can be used by devices to prioritize the ROC
|
* Specifying the ROC type can be used by devices to prioritize the ROC
|
||||||
* operations compared to other operations/flows.
|
* operations compared to other operations/flows.
|
||||||
*
|
*
|
||||||
* @IEEE80211_ROC_TYPE_NORMAL: There are no special requirements for this ROC.
|
* @IEEE80211_ROC_TYPE_NORMAL: There are no special requirements for this ROC.
|
||||||
* @IEEE80211_ROC_TYPE_MGMT_TX: The remain on channel request is required
|
* @IEEE80211_ROC_TYPE_MGMT_TX: The remain on channel request is required
|
||||||
* for sending managment frames offchannel.
|
* for sending management frames offchannel.
|
||||||
*/
|
*/
|
||||||
enum ieee80211_roc_type {
|
enum ieee80211_roc_type {
|
||||||
IEEE80211_ROC_TYPE_NORMAL = 0,
|
IEEE80211_ROC_TYPE_NORMAL = 0,
|
||||||
@ -5616,7 +5618,7 @@ void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ieee80211_iter_chan_contexts_atomic - iterate channel contexts
|
* ieee80211_iter_chan_contexts_atomic - iterate channel contexts
|
||||||
* @hw: pointre obtained from ieee80211_alloc_hw().
|
* @hw: pointer obtained from ieee80211_alloc_hw().
|
||||||
* @iter: iterator function
|
* @iter: iterator function
|
||||||
* @iter_data: data passed to iterator function
|
* @iter_data: data passed to iterator function
|
||||||
*
|
*
|
||||||
@ -6364,7 +6366,7 @@ ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
|
|||||||
* again.
|
* again.
|
||||||
*
|
*
|
||||||
* The API ieee80211_txq_may_transmit() also ensures that TXQ list will be
|
* The API ieee80211_txq_may_transmit() also ensures that TXQ list will be
|
||||||
* aligned aginst driver's own round-robin scheduler list. i.e it rotates
|
* aligned against driver's own round-robin scheduler list. i.e it rotates
|
||||||
* the TXQ list till it makes the requested node becomes the first entry
|
* the TXQ list till it makes the requested node becomes the first entry
|
||||||
* in TXQ list. Thus both the TXQ list and driver's list are in sync. If this
|
* in TXQ list. Thus both the TXQ list and driver's list are in sync. If this
|
||||||
* function returns %true, the driver is expected to schedule packets
|
* function returns %true, the driver is expected to schedule packets
|
||||||
|
@ -248,6 +248,22 @@
|
|||||||
* %NL80211_ATTR_SAE_PASSWORD.
|
* %NL80211_ATTR_SAE_PASSWORD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: VLAN offload support for setting group keys and binding STAs to VLANs
|
||||||
|
*
|
||||||
|
* By setting @NL80211_EXT_FEATURE_VLAN_OFFLOAD flag drivers can indicate they
|
||||||
|
* support offloading VLAN functionality in a manner where the driver exposes a
|
||||||
|
* single netdev that uses VLAN tagged frames and separate VLAN-specific netdevs
|
||||||
|
* can then be added using RTM_NEWLINK/IFLA_VLAN_ID similarly to the Ethernet
|
||||||
|
* case. Frames received from stations that are not assigned to any VLAN are
|
||||||
|
* delivered on the main netdev and frames to such stations can be sent through
|
||||||
|
* that main netdev.
|
||||||
|
*
|
||||||
|
* %NL80211_CMD_NEW_KEY (for group keys), %NL80211_CMD_NEW_STATION, and
|
||||||
|
* %NL80211_CMD_SET_STATION will optionally specify vlan_id using
|
||||||
|
* %NL80211_ATTR_VLAN_ID.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum nl80211_commands - supported nl80211 commands
|
* enum nl80211_commands - supported nl80211 commands
|
||||||
*
|
*
|
||||||
@ -2381,6 +2397,9 @@ enum nl80211_commands {
|
|||||||
* the allowed channel bandwidth configurations. (u8 attribute)
|
* the allowed channel bandwidth configurations. (u8 attribute)
|
||||||
* Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
|
* Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
|
||||||
*
|
*
|
||||||
|
* @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key
|
||||||
|
* (u16).
|
||||||
|
*
|
||||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||||
@ -2843,6 +2862,8 @@ enum nl80211_attrs {
|
|||||||
NL80211_ATTR_WIPHY_EDMG_CHANNELS,
|
NL80211_ATTR_WIPHY_EDMG_CHANNELS,
|
||||||
NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
|
NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
|
||||||
|
|
||||||
|
NL80211_ATTR_VLAN_ID,
|
||||||
|
|
||||||
/* add attributes here, update the policy in nl80211.c */
|
/* add attributes here, update the policy in nl80211.c */
|
||||||
|
|
||||||
__NL80211_ATTR_AFTER_LAST,
|
__NL80211_ATTR_AFTER_LAST,
|
||||||
@ -5492,6 +5513,10 @@ enum nl80211_feature_flags {
|
|||||||
* @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
|
* @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
|
||||||
* station mode (SAE password is passed as part of the connect command).
|
* station mode (SAE password is passed as part of the connect command).
|
||||||
*
|
*
|
||||||
|
* @NL80211_EXT_FEATURE_VLAN_OFFLOAD: The driver supports a single netdev
|
||||||
|
* with VLAN tagged frames and separate VLAN-specific netdevs added using
|
||||||
|
* vconfig similarly to the Ethernet case.
|
||||||
|
*
|
||||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||||
*/
|
*/
|
||||||
@ -5537,6 +5562,7 @@ enum nl80211_ext_feature_index {
|
|||||||
NL80211_EXT_FEATURE_EXT_KEY_ID,
|
NL80211_EXT_FEATURE_EXT_KEY_ID,
|
||||||
NL80211_EXT_FEATURE_STA_TX_PWR,
|
NL80211_EXT_FEATURE_STA_TX_PWR,
|
||||||
NL80211_EXT_FEATURE_SAE_OFFLOAD,
|
NL80211_EXT_FEATURE_SAE_OFFLOAD,
|
||||||
|
NL80211_EXT_FEATURE_VLAN_OFFLOAD,
|
||||||
|
|
||||||
/* add new features before the definition below */
|
/* add new features before the definition below */
|
||||||
NUM_NL80211_EXT_FEATURES,
|
NUM_NL80211_EXT_FEATURES,
|
||||||
|
@ -3428,7 +3428,7 @@ int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
|
|||||||
|
|
||||||
spin_lock_irqsave(&local->ack_status_lock, spin_flags);
|
spin_lock_irqsave(&local->ack_status_lock, spin_flags);
|
||||||
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
||||||
1, 0x10000, GFP_ATOMIC);
|
1, 0x40, GFP_ATOMIC);
|
||||||
spin_unlock_irqrestore(&local->ack_status_lock, spin_flags);
|
spin_unlock_irqrestore(&local->ack_status_lock, spin_flags);
|
||||||
|
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
|
@ -3186,15 +3186,14 @@ static int ieee80211_recalc_twt_req(struct ieee80211_sub_if_data *sdata,
|
|||||||
|
|
||||||
static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
||||||
struct cfg80211_bss *cbss,
|
struct cfg80211_bss *cbss,
|
||||||
struct ieee80211_mgmt *mgmt, size_t len)
|
struct ieee80211_mgmt *mgmt, size_t len,
|
||||||
|
struct ieee802_11_elems *elems)
|
||||||
{
|
{
|
||||||
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
||||||
struct ieee80211_local *local = sdata->local;
|
struct ieee80211_local *local = sdata->local;
|
||||||
struct ieee80211_supported_band *sband;
|
struct ieee80211_supported_band *sband;
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
u8 *pos;
|
|
||||||
u16 capab_info, aid;
|
u16 capab_info, aid;
|
||||||
struct ieee802_11_elems elems;
|
|
||||||
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
|
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
|
||||||
const struct cfg80211_bss_ies *bss_ies = NULL;
|
const struct cfg80211_bss_ies *bss_ies = NULL;
|
||||||
struct ieee80211_mgd_assoc_data *assoc_data = ifmgd->assoc_data;
|
struct ieee80211_mgd_assoc_data *assoc_data = ifmgd->assoc_data;
|
||||||
@ -3222,19 +3221,15 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
ifmgd->broken_ap = true;
|
ifmgd->broken_ap = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = mgmt->u.assoc_resp.variable;
|
if (!elems->supp_rates) {
|
||||||
ieee802_11_parse_elems(pos, len - (pos - (u8 *)mgmt), false, &elems,
|
|
||||||
mgmt->bssid, assoc_data->bss->bssid);
|
|
||||||
|
|
||||||
if (!elems.supp_rates) {
|
|
||||||
sdata_info(sdata, "no SuppRates element in AssocResp\n");
|
sdata_info(sdata, "no SuppRates element in AssocResp\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ifmgd->aid = aid;
|
ifmgd->aid = aid;
|
||||||
ifmgd->tdls_chan_switch_prohibited =
|
ifmgd->tdls_chan_switch_prohibited =
|
||||||
elems.ext_capab && elems.ext_capab_len >= 5 &&
|
elems->ext_capab && elems->ext_capab_len >= 5 &&
|
||||||
(elems.ext_capab[4] & WLAN_EXT_CAPA5_TDLS_CH_SW_PROHIBITED);
|
(elems->ext_capab[4] & WLAN_EXT_CAPA5_TDLS_CH_SW_PROHIBITED);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some APs are erroneously not including some information in their
|
* Some APs are erroneously not including some information in their
|
||||||
@ -3243,11 +3238,11 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
* 2G/3G/4G wifi routers, reported models include the "Onda PN51T",
|
* 2G/3G/4G wifi routers, reported models include the "Onda PN51T",
|
||||||
* "Vodafone PocketWiFi 2", "ZTE MF60" and a similar T-Mobile device.
|
* "Vodafone PocketWiFi 2", "ZTE MF60" and a similar T-Mobile device.
|
||||||
*/
|
*/
|
||||||
if ((assoc_data->wmm && !elems.wmm_param) ||
|
if ((assoc_data->wmm && !elems->wmm_param) ||
|
||||||
(!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) &&
|
(!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) &&
|
||||||
(!elems.ht_cap_elem || !elems.ht_operation)) ||
|
(!elems->ht_cap_elem || !elems->ht_operation)) ||
|
||||||
(!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT) &&
|
(!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT) &&
|
||||||
(!elems.vht_cap_elem || !elems.vht_operation))) {
|
(!elems->vht_cap_elem || !elems->vht_operation))) {
|
||||||
const struct cfg80211_bss_ies *ies;
|
const struct cfg80211_bss_ies *ies;
|
||||||
struct ieee802_11_elems bss_elems;
|
struct ieee802_11_elems bss_elems;
|
||||||
|
|
||||||
@ -3265,8 +3260,8 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
mgmt->bssid,
|
mgmt->bssid,
|
||||||
assoc_data->bss->bssid);
|
assoc_data->bss->bssid);
|
||||||
if (assoc_data->wmm &&
|
if (assoc_data->wmm &&
|
||||||
!elems.wmm_param && bss_elems.wmm_param) {
|
!elems->wmm_param && bss_elems.wmm_param) {
|
||||||
elems.wmm_param = bss_elems.wmm_param;
|
elems->wmm_param = bss_elems.wmm_param;
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"AP bug: WMM param missing from AssocResp\n");
|
"AP bug: WMM param missing from AssocResp\n");
|
||||||
}
|
}
|
||||||
@ -3275,27 +3270,27 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
* Also check if we requested HT/VHT, otherwise the AP doesn't
|
* Also check if we requested HT/VHT, otherwise the AP doesn't
|
||||||
* have to include the IEs in the (re)association response.
|
* have to include the IEs in the (re)association response.
|
||||||
*/
|
*/
|
||||||
if (!elems.ht_cap_elem && bss_elems.ht_cap_elem &&
|
if (!elems->ht_cap_elem && bss_elems.ht_cap_elem &&
|
||||||
!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) {
|
!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) {
|
||||||
elems.ht_cap_elem = bss_elems.ht_cap_elem;
|
elems->ht_cap_elem = bss_elems.ht_cap_elem;
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"AP bug: HT capability missing from AssocResp\n");
|
"AP bug: HT capability missing from AssocResp\n");
|
||||||
}
|
}
|
||||||
if (!elems.ht_operation && bss_elems.ht_operation &&
|
if (!elems->ht_operation && bss_elems.ht_operation &&
|
||||||
!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) {
|
!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) {
|
||||||
elems.ht_operation = bss_elems.ht_operation;
|
elems->ht_operation = bss_elems.ht_operation;
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"AP bug: HT operation missing from AssocResp\n");
|
"AP bug: HT operation missing from AssocResp\n");
|
||||||
}
|
}
|
||||||
if (!elems.vht_cap_elem && bss_elems.vht_cap_elem &&
|
if (!elems->vht_cap_elem && bss_elems.vht_cap_elem &&
|
||||||
!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) {
|
!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) {
|
||||||
elems.vht_cap_elem = bss_elems.vht_cap_elem;
|
elems->vht_cap_elem = bss_elems.vht_cap_elem;
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"AP bug: VHT capa missing from AssocResp\n");
|
"AP bug: VHT capa missing from AssocResp\n");
|
||||||
}
|
}
|
||||||
if (!elems.vht_operation && bss_elems.vht_operation &&
|
if (!elems->vht_operation && bss_elems.vht_operation &&
|
||||||
!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) {
|
!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) {
|
||||||
elems.vht_operation = bss_elems.vht_operation;
|
elems->vht_operation = bss_elems.vht_operation;
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"AP bug: VHT operation missing from AssocResp\n");
|
"AP bug: VHT operation missing from AssocResp\n");
|
||||||
}
|
}
|
||||||
@ -3306,7 +3301,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
* they should be present here. This is just a safety net.
|
* they should be present here. This is just a safety net.
|
||||||
*/
|
*/
|
||||||
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) &&
|
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) &&
|
||||||
(!elems.wmm_param || !elems.ht_cap_elem || !elems.ht_operation)) {
|
(!elems->wmm_param || !elems->ht_cap_elem || !elems->ht_operation)) {
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"HT AP is missing WMM params or HT capability/operation\n");
|
"HT AP is missing WMM params or HT capability/operation\n");
|
||||||
ret = false;
|
ret = false;
|
||||||
@ -3314,7 +3309,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT) &&
|
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT) &&
|
||||||
(!elems.vht_cap_elem || !elems.vht_operation)) {
|
(!elems->vht_cap_elem || !elems->vht_operation)) {
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"VHT AP is missing VHT capability/operation\n");
|
"VHT AP is missing VHT capability/operation\n");
|
||||||
ret = false;
|
ret = false;
|
||||||
@ -3341,7 +3336,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE) &&
|
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE) &&
|
||||||
(!elems.he_cap || !elems.he_operation)) {
|
(!elems->he_cap || !elems->he_operation)) {
|
||||||
mutex_unlock(&sdata->local->sta_mtx);
|
mutex_unlock(&sdata->local->sta_mtx);
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"HE AP is missing HE capability/operation\n");
|
"HE AP is missing HE capability/operation\n");
|
||||||
@ -3350,23 +3345,23 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set up internal HT/VHT capabilities */
|
/* Set up internal HT/VHT capabilities */
|
||||||
if (elems.ht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_HT))
|
if (elems->ht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_HT))
|
||||||
ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
|
ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
|
||||||
elems.ht_cap_elem, sta);
|
elems->ht_cap_elem, sta);
|
||||||
|
|
||||||
if (elems.vht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_VHT))
|
if (elems->vht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_VHT))
|
||||||
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
|
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
|
||||||
elems.vht_cap_elem, sta);
|
elems->vht_cap_elem, sta);
|
||||||
|
|
||||||
if (elems.he_operation && !(ifmgd->flags & IEEE80211_STA_DISABLE_HE) &&
|
if (elems->he_operation && !(ifmgd->flags & IEEE80211_STA_DISABLE_HE) &&
|
||||||
elems.he_cap) {
|
elems->he_cap) {
|
||||||
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
|
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
|
||||||
elems.he_cap,
|
elems->he_cap,
|
||||||
elems.he_cap_len,
|
elems->he_cap_len,
|
||||||
sta);
|
sta);
|
||||||
|
|
||||||
bss_conf->he_support = sta->sta.he_cap.has_he;
|
bss_conf->he_support = sta->sta.he_cap.has_he;
|
||||||
changed |= ieee80211_recalc_twt_req(sdata, sta, &elems);
|
changed |= ieee80211_recalc_twt_req(sdata, sta, elems);
|
||||||
} else {
|
} else {
|
||||||
bss_conf->he_support = false;
|
bss_conf->he_support = false;
|
||||||
bss_conf->twt_requester = false;
|
bss_conf->twt_requester = false;
|
||||||
@ -3374,14 +3369,14 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
|
|
||||||
if (bss_conf->he_support) {
|
if (bss_conf->he_support) {
|
||||||
bss_conf->bss_color =
|
bss_conf->bss_color =
|
||||||
le32_get_bits(elems.he_operation->he_oper_params,
|
le32_get_bits(elems->he_operation->he_oper_params,
|
||||||
IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
|
IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
|
||||||
|
|
||||||
bss_conf->htc_trig_based_pkt_ext =
|
bss_conf->htc_trig_based_pkt_ext =
|
||||||
le32_get_bits(elems.he_operation->he_oper_params,
|
le32_get_bits(elems->he_operation->he_oper_params,
|
||||||
IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK);
|
IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK);
|
||||||
bss_conf->frame_time_rts_th =
|
bss_conf->frame_time_rts_th =
|
||||||
le32_get_bits(elems.he_operation->he_oper_params,
|
le32_get_bits(elems->he_operation->he_oper_params,
|
||||||
IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK);
|
IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK);
|
||||||
|
|
||||||
bss_conf->multi_sta_back_32bit =
|
bss_conf->multi_sta_back_32bit =
|
||||||
@ -3392,12 +3387,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
sta->sta.he_cap.he_cap_elem.mac_cap_info[2] &
|
sta->sta.he_cap.he_cap_elem.mac_cap_info[2] &
|
||||||
IEEE80211_HE_MAC_CAP2_ACK_EN;
|
IEEE80211_HE_MAC_CAP2_ACK_EN;
|
||||||
|
|
||||||
bss_conf->uora_exists = !!elems.uora_element;
|
bss_conf->uora_exists = !!elems->uora_element;
|
||||||
if (elems.uora_element)
|
if (elems->uora_element)
|
||||||
bss_conf->uora_ocw_range = elems.uora_element[0];
|
bss_conf->uora_ocw_range = elems->uora_element[0];
|
||||||
|
|
||||||
ieee80211_he_op_ie_to_bss_conf(&sdata->vif, elems.he_operation);
|
ieee80211_he_op_ie_to_bss_conf(&sdata->vif, elems->he_operation);
|
||||||
ieee80211_he_spr_ie_to_bss_conf(&sdata->vif, elems.he_spr);
|
ieee80211_he_spr_ie_to_bss_conf(&sdata->vif, elems->he_spr);
|
||||||
/* TODO: OPEN: what happens if BSS color disable is set? */
|
/* TODO: OPEN: what happens if BSS color disable is set? */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3421,11 +3416,11 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
* NSS calculation (that would be done in rate_control_rate_init())
|
* NSS calculation (that would be done in rate_control_rate_init())
|
||||||
* and use the # of streams from that element.
|
* and use the # of streams from that element.
|
||||||
*/
|
*/
|
||||||
if (elems.opmode_notif &&
|
if (elems->opmode_notif &&
|
||||||
!(*elems.opmode_notif & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF)) {
|
!(*elems->opmode_notif & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF)) {
|
||||||
u8 nss;
|
u8 nss;
|
||||||
|
|
||||||
nss = *elems.opmode_notif & IEEE80211_OPMODE_NOTIF_RX_NSS_MASK;
|
nss = *elems->opmode_notif & IEEE80211_OPMODE_NOTIF_RX_NSS_MASK;
|
||||||
nss >>= IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT;
|
nss >>= IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT;
|
||||||
nss += 1;
|
nss += 1;
|
||||||
sta->sta.rx_nss = nss;
|
sta->sta.rx_nss = nss;
|
||||||
@ -3440,7 +3435,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
sta->sta.mfp = false;
|
sta->sta.mfp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sta->sta.wme = elems.wmm_param && local->hw.queues >= IEEE80211_NUM_ACS;
|
sta->sta.wme = elems->wmm_param && local->hw.queues >= IEEE80211_NUM_ACS;
|
||||||
|
|
||||||
err = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
|
err = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
|
||||||
if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT))
|
if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT))
|
||||||
@ -3468,9 +3463,9 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
|
|
||||||
if (ifmgd->flags & IEEE80211_STA_DISABLE_WMM) {
|
if (ifmgd->flags & IEEE80211_STA_DISABLE_WMM) {
|
||||||
ieee80211_set_wmm_default(sdata, false, false);
|
ieee80211_set_wmm_default(sdata, false, false);
|
||||||
} else if (!ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
|
} else if (!ieee80211_sta_wmm_params(local, sdata, elems->wmm_param,
|
||||||
elems.wmm_param_len,
|
elems->wmm_param_len,
|
||||||
elems.mu_edca_param_set)) {
|
elems->mu_edca_param_set)) {
|
||||||
/* still enable QoS since we might have HT/VHT */
|
/* still enable QoS since we might have HT/VHT */
|
||||||
ieee80211_set_wmm_default(sdata, false, true);
|
ieee80211_set_wmm_default(sdata, false, true);
|
||||||
/* set the disable-WMM flag in this case to disable
|
/* set the disable-WMM flag in this case to disable
|
||||||
@ -3484,11 +3479,11 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
|||||||
}
|
}
|
||||||
changed |= BSS_CHANGED_QOS;
|
changed |= BSS_CHANGED_QOS;
|
||||||
|
|
||||||
if (elems.max_idle_period_ie) {
|
if (elems->max_idle_period_ie) {
|
||||||
bss_conf->max_idle_period =
|
bss_conf->max_idle_period =
|
||||||
le16_to_cpu(elems.max_idle_period_ie->max_idle_period);
|
le16_to_cpu(elems->max_idle_period_ie->max_idle_period);
|
||||||
bss_conf->protected_keep_alive =
|
bss_conf->protected_keep_alive =
|
||||||
!!(elems.max_idle_period_ie->idle_options &
|
!!(elems->max_idle_period_ie->idle_options &
|
||||||
WLAN_IDLE_OPTIONS_PROTECTED_KEEP_ALIVE);
|
WLAN_IDLE_OPTIONS_PROTECTED_KEEP_ALIVE);
|
||||||
changed |= BSS_CHANGED_KEEP_ALIVE;
|
changed |= BSS_CHANGED_KEEP_ALIVE;
|
||||||
} else {
|
} else {
|
||||||
@ -3598,7 +3593,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
|
|||||||
event.u.mlme.reason = status_code;
|
event.u.mlme.reason = status_code;
|
||||||
drv_event_callback(sdata->local, sdata, &event);
|
drv_event_callback(sdata->local, sdata, &event);
|
||||||
} else {
|
} else {
|
||||||
if (!ieee80211_assoc_success(sdata, bss, mgmt, len)) {
|
if (!ieee80211_assoc_success(sdata, bss, mgmt, len, &elems)) {
|
||||||
/* oops -- internal error -- send timeout for now */
|
/* oops -- internal error -- send timeout for now */
|
||||||
ieee80211_destroy_assoc_data(sdata, false, false);
|
ieee80211_destroy_assoc_data(sdata, false, false);
|
||||||
cfg80211_assoc_timeout(sdata->dev, bss);
|
cfg80211_assoc_timeout(sdata->dev, bss);
|
||||||
|
@ -2417,6 +2417,33 @@ static int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ieee80211_store_ack_skb(struct ieee80211_local *local,
|
||||||
|
struct sk_buff *skb,
|
||||||
|
u32 *info_flags)
|
||||||
|
{
|
||||||
|
struct sk_buff *ack_skb = skb_clone_sk(skb);
|
||||||
|
u16 info_id = 0;
|
||||||
|
|
||||||
|
if (ack_skb) {
|
||||||
|
unsigned long flags;
|
||||||
|
int id;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&local->ack_status_lock, flags);
|
||||||
|
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
||||||
|
1, 0x40, GFP_ATOMIC);
|
||||||
|
spin_unlock_irqrestore(&local->ack_status_lock, flags);
|
||||||
|
|
||||||
|
if (id >= 0) {
|
||||||
|
info_id = id;
|
||||||
|
*info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
|
||||||
|
} else {
|
||||||
|
kfree_skb(ack_skb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return info_id;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ieee80211_build_hdr - build 802.11 header in the given frame
|
* ieee80211_build_hdr - build 802.11 header in the given frame
|
||||||
* @sdata: virtual interface to build the header for
|
* @sdata: virtual interface to build the header for
|
||||||
@ -2710,26 +2737,8 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(!multicast && skb->sk &&
|
if (unlikely(!multicast && skb->sk &&
|
||||||
skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS)) {
|
skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS))
|
||||||
struct sk_buff *ack_skb = skb_clone_sk(skb);
|
info_id = ieee80211_store_ack_skb(local, skb, &info_flags);
|
||||||
|
|
||||||
if (ack_skb) {
|
|
||||||
unsigned long flags;
|
|
||||||
int id;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&local->ack_status_lock, flags);
|
|
||||||
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
|
||||||
1, 0x10000, GFP_ATOMIC);
|
|
||||||
spin_unlock_irqrestore(&local->ack_status_lock, flags);
|
|
||||||
|
|
||||||
if (id >= 0) {
|
|
||||||
info_id = id;
|
|
||||||
info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
|
|
||||||
} else {
|
|
||||||
kfree_skb(ack_skb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the skb is shared we need to obtain our own copy.
|
* If the skb is shared we need to obtain our own copy.
|
||||||
|
@ -624,6 +624,7 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
|
|||||||
.len = SAE_PASSWORD_MAX_LEN },
|
.len = SAE_PASSWORD_MAX_LEN },
|
||||||
[NL80211_ATTR_TWT_RESPONDER] = { .type = NLA_FLAG },
|
[NL80211_ATTR_TWT_RESPONDER] = { .type = NLA_FLAG },
|
||||||
[NL80211_ATTR_HE_OBSS_PD] = NLA_POLICY_NESTED(he_obss_pd_policy),
|
[NL80211_ATTR_HE_OBSS_PD] = NLA_POLICY_NESTED(he_obss_pd_policy),
|
||||||
|
[NL80211_ATTR_VLAN_ID] = NLA_POLICY_RANGE(NLA_U16, 1, VLAN_N_VID - 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* policy for the key attributes */
|
/* policy for the key attributes */
|
||||||
@ -3940,6 +3941,10 @@ static int nl80211_new_key(struct sk_buff *skb, struct genl_info *info)
|
|||||||
key.type != NL80211_KEYTYPE_GROUP)
|
key.type != NL80211_KEYTYPE_GROUP)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (key.type == NL80211_KEYTYPE_GROUP &&
|
||||||
|
info->attrs[NL80211_ATTR_VLAN_ID])
|
||||||
|
key.p.vlan_id = nla_get_u16(info->attrs[NL80211_ATTR_VLAN_ID]);
|
||||||
|
|
||||||
if (!rdev->ops->add_key)
|
if (!rdev->ops->add_key)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
@ -5711,6 +5716,9 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (info->attrs[NL80211_ATTR_STA_AID])
|
if (info->attrs[NL80211_ATTR_STA_AID])
|
||||||
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
|
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
|
||||||
|
|
||||||
|
if (info->attrs[NL80211_ATTR_VLAN_ID])
|
||||||
|
params.vlan_id = nla_get_u16(info->attrs[NL80211_ATTR_VLAN_ID]);
|
||||||
|
|
||||||
if (info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL])
|
if (info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL])
|
||||||
params.listen_interval =
|
params.listen_interval =
|
||||||
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
||||||
@ -5856,6 +5864,9 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
|||||||
params.listen_interval =
|
params.listen_interval =
|
||||||
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
||||||
|
|
||||||
|
if (info->attrs[NL80211_ATTR_VLAN_ID])
|
||||||
|
params.vlan_id = nla_get_u16(info->attrs[NL80211_ATTR_VLAN_ID]);
|
||||||
|
|
||||||
if (info->attrs[NL80211_ATTR_STA_SUPPORT_P2P_PS]) {
|
if (info->attrs[NL80211_ATTR_STA_SUPPORT_P2P_PS]) {
|
||||||
params.support_p2p_ps =
|
params.support_p2p_ps =
|
||||||
nla_get_u8(info->attrs[NL80211_ATTR_STA_SUPPORT_P2P_PS]);
|
nla_get_u8(info->attrs[NL80211_ATTR_STA_SUPPORT_P2P_PS]);
|
||||||
|
Loading…
Reference in New Issue
Block a user