Search Linux Wireless

Re: [PATCH v2 5/6] rtw88: add set_bitrate_mask support

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

 



On Wed, Oct 16, 2019 at 8:33 PM <yhchuang@xxxxxxxxxxx> wrote:
>
> From: Tzu-En Huang <tehuang@xxxxxxxxxxx>
>

> +
> +       band = hal->current_band_type;
> +       if (band == RTW_BAND_2G) {
> +               band = NL80211_BAND_2GHZ;
> +               cfg_mask = mask->control[band].legacy;
> +       } else if (band == RTW_BAND_5G) {
> +               band = NL80211_BAND_5GHZ;
> +               cfg_mask = mask->control[band].legacy << 4;
> +       }
> +
> +       if (!is_vht_enable) {
> +               if (ra_mask & RA_MASK_HT_RATES_1SS)
> +                       cfg_mask |= mask->control[band].ht_mcs[0] << 12;
> +               if (ra_mask & RA_MASK_HT_RATES_2SS)
> +                       cfg_mask |= mask->control[band].ht_mcs[1] << 20;
> +       } else {
> +               if (ra_mask & RA_MASK_VHT_RATES_1SS)
> +                       cfg_mask |= mask->control[band].vht_mcs[0] << 12;
> +               if (ra_mask & RA_MASK_VHT_RATES_2SS)
> +                       cfg_mask |= mask->control[band].vht_mcs[1] << 22;
> +       }
> +
> +       ra_mask &= cfg_mask;
> +
> +       return ra_mask;
> +}
> +

I believe you can replace the 4, 12, 20, 22 with a more descriptive macro.

Chris

> --
> 2.17.1
>



[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