mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Integrate NPU in RRO session management
Add NPU integration in RRO 3.0 session management. This is a preliminary patch to enable NPU offload for MT7996 (Eagle) chipset. Tested-by: Kang Yang <[email protected]> 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
01575edfc3
commit
d7a79fcece
@@ -383,6 +383,36 @@ int mt76_npu_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_npu_net_setup_tc);
|
||||
|
||||
int mt76_npu_send_txrx_addr(struct mt76_dev *dev, int ifindex,
|
||||
u32 direction, u32 i_count_addr,
|
||||
u32 o_status_addr, u32 o_count_addr)
|
||||
{
|
||||
struct {
|
||||
__le32 dir;
|
||||
__le32 in_count_addr;
|
||||
__le32 out_status_addr;
|
||||
__le32 out_count_addr;
|
||||
} info = {
|
||||
.dir = cpu_to_le32(direction),
|
||||
.in_count_addr = cpu_to_le32(i_count_addr),
|
||||
.out_status_addr = cpu_to_le32(o_status_addr),
|
||||
.out_count_addr = cpu_to_le32(o_count_addr),
|
||||
};
|
||||
struct airoha_npu *npu;
|
||||
int err = -ENODEV;
|
||||
|
||||
rcu_read_lock();
|
||||
npu = rcu_dereference(dev->mmio.npu);
|
||||
if (npu)
|
||||
err = airoha_npu_wlan_send_msg(npu, ifindex,
|
||||
WLAN_FUNC_SET_WAIT_INODE_TXRX_REG_ADDR,
|
||||
&info, sizeof(info), GFP_ATOMIC);
|
||||
rcu_read_unlock();
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_npu_send_txrx_addr);
|
||||
|
||||
void mt76_npu_disable_irqs(struct mt76_dev *dev)
|
||||
{
|
||||
struct airoha_npu *npu;
|
||||
|
||||
Reference in New Issue
Block a user