From: Daniel Gabay Date: Mon, 10 Nov 2025 13:02:13 +0000 (+0200) Subject: wifi: iwlwifi: mld: Remove wrong channel flags in scan cmd X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5ee8b255451611590b10b5df18625f02b3741c7;p=thirdparty%2Fkernel%2Flinux.git wifi: iwlwifi: mld: Remove wrong channel flags in scan cmd 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 Link: https://patch.msgid.link/20251110150012.a8a931e1abef.I8f7dc66b23198b83083685ef76dec59cfb407f57@changeid --- 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,