[PATCH ath-next] wifi: ath12k: Fix incorrect rates sent to firmware
Roopni Devanathan
quic_rdevanat at quicinc.com
Wed Mar 19 04:07:29 PDT 2025
On 3/19/2025 7:43 AM, Ping-Ke Shih wrote:
>
>> @@ -3450,7 +3450,9 @@ static void ath12k_recalculate_mgmt_rate(struct ath12k *ar,
>> }
>>
>> sband = hw->wiphy->bands[def->chan->band];
>> - basic_rate_idx = ffs(bss_conf->basic_rates) - 1;
>> + basic_rate_idx = ffs(bss_conf->basic_rates);
>> + if (basic_rate_idx)
>> + basic_rate_idx -= 1;
>
> Using __ffs() might be more readable, like
>
> u8 basic_rate_idx = 0;
>
> ...
>
> if (bss_conf->basic_rates)
> basic_rate_idx = __ffs(bss_conf->basic_rates);
>
>
>
Thanks for the suggestion. I'll change this in my next version.
More information about the ath12k
mailing list