Search Linux Wireless

RE: [PATCH ath-next] wifi: ath12k: Fix incorrect rates sent to firmware

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

 



> @@ -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);








[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