All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Shayne Chen <shayne.chen@mediatek.com>,
	Deren Wu <deren.wu@mediatek.com>,
	Simon Horman <simon.horman@corigine.com>,
	Felix Fietkau <nbd@nbd.name>
Subject: [PATCH 6.4 19/32] wifi: mt76: mt7921: fix skb leak by txs missing in AMSDU
Date: Mon,  4 Sep 2023 19:30:17 +0100	[thread overview]
Message-ID: <20230904182948.784609521@linuxfoundation.org> (raw)
In-Reply-To: <20230904182947.899158313@linuxfoundation.org>

6.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Deren Wu <deren.wu@mediatek.com>

commit b642f4c5f3de0a8f47808d32b1ebd9c427a42a66 upstream.

txs may be dropped if the frame is aggregated in AMSDU. When the problem
shows up, some SKBs would be hold in driver to cause network stopped
temporarily. Even if the problem can be recovered by txs timeout handling,
mt7921 still need to disable txs in AMSDU to avoid this issue.

Cc: stable@vger.kernel.org
Fixes: 163f4d22c118 ("mt76: mt7921: add MAC support")
Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
@@ -495,6 +495,7 @@ void mt76_connac2_mac_write_txwi(struct
 				    BSS_CHANGED_BEACON_ENABLED));
 	bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
 					 BSS_CHANGED_FILS_DISCOVERY));
+	bool amsdu_en = wcid->amsdu;
 
 	if (vif) {
 		struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
@@ -554,12 +555,14 @@ void mt76_connac2_mac_write_txwi(struct
 	txwi[4] = 0;
 
 	val = FIELD_PREP(MT_TXD5_PID, pid);
-	if (pid >= MT_PACKET_ID_FIRST)
+	if (pid >= MT_PACKET_ID_FIRST) {
 		val |= MT_TXD5_TX_STATUS_HOST;
+		amsdu_en = amsdu_en && !is_mt7921(dev);
+	}
 
 	txwi[5] = cpu_to_le32(val);
 	txwi[6] = 0;
-	txwi[7] = wcid->amsdu ? cpu_to_le32(MT_TXD7_HW_AMSDU) : 0;
+	txwi[7] = amsdu_en ? cpu_to_le32(MT_TXD7_HW_AMSDU) : 0;
 
 	if (is_8023)
 		mt76_connac2_mac_write_txwi_8023(txwi, skb, wcid);



  parent reply	other threads:[~2023-09-04 18:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 18:29 [PATCH 6.4 00/32] 6.4.15-rc1 review Greg Kroah-Hartman
2023-09-04 18:29 ` [PATCH 6.4 01/32] erofs: ensure that the post-EOF tails are all zeroed Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 02/32] ksmbd: fix wrong DataOffset validation of create context Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 03/32] ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob() Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 04/32] ksmbd: replace one-element array with flex-array member in struct smb2_ea_info Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 05/32] ksmbd: reduce descriptor size if remaining bytes is less than request size Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 06/32] ARM: pxa: remove use of symbol_get() Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 07/32] mmc: au1xmmc: force non-modular build and remove symbol_get usage Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 08/32] net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 09/32] rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 10/32] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 11/32] USB: serial: option: add Quectel EM05G variant (0x030e) Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 12/32] USB: serial: option: add FOXCONN T99W368/T99W373 product Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 13/32] ALSA: usb-audio: Fix init call orders for UAC1 Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 14/32] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 15/32] usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0 Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 16/32] HID: wacom: remove the battery when the EKR is off Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 17/32] staging: rtl8712: fix race condition Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 18/32] wifi: mt76: mt7921: do not support one stream on secondary antenna only Greg Kroah-Hartman
2023-09-04 18:30 ` Greg Kroah-Hartman [this message]
2023-09-04 18:30 ` [PATCH 6.4 20/32] wifi: rtw88: usb: kill and free rx urbs on probe failure Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 21/32] wifi: ath11k: Dont drop tx_status when peer cannot be found Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 22/32] wifi: ath11k: Cleanup mac80211 references on failure during tx_complete Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 23/32] serial: qcom-geni: fix opp vote on shutdown Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 24/32] serial: sc16is7xx: fix broken port 0 uart init Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 25/32] serial: sc16is7xx: fix bug when first setting GPIO direction Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 26/32] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 27/32] fsi: master-ast-cf: Add MODULE_FIRMWARE macro Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 28/32] tcpm: Avoid soft reset when partner does not support get_status Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 29/32] dt-bindings: sc16is7xx: Add property to change GPIO function Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 30/32] nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 31/32] usb: typec: tcpci: clear the fault status bit Greg Kroah-Hartman
2023-09-04 18:30 ` [PATCH 6.4 32/32] pinctrl: amd: Dont show `Invalid config param` errors Greg Kroah-Hartman
2023-09-05  0:09 ` [PATCH 6.4 00/32] 6.4.15-rc1 review Joel Fernandes
2023-09-05  4:28 ` Bagas Sanjaya
2023-09-05  8:28 ` Naresh Kamboju
2023-09-05  9:41 ` Sudip Mukherjee (Codethink)
2023-09-05 11:08 ` Jon Hunter
2023-09-05 17:09 ` Justin Forbes
2023-09-05 20:54 ` Shuah Khan
2023-09-05 21:01 ` Florian Fainelli
2023-09-05 23:06 ` Ron Economos
2023-09-06  5:13 ` SeongJae Park
2023-09-06 17:30 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230904182948.784609521@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=deren.wu@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=patches@lists.linux.dev \
    --cc=shayne.chen@mediatek.com \
    --cc=simon.horman@corigine.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.