aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-08-26 15:39:12 +0200
committerFelix Fietkau <nbd@nbd.name>2023-08-26 15:59:52 +0200
commit76b1e564d202c09d0035315eb6e958a9b0dd4491 (patch)
treea8e54acd6d119bc370e1a910f16bae12b3c71ab1
parent866badc361f8feb7acc79f7645af00ad3b385c8d (diff)
downloadupstream-76b1e564d202c09d0035315eb6e958a9b0dd4491.tar.gz
upstream-76b1e564d202c09d0035315eb6e958a9b0dd4491.tar.bz2
upstream-76b1e564d202c09d0035315eb6e958a9b0dd4491.zip
mt76: update to the latest version from the 22.03 branch
94eb0bc1374d wifi: mt76: testmode: use random payload for tx packets f8ece810002b wifi: mt76: add rx_check callback for usb devices 67fbdb7bed90 wifi: mt76: mt7921e: fix race issue between reset and suspend/resume a9b09dd2715f wifi: mt76: mt7921s: fix race issue between reset and suspend/resume ee3eb0d6d52e wifi: mt76: mt7921u: fix race issue between reset and suspend/resume 9706ccef5447 wifi: mt76: mt7921u: remove unnecessary MT76_STATE_SUSPEND 74a29eb4f714 wifi: mt76: mt7921: move mt7921_rx_check and mt7921_queue_rx_skb in mac.c f49e06c4cfce wifi: mt76: sdio: fix the deadlock caused by sdio->stat_work 322656141fa4 wifi: mt76: sdio: poll sta stat when device transmits data dee0a3cbfb03 wifi: mt76: mt7915: fix an uninitialized variable bug 9dd7be2c5164 wifi: mt76: mt7921: fix use after free in mt7921_acpi_read() 0ad02c9a4512 wifi: mt76: sdio: add rx_check callback for sdio devices fe85e5ccbaca wifi: mt76: sdio: fix transmitting packet hangs 206c7ebd7464 wifi: mt76: mt7615: add mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload bf79f5d73e4f wifi: mt76: mt7915: fix possible unaligned access in mt7915_mac_add_twt_setup c4132ab0bea2 wifi: mt76: connac: fix possible unaligned access in mt76_connac_mcu_add_nested_tlv 52eec74986cf wifi: mt76: mt7663s: add rx_check callback 019ef069e754 wifi: mt76: mt76_usb.mt76u_mcu.burst is always false remove related code 0a392ca03db8 wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap fbb3554b6236 wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_sta_set_decap_offload b55a4eb2ee21 wifi: mt76: mt7921: fix the firmware version report 2d72c9a74011 wifi: mt76: move move mt76_sta_stats to mt76_wcid 873365b06c5c wifi: mt76: add PPDU based TxS support for WED device 0c64a80a61c2 wifi: mt76: connac: fix in comment d11f971a452e wifi: mt76: mt7921: get rid of the false positive reset 2ac22300c7ac wifi: mt76: mt7915: fix mcs value in ht mode 5e45533e4ba2 wifi: mt76: fix uninitialized pointer in mt7921_mac_fill_rx e06376af21dd wifi: mt76: mt7915: do not check state before configuring implicit beamform 0c0bda4aea05 wifi: mt76: mt7921: reset msta->airtime_ac while clearing up hw value cddc4b43ea93 wifi: mt76: mt7921e: fix rmmod crash in driver reload test ebbd68842ee0 wifi: mt76: mt7921: introduce Country Location Control support 763a1d90133b wifi: mt76: mt7921e: fix random fw download fail e4fa68a9b3b3 linux-firmware: update firmware for MT7921 WiFi device 60fcf08fe659 linux-firmware: update firmware for MT7921 WiFi device 9d601f4eee8f linux-firmware: update firmware for MT7922 WiFi device e49b6063fb4b wifi: mt76: move mt76_rate_power from core to mt76x02 driver code 3f27f6adb1ab wifi: mt76: mt76x02: simplify struct mt76x02_rate_power c07f3d2d5ede wifi: mt76: mt7921: fix antenna signal are way off in monitor mode 9059a5de3bd0 wifi: mt76: Remove unused inline function mt76_wcid_mask_test() d75f15ddeb90 wifi: mt76: mt7915: fix bounds checking for tx-free-done command 06df7e689294 wifi: mt76: mt7915: reserve 8 bits for the index of rf registers ad3d0f8db00b wifi: mt76: mt7915: rework eeprom tx paths and streams init 66065073177b wifi: mt76: mt7915: deal with special variant of mt7916 b0114a0abb57 wifi: mt76: mt7915: rework testmode tx antenna setting 6dee964e1f36 wifi: mt76: connac: introduce mt76_connac_spe_idx() 48c116d92939 wifi: mt76: mt7915: add spatial extension index support db6db4ded0fd wifi: mt76: mt7915: set correct antenna for radar detection on MT7915D 2b8f56a72d76 wifi: mt76: mt7915: fix mt7915_mac_set_timing() d554a02554db wifi: mt76: mt7915: move wed init routines in mmio.c 676b10bb203f mt76: mt76x02: fix vht rate power array overrun 7df5b4514721 Revert "mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD" 1b80532eb55f wifi: mt76: mt7921: set MT_DRV_AMSDU_OFFLOAD for USB/SDIO 843955920e19 wifi: mt76: fix receiving LLC packets on mt7615/mt7915 148b7fa2329d wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921 9dda9f709c7b wifi: mt76: mt7603: fix beacon interval after disabling a single vif 2cbd5df8cfd8 wifi: mt76: mt7603: fix tx filter/flush function 780ea78ba0ca wifi: mt76: mt7603: rework/fix rx pse hang check 283c46fd1d4f wifi: mt76: mt7603: improve watchdog reset reliablity aa309b5c2a0a wifi: mt76: mt7603: improve stuck beacon handling eb57b7e35f9b wifi: mt76: mt7603: add missing register initialization for MT7628 11f2efecb141 wifi: mt76: mt7603: disable A-MSDU tx support on MT7628 b144bd200519 ieee80211: add EHT 1K aggregation definitions f27ff9a8fb63 mt76: adjust for ieee80211_is_bufferable_mmpdu API change de38fe7d4cb3 wifi: mt76: ignore key disable commands Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/kernel/mt76/Makefile6
-rw-r--r--package/kernel/mt76/patches/100-aggregation-definitions.patch13
-rw-r--r--package/kernel/mt76/patches/110-api_update.patch11
-rw-r--r--package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch301
4 files changed, 3 insertions, 328 deletions
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 63d3a48085..9b10fc3e6f 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2022-09-06
-PKG_SOURCE_VERSION:=d70546462b7b51ebc2bcdd5c534fdf3465be62a4
-PKG_MIRROR_HASH:=3d6b68d70a78c0072ed10ab2548344b6b3a70ad99e4edc258fafa16886f4abf9
+PKG_SOURCE_DATE:=2023-08-26
+PKG_SOURCE_VERSION:=de38fe7d4cb365312aa570cf37a4c0eff6e15650
+PKG_MIRROR_HASH:=d8b86332060668b36698e3b3703b8735003c09d7dc612327afa9272eead5238d
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/100-aggregation-definitions.patch b/package/kernel/mt76/patches/100-aggregation-definitions.patch
deleted file mode 100644
index a88d57133f..0000000000
--- a/package/kernel/mt76/patches/100-aggregation-definitions.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/mt7915/init.c
-+++ b/mt7915/init.c
-@@ -327,8 +327,8 @@ mt7915_init_wiphy(struct ieee80211_hw *h
- struct mt7915_dev *dev = phy->dev;
-
- hw->queues = 4;
-- hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
-- hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
-+ hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
-+ hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
- hw->netdev_features = NETIF_F_RXCSUM;
-
- hw->radiotap_timestamp.units_pos =
diff --git a/package/kernel/mt76/patches/110-api_update.patch b/package/kernel/mt76/patches/110-api_update.patch
deleted file mode 100644
index 27bd6286b0..0000000000
--- a/package/kernel/mt76/patches/110-api_update.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/tx.c
-+++ b/tx.c
-@@ -325,7 +325,7 @@ mt76_tx(struct mt76_phy *phy, struct iee
- if ((dev->drv->drv_flags & MT_DRV_HW_MGMT_TXQ) &&
- !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
- !ieee80211_is_data(hdr->frame_control) &&
-- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
-+ !ieee80211_is_bufferable_mmpdu(skb)) {
- qid = MT_TXQ_PSD;
- }
-
diff --git a/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch b/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch
deleted file mode 100644
index 3ac6cebca8..0000000000
--- a/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Wed, 22 Mar 2023 10:17:49 +0100
-Subject: [PATCH] wifi: mt76: ignore key disable commands
-
-This helps avoid cleartext leakage of already queued or powersave buffered
-packets, when a reassoc triggers the key deletion.
-
-Cc: stable@vger.kernel.org
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/mt7603/main.c
-+++ b/mt7603/main.c
-@@ -512,15 +512,15 @@ mt7603_set_key(struct ieee80211_hw *hw,
- !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
- return -EOPNOTSUPP;
-
-- if (cmd == SET_KEY) {
-- key->hw_key_idx = wcid->idx;
-- wcid->hw_key_idx = idx;
-- } else {
-+ if (cmd != SET_KEY) {
- if (idx == wcid->hw_key_idx)
- wcid->hw_key_idx = -1;
-
-- key = NULL;
-+ return 0;
- }
-+
-+ key->hw_key_idx = wcid->idx;
-+ wcid->hw_key_idx = idx;
- mt76_wcid_key_setup(&dev->mt76, wcid, key);
-
- return mt7603_wtbl_set_key(dev, wcid->idx, key);
---- a/mt7615/mac.c
-+++ b/mt7615/mac.c
-@@ -1178,8 +1178,7 @@ EXPORT_SYMBOL_GPL(mt7615_mac_set_rates);
- static int
- mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
- struct ieee80211_key_conf *key,
-- enum mt76_cipher_type cipher, u16 cipher_mask,
-- enum set_key_cmd cmd)
-+ enum mt76_cipher_type cipher, u16 cipher_mask)
- {
- u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx) + 30 * 4;
- u8 data[32] = {};
-@@ -1188,27 +1187,18 @@ mt7615_mac_wtbl_update_key(struct mt7615
- return -EINVAL;
-
- mt76_rr_copy(dev, addr, data, sizeof(data));
-- if (cmd == SET_KEY) {
-- if (cipher == MT_CIPHER_TKIP) {
-- /* Rx/Tx MIC keys are swapped */
-- memcpy(data, key->key, 16);
-- memcpy(data + 16, key->key + 24, 8);
-- memcpy(data + 24, key->key + 16, 8);
-- } else {
-- if (cipher_mask == BIT(cipher))
-- memcpy(data, key->key, key->keylen);
-- else if (cipher != MT_CIPHER_BIP_CMAC_128)
-- memcpy(data, key->key, 16);
-- if (cipher == MT_CIPHER_BIP_CMAC_128)
-- memcpy(data + 16, key->key, 16);
-- }
-+ if (cipher == MT_CIPHER_TKIP) {
-+ /* Rx/Tx MIC keys are swapped */
-+ memcpy(data, key->key, 16);
-+ memcpy(data + 16, key->key + 24, 8);
-+ memcpy(data + 24, key->key + 16, 8);
- } else {
-+ if (cipher_mask == BIT(cipher))
-+ memcpy(data, key->key, key->keylen);
-+ else if (cipher != MT_CIPHER_BIP_CMAC_128)
-+ memcpy(data, key->key, 16);
- if (cipher == MT_CIPHER_BIP_CMAC_128)
-- memset(data + 16, 0, 16);
-- else if (cipher_mask)
-- memset(data, 0, 16);
-- if (!cipher_mask)
-- memset(data, 0, sizeof(data));
-+ memcpy(data + 16, key->key, 16);
- }
-
- mt76_wr_copy(dev, addr, data, sizeof(data));
-@@ -1219,7 +1209,7 @@ mt7615_mac_wtbl_update_key(struct mt7615
- static int
- mt7615_mac_wtbl_update_pk(struct mt7615_dev *dev, struct mt76_wcid *wcid,
- enum mt76_cipher_type cipher, u16 cipher_mask,
-- int keyidx, enum set_key_cmd cmd)
-+ int keyidx)
- {
- u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx), w0, w1;
-
-@@ -1238,9 +1228,7 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
- else
- w0 &= ~MT_WTBL_W0_RX_IK_VALID;
-
-- if (cmd == SET_KEY &&
-- (cipher != MT_CIPHER_BIP_CMAC_128 ||
-- cipher_mask == BIT(cipher))) {
-+ if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) {
- w0 &= ~MT_WTBL_W0_KEY_IDX;
- w0 |= FIELD_PREP(MT_WTBL_W0_KEY_IDX, keyidx);
- }
-@@ -1257,19 +1245,10 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
-
- static void
- mt7615_mac_wtbl_update_cipher(struct mt7615_dev *dev, struct mt76_wcid *wcid,
-- enum mt76_cipher_type cipher, u16 cipher_mask,
-- enum set_key_cmd cmd)
-+ enum mt76_cipher_type cipher, u16 cipher_mask)
- {
- u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx);
-
-- if (!cipher_mask) {
-- mt76_clear(dev, addr + 2 * 4, MT_WTBL_W2_KEY_TYPE);
-- return;
-- }
--
-- if (cmd != SET_KEY)
-- return;
--
- if (cipher == MT_CIPHER_BIP_CMAC_128 &&
- cipher_mask & ~BIT(MT_CIPHER_BIP_CMAC_128))
- return;
-@@ -1280,8 +1259,7 @@ mt7615_mac_wtbl_update_cipher(struct mt7
-
- int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
- struct mt76_wcid *wcid,
-- struct ieee80211_key_conf *key,
-- enum set_key_cmd cmd)
-+ struct ieee80211_key_conf *key)
- {
- enum mt76_cipher_type cipher;
- u16 cipher_mask = wcid->cipher;
-@@ -1291,19 +1269,14 @@ int __mt7615_mac_wtbl_set_key(struct mt7
- if (cipher == MT_CIPHER_NONE)
- return -EOPNOTSUPP;
-
-- if (cmd == SET_KEY)
-- cipher_mask |= BIT(cipher);
-- else
-- cipher_mask &= ~BIT(cipher);
--
-- mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask, cmd);
-- err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask,
-- cmd);
-+ cipher_mask |= BIT(cipher);
-+ mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask);
-+ err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask);
- if (err < 0)
- return err;
-
- err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, cipher_mask,
-- key->keyidx, cmd);
-+ key->keyidx);
- if (err < 0)
- return err;
-
-@@ -1314,13 +1287,12 @@ int __mt7615_mac_wtbl_set_key(struct mt7
-
- int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
- struct mt76_wcid *wcid,
-- struct ieee80211_key_conf *key,
-- enum set_key_cmd cmd)
-+ struct ieee80211_key_conf *key)
- {
- int err;
-
- spin_lock_bh(&dev->mt76.lock);
-- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
-+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
- spin_unlock_bh(&dev->mt76.lock);
-
- return err;
---- a/mt7615/main.c
-+++ b/mt7615/main.c
-@@ -391,18 +391,17 @@ static int mt7615_set_key(struct ieee802
-
- if (cmd == SET_KEY)
- *wcid_keyidx = idx;
-- else if (idx == *wcid_keyidx)
-- *wcid_keyidx = -1;
-- else
-+ else {
-+ if (idx == *wcid_keyidx)
-+ *wcid_keyidx = -1;
- goto out;
-+ }
-
-- mt76_wcid_key_setup(&dev->mt76, wcid,
-- cmd == SET_KEY ? key : NULL);
--
-+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
- if (mt76_is_mmio(&dev->mt76))
-- err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
-+ err = mt7615_mac_wtbl_set_key(dev, wcid, key);
- else
-- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
-+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
-
- out:
- mt7615_mutex_release(dev);
---- a/mt7615/mt7615.h
-+++ b/mt7615/mt7615.h
-@@ -482,11 +482,9 @@ int mt7615_mac_write_txwi(struct mt7615_
- void mt7615_mac_set_timing(struct mt7615_phy *phy);
- int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
- struct mt76_wcid *wcid,
-- struct ieee80211_key_conf *key,
-- enum set_key_cmd cmd);
-+ struct ieee80211_key_conf *key);
- int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
-- struct ieee80211_key_conf *key,
-- enum set_key_cmd cmd);
-+ struct ieee80211_key_conf *key);
- void mt7615_mac_reset_work(struct work_struct *work);
- u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid);
-
---- a/mt76x02_util.c
-+++ b/mt76x02_util.c
-@@ -455,20 +455,20 @@ int mt76x02_set_key(struct ieee80211_hw
- msta = sta ? (struct mt76x02_sta *)sta->drv_priv : NULL;
- wcid = msta ? &msta->wcid : &mvif->group_wcid;
-
-- if (cmd == SET_KEY) {
-- key->hw_key_idx = wcid->idx;
-- wcid->hw_key_idx = idx;
-- if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
-- key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
-- wcid->sw_iv = true;
-- }
-- } else {
-+ if (cmd != SET_KEY) {
- if (idx == wcid->hw_key_idx) {
- wcid->hw_key_idx = -1;
- wcid->sw_iv = false;
- }
-
-- key = NULL;
-+ return 0;
-+ }
-+
-+ key->hw_key_idx = wcid->idx;
-+ wcid->hw_key_idx = idx;
-+ if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
-+ key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
-+ wcid->sw_iv = true;
- }
- mt76_wcid_key_setup(&dev->mt76, wcid, key);
-
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -387,16 +387,15 @@ static int mt7915_set_key(struct ieee802
- mt7915_mcu_add_bss_info(phy, vif, true);
- }
-
-- if (cmd == SET_KEY)
-+ if (cmd == SET_KEY) {
- *wcid_keyidx = idx;
-- else if (idx == *wcid_keyidx)
-- *wcid_keyidx = -1;
-- else
-+ } else {
-+ if (idx == *wcid_keyidx)
-+ *wcid_keyidx = -1;
- goto out;
-+ }
-
-- mt76_wcid_key_setup(&dev->mt76, wcid,
-- cmd == SET_KEY ? key : NULL);
--
-+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
- err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
- key, MCU_EXT_CMD(STA_REC_UPDATE),
- &msta->wcid, cmd);
---- a/mt7921/main.c
-+++ b/mt7921/main.c
-@@ -463,16 +463,15 @@ static int mt7921_set_key(struct ieee802
-
- mt7921_mutex_acquire(dev);
-
-- if (cmd == SET_KEY)
-+ if (cmd == SET_KEY) {
- *wcid_keyidx = idx;
-- else if (idx == *wcid_keyidx)
-- *wcid_keyidx = -1;
-- else
-+ } else {
-+ if (idx == *wcid_keyidx)
-+ *wcid_keyidx = -1;
- goto out;
-+ }
-
-- mt76_wcid_key_setup(&dev->mt76, wcid,
-- cmd == SET_KEY ? key : NULL);
--
-+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
- err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
- key, MCU_UNI_CMD(STA_REC_UPDATE),
- &msta->wcid, cmd);