developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 1 | From 19b60e35c6662ae573af038a5fec349366e3269a Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: TomLiu <tomml.liu@mediatek.com> |
| 3 | Date: Wed, 14 Dec 2022 00:26:50 -0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 23/89] mtk: mac80211: fix tx amsdu aggregation |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | include/net/mac80211.h | 7 +++++++ |
| 8 | net/mac80211/agg-tx.c | 6 ++++-- |
| 9 | 2 files changed, 11 insertions(+), 2 deletions(-) |
| 10 | |
| 11 | diff --git a/include/net/mac80211.h b/include/net/mac80211.h |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 12 | index 1953f91..859afcf 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 13 | --- a/include/net/mac80211.h |
| 14 | +++ b/include/net/mac80211.h |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 15 | @@ -3074,6 +3074,13 @@ static inline void _ieee80211_hw_set(struct ieee80211_hw *hw, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 16 | } |
| 17 | #define ieee80211_hw_set(hw, flg) _ieee80211_hw_set(hw, IEEE80211_HW_##flg) |
| 18 | |
| 19 | +static inline void _ieee80211_hw_clear(struct ieee80211_hw *hw, |
| 20 | + enum ieee80211_hw_flags flg) |
| 21 | +{ |
| 22 | + return __clear_bit(flg, hw->flags); |
| 23 | +} |
| 24 | +#define ieee80211_hw_clear(hw, flg) _ieee80211_hw_clear(hw, IEEE80211_HW_##flg) |
| 25 | + |
| 26 | /** |
| 27 | * struct ieee80211_scan_request - hw scan request |
| 28 | * |
| 29 | diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 30 | index 677bbba..589494f 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 31 | --- a/net/mac80211/agg-tx.c |
| 32 | +++ b/net/mac80211/agg-tx.c |
| 33 | @@ -66,7 +66,8 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, |
| 34 | struct ieee80211_local *local = sdata->local; |
| 35 | struct sk_buff *skb; |
| 36 | struct ieee80211_mgmt *mgmt; |
| 37 | - u16 capab; |
| 38 | + u16 capab = 0; |
| 39 | + bool amsdu = ieee80211_hw_check(&local->hw, SUPPORTS_AMSDU_IN_AMPDU); |
| 40 | |
| 41 | skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom); |
| 42 | |
| 43 | @@ -95,7 +96,8 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, |
| 44 | mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ; |
| 45 | |
| 46 | mgmt->u.action.u.addba_req.dialog_token = dialog_token; |
| 47 | - capab = IEEE80211_ADDBA_PARAM_AMSDU_MASK; |
| 48 | + if (amsdu) |
| 49 | + capab = IEEE80211_ADDBA_PARAM_AMSDU_MASK; |
| 50 | capab |= IEEE80211_ADDBA_PARAM_POLICY_MASK; |
| 51 | capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK); |
| 52 | capab |= u16_encode_bits(agg_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK); |
| 53 | -- |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 54 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 55 | |