Skip to content

Commit c1b3ddf

Browse files
committed
Merge tag 'mac80211-next-for-davem-2019-09-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== We have a number of changes, but things are settling down: * a fix in the new 6 GHz channel support * a fix for recent minstrel (rate control) updates for an infinite loop * handle interface type changes better wrt. management frame registrations (for management frames sent to userspace) * add in-BSS RX time to survey information * handle HW rfkill properly if !CONFIG_RFKILL * send deauth on IBSS station expiry, to avoid state mismatches * handle deferred crypto tailroom updates in mac80211 better when device restart happens * fix a spectre-v1 - really a continuation of a previous patch * advertise NL80211_CMD_UPDATE_FT_IES as supported if so * add some missing parsing in VHT extended NSS support * support HE in mac80211_hwsim * let mac80211 drivers determine the max MTU themselves along with the usual cleanups etc. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 747f3cf + c1d3ad8 commit c1b3ddf

File tree

19 files changed

+274
-161
lines changed

19 files changed

+274
-161
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 189 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,116 +2497,211 @@ static void hwsim_mcast_new_radio(int id, struct genl_info *info,
24972497
nlmsg_free(mcast_skb);
24982498
}
24992499

2500-
static const struct ieee80211_sband_iftype_data he_capa_2ghz = {
2501-
/* TODO: should we support other types, e.g., P2P?*/
2502-
.types_mask = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP),
2503-
.he_cap = {
2504-
.has_he = true,
2505-
.he_cap_elem = {
2506-
.mac_cap_info[0] =
2507-
IEEE80211_HE_MAC_CAP0_HTC_HE,
2508-
.mac_cap_info[1] =
2509-
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
2510-
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2511-
.mac_cap_info[2] =
2512-
IEEE80211_HE_MAC_CAP2_BSR |
2513-
IEEE80211_HE_MAC_CAP2_MU_CASCADING |
2514-
IEEE80211_HE_MAC_CAP2_ACK_EN,
2515-
.mac_cap_info[3] =
2516-
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2517-
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2518-
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2519-
.phy_cap_info[1] =
2520-
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2521-
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2522-
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2523-
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2524-
.phy_cap_info[2] =
2525-
IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
2526-
IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ |
2527-
IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ |
2528-
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
2529-
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO,
2530-
2531-
/* Leave all the other PHY capability bytes unset, as
2532-
* DCM, beam forming, RU and PPE threshold information
2533-
* are not supported
2534-
*/
2500+
static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
2501+
{
2502+
/* TODO: should we support other types, e.g., P2P?*/
2503+
.types_mask = BIT(NL80211_IFTYPE_STATION) |
2504+
BIT(NL80211_IFTYPE_AP),
2505+
.he_cap = {
2506+
.has_he = true,
2507+
.he_cap_elem = {
2508+
.mac_cap_info[0] =
2509+
IEEE80211_HE_MAC_CAP0_HTC_HE,
2510+
.mac_cap_info[1] =
2511+
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
2512+
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2513+
.mac_cap_info[2] =
2514+
IEEE80211_HE_MAC_CAP2_BSR |
2515+
IEEE80211_HE_MAC_CAP2_MU_CASCADING |
2516+
IEEE80211_HE_MAC_CAP2_ACK_EN,
2517+
.mac_cap_info[3] =
2518+
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2519+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2520+
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2521+
.phy_cap_info[1] =
2522+
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2523+
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2524+
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2525+
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2526+
.phy_cap_info[2] =
2527+
IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
2528+
IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ |
2529+
IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ |
2530+
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
2531+
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO,
2532+
2533+
/* Leave all the other PHY capability bytes
2534+
* unset, as DCM, beam forming, RU and PPE
2535+
* threshold information are not supported
2536+
*/
2537+
},
2538+
.he_mcs_nss_supp = {
2539+
.rx_mcs_80 = cpu_to_le16(0xfffa),
2540+
.tx_mcs_80 = cpu_to_le16(0xfffa),
2541+
.rx_mcs_160 = cpu_to_le16(0xffff),
2542+
.tx_mcs_160 = cpu_to_le16(0xffff),
2543+
.rx_mcs_80p80 = cpu_to_le16(0xffff),
2544+
.tx_mcs_80p80 = cpu_to_le16(0xffff),
2545+
},
25352546
},
2536-
.he_mcs_nss_supp = {
2537-
.rx_mcs_80 = cpu_to_le16(0xfffa),
2538-
.tx_mcs_80 = cpu_to_le16(0xfffa),
2539-
.rx_mcs_160 = cpu_to_le16(0xffff),
2540-
.tx_mcs_160 = cpu_to_le16(0xffff),
2541-
.rx_mcs_80p80 = cpu_to_le16(0xffff),
2542-
.tx_mcs_80p80 = cpu_to_le16(0xffff),
2547+
},
2548+
#ifdef CONFIG_MAC80211_MESH
2549+
{
2550+
/* TODO: should we support other types, e.g., IBSS?*/
2551+
.types_mask = BIT(NL80211_IFTYPE_MESH_POINT),
2552+
.he_cap = {
2553+
.has_he = true,
2554+
.he_cap_elem = {
2555+
.mac_cap_info[0] =
2556+
IEEE80211_HE_MAC_CAP0_HTC_HE,
2557+
.mac_cap_info[1] =
2558+
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2559+
.mac_cap_info[2] =
2560+
IEEE80211_HE_MAC_CAP2_ACK_EN,
2561+
.mac_cap_info[3] =
2562+
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2563+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2564+
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2565+
.phy_cap_info[1] =
2566+
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2567+
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2568+
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2569+
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2570+
.phy_cap_info[2] = 0,
2571+
2572+
/* Leave all the other PHY capability bytes
2573+
* unset, as DCM, beam forming, RU and PPE
2574+
* threshold information are not supported
2575+
*/
2576+
},
2577+
.he_mcs_nss_supp = {
2578+
.rx_mcs_80 = cpu_to_le16(0xfffa),
2579+
.tx_mcs_80 = cpu_to_le16(0xfffa),
2580+
.rx_mcs_160 = cpu_to_le16(0xffff),
2581+
.tx_mcs_160 = cpu_to_le16(0xffff),
2582+
.rx_mcs_80p80 = cpu_to_le16(0xffff),
2583+
.tx_mcs_80p80 = cpu_to_le16(0xffff),
2584+
},
25432585
},
25442586
},
2587+
#endif
25452588
};
25462589

2547-
static const struct ieee80211_sband_iftype_data he_capa_5ghz = {
2548-
/* TODO: should we support other types, e.g., P2P?*/
2549-
.types_mask = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP),
2550-
.he_cap = {
2551-
.has_he = true,
2552-
.he_cap_elem = {
2553-
.mac_cap_info[0] =
2554-
IEEE80211_HE_MAC_CAP0_HTC_HE,
2555-
.mac_cap_info[1] =
2556-
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
2557-
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2558-
.mac_cap_info[2] =
2559-
IEEE80211_HE_MAC_CAP2_BSR |
2560-
IEEE80211_HE_MAC_CAP2_MU_CASCADING |
2561-
IEEE80211_HE_MAC_CAP2_ACK_EN,
2562-
.mac_cap_info[3] =
2563-
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2564-
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2565-
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2566-
.phy_cap_info[0] =
2567-
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
2568-
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
2569-
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G,
2570-
.phy_cap_info[1] =
2571-
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2572-
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2573-
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2574-
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2575-
.phy_cap_info[2] =
2576-
IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
2577-
IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ |
2578-
IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ |
2579-
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
2580-
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO,
2581-
2582-
/* Leave all the other PHY capability bytes unset, as
2583-
* DCM, beam forming, RU and PPE threshold information
2584-
* are not supported
2585-
*/
2590+
static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
2591+
{
2592+
/* TODO: should we support other types, e.g., P2P?*/
2593+
.types_mask = BIT(NL80211_IFTYPE_STATION) |
2594+
BIT(NL80211_IFTYPE_AP),
2595+
.he_cap = {
2596+
.has_he = true,
2597+
.he_cap_elem = {
2598+
.mac_cap_info[0] =
2599+
IEEE80211_HE_MAC_CAP0_HTC_HE,
2600+
.mac_cap_info[1] =
2601+
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
2602+
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2603+
.mac_cap_info[2] =
2604+
IEEE80211_HE_MAC_CAP2_BSR |
2605+
IEEE80211_HE_MAC_CAP2_MU_CASCADING |
2606+
IEEE80211_HE_MAC_CAP2_ACK_EN,
2607+
.mac_cap_info[3] =
2608+
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2609+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2610+
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2611+
.phy_cap_info[0] =
2612+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
2613+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
2614+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G,
2615+
.phy_cap_info[1] =
2616+
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2617+
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2618+
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2619+
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2620+
.phy_cap_info[2] =
2621+
IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
2622+
IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ |
2623+
IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ |
2624+
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
2625+
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO,
2626+
2627+
/* Leave all the other PHY capability bytes
2628+
* unset, as DCM, beam forming, RU and PPE
2629+
* threshold information are not supported
2630+
*/
2631+
},
2632+
.he_mcs_nss_supp = {
2633+
.rx_mcs_80 = cpu_to_le16(0xfffa),
2634+
.tx_mcs_80 = cpu_to_le16(0xfffa),
2635+
.rx_mcs_160 = cpu_to_le16(0xfffa),
2636+
.tx_mcs_160 = cpu_to_le16(0xfffa),
2637+
.rx_mcs_80p80 = cpu_to_le16(0xfffa),
2638+
.tx_mcs_80p80 = cpu_to_le16(0xfffa),
2639+
},
25862640
},
2587-
.he_mcs_nss_supp = {
2588-
.rx_mcs_80 = cpu_to_le16(0xfffa),
2589-
.tx_mcs_80 = cpu_to_le16(0xfffa),
2590-
.rx_mcs_160 = cpu_to_le16(0xfffa),
2591-
.tx_mcs_160 = cpu_to_le16(0xfffa),
2592-
.rx_mcs_80p80 = cpu_to_le16(0xfffa),
2593-
.tx_mcs_80p80 = cpu_to_le16(0xfffa),
2641+
},
2642+
#ifdef CONFIG_MAC80211_MESH
2643+
{
2644+
/* TODO: should we support other types, e.g., IBSS?*/
2645+
.types_mask = BIT(NL80211_IFTYPE_MESH_POINT),
2646+
.he_cap = {
2647+
.has_he = true,
2648+
.he_cap_elem = {
2649+
.mac_cap_info[0] =
2650+
IEEE80211_HE_MAC_CAP0_HTC_HE,
2651+
.mac_cap_info[1] =
2652+
IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
2653+
.mac_cap_info[2] =
2654+
IEEE80211_HE_MAC_CAP2_ACK_EN,
2655+
.mac_cap_info[3] =
2656+
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
2657+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
2658+
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
2659+
.phy_cap_info[0] =
2660+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
2661+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
2662+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G,
2663+
.phy_cap_info[1] =
2664+
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
2665+
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
2666+
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
2667+
IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
2668+
.phy_cap_info[2] = 0,
2669+
2670+
/* Leave all the other PHY capability bytes
2671+
* unset, as DCM, beam forming, RU and PPE
2672+
* threshold information are not supported
2673+
*/
2674+
},
2675+
.he_mcs_nss_supp = {
2676+
.rx_mcs_80 = cpu_to_le16(0xfffa),
2677+
.tx_mcs_80 = cpu_to_le16(0xfffa),
2678+
.rx_mcs_160 = cpu_to_le16(0xfffa),
2679+
.tx_mcs_160 = cpu_to_le16(0xfffa),
2680+
.rx_mcs_80p80 = cpu_to_le16(0xfffa),
2681+
.tx_mcs_80p80 = cpu_to_le16(0xfffa),
2682+
},
25942683
},
25952684
},
2685+
#endif
25962686
};
25972687

25982688
static void mac80211_hwsim_he_capab(struct ieee80211_supported_band *sband)
25992689
{
2600-
if (sband->band == NL80211_BAND_2GHZ)
2690+
u16 n_iftype_data;
2691+
2692+
if (sband->band == NL80211_BAND_2GHZ) {
2693+
n_iftype_data = ARRAY_SIZE(he_capa_2ghz);
26012694
sband->iftype_data =
2602-
(struct ieee80211_sband_iftype_data *)&he_capa_2ghz;
2603-
else if (sband->band == NL80211_BAND_5GHZ)
2695+
(struct ieee80211_sband_iftype_data *)he_capa_2ghz;
2696+
} else if (sband->band == NL80211_BAND_5GHZ) {
2697+
n_iftype_data = ARRAY_SIZE(he_capa_5ghz);
26042698
sband->iftype_data =
2605-
(struct ieee80211_sband_iftype_data *)&he_capa_5ghz;
2606-
else
2699+
(struct ieee80211_sband_iftype_data *)he_capa_5ghz;
2700+
} else {
26072701
return;
2702+
}
26082703

2609-
sband->n_iftype_data = 1;
2704+
sband->n_iftype_data = n_iftype_data;
26102705
}
26112706

26122707
#ifdef CONFIG_MAC80211_MESH

include/net/cfg80211.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ ieee80211_chandef_max_power(struct cfg80211_chan_def *chandef)
768768
* @SURVEY_INFO_TIME_RX: receive time was filled in
769769
* @SURVEY_INFO_TIME_TX: transmit time was filled in
770770
* @SURVEY_INFO_TIME_SCAN: scan time was filled in
771+
* @SURVEY_INFO_TIME_BSS_RX: local BSS receive time was filled in
771772
*
772773
* Used by the driver to indicate which info in &struct survey_info
773774
* it has filled in during the get_survey().
@@ -781,6 +782,7 @@ enum survey_info_flags {
781782
SURVEY_INFO_TIME_RX = BIT(5),
782783
SURVEY_INFO_TIME_TX = BIT(6),
783784
SURVEY_INFO_TIME_SCAN = BIT(7),
785+
SURVEY_INFO_TIME_BSS_RX = BIT(8),
784786
};
785787

786788
/**
@@ -797,6 +799,7 @@ enum survey_info_flags {
797799
* @time_rx: amount of time the radio spent receiving data
798800
* @time_tx: amount of time the radio spent transmitting data
799801
* @time_scan: amount of time the radio spent for scanning
802+
* @time_bss_rx: amount of time the radio spent receiving data on a local BSS
800803
*
801804
* Used by dump_survey() to report back per-channel survey information.
802805
*
@@ -811,6 +814,7 @@ struct survey_info {
811814
u64 time_rx;
812815
u64 time_tx;
813816
u64 time_scan;
817+
u64 time_bss_rx;
814818
u32 filled;
815819
s8 noise;
816820
};

include/net/mac80211.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,6 +2463,8 @@ enum ieee80211_hw_flags {
24632463
*
24642464
* @weight_multiplier: Driver specific airtime weight multiplier used while
24652465
* refilling deficit of each TXQ.
2466+
*
2467+
* @max_mtu: the max mtu could be set.
24662468
*/
24672469
struct ieee80211_hw {
24682470
struct ieee80211_conf conf;
@@ -2500,6 +2502,7 @@ struct ieee80211_hw {
25002502
u8 max_nan_de_entries;
25012503
u8 tx_sk_pacing_shift;
25022504
u8 weight_multiplier;
2505+
u32 max_mtu;
25032506
};
25042507

25052508
static inline bool _ieee80211_hw_check(struct ieee80211_hw *hw,

include/uapi/linux/nl80211.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3870,6 +3870,8 @@ enum nl80211_user_reg_hint_type {
38703870
* @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan
38713871
* (on this channel or globally)
38723872
* @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment
3873+
* @NL80211_SURVEY_INFO_TIME_BSS_RX: amount of time the radio spent
3874+
* receiving frames destined to the local BSS
38733875
* @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
38743876
* currently defined
38753877
* @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
@@ -3886,6 +3888,7 @@ enum nl80211_survey_info {
38863888
NL80211_SURVEY_INFO_TIME_TX,
38873889
NL80211_SURVEY_INFO_TIME_SCAN,
38883890
NL80211_SURVEY_INFO_PAD,
3891+
NL80211_SURVEY_INFO_TIME_BSS_RX,
38893892

38903893
/* keep last */
38913894
__NL80211_SURVEY_INFO_AFTER_LAST,

net/mac80211/ibss.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
12521252

12531253
static void ieee80211_ibss_sta_expire(struct ieee80211_sub_if_data *sdata)
12541254
{
1255+
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
12551256
struct ieee80211_local *local = sdata->local;
12561257
struct sta_info *sta, *tmp;
12571258
unsigned long exp_time = IEEE80211_IBSS_INACTIVITY_LIMIT;
@@ -1268,10 +1269,17 @@ static void ieee80211_ibss_sta_expire(struct ieee80211_sub_if_data *sdata)
12681269
if (time_is_before_jiffies(last_active + exp_time) ||
12691270
(time_is_before_jiffies(last_active + exp_rsn) &&
12701271
sta->sta_state != IEEE80211_STA_AUTHORIZED)) {
1272+
u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
1273+
12711274
sta_dbg(sta->sdata, "expiring inactive %sSTA %pM\n",
12721275
sta->sta_state != IEEE80211_STA_AUTHORIZED ?
12731276
"not authorized " : "", sta->sta.addr);
12741277

1278+
ieee80211_send_deauth_disassoc(sdata, sta->sta.addr,
1279+
ifibss->bssid,
1280+
IEEE80211_STYPE_DEAUTH,
1281+
WLAN_REASON_DEAUTH_LEAVING,
1282+
true, frame_buf);
12751283
WARN_ON(__sta_info_destroy(sta));
12761284
}
12771285
}

0 commit comments

Comments
 (0)