[F/Unstable] [PATCH 2/3] UBUNTU: SAUCE: rtw88: fix rate for a while after being connected
Kai-Heng Feng
kai.heng.feng at canonical.com
Tue Apr 7 06:05:15 UTC 2020
From: Ping-Ke Shih <pkshih at realtek.com>
BugLink: https://bugs.launchpad.net/bugs/1871300
Use low rate to issue auth/assoc to ensure AP can receive these packets
with higher probability.
Change-Id: Ic500bbd14687d623e1e98a2ab6f9ba15055201a9
Signed-off-by: Ping-Ke Shih <pkshih at realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
drivers/net/wireless/realtek/rtw88/mac80211.c | 4 ++++
drivers/net/wireless/realtek/rtw88/main.h | 2 ++
drivers/net/wireless/realtek/rtw88/tx.c | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index f92515039e96..3c6ae6e6cf51 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -355,11 +355,15 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
rtw_coex_media_status_notify(rtwdev, conf->assoc);
if (rtw_bf_support)
rtw_bf_assoc(rtwdev, vif, conf);
+
+ rtwdev->fix_rate_count = 20;
} else {
rtw_leave_lps(rtwdev);
net_type = RTW_NET_NO_LINK;
rtwvif->aid = 0;
rtw_bf_disassoc(rtwdev, vif, conf);
+
+ rtwdev->fix_rate_count = 0;
}
rtwvif->net_type = net_type;
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index f311adeb4853..021fdb41ff4d 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -1761,6 +1761,8 @@ struct rtw_dev {
struct rtw_sar sar;
+ u32 fix_rate_count;
+
/* hci related data, must be last */
u8 priv[0] __aligned(sizeof(void *));
};
diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
index 88c57fe46857..794d134d2dfe 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.c
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
@@ -376,6 +376,11 @@ void rtw_tx_pkt_info_update(struct rtw_dev *rtwdev,
else if (ieee80211_is_data(fc))
rtw_tx_data_pkt_info_update(rtwdev, pkt_info, control, skb);
+ if (rtwdev->fix_rate_count) {
+ rtwdev->fix_rate_count--;
+ rtw_tx_pkt_info_update_rate(rtwdev, pkt_info, skb);
+ }
+
bmc = is_broadcast_ether_addr(hdr->addr1) ||
is_multicast_ether_addr(hdr->addr1);
--
2.17.1
More information about the kernel-team
mailing list