[][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/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
index dd1e092..c681770 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
@@ -1,7 +1,7 @@
-From f00aa90bc4a1b77e1b0c884b24a71c1b49a94ee6 Mon Sep 17 00:00:00 2001
+From 705b565717a1e6e74369ad56b17e147e60d5a821 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 12 Apr 2022 15:58:28 +0800
-Subject: [PATCH] mt76:remove WED support patch for build err
+Subject: [PATCH 1116/1116] mt76:remove WED support patch for build err
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -232,10 +232,10 @@
  }
  EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
 diff --git a/mac80211.c b/mac80211.c
-index 21eaf994..ceab8412 100644
+index e17b04b1..1b9a400b 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -1596,7 +1596,7 @@ EXPORT_SYMBOL_GPL(mt76_get_antenna);
+@@ -1594,7 +1594,7 @@ EXPORT_SYMBOL_GPL(mt76_get_antenna);
  
  struct mt76_queue *
  mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
@@ -244,7 +244,7 @@
  {
  	struct mt76_queue *hwq;
  	int err;
-@@ -1605,8 +1605,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
+@@ -1603,8 +1603,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
  	if (!hwq)
  		return ERR_PTR(-ENOMEM);
  
@@ -442,7 +442,7 @@
  		return ret;
  
 diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 219b440f..60b4368a 100644
+index c2d655cd..66a312a9 100644
 --- a/mt7915/dma.c
 +++ b/mt7915/dma.c
 @@ -8,16 +8,9 @@
@@ -527,10 +527,10 @@
  		return ret;
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 8df38a23..8b0b90da 100644
+index 1935acff..8d1552fc 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1379,29 +1379,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1391,29 +1391,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	return 0;
  }
  
@@ -560,7 +560,7 @@
  static void
  mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
  {
-@@ -1435,7 +1412,7 @@ mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
+@@ -1447,7 +1424,7 @@ mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
  
  	txp = mt7915_txwi_to_txp(dev, t);
  	for (i = 0; i < txp->nbuf; i++)
@@ -569,7 +569,7 @@
  				 le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
  }
  
-@@ -1444,7 +1421,6 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
+@@ -1456,7 +1433,6 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
  		 struct ieee80211_sta *sta, struct list_head *free_list)
  {
  	struct mt76_dev *mdev = &dev->mt76;
@@ -577,7 +577,7 @@
  	struct mt76_wcid *wcid;
  	__le32 *txwi;
  	u16 wcid_idx;
-@@ -1457,24 +1433,13 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
+@@ -1469,24 +1445,13 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
  	if (sta) {
  		wcid = (struct mt76_wcid *)sta->drv_priv;
  		wcid_idx = wcid->idx;
@@ -605,7 +605,7 @@
  	__mt76_tx_complete_skb(mdev, wcid_idx, t->skb, free_list);
  
  out:
-@@ -1482,55 +1447,29 @@ out:
+@@ -1494,56 +1459,30 @@ out:
  	mt76_put_txwi(mdev, t);
  }
  
@@ -651,6 +651,7 @@
 +	struct mt76_phy *mphy_ext = mdev->phy2;
  	struct mt76_txwi_cache *txwi;
  	struct ieee80211_sta *sta = NULL;
+ 	struct mt7915_sta *msta;
  	LIST_HEAD(free_list);
 +	struct sk_buff *skb, *tmp;
  	void *end = data + len;
@@ -670,7 +671,7 @@
  
  	total = le16_get_bits(free->ctrl, MT_TX_FREE_MSDU_CNT);
  	v3 = (FIELD_GET(MT_TX_FREE_VER, txd) == 0x4);
-@@ -1587,38 +1526,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -1603,38 +1542,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  		}
  	}
  
@@ -716,7 +717,7 @@
  }
  
  static bool
