Search Linux Wireless

Re: [PATCH iwlwifi-fixes v3] wifi: iwlwifi: mvm: assume '1' as the default mac_config_cmd version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miri,

On 6/24/25 13:35, Miri Korenblit wrote:
> Unfortunately, FWs of some devices don't have the version of the
> iwl_mac_config_cmd defined in the TLVs. We send 0 as the 'def argument
> to  iwl_fw_lookup_cmd_ver, so for such FWs, the return value will be 0,
> leading to a warning, and to not sending the command.
> 
> Fix this by assuming that the default version is 1.
> 
> Fixes: df6146a0296e ("wifi: iwlwifi: Add a new version for mac config command")
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>

Should the fixes tag be for 83f3ac2848b4 instead since that is the commit that introduced breakage without this commit. See: https://lore.kernel.org/1b3f2387-e27f-4b74-99b7-0596a9331a1e@xxxxxxxxxxx/

-- 
Regards,
  Eric

> ---
> v2: removed the check if the ver is smaller than 1, as it can't happen
> now.
> v3: added a Fixes tag
> 
>  drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c
> index 3c255ae916c8..3f8b840871d3 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c
> @@ -32,9 +32,9 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
>  	unsigned int link_id;
>  	int cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
>  					    WIDE_ID(MAC_CONF_GROUP,
> -						    MAC_CONFIG_CMD), 0);
> +						    MAC_CONFIG_CMD), 1);
>  
> -	if (WARN_ON(cmd_ver < 1 || cmd_ver > 3))
> +	if (WARN_ON(cmd_ver > 3))
>  		return;
>  
>  	cmd->id_and_color = cpu_to_le32(mvmvif->id);




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux