mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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:
committed by
Felix Fietkau
parent
85e6517b0a
commit
a3b6c67c97
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user