mt76: testmode: make tx queued limit adjustable

Originally, tx queued limit is set to 1000 to prevent from running out
of tx token. If a new testmode tx is triggered while the previous one
hasn't finished yet, we'll wait a period of time until tx_done equals to
tx_queued. Normally, current queued limit can finish in 10 seconds.

However, if ipg is configured to a larger value, less than 1000 packets
can be done in the default timeout period, which may lead to a crash
when a new testmode tx triggered.

To deal with this, make tx queued limit dynamically adjusted according
to ipg value.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Shayne Chen
2021-01-14 11:14:59 +01:00
committed by Felix Fietkau
parent cc05f46796
commit 77b18b16fe
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -5,6 +5,8 @@
#ifndef __MT76_TESTMODE_H
#define __MT76_TESTMODE_H
#define MT76_TM_TIMEOUT 10
/**
* enum mt76_testmode_attr - testmode attributes inside NL80211_ATTR_TESTDATA
*