From 88046b2c9f6d8b91cc8b3ada547f49f6dd45469b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 25 Oct 2018 16:11:34 +0200 Subject: mt76: add support for reporting tx status with skb MT76x2/MT76x0 has somewhat unreliable tx status reporting, and for that reason the driver currently does not report per-skb tx ack status at all. This breaks things like client idle polling, which relies on the tx ack status of a transmitted nullfunc frame. This patch adds code to report skb-attached tx status if requested by mac80211 or the rate control module. Since tx status is polled from a simple FIFO register, the code needs to account for the possibility of tx status events getting lost. The code keeps a list of skbs for which tx status is required and passes them to mac80211 once tx status has been filled in and the DMA queue is done with it. If a tx status event is not received after one second, the status rates are cleared, and a succesful ACK is indicated to avoid spurious disassoc during assoc or client polling. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_mac.h') diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h index e2c47ca18d85..b076c4305585 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h @@ -42,15 +42,6 @@ struct mt76x02_vif { struct mt76_wcid group_wcid; }; -struct mt76x02_tx_info { - unsigned long jiffies; - u8 tries; - - u8 wcid; - u8 pktid; - u8 retry; -}; - DECLARE_EWMA(signal, 10, 8); struct mt76x02_sta { @@ -153,8 +144,6 @@ enum mt76x2_phy_bandwidth { #define MT_TXWI_ACK_CTL_NSEQ BIT(1) #define MT_TXWI_ACK_CTL_BA_WINDOW GENMASK(7, 2) -#define MT_TXWI_PKTID_PROBE BIT(7) - struct mt76x02_txwi { __le16 flags; __le16 rate; @@ -190,14 +179,6 @@ static inline bool mt76x02_wait_for_mac(struct mt76_dev *dev) return false; } -static inline struct mt76x02_tx_info * -mt76x02_skb_tx_info(struct sk_buff *skb) -{ - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - - return (void *)info->status.status_driver_data; -} - void mt76x02_txq_init(struct mt76x02_dev *dev, struct ieee80211_txq *txq); void mt76x02_mac_set_short_preamble(struct mt76x02_dev *dev, bool enable); -- cgit v1.2.3