diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-06-18 21:12:24 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-07-21 19:01:15 +0200 |
commit | f0efa8621550e77492719072d056f30569242b6b (patch) | |
tree | 2d72ad0ff4ec159687d4334e485c4fc181cbfa8c /drivers/net/wireless/mediatek/mt76/dma.c | |
parent | beffe070b1880e7c53e3fc76f2e4e8f31d18f7c5 (diff) | |
download | linux-stable-f0efa8621550e77492719072d056f30569242b6b.tar.gz linux-stable-f0efa8621550e77492719072d056f30569242b6b.tar.bz2 linux-stable-f0efa8621550e77492719072d056f30569242b6b.zip |
mt76: add API for testmode support
This can be used for calibration in the manufacturing process.
It supports sending a configurable number of packets with a specific rate
and configurable tx power levels / antenna settings.
It also supports receiving packets and showing some statistics, including
packet counters and detailed RSSI information.
It will only be compiled in if CONFIG_NL80211_TESTMODE is enabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/dma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index f4d6074fe32a..6c25859dd386 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -370,6 +370,12 @@ unmap: tx_info.buf[n].len, DMA_TO_DEVICE); free: +#ifdef CONFIG_NL80211_TESTMODE + /* fix tx_done accounting on queue overflow */ + if (tx_info.skb == dev->test.tx_skb) + dev->test.tx_done--; +#endif + e.skb = tx_info.skb; e.txwi = t; dev->drv->tx_complete_skb(dev, qid, &e); |