Commit 94e1cfa8 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt76u: introduce mt76u_alloc_mcu_queue utility routine

Add mt76u_alloc_mcu_queue  utility routine to allocate mcu hw rx queue.
This is a preliminary patch to support new devices (e.g. mt7663u) that
rely on a hw queue for mcu messages
Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1d54bc27
...@@ -885,6 +885,7 @@ void mt76u_single_wr(struct mt76_dev *dev, const u8 req, ...@@ -885,6 +885,7 @@ void mt76u_single_wr(struct mt76_dev *dev, const u8 req,
const u16 offset, const u32 val); const u16 offset, const u32 val);
int mt76u_init(struct mt76_dev *dev, struct usb_interface *intf); int mt76u_init(struct mt76_dev *dev, struct usb_interface *intf);
void mt76u_deinit(struct mt76_dev *dev); void mt76u_deinit(struct mt76_dev *dev);
int mt76u_alloc_mcu_queue(struct mt76_dev *dev);
int mt76u_alloc_queues(struct mt76_dev *dev); int mt76u_alloc_queues(struct mt76_dev *dev);
void mt76u_stop_tx(struct mt76_dev *dev); void mt76u_stop_tx(struct mt76_dev *dev);
void mt76u_stop_rx(struct mt76_dev *dev); void mt76u_stop_rx(struct mt76_dev *dev);
......
...@@ -629,6 +629,12 @@ mt76u_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid) ...@@ -629,6 +629,12 @@ mt76u_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid)
return mt76u_submit_rx_buffers(dev, qid); return mt76u_submit_rx_buffers(dev, qid);
} }
int mt76u_alloc_mcu_queue(struct mt76_dev *dev)
{
return mt76u_alloc_rx_queue(dev, MT_RXQ_MCU);
}
EXPORT_SYMBOL_GPL(mt76u_alloc_mcu_queue);
static void static void
mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q) mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment