[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]
[Description]
Refactor and sync kernel/wifi from Openwrt
[Release-log]
N/A
diff --git a/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch b/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
index 795bc23..974ef99 100644
--- a/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
@@ -1,9 +1,10 @@
-From 6a8ab8991772977d92928b560b6b881132728508 Mon Sep 17 00:00:00 2001
+From a242bbf9b619b24729315038c35b319d2cc314ef Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Tue, 5 Jul 2022 19:42:55 +0800
-Subject: [PATCH 3003/3011] mt76 add wed rx support
+Subject: [PATCH 3003/3010] mt76 add wed rx support
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
dma.c | 250 ++++++++++++++++++++++++++++++++++++++--------
dma.h | 10 ++
@@ -28,7 +29,7 @@
20 files changed, 448 insertions(+), 67 deletions(-)
diff --git a/dma.c b/dma.c
-index 82b4da26..a8739eb4 100644
+index 82b4da2..a8739eb 100644
--- a/dma.c
+++ b/dma.c
@@ -98,6 +98,63 @@ mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t)
@@ -479,7 +480,7 @@
}
EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
diff --git a/dma.h b/dma.h
-index fdf786f9..90370d12 100644
+index fdf786f..90370d1 100644
--- a/dma.h
+++ b/dma.h
@@ -16,6 +16,16 @@
@@ -500,7 +501,7 @@
#define MT_RX_INFO_LEN 4
#define MT_FCE_INFO_LEN 4
diff --git a/mac80211.c b/mac80211.c
-index 1e13b654..3e276357 100644
+index 1e13b65..3e27635 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -603,11 +603,14 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
@@ -531,7 +532,7 @@
mt76_rx_complete(dev, &frames, napi);
diff --git a/mt76.h b/mt76.h
-index 335f0b10..959fb240 100644
+index 1888706..45439a7 100644
--- a/mt76.h
+++ b/mt76.h
@@ -20,6 +20,8 @@
@@ -580,7 +581,7 @@
void (*rx_poll_complete)(struct mt76_dev *dev, enum mt76_rxq_id q);
-@@ -771,6 +778,7 @@ struct mt76_dev {
+@@ -779,6 +786,7 @@ struct mt76_dev {
struct ieee80211_hw *hw;
spinlock_t lock;
@@ -588,7 +589,7 @@
spinlock_t cc_lock;
u32 cur_cc_bss_rx;
-@@ -796,6 +804,7 @@ struct mt76_dev {
+@@ -804,6 +812,7 @@ struct mt76_dev {
struct sk_buff_head rx_skb[__MT_RXQ_MAX];
struct list_head txwi_cache;
@@ -596,7 +597,7 @@
struct mt76_queue *q_mcu[__MT_MCUQ_MAX];
struct mt76_queue q_rx[__MT_RXQ_MAX];
const struct mt76_queue_ops *queue_ops;
-@@ -809,6 +818,9 @@ struct mt76_dev {
+@@ -817,6 +826,9 @@ struct mt76_dev {
u16 wed_token_count;
u16 token_count;
u16 token_size;
@@ -606,7 +607,7 @@
wait_queue_head_t tx_wait;
/* spinclock used to protect wcid pktid linked list */
-@@ -1351,6 +1363,8 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
+@@ -1359,6 +1371,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);
@@ -615,7 +616,7 @@
void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
struct napi_struct *napi);
void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
-@@ -1495,6 +1509,12 @@ struct mt76_txwi_cache *
+@@ -1503,6 +1517,12 @@ 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);
@@ -629,7 +630,7 @@
static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
{
diff --git a/mt7603/dma.c b/mt7603/dma.c
-index 590cff9d..2ff71c53 100644
+index 590cff9..2ff71c5 100644
--- a/mt7603/dma.c
+++ b/mt7603/dma.c
@@ -69,7 +69,7 @@ free:
@@ -642,7 +643,7 @@
struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
__le32 *rxd = (__le32 *)skb->data;
diff --git a/mt7603/mt7603.h b/mt7603/mt7603.h
-index 0fd46d90..f2ce22ae 100644
+index 0fd46d9..f2ce22a 100644
--- a/mt7603/mt7603.h
+++ b/mt7603/mt7603.h
@@ -244,7 +244,7 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
@@ -655,7 +656,7 @@
void mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
int mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
diff --git a/mt7615/mac.c b/mt7615/mac.c
-index 2ce1705c..59125b4d 100644
+index 2ce1705..59125b4 100644
--- a/mt7615/mac.c
+++ b/mt7615/mac.c
@@ -1653,7 +1653,7 @@ bool mt7615_rx_check(struct mt76_dev *mdev, void *data, int len)
@@ -668,7 +669,7 @@
struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
__le32 *rxd = (__le32 *)skb->data;
diff --git a/mt7615/mt7615.h b/mt7615/mt7615.h
-index 060d52c8..232b0f29 100644
+index 060d52c..232b0f2 100644
--- a/mt7615/mt7615.h
+++ b/mt7615/mt7615.h
@@ -511,7 +511,7 @@ void mt7615_tx_worker(struct mt76_worker *w);
@@ -681,7 +682,7 @@
int mt7615_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 01561a56..0f800909 100644
+index 01561a5..0f80090 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -1192,6 +1192,7 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
@@ -729,7 +730,7 @@
}
EXPORT_SYMBOL_GPL(mt76_connac_mcu_add_key);
diff --git a/mt76x02.h b/mt76x02.h
-index 849c2644..49112ab6 100644
+index 849c264..49112ab 100644
--- a/mt76x02.h
+++ b/mt76x02.h
@@ -187,7 +187,7 @@ int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val);
@@ -742,7 +743,7 @@
irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance);
void mt76x02_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
diff --git a/mt76x02_txrx.c b/mt76x02_txrx.c
-index 3a313075..5d6c8f71 100644
+index 3a31307..5d6c8f7 100644
--- a/mt76x02_txrx.c
+++ b/mt76x02_txrx.c
@@ -33,7 +33,7 @@ void mt76x02_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
@@ -755,7 +756,7 @@
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
void *rxwi = skb->data;
diff --git a/mt7915/dma.c b/mt7915/dma.c
-index e3918860..702d629a 100644
+index e391886..702d629 100644
--- a/mt7915/dma.c
+++ b/mt7915/dma.c
@@ -344,7 +344,8 @@ static int mt7915_dma_enable(struct mt7915_dev *dev)
@@ -811,7 +812,7 @@
ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_BAND1],
MT_RXQ_ID(MT_RXQ_BAND1),
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 98925ed5..1ef7cb45 100644
+index 98925ed..1ef7cb4 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -217,7 +217,7 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
@@ -951,7 +952,7 @@
return;
}
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 4aa859e5..6603effd 100644
+index 8f03a7d..79c7eff 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -1724,6 +1724,7 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
@@ -972,7 +973,7 @@
MCU_EXT_CMD(STA_REC_UPDATE), true);
}
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 84a47c94..45520c74 100644
+index 84a47c9..45520c7 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -29,6 +29,7 @@ static const u32 mt7915_reg[] = {
@@ -1064,7 +1065,7 @@
return 0;
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 5a2d15ff..e2127e02 100644
+index a20d4b8..346571a 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -81,6 +81,7 @@
@@ -1075,7 +1076,7 @@
struct mt7915_vif;
struct mt7915_sta;
-@@ -543,7 +544,9 @@ void mt7915_wfsys_reset(struct mt7915_dev *dev);
+@@ -544,7 +545,9 @@ 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);
u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
@@ -1086,7 +1087,7 @@
int mt7915_register_device(struct mt7915_dev *dev);
void mt7915_unregister_device(struct mt7915_dev *dev);
void mt7915_eeprom_rebonding(struct mt7915_dev *dev);
-@@ -697,7 +700,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -698,7 +701,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
struct mt76_tx_info *tx_info);
void mt7915_tx_token_put(struct mt7915_dev *dev);
void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
@@ -1096,7 +1097,7 @@
bool mt7915_wed_wds_check(struct mt76_dev *mdev, struct ieee80211_sta *sta);
void mt7915_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 8fd2f69a..36ad2433 100644
+index 8fd2f69..36ad243 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
@@ -28,6 +28,7 @@ enum reg_rev {
@@ -1130,7 +1131,7 @@
#define MT_INT_SOURCE_CSR __REG(INT_SOURCE_CSR)
#define MT_INT_MASK_CSR __REG(INT_MASK_CSR)
diff --git a/mt7921/mac.c b/mt7921/mac.c
-index 1abf7d9b..2ad7b33a 100644
+index 1abf7d9..2ad7b33 100644
--- a/mt7921/mac.c
+++ b/mt7921/mac.c
@@ -692,7 +692,7 @@ bool mt7921_rx_check(struct mt76_dev *mdev, void *data, int len)
@@ -1143,7 +1144,7 @@
struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76);
__le32 *rxd = (__le32 *)skb->data;
diff --git a/mt7921/mt7921.h b/mt7921/mt7921.h
-index eaba114a..54a30ca1 100644
+index eaba114..54a30ca 100644
--- a/mt7921/mt7921.h
+++ b/mt7921/mt7921.h
@@ -408,7 +408,7 @@ void mt7921_tx_worker(struct mt76_worker *w);
@@ -1156,7 +1157,7 @@
void mt7921_stats_work(struct work_struct *work);
void mt7921_set_stream_he_caps(struct mt7921_phy *phy);
diff --git a/tx.c b/tx.c
-index 8b33186b..b812d067 100644
+index 8b33186..b812d06 100644
--- a/tx.c
+++ b/tx.c
@@ -778,3 +778,37 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
@@ -1198,5 +1199,5 @@
+}
+EXPORT_SYMBOL_GPL(mt76_rx_token_release);
--
-2.25.1
+2.18.0