[][MAC80211][core][support configurable addba resp timer]

[Description]
Fix
support configurable addba resp time. Default value is 2 seconds to align with Logan

[Release-log]


Change-Id: I35aeff4310ed42dd4d86e8d980ad77eb2e559f5b
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7605764
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/mtk-0018-mac80211-support-configurable-addba-resp-time.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/mtk-0018-mac80211-support-configurable-addba-resp-time.patch
new file mode 100644
index 0000000..759d36b
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/mtk-0018-mac80211-support-configurable-addba-resp-time.patch
@@ -0,0 +1,42 @@
+From 0236a4a01f3f3ed932ab326de0deef6911519dab Mon Sep 17 00:00:00 2001
+From: Lian Chen <lian.chen@mediatek.com>
+Date: Wed, 7 Jun 2023 15:30:34 +0800
+Subject: [PATCH] support configurable addba resp time.
+
+---
+ net/mac80211/agg-tx.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
+index 6992c1f..ad0c0d6 100644
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -16,10 +16,16 @@
+ #include <linux/slab.h>
+ #include <linux/export.h>
+ #include <net/mac80211.h>
++#include <linux/moduleparam.h>
+ #include "ieee80211_i.h"
+ #include "driver-ops.h"
+ #include "wme.h"
+ 
++static int addba_resp_wait_count = 2;
++module_param(addba_resp_wait_count, int, 0644);
++MODULE_PARM_DESC(addba_resp_wait_count,
++		 "Number of ADDBA_RESP_INTERVAL to wait for addba response");
++
+ /**
+  * DOC: TX A-MPDU aggregation
+  *
+@@ -460,7 +466,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
+ 	u16 buf_size;
+ 
+ 	/* activate the timer for the recipient's addBA response */
+-	mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
++	mod_timer(&tid_tx->addba_resp_timer, jiffies + addba_resp_wait_count * ADDBA_RESP_INTERVAL);
+ 	ht_dbg(sdata, "activated addBA response timer on %pM tid %d\n",
+ 	       sta->sta.addr, tid);
+ 
+-- 
+2.18.0
+
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mac80211-support-configurable-addba-resp-time.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mac80211-support-configurable-addba-resp-time.patch
new file mode 100644
index 0000000..759d36b
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mac80211-support-configurable-addba-resp-time.patch
@@ -0,0 +1,42 @@
+From 0236a4a01f3f3ed932ab326de0deef6911519dab Mon Sep 17 00:00:00 2001
+From: Lian Chen <lian.chen@mediatek.com>
+Date: Wed, 7 Jun 2023 15:30:34 +0800
+Subject: [PATCH] support configurable addba resp time.
+
+---
+ net/mac80211/agg-tx.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
+index 6992c1f..ad0c0d6 100644
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -16,10 +16,16 @@
+ #include <linux/slab.h>
+ #include <linux/export.h>
+ #include <net/mac80211.h>
++#include <linux/moduleparam.h>
+ #include "ieee80211_i.h"
+ #include "driver-ops.h"
+ #include "wme.h"
+ 
++static int addba_resp_wait_count = 2;
++module_param(addba_resp_wait_count, int, 0644);
++MODULE_PARM_DESC(addba_resp_wait_count,
++		 "Number of ADDBA_RESP_INTERVAL to wait for addba response");
++
+ /**
+  * DOC: TX A-MPDU aggregation
+  *
+@@ -460,7 +466,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
+ 	u16 buf_size;
+ 
+ 	/* activate the timer for the recipient's addBA response */
+-	mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
++	mod_timer(&tid_tx->addba_resp_timer, jiffies + addba_resp_wait_count * ADDBA_RESP_INTERVAL);
+ 	ht_dbg(sdata, "activated addBA response timer on %pM tid %d\n",
+ 	       sta->sta.addr, tid);
+ 
+-- 
+2.18.0
+