Search Linux Wireless

Re: [PATCH 01/11] rtw88: fix rate mask for 1SS chip

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

 



On Fri, Dec 20, 2019 at 5:22 PM <yhchuang@xxxxxxxxxxx> wrote:
>
> From: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
>
> The rate mask is used to tell firmware the supported rate depends on
> negotiation. We loop 2 times for all VHT/HT 2SS rate mask first, and then
> only keep the part according to chip's NSS.
>
> This commit fixes the logic error of '&' operations for VHT/HT rate, and
> we should run this logic before adding legacy rate.
>
> To access HT MCS map, index 0/1 represent MCS 0-7/8-15 respectively. Use
> NL80211_BAND_xxx is incorrect, so fix it as well.
>
> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx>
> ---
Reviewed-by: Chris Chiu <chiu@xxxxxxxxxxxx>

>  drivers/net/wireless/realtek/rtw88/main.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index ae61415e1665..f369ddca953a 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -706,8 +706,8 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si)
>                 if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
>                         is_support_sgi = true;
>         } else if (sta->ht_cap.ht_supported) {
> -               ra_mask |= (sta->ht_cap.mcs.rx_mask[NL80211_BAND_5GHZ] << 20) |
> -                          (sta->ht_cap.mcs.rx_mask[NL80211_BAND_2GHZ] << 12);
> +               ra_mask |= (sta->ht_cap.mcs.rx_mask[1] << 20) |
> +                          (sta->ht_cap.mcs.rx_mask[0] << 12);
>                 if (sta->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
>                         stbc_en = HT_STBC_EN;
>                 if (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)
> @@ -717,6 +717,9 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si)
>                         is_support_sgi = true;
>         }
>
> +       if (efuse->hw_cap.nss == 1)
> +               ra_mask &= RA_MASK_VHT_RATES_1SS | RA_MASK_HT_RATES_1SS;
> +
>         if (hal->current_band_type == RTW_BAND_5G) {
>                 ra_mask |= (u64)sta->supp_rates[NL80211_BAND_5GHZ] << 4;
>                 if (sta->vht_cap.vht_supported) {
> @@ -750,11 +753,6 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si)
>                 wireless_set = 0;
>         }
>
> -       if (efuse->hw_cap.nss == 1) {
> -               ra_mask &= RA_MASK_VHT_RATES_1SS;
> -               ra_mask &= RA_MASK_HT_RATES_1SS;
> -       }
> -
>         switch (sta->bandwidth) {
>         case IEEE80211_STA_RX_BW_80:
>                 bw_mode = RTW_CHANNEL_WIDTH_80;
> --
> 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