1 From 2994307fe092a9627e12ad7cd9f32f4d36c201d8 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Sun, 25 Sep 2022 15:58:37 +0200
4 Subject: [PATCH] mt76: mt7915: fix changed IEEE80211_MAX_AMPDU_BUF define in
7 New kernel use IEEE80211_MAX_AMPDU_BUF_HE instead of
8 IEEE80211_MAX_AMPDU_BUF.
9 This got backported to stable kernel 5.15.61 and cause compilation
11 Add required ifdef to handle this changed define.
13 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
15 mt7915/init.c | 5 +++++
16 1 file changed, 5 insertions(+)
18 diff --git a/mt7915/init.c b/mt7915/init.c
19 index 489f6e77..1813370a 100644
22 @@ -327,8 +327,13 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
23 struct mt7915_dev *dev = phy->dev;
26 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 61))
27 hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
28 hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
30 + hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
31 + hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
33 hw->netdev_features = NETIF_F_RXCSUM;
35 hw->radiotap_timestamp.units_pos =