diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2019-05-07 10:28:18 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-05-28 14:30:05 +0300 |
commit | a24bad74737f4c8814e0669d38dba5f2ddb86514 (patch) | |
tree | 23a3d816a991f1bc3b106aa0588a0af488d8934b /drivers/net/wireless/realtek | |
parent | 8a03447dd311da2ad2df74dcf730a1a15f673379 (diff) | |
download | linux-a24bad74737f4c8814e0669d38dba5f2ddb86514.tar.gz linux-a24bad74737f4c8814e0669d38dba5f2ddb86514.tar.bz2 linux-a24bad74737f4c8814e0669d38dba5f2ddb86514.zip |
rtw88: fix unassigned rssi_level in rtw_sta_info
The new rssi_level should be stored in si, otherwise the rssi_level will
never be updated and get a wrong RA mask, which is calculated by the
rssi level
If a wrong RA mask is chosen, the firmware will pick some *bad rates*.
The most hurtful scene will be in *noisy environment*, such as office or
public area with many APs and users.
The latency would be high and the overall throughput would be only half
or less.
Tested in 2.4G in office area, with this patch the throughput increased
from such as "1x Mbps -> 4x Mbps".
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c index 8284a7797398..77b8c02b5ac6 100644 --- a/drivers/net/wireless/realtek/rtw88/phy.c +++ b/drivers/net/wireless/realtek/rtw88/phy.c @@ -144,10 +144,10 @@ static void rtw_phy_stat_rssi_iter(void *data, struct ieee80211_sta *sta) struct rtw_phy_stat_iter_data *iter_data = data; struct rtw_dev *rtwdev = iter_data->rtwdev; struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; - u8 rssi, rssi_level; + u8 rssi; rssi = ewma_rssi_read(&si->avg_rssi); - rssi_level = rtw_phy_get_rssi_level(si->rssi_level, rssi); + si->rssi_level = rtw_phy_get_rssi_level(si->rssi_level, rssi); rtw_fw_send_rssi_info(rtwdev, si); |