diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2020-01-30 13:31:11 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-02-12 18:20:39 +0200 |
commit | 40fb04b22f31e17aeb7740bba36cf3297f689f46 (patch) | |
tree | b2513c0a1939daf561a52a7595b3180c29271393 /drivers/net/wireless/realtek/rtw88/mac.c | |
parent | bafbc6f0b51b0bb8566c5d8ec255838c8cfe3545 (diff) | |
download | linux-40fb04b22f31e17aeb7740bba36cf3297f689f46.tar.bz2 |
rtw88: Use secondary channel offset enumeration
The hardware value of secondary channel offset isn't very intuitive. This
commit adds enumeration, so we can easier to check the logic with the
suffix of enumeration name, likes _UPPER or _LOWER.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/mac.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/mac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c index cadf0abbe16b..ec2c1adcb900 100644 --- a/drivers/net/wireless/realtek/rtw88/mac.c +++ b/drivers/net/wireless/realtek/rtw88/mac.c @@ -17,10 +17,10 @@ void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw, txsc20 = primary_ch_idx; if (bw == RTW_CHANNEL_WIDTH_80) { - if (txsc20 == 1 || txsc20 == 3) - txsc40 = 9; + if (txsc20 == RTW_SC_20_UPPER || txsc20 == RTW_SC_20_UPMOST) + txsc40 = RTW_SC_40_UPPER; else - txsc40 = 10; + txsc40 = RTW_SC_40_LOWER; } rtw_write8(rtwdev, REG_DATA_SC, BIT_TXSC_20M(txsc20) | BIT_TXSC_40M(txsc40)); |