diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2019-09-12 14:39:15 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-09-13 18:07:19 +0300 |
commit | 98ab76ef6b6d16f3fcb5e13ed19448bcc7de83d2 (patch) | |
tree | 47f5969c2b1b841f199186dd9bf19b80954cfbd3 /drivers/net/wireless/realtek/rtw88/rx.c | |
parent | rtw88: fix wrong rx power calculation (diff) | |
download | linux-dev-98ab76ef6b6d16f3fcb5e13ed19448bcc7de83d2.tar.xz linux-dev-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 '')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/rx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/rx.c b/drivers/net/wireless/realtek/rtw88/rx.c index 4d837f0c6d5f..48b9ed49b79a 100644 --- a/drivers/net/wireless/realtek/rtw88/rx.c +++ b/drivers/net/wireless/realtek/rtw88/rx.c @@ -90,6 +90,7 @@ void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev, u8 *phy_status) { struct ieee80211_hw *hw = rtwdev->hw; + u8 path; memset(rx_status, 0, sizeof(*rx_status)); rx_status->freq = hw->conf.chandef.chan->center_freq; @@ -146,6 +147,10 @@ void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev, rx_status->bw = RATE_INFO_BW_20; rx_status->signal = pkt_stat->signal_power; + for (path = 0; path < rtwdev->hal.rf_path_num; path++) { + rx_status->chains |= BIT(path); + rx_status->chain_signal[path] = pkt_stat->rx_power[path]; + } rtw_rx_addr_match(rtwdev, pkt_stat, hdr); } |