wifi: mt76: Add the capability to set TX token start ID

This is a preliminary patch to enable traffic forward offloading via the
Airoha NPU module available on the Airoha EN7581 SoC.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2025-10-30 11:48:48 +00:00
committed by Felix Fietkau
parent 85e6517b0a
commit a3b6c67c97
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -952,6 +952,7 @@ struct mt76_dev {
struct idr token;
u16 wed_token_count;
u16 token_count;
u16 token_start;
u16 token_size;
spinlock_t rx_token_lock;
+4 -2
View File
@@ -847,8 +847,10 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
spin_lock_bh(&dev->token_lock);
token = idr_alloc(&dev->token, *ptxwi, 0, dev->token_size, GFP_ATOMIC);
if (token >= 0)
token = idr_alloc(&dev->token, *ptxwi, dev->token_start,
dev->token_start + dev->token_size,
GFP_ATOMIC);
if (token >= dev->token_start)
dev->token_count++;
#ifdef CONFIG_NET_MEDIATEK_SOC_WED