[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
93c9497 [MAC80211][mt76][Fix mwctl set hostapd_cli cmd]
a737b23 [mac80211][mt76][Fix backports6.1 build fail]
5423240 [MAC80211][hostapd][Fix HOSTAPD_START_FAILED caused by ubus]
b5e1c3b [MAC80211][mt76][5G UNII4 support]
27b4e6a [MAC80211][mt76][Add the MURU definition for test mode]
0d84ee7 [MAC80211][hostapd][Fix STA association failure when co-locating with multiple AP interfaces]
4afd899 [MT76][Fix mt7915 Air-Monitor issue]
[Release-log]
Change-Id: Id48a094923b83de8650eebf6004b498b12a481d6
diff --git a/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch b/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
index ffb0cac..54dff6d 100644
--- a/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
@@ -1,19 +1,18 @@
-From c7800e4fd168a7b2eba45098ba3bc2bb3772859c Mon Sep 17 00:00:00 2001
+From 769ca30484c3c8a3e84b11d27cf71b77cdb65c0f Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Wed, 18 Jan 2023 11:50:38 +0800
-Subject: [PATCH 3009/3013] wifi: mt76: mt7915: enable PPDU-TxS to host when
- wed enable
+Subject: [PATCH] wifi: mt76: mt7915: enable PPDU-TxS to host when wed enable
Calculate tx bytes and tx retries from PPDU-TxS
---
mt76_connac_mac.c | 2 --
mt7915/init.c | 6 ++++++
mt7915/mmio.c | 21 ---------------------
- tx.c | 14 ++++++++++++++
- 4 files changed, 20 insertions(+), 23 deletions(-)
+ tx.c | 21 +++++++++++++++++++++
+ 4 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index abcb9a2..5a5861a 100644
+index abcb9a27..5a5861a8 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
@@ -490,8 +490,6 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
@@ -26,7 +25,7 @@
wcid->stats.tx_packets++;
}
diff --git a/mt7915/init.c b/mt7915/init.c
-index 21286a6..6f309d0 100644
+index 21286a6d..6f309d0d 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
@@ -503,6 +503,12 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
@@ -43,7 +42,7 @@
static void
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index fc9aadb..65ee2af 100644
+index fc9aadb1..65ee2afa 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -551,7 +551,6 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
@@ -94,7 +93,7 @@
static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
diff --git a/tx.c b/tx.c
-index a72b777..c3c7eb5 100644
+index 25683c1f..823c8680 100644
--- a/tx.c
+++ b/tx.c
@@ -120,6 +120,7 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
@@ -117,23 +116,25 @@
if (!(info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS |
IEEE80211_TX_CTL_RATE_CTRL_PROBE)))
return MT_PACKET_ID_NO_SKB;
-@@ -230,6 +236,7 @@ mt76_tx_check_non_aql(struct mt76_dev *dev, struct mt76_wcid *wcid,
- void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *skb,
- struct list_head *free_list)
- {
-+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
- struct ieee80211_tx_status status = {
- .skb = skb,
-@@ -262,6 +269,13 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
+@@ -260,8 +266,23 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
+ #endif
+
if (cb->pktid < MT_PACKET_ID_FIRST) {
++ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
++ struct ieee80211_rate_status rs = {};
++
hw = mt76_tx_status_get_hw(dev, skb);
status.sta = wcid_to_sta(wcid);
+ if (mtk_wed_device_active(&dev->mmio.wed) &&
+ (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
-+ if (status.sta) {
-+ info->status.rates[0].idx = -1;
-+ status.rate = &wcid->rate;
++ info->status.rates[0].idx = -1;
++
++ if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
++ rs.rate_idx = wcid->rate;
++ status.rates = &rs;
++ status.n_rates = 1;
++ } else {
++ status.n_rates = 0;
+ }
+ }
ieee80211_tx_status_ext(hw, &status);