mt76: add EHT 1K aggregation definitions backport

This commit is contained in:
coolsnowwolf 2022-11-13 19:50:36 +08:00
parent 0583068db1
commit 1770fdd319
2 changed files with 41 additions and 4 deletions

View File

@ -1,16 +1,16 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mt76 PKG_NAME:=mt76
PKG_RELEASE=4 PKG_RELEASE=5
PKG_LICENSE:=GPLv2 PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:= PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-11-11 PKG_SOURCE_DATE:=2022-11-13
PKG_SOURCE_VERSION:=4a27f23fc4f22510db81513680666be7e72ccb61 PKG_SOURCE_VERSION:=4bf2607362fc64fc4cb7d662feb736b7536c0811
PKG_MIRROR_HASH:=2cb9a446c6df7d56efc8ace46227964b492bdc3cae6bdbcc2e03fdd1b836b5a6 PKG_MIRROR_HASH:=38ba1475fd53758290f6d07c8e838486fd6d67425d8939a487734ae739f9025d
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0 PKG_USE_NINJA:=0

View File

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