From: Ali Bahar Date: Sat, 3 Sep 2011 19:14:14 +0000 (+0800) Subject: staging: r8712u: Merging Realtek's latest (v2.6.6). stop_drv_timers moved. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c19d86b9bd03d32d727d0b1d56a0716dfe6eb83;p=linux-beck.git staging: r8712u: Merging Realtek's latest (v2.6.6). stop_drv_timers moved. stop_drv_timers() is now done in r871xu_dev_remove(), not netdev_close(). Signed-off-by: Ali Bahar Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index a46d4bb567a7..961d6e5a26c3 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -261,7 +261,7 @@ static void start_drv_timers(struct _adapter *padapter) _set_timer(&padapter->mlmepriv.wdg_timer, 2000); } -static void stop_drv_timers(struct _adapter *padapter) +void r8712_stop_drv_timers(struct _adapter *padapter) { _cancel_timer_ex(&padapter->mlmepriv.assoc_timer); _cancel_timer_ex(&padapter->mlmepriv.sitesurveyctrl. @@ -468,8 +468,6 @@ static int netdev_close(struct net_device *pnetdev) r8712_free_assoc_resources(padapter); /*s2-4.*/ r8712_free_network_queue(padapter); - /*Stop driver mlme relation timer*/ - stop_drv_timers(padapter); /* The interface is no longer Up: */ padapter->bup = false; return 0; diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 3447d755a60b..3bcb669a7ea7 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -622,6 +622,8 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) } flush_scheduled_work(); udelay(1); + /*Stop driver mlme relation timer */ + r8712_stop_drv_timers(padapter); r871x_dev_unload(padapter); r8712_free_drv_sw(padapter); } diff --git a/drivers/staging/rtl8712/usb_osintf.h b/drivers/staging/rtl8712/usb_osintf.h index d397a82986d2..d95797aac37a 100644 --- a/drivers/staging/rtl8712/usb_osintf.h +++ b/drivers/staging/rtl8712/usb_osintf.h @@ -42,6 +42,7 @@ uint rtl8712_hal_deinit(struct _adapter *padapter); void rtl871x_intf_stop(struct _adapter *padapter); void r871x_dev_unload(struct _adapter *padapter); void r8712_stop_drv_threads(struct _adapter *padapter); +void r8712_stop_drv_timers(struct _adapter *padapter); u8 r8712_init_drv_sw(struct _adapter *padapter); u8 r8712_free_drv_sw(struct _adapter *padapter); struct net_device *r8712_init_netdev(void);