beacon_timeout.patch (3325B)
1 diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c 2 index a2203f661321..82b24667b602 100644 3 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c 4 +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c 5 @@ -1779,6 +1779,7 @@ struct iwl_mod_params iwlwifi_mod_params = { 6 .power_level = IWL_POWER_INDEX_1, 7 .uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT, 8 .enable_ini = ENABLE_INI, 9 + .beacon_timeout = 16, 10 /* the rest are 0 by default */ 11 }; 12 IWL_EXPORT_SYMBOL(iwlwifi_mod_params); 13 @@ -1926,6 +1927,9 @@ module_param_cb(enable_ini, &enable_ini_ops, &iwlwifi_mod_params.enable_ini, 064 14 MODULE_PARM_DESC(enable_ini, 15 "0:disable, 1-15:FW_DBG_PRESET Values, 16:enabled without preset value defined," 16 "Debug INI TLV FW debug infrastructure (default: 16)"); 17 +module_param_named(beacon_timeout, iwlwifi_mod_params.beacon_timeout, uint, 0644); 18 +MODULE_PARM_DESC(beacon_timeout, 19 + "Number of missed beacons before disconnecting (default: 16)"); 20 21 /* 22 * set bt_coex_active to true, uCode will do kill/defer 23 diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h 24 index d0b4d02bdab9..942dfcb2ebbe 100644 25 --- a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h 26 +++ b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h 27 @@ -62,6 +62,7 @@ enum iwl_uapsd_disable { 28 * @disable_11ac: disable VHT capabilities, default = false. 29 * @remove_when_gone: remove an inaccessible device from the PCIe bus. 30 * @enable_ini: enable new FW debug infratructure (INI TLVs) 31 + * @beacon_timeout: number of missed beacons before disconnect, default = 16 32 */ 33 struct iwl_mod_params { 34 int swcrypto; 35 @@ -84,6 +85,7 @@ struct iwl_mod_params { 36 bool disable_11ax; 37 bool remove_when_gone; 38 u32 enable_ini; 39 + u32 beacon_timeout; 40 bool disable_11be; 41 }; 42 43 diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c 44 index 56fa20596f16..724063deddeb 100644 45 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c 46 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c 47 @@ -8,6 +8,7 @@ 48 #include <linux/crc32.h> 49 #include <net/mac80211.h> 50 #include "iwl-io.h" 51 +#include "iwl-modparams.h" 52 #include "iwl-prph.h" 53 #include "fw-api.h" 54 #include "mvm.h" 55 @@ -1398,7 +1399,7 @@ void iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm, 56 * TODO: the threshold should be adjusted based on latency conditions, 57 * and/or in case of a CS flow on one of the other AP vifs. 58 */ 59 - if (rx_missed_bcon > IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG) 60 + if (rx_missed_bcon > iwlwifi_mod_params.beacon_timeout) 61 iwl_mvm_connection_loss(mvm, vif, "missed beacons"); 62 else if (rx_missed_bcon_since_rx > IWL_MVM_MISSED_BEACONS_THRESHOLD) 63 ieee80211_beacon_loss(vif); 64 diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 65 index bf35e130c876..53097d4c0562 100644 66 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 67 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 68 @@ -39,7 +39,6 @@ 69 /* RSSI offset for WkP */ 70 #define IWL_RSSI_OFFSET 50 71 #define IWL_MVM_MISSED_BEACONS_THRESHOLD 8 72 -#define IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG 16 73 74 /* A TimeUnit is 1024 microsecond */ 75 #define MSEC_TO_TU(_msec) (_msec*1000/1024)