Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MT798X: TXS ACK is incorrectly reported with wed enabled #848

Closed
zhaojh329 opened this issue Dec 7, 2023 · 2 comments
Closed

MT798X: TXS ACK is incorrectly reported with wed enabled #848

zhaojh329 opened this issue Dec 7, 2023 · 2 comments

Comments

@zhaojh329
Copy link

zhaojh329 commented Dec 7, 2023

@nbd168
Steps to reproduce the issue with wed enabled.

  1. Setup a sta interface and connect an AP.
  2. Then unplug the AP device it connected.
  3. The mt76 driver still report tx acked.
info->flags |= IEEE80211_TX_STAT_ACK
bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
				  int pid, __le32 *txs_data)
{
	struct sk_buff_head list;
	struct sk_buff *skb;

	mt76_tx_status_lock(dev, &list);
	skb = mt76_tx_status_skb_get(dev, wcid, pid, &list);
	if (skb) {
		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

		if (!(le32_to_cpu(txs_data[0]) & MT_TXS0_ACK_ERROR_MASK))
			info->flags |= IEEE80211_TX_STAT_ACK;

		info->status.ampdu_len = 1;
		info->status.ampdu_ack_len =
			!!(info->flags & IEEE80211_TX_STAT_ACK);
		info->status.rates[0].idx = -1;

		mt76_connac2_mac_fill_txs(dev, wcid, txs_data);
		mt76_tx_status_skb_done(dev, skb, &list);
	}
	mt76_tx_status_unlock(dev, &list);

	return !!skb;
}

This break the IEEE80211_STA_CONNECTION_POLL mechanism.

Thu Dec  7 11:20:30 2023 daemon.notice wpa_supplicant[2757]: wlan-sta0: CTRL-EVENT-BEACON-LOSS
Thu Dec  7 11:20:42 2023 daemon.notice wpa_supplicant[2757]: wlan-sta0: CTRL-EVENT-BEACON-LOSS
Thu Dec  7 11:20:54 2023 daemon.notice wpa_supplicant[2757]: wlan-sta0: CTRL-EVENT-BEACON-LOSS
Thu Dec  7 11:22:15 2023 daemon.notice wpa_supplicant[2757]: wlan-sta0: CTRL-EVENT-BEACON-LOSS
Thu Dec  7 11:22:21 2023 daemon.notice wpa_supplicant[2757]: wlan-sta0: CTRL-EVENT-BEACON-LOSS
@zhaojh329 zhaojh329 changed the title MT798X: TXS ACK is incorrectly reported MT798X: TXS ACK is incorrectly reported with wed enabled Dec 7, 2023
@lukasz1992
Copy link

@zhaojh329 https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/cdb68e10f0f9246114d085e3bcb7dfcfe59ce854%5E%21/#F0 does it fix the issue?

@zhaojh329
Copy link
Author

@nbd168 nbd168 closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants