summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtw88/main.h
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2019-10-02 14:35:21 +0800
committerKalle Valo <kvalo@codeaurora.org>2019-10-04 16:44:56 +0300
commit46ebb1743f339eae14daaa3afe094957f6b67d1d (patch)
treeb12411c21eb411a838586da234285dcb1acd24b1 /drivers/net/wireless/realtek/rtw88/main.h
parent3745d3e550d1e6c4301596ac05a5fe82c11301ce (diff)
downloadlinux-46ebb1743f339eae14daaa3afe094957f6b67d1d.tar.bz2
rtw88: take over rate control from mac80211
We can indicate IEEE80211_HW_HAS_RATE_CONTROL to mac80211 because the hardware has its own rate control algorithm. And what driver needs to do is to choose an RA mask according the peer's capabilities. But the hardware is not able to setup BA session by itself. So driver requires to initiate tx BA session for hardware, and tells it if it is possible to transmit AMPDU. The hardware can then aggregate MPDUs. And the size of AMPDU is controlled by the TX descriptor and the register value. Since the TX descriptor will reference the max AMPDU size from ieee80211_sta::ht_cap::ampdu_factor, just set the register value to 0x3f, and let it be controlled by TX descriptor. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/main.h')
-rw-r--r--drivers/net/wireless/realtek/rtw88/main.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index cfe94a685dde..dcf806ac8155 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -306,6 +306,11 @@ enum rtw_regulatory_domains {
RTW_REGD_MAX
};
+enum rtw_txq_flags {
+ RTW_TXQ_AMPDU,
+ RTW_TXQ_BLOCK_BA,
+};
+
enum rtw_flags {
RTW_FLAG_RUNNING,
RTW_FLAG_FW_RUNNING,
@@ -589,6 +594,8 @@ struct rtw_tx_report {
struct rtw_txq {
struct list_head list;
+
+ unsigned long flags;
unsigned long last_push;
};
@@ -614,6 +621,8 @@ struct rtw_sta_info {
bool updated;
u8 init_ra_lv;
u64 ra_mask;
+
+ DECLARE_BITMAP(tid_ba, IEEE80211_NUM_TIDS);
};
struct rtw_vif {
@@ -1370,6 +1379,7 @@ struct rtw_dev {
spinlock_t txq_lock;
struct list_head txqs;
struct tasklet_struct tx_tasklet;
+ struct work_struct ba_work;
struct rtw_tx_report tx_report;