summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorKuan-Chung Chen <damon.chen@realtek.com>2022-09-22 09:27:37 +0800
committerKalle Valo <kvalo@kernel.org>2022-09-24 15:37:40 +0300
commitf3d8232331a3f4eaac1ab9a8679e5aedb2c33758 (patch)
tree4f7ff25e4c038a951af7f1c7f600d9ed753560c2 /drivers/net/wireless
parent8d540f9d29162e273797bef36686a010724f0f8a (diff)
wifi: rtw89: support for enable/disable MSDU aggregation
To enable/disable amsdu in set_tid_config, and currently only support to configure all tids (==0xff) for AMSDU, not individual tid. The command example is: iw wlan0 set tidconf tids 0xff amsdu off iw wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0xff amsdu on Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220922012737.15091-1-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/realtek/rtw89/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 25f759a8a5c5..7f75d05c004f 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2602,6 +2602,13 @@ static void _rtw89_core_set_tid_config(struct rtw89_dev *rtwdev,
spin_unlock_bh(&rtwdev->ba_lock);
}
}
+
+ if (mask & BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL) && tids == 0xff) {
+ if (tid_conf->amsdu == NL80211_TID_CONFIG_ENABLE)
+ sta->max_amsdu_subframes = 0;
+ else
+ sta->max_amsdu_subframes = 1;
+ }
}
}
@@ -3261,6 +3268,8 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev)
hw->wiphy->tid_config_support.vif |= BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL);
hw->wiphy->tid_config_support.peer |= BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL);
+ hw->wiphy->tid_config_support.vif |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL);
+ hw->wiphy->tid_config_support.peer |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL);
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);