From: Daniel Gabay Erroneously, the channel flags in the scan command for 6 GHz scan were mistakenly set using iwl_mld_scan_get_cmd_gen_flags, which actually calculates a different field (the general flags) in the command. However, these flags are not relevant for 6 GHz scan part, except for IWL_SCAN_CHANNEL_FLAG_6G_PSC_NO_FILTER, which is already set correctly. Since the incorrect flags are only applied in the 6 GHz scan part and are ignored by the firmware, this has no adverse effect. Therefore, we can simply remove this helper function call and explicitly clear the flags. Signed-off-by: Daniel Gabay Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/scan.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/scan.c b/drivers/net/wireless/intel/iwlwifi/mld/scan.c index fd1022ddc912..16f48087a888 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/scan.c @@ -1063,14 +1063,15 @@ static int iwl_mld_scan_cmd_set_6ghz_chan_params(struct iwl_mld *mld, struct iwl_mld_scan_params *params, struct ieee80211_vif *vif, - struct iwl_scan_req_params_v17 *scan_p, - enum iwl_mld_scan_status scan_status) + struct iwl_scan_req_params_v17 *scan_p) { struct iwl_scan_channel_params_v7 *chan_p = &scan_p->channel_params; struct iwl_scan_probe_params_v4 *probe_p = &scan_p->probe_params; - chan_p->flags = iwl_mld_scan_get_cmd_gen_flags(mld, params, vif, - scan_status); + /* Explicitly clear the flags since most of them are not + * relevant for 6 GHz scan. + */ + chan_p->flags = 0; chan_p->count = iwl_mld_scan_cfg_channels_6g(mld, params, params->n_channels, probe_p, chan_p, @@ -1106,8 +1107,7 @@ iwl_mld_scan_cmd_set_chan_params(struct iwl_mld *mld, if (params->scan_6ghz) return iwl_mld_scan_cmd_set_6ghz_chan_params(mld, params, - vif, scan_p, - scan_status); + vif, scan_p); /* relevant only for 2.4 GHz/5 GHz scan */ cp->flags = iwl_mld_scan_cmd_set_chan_flags(mld, params, vif, -- 2.34.1