[][MAC80211][core][mt76][Airtime Fairness Scheduler Feature Off]

[Description]
Change Airtime Fairness Scheduler feature

mac80211: airtime_flags depends on NL80211_EXT_FEATURE_AIRTIME_FAIRNESS
mt76: Airtime Fairness Scheduler feature disbale

MAC80211 provides three Fairness Componments (ATF/AQL/AQM)
To fit with Mediatek WiFi6 Feature, will default disable ATF scheduler.

The airtime info is registered by mt76 which reads it from WTBL and
MAC80211 grant permission based on a historical average of airtime usage.
When ATF on, packets per station is unbalance a split second and
cause firmware algorithm hard to send HEMU PPDUs.

[Release-log]
N/A

Change-Id: I95cb3796fc18f1e91ad957015d5f8a25bb6da691
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5936675
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch
index 04b3270..b6f6d69 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch
@@ -17,9 +17,9 @@
  		cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
  
 +	if ((dfs_region == NL80211_DFS_ETSI) &&
-+	    ((chandef.width == NL80211_CHAN_WIDTH_160) &&
++	    (((chandef.width == NL80211_CHAN_WIDTH_160) &&
 +	     (chandef.center_freq2 >= 5580 && chandef.center_freq2 <= 5640)) ||
-+	    (chandef.center_freq1 >= 5580 && chandef.center_freq1 <= 5640))
++	    (chandef.center_freq1 >= 5580 && chandef.center_freq1 <= 5640)))
 +		cac_time_ms = 600000;
 +	pr_info("%s: region = %u, cetner freq1 = %u, center freq2 = %u, cac time ms = %u\n", __func__, dfs_region, chandef.center_freq1, chandef.center_freq2, cac_time_ms);
 +
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch
new file mode 100644
index 0000000..8325e96
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/905-mac80211-airtime_flags-depends-on-NL80211_EXT_FEATUR.patch
@@ -0,0 +1,19 @@
+diff --git a/net/mac80211/main.c b/net/mac80211/main.c
+index 3a442d8..f355cd3 100644
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -723,8 +723,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
+ 		air_sched->aql_txq_limit_high =
+ 			IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H;
+ 	}
+-
+-	local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
++	if (wiphy_ext_feature_isset(local->hw.wiphy,
++			NL80211_EXT_FEATURE_AIRTIME_FAIRNESS))
++		local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
+ 	local->aql_threshold = IEEE80211_AQL_THRESHOLD;
+ 	atomic_set(&local->aql_total_pending_airtime, 0);
+ 
+-- 
+2.18.0
+