Commit 288d600a authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Kalle Valo

mt76: move mt76x2u_mcu_deinit routine in mt76-usb module

Move mt76x2u_mcu_deinit routine in usb_mcu layer in order to
be reused by mt76x0 driver in usb mcu layer unification between
mt76x0 and mt76x2u drivers
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4c89ff2c
...@@ -629,5 +629,6 @@ int mt76u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb, ...@@ -629,5 +629,6 @@ int mt76u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb,
int cmd, bool wait_resp); int cmd, bool wait_resp);
void mt76u_mcu_fw_reset(struct mt76_dev *dev); void mt76u_mcu_fw_reset(struct mt76_dev *dev);
int mt76u_mcu_init_rx(struct mt76_dev *dev); int mt76u_mcu_init_rx(struct mt76_dev *dev);
void mt76u_mcu_deinit(struct mt76_dev *dev);
#endif #endif
...@@ -65,7 +65,6 @@ int mt76x2u_mcu_load_cr(struct mt76x2_dev *dev, u8 type, ...@@ -65,7 +65,6 @@ int mt76x2u_mcu_load_cr(struct mt76x2_dev *dev, u8 type,
u8 temp_level, u8 channel); u8 temp_level, u8 channel);
int mt76x2u_mcu_init(struct mt76x2_dev *dev); int mt76x2u_mcu_init(struct mt76x2_dev *dev);
int mt76x2u_mcu_fw_init(struct mt76x2_dev *dev); int mt76x2u_mcu_fw_init(struct mt76x2_dev *dev);
void mt76x2u_mcu_deinit(struct mt76x2_dev *dev);
int mt76x2u_alloc_queues(struct mt76x2_dev *dev); int mt76x2u_alloc_queues(struct mt76x2_dev *dev);
void mt76x2u_queues_deinit(struct mt76x2_dev *dev); void mt76x2u_queues_deinit(struct mt76x2_dev *dev);
......
...@@ -312,5 +312,5 @@ void mt76x2u_cleanup(struct mt76x2_dev *dev) ...@@ -312,5 +312,5 @@ void mt76x2u_cleanup(struct mt76x2_dev *dev)
mt76x2u_mcu_set_radio_state(dev, false); mt76x2u_mcu_set_radio_state(dev, false);
mt76x2u_stop_hw(dev); mt76x2u_stop_hw(dev);
mt76u_queues_deinit(&dev->mt76); mt76u_queues_deinit(&dev->mt76);
mt76x2u_mcu_deinit(dev); mt76u_mcu_deinit(&dev->mt76);
} }
...@@ -453,11 +453,3 @@ int mt76x2u_mcu_init(struct mt76x2_dev *dev) ...@@ -453,11 +453,3 @@ int mt76x2u_mcu_init(struct mt76x2_dev *dev)
return mt76x2u_mcu_set_radio_state(dev, true); return mt76x2u_mcu_set_radio_state(dev, true);
} }
void mt76x2u_mcu_deinit(struct mt76x2_dev *dev)
{
struct mt76_usb *usb = &dev->mt76.usb;
usb_kill_urb(usb->mcu.res.urb);
mt76u_buf_free(&usb->mcu.res);
}
...@@ -250,3 +250,12 @@ int mt76u_mcu_init_rx(struct mt76_dev *dev) ...@@ -250,3 +250,12 @@ int mt76u_mcu_init_rx(struct mt76_dev *dev)
return err; return err;
} }
EXPORT_SYMBOL_GPL(mt76u_mcu_init_rx); EXPORT_SYMBOL_GPL(mt76u_mcu_init_rx);
void mt76u_mcu_deinit(struct mt76_dev *dev)
{
struct mt76_usb *usb = &dev->usb;
usb_kill_urb(usb->mcu.res.urb);
mt76u_buf_free(&usb->mcu.res);
}
EXPORT_SYMBOL_GPL(mt76u_mcu_deinit);
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