Commit c07a49d4 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: move mt76_mcu_rx_event in mt76-core

Move mt76_mcu_rx_event i mt76-core module and remove duplicated code.
mt76_mcu_rx_event will be reused adding support for mt7603 driver
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 680abb25
...@@ -51,3 +51,10 @@ struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev, ...@@ -51,3 +51,10 @@ struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev,
return skb_dequeue(&dev->mmio.mcu.res_q); return skb_dequeue(&dev->mmio.mcu.res_q);
} }
EXPORT_SYMBOL_GPL(mt76_mcu_get_response); EXPORT_SYMBOL_GPL(mt76_mcu_get_response);
void mt76_mcu_rx_event(struct mt76_dev *dev, struct sk_buff *skb)
{
skb_queue_tail(&dev->mmio.mcu.res_q, skb);
wake_up(&dev->mmio.mcu.wait);
}
EXPORT_SYMBOL_GPL(mt76_mcu_rx_event);
...@@ -754,6 +754,7 @@ void mt76u_queues_deinit(struct mt76_dev *dev); ...@@ -754,6 +754,7 @@ void mt76u_queues_deinit(struct mt76_dev *dev);
struct sk_buff * struct sk_buff *
mt76_mcu_msg_alloc(const void *data, int head_len, mt76_mcu_msg_alloc(const void *data, int head_len,
int data_len, int tail_len); int data_len, int tail_len);
void mt76_mcu_rx_event(struct mt76_dev *dev, struct sk_buff *skb);
struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev, struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev,
unsigned long expires); unsigned long expires);
......
...@@ -58,8 +58,7 @@ void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, ...@@ -58,8 +58,7 @@ void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
if (q == MT_RXQ_MCU) { if (q == MT_RXQ_MCU) {
/* this is used just by mmio code */ /* this is used just by mmio code */
skb_queue_tail(&mdev->mmio.mcu.res_q, skb); mt76_mcu_rx_event(&dev->mt76, skb);
wake_up(&mdev->mmio.mcu.wait);
return; return;
} }
......
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