summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtw88/rtw8822b.c
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2019-09-12 08:39:15 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-09-13 17:07:19 +0200
commit98ab76ef6b6d16f3fcb5e13ed19448bcc7de83d2 (patch)
tree47f5969c2b1b841f199186dd9bf19b80954cfbd3 /drivers/net/wireless/realtek/rtw88/rtw8822b.c
parentrtw88: fix wrong rx power calculation (diff)
downloadlinux-98ab76ef6b6d16f3fcb5e13ed19448bcc7de83d2.tar.xz
linux-98ab76ef6b6d16f3fcb5e13ed19448bcc7de83d2.zip
rtw88: report RX power for each antenna
Report chains and chain_signal in ieee80211_rx_status. It is useful for program such as tcpdump to see if the antennas are well connected/placed. 8822C is able to receive CCK rates with 2 antennas, while 8822B can only use 1 antenna path to receive CCK rates. 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/rtw8822b.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/rtw8822b.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 7056ea31c1d8..63abda3b0ebf 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -766,6 +766,7 @@ static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status,
s8 min_rx_power = -120;
u8 pwdb = GET_PHY_STAT_P0_PWDB(phy_status);
+ /* 8822B uses only 1 antenna to RX CCK rates */
pkt_stat->rx_power[RF_PATH_A] = pwdb - 110;
pkt_stat->rssi = rtw_phy_rf_power_2_rssi(pkt_stat->rx_power, 1);
pkt_stat->bw = RTW_CHANNEL_WIDTH_20;