[][Fix mt7915 wds t-put drop to 0 issue]
[Description]
Fix mt7915 wds t-put drop to 0 issue
mt7915 wds should set real wcid, don't overwrite txd since mt7915 only
support 256 sta
[Release-log]
N/A
Change-Id: I749c332ccc52a3e730808f068068a0fd0362c411
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6510406
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-add-wed-tx-wds-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-add-wed-tx-wds-support.patch
index aa7f160..43e402d 100755
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-add-wed-tx-wds-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-add-wed-tx-wds-support.patch
@@ -8,12 +8,12 @@
mac80211.c | 5 ++++-
mt76.h | 2 ++
mt7915/init.c | 9 +++++++++
- mt7915/main.c | 47 +++++++++++++++++++++++++++++++++++++++++++----
+ mt7915/main.c | 52 +++++++++++++++++++++++++++++++++++++++++++------
mt7915/mcu.c | 12 ++++++++++--
mt7915/mcu.h | 1 +
- mt7915/mmio.c | 1 +
+ mt7915/mmio.c | 3 +++
mt7915/mt7915.h | 4 ++++
- 8 files changed, 74 insertions(+), 7 deletions(-)
+ 8 files changed, 79 insertions(+), 9 deletions(-)
diff --git a/mac80211.c b/mac80211.c
index 4eaf317..c477d62 100644
@@ -135,16 +135,22 @@
mt76_connac_mcu_wtbl_update_hdr_trans(&dev->mt76, vif, sta);
}
-@@ -1449,9 +1485,12 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
- /* fw will find the wcid by dest addr */
- if(is_mt7915(&dev->mt76))
- path->mtk_wdma.wcid = 0xff;
+@@ -1446,12 +1482,16 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+ path->dev = ctx->dev;
+ path->mtk_wdma.wdma_idx = wed->wdma_idx;
+ path->mtk_wdma.bss = mvif->mt76.idx;
+- /* fw will find the wcid by dest addr */
+- if(is_mt7915(&dev->mt76))
+- path->mtk_wdma.wcid = 0xff;
- else
- path->mtk_wdma.wcid = 0x3ff;
--
-+ else {
-+ if (test_bit(MT_WCID_FLAG_4ADDR, &msta->wcid.flags))
-+ path->mtk_wdma.wcid = msta->wcid.idx;
+
++ if (test_bit(MT_WCID_FLAG_4ADDR, &msta->wcid.flags)) {
++ path->mtk_wdma.wcid = msta->wcid.idx;
++ } else {
++ /* fw will find the wcid by dest addr */
++ if(is_mt7915(&dev->mt76))
++ path->mtk_wdma.wcid = 0xff;
+ else
+ path->mtk_wdma.wcid = 0x3ff;
+ }
@@ -197,7 +203,16 @@
index b0d8a61..de797fd 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
-@@ -774,6 +774,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -734,6 +734,8 @@ mt7915_pci_wed_init(struct mt7915_dev *dev, struct device *pdev, int *irq)
+ /* disable dynamic tx token */
+ wed->wlan.offload_enable = mt7915_wed_offload_enable;
+ wed->wlan.offload_disable = mt7915_wed_offload_disable;
++ if (!is_mt7915(mdev))
++ wed->wlan.wcid_512 = true;
+
+ if (mtk_wed_device_attach(wed) != 0)
+ return 0;
+@@ -774,6 +776,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
.sta_add = mt7915_mac_sta_add,
.sta_remove = mt7915_mac_sta_remove,
.update_survey = mt7915_update_channel,
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-add-wed-rx-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-add-wed-rx-support.patch
index 4b7c349..9202a43 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-add-wed-rx-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-add-wed-rx-support.patch
@@ -1058,9 +1058,9 @@
wed->wlan.nbuf = 7168;
wed->wlan.token_start = MT7915_TOKEN_SIZE - wed->wlan.nbuf;
wed->wlan.init_buf = mt7915_wed_init_buf;
-@@ -735,12 +752,15 @@ mt7915_pci_wed_init(struct mt7915_dev *dev, struct device *pdev, int *irq)
- wed->wlan.offload_enable = mt7915_wed_offload_enable;
- wed->wlan.offload_disable = mt7915_wed_offload_disable;
+@@ -737,12 +754,15 @@ mt7915_pci_wed_init(struct mt7915_dev *dev, struct device *pdev, int *irq)
+ if (!is_mt7915(mdev))
+ wed->wlan.wcid_512 = true;
+ wed->wlan.rx_nbuf = 65536;
+ wed->wlan.rx_pkt_size = MTK_WED_RX_PKT_SIZE;