diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2020-05-04 18:50:05 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-05-06 11:34:17 +0300 |
commit | 5f028a9cf4b9e503151b25284384269beb0b742e (patch) | |
tree | c0ea8117f07e3c5f7825484e3e4f663b6cb924cf /drivers/net/wireless/realtek/rtw88/mac.c | |
parent | 158441a2bed49ea294cc79709bf88e17a7b71912 (diff) | |
download | lwn-5f028a9cf4b9e503151b25284384269beb0b742e.tar.gz lwn-5f028a9cf4b9e503151b25284384269beb0b742e.zip |
rtw88: 8723d: Add set_channel
Set MAC/BB/RF register according to specified channel. The function
rtw_set_channel_mac() is used to set MAC registers, but 8723D only need
some of them.
For channel 14, we need to set different CCK DFIR values, so restore the
values when channel 1 to 13 is selected.
Spur calibration is needed in channel 13 and 14, and we do notch if spur
is over threshold.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-4-yhchuang@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/mac.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/mac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c index bd82b48e02f4..e8ffeb338584 100644 --- a/drivers/net/wireless/realtek/rtw88/mac.c +++ b/drivers/net/wireless/realtek/rtw88/mac.c @@ -40,6 +40,9 @@ void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw, } rtw_write32(rtwdev, REG_WMAC_TRXPTCL_CTL, value32); + if (rtw_chip_wcpu_11n(rtwdev)) + return; + value32 = rtw_read32(rtwdev, REG_AFE_CTRL1) & ~(BIT_MAC_CLK_SEL); value32 |= (MAC_CLK_HW_DEF_80M << BIT_SHIFT_MAC_CLK_SEL); rtw_write32(rtwdev, REG_AFE_CTRL1, value32); |