[][MAC80211][core][Remove BA timer AX210 IOT Issue]

[Description]
Remove BA timer for AX210 IOT issue, MAC80211 trigger DEL BA
repeatedly when traffic through hw path.

Support kasan/swpath build.

[Release-log]
N/A

Change-Id: I3d2bf78ee947a761f4741310e6cd812efe445df9
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6581420
Build: srv_hbgsm110
diff --git a/autobuild_mac80211_release/mt7622_mt7915_mac80211/.config b/autobuild_mac80211_release/mt7622_mt7915_mac80211/.config
index 90c7959..5c1c773 100644
--- a/autobuild_mac80211_release/mt7622_mt7915_mac80211/.config
+++ b/autobuild_mac80211_release/mt7622_mt7915_mac80211/.config
@@ -189,7 +189,7 @@
 # CONFIG_IPK_FILES_CHECKSUMS is not set
 # CONFIG_INCLUDE_CONFIG is not set
 # CONFIG_REPRODUCIBLE_DEBUG_INFO is not set
-# CONFIG_COLLECT_KERNEL_DEBUG is not set
+CONFIG_COLLECT_KERNEL_DEBUG=y
 
 #
 # Kernel build options
diff --git a/autobuild_mac80211_release/mt7986_mac80211/.config b/autobuild_mac80211_release/mt7986_mac80211/.config
index 3025ea4..172cac7 100644
--- a/autobuild_mac80211_release/mt7986_mac80211/.config
+++ b/autobuild_mac80211_release/mt7986_mac80211/.config
@@ -215,7 +215,7 @@
 # CONFIG_IPK_FILES_CHECKSUMS is not set
 # CONFIG_INCLUDE_CONFIG is not set
 # CONFIG_REPRODUCIBLE_DEBUG_INFO is not set
-# CONFIG_COLLECT_KERNEL_DEBUG is not set
+CONFIG_COLLECT_KERNEL_DEBUG=y
 
 #
 # Kernel build options
diff --git a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
index 24a6f12..ba5d6c0 100755
--- a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
@@ -4,6 +4,56 @@
 #get the brach_name
 temp=${0%/*}
 branch_name=${temp##*/}
+swpath=0
+kasan=0
+args=
+
+for arg in $*; do
+	case "$arg" in
+	"swpath")
+		swpath=1
+		;;
+	"kasan")
+		kasan=1
+		;;
+	*)
+		args="$args $arg"
+		;;
+	esac
+done
+set -- $args
+
+change_dot_config() {
+	[ "$swpath" = "1" ] && {
+                sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		sed -i 's/CONFIG_NETFILTER_FAMILY_BRIDGE=y/# CONFIG_NETFILTER_FAMILY_BRIDGE is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7622/config-5.4
+		sed -i 's/CONFIG_NETFILTER_FAMILY_BRIDGE=y/# CONFIG_NETFILTER_FAMILY_BRIDGE is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7622/config-5.4
+		sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7622/config-5.4
+		sed -i '/AUTOLOAD:=$(call AutoProbe,mt7915e)/a\  MODPARAMS.mt7915e:=wed_enable=0' ${BUILD_DIR}/package/kernel/mt76/Makefile
+	}
+
+	[ "$kasan" = "1" ] && {
+		sed -i 's/# CONFIG_KERNEL_KASAN is not set/CONFIG_KERNEL_KASAN=y/g' ${BUILD_DIR}/.config
+		sed -i 's/# CONFIG_KERNEL_KALLSYMS is not set/CONFIG_KERNEL_KALLSYMS=y/g' ${BUILD_DIR}/.config
+		echo "CONFIG_KERNEL_KASAN_OUTLINE=y" >> ${BUILD_DIR}/.config
+		echo "CONFIG_DEBUG_KMEMLEAK=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_DEBUG_KMEMLEAK_TEST=m" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_KALLSYMS=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_KASAN=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_KASAN_GENERIC=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "# CONFIG_KASAN_INLINE is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_KASAN_OUTLINE=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_KASAN_SHADOW_OFFSET=0xdfffffd000000000" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "# CONFIG_TEST_KASAN is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_SLUB_DEBUG=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+		echo "CONFIG_FRAME_WARN=4096" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+	}
+}
 
 #step1 clean
 #clean
@@ -22,6 +72,8 @@
 
 prepare_final ${branch_name}
 
+change_dot_config
+
 #step2 build
 if [ -z ${1} ]; then
 	build_log ${branch_name} -j1 || [ "$LOCAL" != "1" ]
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-remove-timerout-handle-for-ax210-iot-issue.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-remove-timerout-handle-for-ax210-iot-issue.patch
new file mode 100755
index 0000000..4d3b674
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/913-mac80211-remove-timerout-handle-for-ax210-iot-issue.patch
@@ -0,0 +1,20 @@
+diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
+index 1deb3d8..c30f02d 100755
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -568,10 +568,9 @@ static void sta_tx_agg_session_timer_expired(struct timer_list *t)
+ 	}
+
+ 	timeout = tid_tx->last_tx + TU_TO_JIFFIES(tid_tx->timeout);
+-	if (time_is_after_jiffies(timeout)) {
+-		mod_timer(&tid_tx->session_timer, timeout);
+-		return;
+-	}
++	/* remove timerout handle for ax210 iot issue */
++	mod_timer(&tid_tx->session_timer, timeout);
++	return;
+
+ 	ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n",
+ 	       sta->sta.addr, tid);
+-- 
+2.18.0