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/rtw8822c.c | |
parent | bafbc6f0b51b0bb8566c5d8ec255838c8cfe3545 (diff) |
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/rtw8822c.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index d49c8b697e4f..56de9d0c5c10 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -1482,7 +1482,7 @@ static void rtw8822c_set_channel_bb(struct rtw_dev *rtwdev, u8 channel, u8 bw, break; case RTW_CHANNEL_WIDTH_40: rtw_write32_mask(rtwdev, REG_CCKSB, BIT(4), - (primary_ch_idx == 1 ? 1 : 0)); + (primary_ch_idx == RTW_SC_20_UPPER ? 1 : 0)); rtw_write32_mask(rtwdev, REG_TXBWCTL, 0xf, 0x5); rtw_write32_mask(rtwdev, REG_TXBWCTL, 0xc0, 0x0); rtw_write32_mask(rtwdev, REG_TXBWCTL, 0xff00, |