mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt76x02u: move mt76x02u_mac_start in mt76x02-usb module
Unify mt76x02u_mac_start between mt76x2u and mt76x0u since the code is shared between both drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
c39488772d
commit
0b01aceeef
@@ -23,6 +23,27 @@ void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02u_tx_complete_skb);
|
||||
|
||||
int mt76x02u_mac_start(struct mt76x02_dev *dev)
|
||||
{
|
||||
mt76x02_mac_reset_counters(dev);
|
||||
|
||||
mt76_wr(dev, MT_MAC_SYS_CTRL, MT_MAC_SYS_CTRL_ENABLE_TX);
|
||||
if (!mt76x02_wait_for_wpdma(&dev->mt76, 200000))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
mt76_wr(dev, MT_RX_FILTR_CFG, dev->mt76.rxfilter);
|
||||
|
||||
mt76_wr(dev, MT_MAC_SYS_CTRL,
|
||||
MT_MAC_SYS_CTRL_ENABLE_TX |
|
||||
MT_MAC_SYS_CTRL_ENABLE_RX);
|
||||
|
||||
if (!mt76x02_wait_for_wpdma(&dev->mt76, 50))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02u_mac_start);
|
||||
|
||||
int mt76x02u_skb_dma_info(struct sk_buff *skb, int port, u32 flags)
|
||||
{
|
||||
struct sk_buff *iter, *last = skb;
|
||||
|
||||
Reference in New Issue
Block a user