wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
[ Upstream commit 0c5a89ceddc1728a40cb3313948401dd70e3c649 ] The interrupt status polling is unreliable, which can cause status events to get lost. On all newer chips, txs-timeout is an indication that the packet was either never sent, or never acked. Fixes issues with inactivity polling. Link: https://patch.msgid.link/20250311103646.43346-6-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8f82cf305e
commit
fa6c05122f
@@ -489,6 +489,7 @@ struct mt76_hw_cap {
|
|||||||
#define MT_DRV_RX_DMA_HDR BIT(3)
|
#define MT_DRV_RX_DMA_HDR BIT(3)
|
||||||
#define MT_DRV_HW_MGMT_TXQ BIT(4)
|
#define MT_DRV_HW_MGMT_TXQ BIT(4)
|
||||||
#define MT_DRV_AMSDU_OFFLOAD BIT(5)
|
#define MT_DRV_AMSDU_OFFLOAD BIT(5)
|
||||||
|
#define MT_DRV_IGNORE_TXS_FAILED BIT(6)
|
||||||
|
|
||||||
struct mt76_driver_ops {
|
struct mt76_driver_ops {
|
||||||
u32 drv_flags;
|
u32 drv_flags;
|
||||||
|
|||||||
@@ -156,7 +156,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
static const struct mt76_driver_ops drv_ops = {
|
static const struct mt76_driver_ops drv_ops = {
|
||||||
.txwi_size = sizeof(struct mt76x02_txwi),
|
.txwi_size = sizeof(struct mt76x02_txwi),
|
||||||
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
|
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
|
||||||
MT_DRV_SW_RX_AIRTIME,
|
MT_DRV_SW_RX_AIRTIME |
|
||||||
|
MT_DRV_IGNORE_TXS_FAILED,
|
||||||
.survey_flags = SURVEY_INFO_TIME_TX,
|
.survey_flags = SURVEY_INFO_TIME_TX,
|
||||||
.update_survey = mt76x02_update_channel,
|
.update_survey = mt76x02_update_channel,
|
||||||
.set_channel = mt76x0_set_channel,
|
.set_channel = mt76x0_set_channel,
|
||||||
|
|||||||
@@ -214,7 +214,8 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
|
|||||||
const struct usb_device_id *id)
|
const struct usb_device_id *id)
|
||||||
{
|
{
|
||||||
static const struct mt76_driver_ops drv_ops = {
|
static const struct mt76_driver_ops drv_ops = {
|
||||||
.drv_flags = MT_DRV_SW_RX_AIRTIME,
|
.drv_flags = MT_DRV_SW_RX_AIRTIME |
|
||||||
|
MT_DRV_IGNORE_TXS_FAILED,
|
||||||
.survey_flags = SURVEY_INFO_TIME_TX,
|
.survey_flags = SURVEY_INFO_TIME_TX,
|
||||||
.update_survey = mt76x02_update_channel,
|
.update_survey = mt76x02_update_channel,
|
||||||
.set_channel = mt76x0_set_channel,
|
.set_channel = mt76x0_set_channel,
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
static const struct mt76_driver_ops drv_ops = {
|
static const struct mt76_driver_ops drv_ops = {
|
||||||
.txwi_size = sizeof(struct mt76x02_txwi),
|
.txwi_size = sizeof(struct mt76x02_txwi),
|
||||||
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
|
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
|
||||||
MT_DRV_SW_RX_AIRTIME,
|
MT_DRV_SW_RX_AIRTIME |
|
||||||
|
MT_DRV_IGNORE_TXS_FAILED,
|
||||||
.survey_flags = SURVEY_INFO_TIME_TX,
|
.survey_flags = SURVEY_INFO_TIME_TX,
|
||||||
.update_survey = mt76x02_update_channel,
|
.update_survey = mt76x02_update_channel,
|
||||||
.set_channel = mt76x2e_set_channel,
|
.set_channel = mt76x2e_set_channel,
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ static int mt76x2u_probe(struct usb_interface *intf,
|
|||||||
const struct usb_device_id *id)
|
const struct usb_device_id *id)
|
||||||
{
|
{
|
||||||
static const struct mt76_driver_ops drv_ops = {
|
static const struct mt76_driver_ops drv_ops = {
|
||||||
.drv_flags = MT_DRV_SW_RX_AIRTIME,
|
.drv_flags = MT_DRV_SW_RX_AIRTIME |
|
||||||
|
MT_DRV_IGNORE_TXS_FAILED,
|
||||||
.survey_flags = SURVEY_INFO_TIME_TX,
|
.survey_flags = SURVEY_INFO_TIME_TX,
|
||||||
.update_survey = mt76x02_update_channel,
|
.update_survey = mt76x02_update_channel,
|
||||||
.set_channel = mt76x2u_set_channel,
|
.set_channel = mt76x2u_set_channel,
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ __mt76_tx_status_skb_done(struct mt76_dev *dev, struct sk_buff *skb, u8 flags,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Tx status can be unreliable. if it fails, mark the frame as ACKed */
|
/* Tx status can be unreliable. if it fails, mark the frame as ACKed */
|
||||||
if (flags & MT_TX_CB_TXS_FAILED) {
|
if (flags & MT_TX_CB_TXS_FAILED &&
|
||||||
|
(dev->drv->drv_flags & MT_DRV_IGNORE_TXS_FAILED)) {
|
||||||
info->status.rates[0].count = 0;
|
info->status.rates[0].count = 0;
|
||||||
info->status.rates[0].idx = -1;
|
info->status.rates[0].idx = -1;
|
||||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
info->flags |= IEEE80211_TX_STAT_ACK;
|
||||||
|
|||||||
Reference in New Issue
Block a user