diff options
author | Nathan Errera <nathan.errera@intel.com> | 2020-10-08 18:09:37 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-10-08 20:09:25 +0300 |
commit | be9ae34ead42f88c024bc26d93ef829cd12a8446 (patch) | |
tree | 959bb69c6832c7f5fc9f9f9356f5197ffec13572 /drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |
parent | 8b2426c50f20d6f9ca4c4e42bb7afcb312daec6a (diff) | |
download | linux-be9ae34ead42f88c024bc26d93ef829cd12a8446.tar.xz |
iwlwifi: mvm: get number of stations from TLV
FW is changing the max number of supported stations. To adapt to the
change we get the max number from the TLV and act according to the new
number.
Signed-off-by: Nathan Errera <nathan.errera@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20201008180656.863ab470babc.I393223392f36436663c4e66add03fefe77b74e60@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 2a9075b1b374..9dcd2e990c9c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -76,6 +76,7 @@ #include "iwl-config.h" #include "iwl-modparams.h" #include "fw/api/alive.h" +#include "fw/api/mac.h" /****************************************************************************** * @@ -1127,6 +1128,19 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, fseq_ver->version); } break; + case IWL_UCODE_TLV_FW_NUM_STATIONS: + if (tlv_len != sizeof(u32)) + goto invalid_tlv_len; + if (le32_to_cpup((__le32 *)tlv_data) > + IWL_MVM_STATION_COUNT_MAX) { + IWL_ERR(drv, + "%d is an invalid number of station\n", + le32_to_cpup((__le32 *)tlv_data)); + goto tlv_error; + } + capa->num_stations = + le32_to_cpup((__le32 *)tlv_data); + break; case IWL_UCODE_TLV_UMAC_DEBUG_ADDRS: { struct iwl_umac_debug_addrs *dbg_ptrs = (void *)tlv_data; @@ -1348,6 +1362,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) fw->ucode_capa.standard_phy_calibration_size = IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE; fw->ucode_capa.n_scan_channels = IWL_DEFAULT_SCAN_CHANNELS; + fw->ucode_capa.num_stations = IWL_MVM_STATION_COUNT_MAX; /* dump all fw memory areas by default */ fw->dbg.dump_mask = 0xffffffff; |