Skip to content

Commit 916a5d9

Browse files
gabaydjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room()
Driver creates also the WFA TPC element, consider that in the calculation. Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20240825191257.e710ce446b7f.I2715c6742e9c3d160e2ba41bc4b35de370d2ce34@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent d441622 commit 916a5d9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mvm

drivers/net/wireless/intel/iwlwifi/mvm/scan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
/* Number of iterations on the channel for mei filtered scan */
4949
#define IWL_MEI_SCAN_NUM_ITER 5U
5050

51+
#define WFA_TPC_IE_LEN 9
52+
5153
struct iwl_mvm_scan_timing_params {
5254
u32 suspend_time;
5355
u32 max_out_time;
@@ -303,8 +305,8 @@ static int iwl_mvm_max_scan_ie_fw_cmd_room(struct iwl_mvm *mvm)
303305

304306
max_probe_len = SCAN_OFFLOAD_PROBE_REQ_SIZE;
305307

306-
/* we create the 802.11 header and SSID element */
307-
max_probe_len -= 24 + 2;
308+
/* we create the 802.11 header SSID element and WFA TPC element */
309+
max_probe_len -= 24 + 2 + WFA_TPC_IE_LEN;
308310

309311
/* DS parameter set element is added on 2.4GHZ band if required */
310312
if (iwl_mvm_rrm_scan_needed(mvm))
@@ -731,8 +733,6 @@ static u8 *iwl_mvm_copy_and_insert_ds_elem(struct iwl_mvm *mvm, const u8 *ies,
731733
return newpos;
732734
}
733735

734-
#define WFA_TPC_IE_LEN 9
735-
736736
static void iwl_mvm_add_tpc_report_ie(u8 *pos)
737737
{
738738
pos[0] = WLAN_EID_VENDOR_SPECIFIC;

0 commit comments

Comments
 (0)