summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-10-25 16:11:34 +0200
committerFelix Fietkau <nbd@nbd.name>2018-11-30 12:21:42 +0100
commit88046b2c9f6d8b91cc8b3ada547f49f6dd45469b (patch)
tree9d9cb060a3b528b42fc4fa1e0b5700ba2e4513da /drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
parent59b55d066ff625f8613c563bd2ed705bce412fa8 (diff)
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 <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_mac.h')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x02_mac.h19
1 files changed, 0 insertions, 19 deletions
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);