* [PATCH] rtlwifi: Modify some USB de-initialize code.
@ 2015-02-10 16:40 Taehee Yoo
2015-02-27 8:05 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2015-02-10 16:40 UTC (permalink / raw)
To: Larry.Finger, ap420073; +Cc: linux-wireless
Delete SET_USB_STOP macro and rtl_usb_deinit because
those are called twice in USB de-initialize routine.
Add some de-initialize workqueue function in USB disconnect routine.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
drivers/net/wireless/rtlwifi/usb.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 46ee956..f0188c8 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -701,12 +701,18 @@ free:
static void _rtl_usb_cleanup_rx(struct ieee80211_hw *hw)
{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
struct urb *urb;
usb_kill_anchored_urbs(&rtlusb->rx_submitted);
tasklet_kill(&rtlusb->rx_work_tasklet);
+ cancel_work_sync(&rtlpriv->works.lps_change_work);
+
+ flush_workqueue(rtlpriv->works.rtl_wq);
+ destroy_workqueue(rtlpriv->works.rtl_wq);
+
skb_queue_purge(&rtlusb->rx_queue);
while ((urb = usb_get_from_anchor(&rtlusb->rx_cleanup_urbs))) {
@@ -794,8 +800,6 @@ static void rtl_usb_cleanup(struct ieee80211_hw *hw)
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
struct ieee80211_tx_info *txinfo;
- SET_USB_STOP(rtlusb);
-
/* clean up rx stuff. */
_rtl_usb_cleanup_rx(hw);
@@ -834,7 +838,6 @@ static void rtl_usb_stop(struct ieee80211_hw *hw)
cancel_work_sync(&rtlpriv->works.fill_h2c_cmd);
/* Enable software */
SET_USB_STOP(rtlusb);
- rtl_usb_deinit(hw);
rtlpriv->cfg->ops->hw_disable(hw);
}
@@ -1147,9 +1150,9 @@ void rtl_usb_disconnect(struct usb_interface *intf)
if (unlikely(!rtlpriv))
return;
-
/* just in case driver is removed before firmware callback */
wait_for_completion(&rtlpriv->firmware_loading_complete);
+ clear_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status);
/*ieee80211_unregister_hw will call ops_stop */
if (rtlmac->mac80211_registered == 1) {
ieee80211_unregister_hw(hw);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: rtlwifi: Modify some USB de-initialize code.
2015-02-10 16:40 [PATCH] rtlwifi: Modify some USB de-initialize code Taehee Yoo
@ 2015-02-27 8:05 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-02-27 8:05 UTC (permalink / raw)
To: Taehee Yoo; +Cc: Larry.Finger, ap420073, linux-wireless
> Delete SET_USB_STOP macro and rtl_usb_deinit because
> those are called twice in USB de-initialize routine.
> Add some de-initialize workqueue function in USB disconnect routine.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-27 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 16:40 [PATCH] rtlwifi: Modify some USB de-initialize code Taehee Yoo
2015-02-27 8:05 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.