mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +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 <lorenzo@kernel.org> Link: https://patch.msgid.link/20251017-mt76-npu-devel-v2-3-ddaa90901723@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
a7fb9aac3e
commit
f7632a7fdd
@@ -944,6 +944,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