-@@ -1798,9 +1716,6 @@ bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len)
+@@ -1814,9 +1732,6 @@ bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len)
  	case PKT_TYPE_TXRX_NOTIFY:
  		mt7915_mac_tx_free(dev, data, len);
  		return false;
@@ -726,7 +727,7 @@
  	case PKT_TYPE_TXS:
  		for (rxd += 2; rxd + 8 <= end; rxd += 8)
  		    mt7915_mac_add_txs(dev, rxd);
-@@ -1828,10 +1743,6 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
+@@ -1844,10 +1759,6 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
  		mt7915_mac_tx_free(dev, skb->data, skb->len);
  		napi_consume_skb(skb, 1);
  		break;
@@ -758,10 +759,10 @@
  #define MT_TX_FREE_LATENCY		GENMASK(12, 0)
  /* 0: success, others: dropped */
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 23f89379..09659dc7 100644
+index f50dbbb5..660f3482 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1414,39 +1414,6 @@ out:
+@@ -1393,39 +1393,6 @@ out:
  	return ret;
  }
  
@@ -801,7 +802,7 @@
  const struct ieee80211_ops mt7915_ops = {
  	.tx = mt7915_tx,
  	.start = mt7915_start,
-@@ -1494,7 +1461,4 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1473,7 +1440,4 @@ const struct ieee80211_ops mt7915_ops = {
  	.sta_add_debugfs = mt7915_sta_add_debugfs,
  #endif
  	.set_radar_background = mt7915_set_radar_background,
@@ -810,10 +811,10 @@
 -#endif
  };
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8d7e7422..afdbb5aa 100644
+index 10450bd7..e464a16b 100755
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2527,9 +2527,6 @@ int mt7915_run_firmware(struct mt7915_dev *dev)
+@@ -2512,9 +2512,6 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
  	if (ret)
  		return ret;
  
@@ -824,10 +825,10 @@
  	if (ret)
  		return ret;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index f07b0565..561ac650 100644
+index 2d733d32..99119cdc 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -555,21 +555,15 @@ static void mt7915_rx_poll_complete(struct mt76_dev *mdev,
+@@ -552,21 +552,15 @@ static void mt7915_rx_poll_complete(struct mt76_dev *mdev,
  static void mt7915_irq_tasklet(struct tasklet_struct *t)
  {
  	struct mt7915_dev *dev = from_tasklet(dev, t, irq_tasklet);
@@ -855,7 +856,7 @@
  
  	if (dev->hif2) {
  		intr1 = mt76_rr(dev, MT_INT1_SOURCE_CSR);
-@@ -624,15 +618,10 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
+@@ -621,15 +615,10 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
  irqreturn_t mt7915_irq_handler(int irq, void *dev_instance)
  {
  	struct mt7915_dev *dev = dev_instance;
@@ -875,10 +876,10 @@
  	if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
  		return IRQ_NONE;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b7838385..454232ba 100644
+index 0feccb17..d185e364 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -517,8 +517,6 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -502,8 +502,6 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
  void mt7915_wfsys_reset(struct mt7915_dev *dev);
  irqreturn_t mt7915_irq_handler(int irq, void *dev_instance);
  u64 __mt7915_get_tsf(struct ieee80211_hw *hw, struct mt7915_vif *mvif);
@@ -1026,10 +1027,10 @@
  	mt76_free_device(&dev->mt76);
  
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index a3b9bf4c..27f682fe 100644
+index ee212c99..078ab334 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -591,31 +591,18 @@ enum offs_rev {
+@@ -581,31 +581,18 @@ enum offs_rev {
  
  /* WFDMA CSR */
  #define MT_WFDMA_EXT_CSR_BASE		__REG(WFDMA_EXT_CSR_ADDR)
@@ -1077,7 +1078,7 @@
  		return err;
  
 diff --git a/tx.c b/tx.c
-index 892f3618..2c26b955 100644
+index 0457c3eb..656b7090 100644
 --- a/tx.c
 +++ b/tx.c
 @@ -725,12 +725,6 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)