[][MAC80211][mt76][rework bin file mode and RED rework]

[Description]
Change bin file mode to directly get bin file name from dts.
This extends bin file mode to support the case that two pcie has
the same NIC.
Rework RED by adding global define for HW_TOKEN_SIZE.

[Release-log]
N/A

Change-Id: I7a8c823ee2fbc3ddd21e459210f3c34d52fb6692
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6926502
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
old mode 100755
new mode 100644
index 9aec8e0..08e2024
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
@@ -1,4 +1,4 @@
-From bb55e2125bd43a6082d57f0069e41331efd89bda Mon Sep 17 00:00:00 2001
+From b405687f0b8cf6b2bcd16f2addd74a6736852c15 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Wed, 14 Dec 2022 17:19:00 +0800
 Subject: [PATCH 3012/3012] mt76: mt7915: wed: add rxwi for further in chip rro
@@ -16,7 +16,7 @@
  7 files changed, 86 insertions(+), 78 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index 0914266..7ef272e 100644
+index 0914266a..7ef272e2 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -59,17 +59,17 @@ mt76_alloc_txwi(struct mt76_dev *dev)
@@ -263,7 +263,7 @@
  					 DMA_FROM_DEVICE);
  			skb_free_frag(buf);
 diff --git a/mac80211.c b/mac80211.c
-index de9ef23..818f4f0 100644
+index de9ef237..818f4f0c 100644
 --- a/mac80211.c
 +++ b/mac80211.c
 @@ -597,7 +597,6 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
@@ -283,7 +283,7 @@
  	for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++)
  		skb_queue_head_init(&dev->rx_skb[i]);
 diff --git a/mt76.h b/mt76.h
-index 13c5ca3..a7b2135 100644
+index b10a16f8..631c4ccd 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -166,6 +166,7 @@ struct mt76_queue_entry {
@@ -330,7 +330,7 @@
  	spinlock_t lock;
  	spinlock_t cc_lock;
  
-@@ -1398,8 +1404,8 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
+@@ -1400,8 +1406,8 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
  }
  
  void mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t);
@@ -341,7 +341,7 @@
  void mt76_free_pending_rxwi(struct mt76_dev *dev);
  void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
  		      struct napi_struct *napi);
-@@ -1545,9 +1551,9 @@ struct mt76_txwi_cache *
+@@ -1547,9 +1553,9 @@ struct mt76_txwi_cache *
  mt76_token_release(struct mt76_dev *dev, int token, bool *wake);
  int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi);
  void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
@@ -354,7 +354,7 @@
  static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
  {
 diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 3626008..9cbd362 100644
+index 36260085..9cbd3625 100644
 --- a/mt7915/dma.c
 +++ b/mt7915/dma.c
 @@ -492,7 +492,6 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -374,7 +374,7 @@
  
  		/* rx data queue for band1 */
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 02261b7..6f80f07 100644
+index 4bc8e8cd..09b39730 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -605,18 +605,18 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
@@ -439,19 +439,19 @@
  		.tx_complete_skb = mt76_connac_tx_complete_skb,
  		.rx_skb = mt7915_queue_rx_skb,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b2bcf02..1559164 100644
+index 30e878f4..58ed90b0 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -65,6 +65,7 @@
- 
+@@ -57,6 +57,7 @@
  #define MT7915_EEPROM_BLOCK_SIZE	16
  #define MT7915_TOKEN_SIZE		8192
+ #define MT7915_HW_TOKEN_SIZE		4096
 +#define MT7915_RX_TOKEN_SIZE		4096
  
  #define MT7915_CFEND_RATE_DEFAULT	0x49	/* OFDM 24M */
  #define MT7915_CFEND_RATE_11B		0x03	/* 11B LP, 11M */
 diff --git a/tx.c b/tx.c
-index 6d55566..a72b777 100644
+index 6d55566f..a72b7779 100644
 --- a/tx.c
 +++ b/tx.c
 @@ -756,16 +756,16 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
@@ -496,5 +496,5 @@
  }
  EXPORT_SYMBOL_GPL(mt76_rx_token_release);
 -- 
-2.18.0
+2.25.1