Commit a5ee6529 authored by Ali Bahar's avatar Ali Bahar Committed by Greg Kroah-Hartman

staging: r8712u: Interface-state not fully tracked.

padapter->bup is True when the interface has been
brought Up. But it was not being reset when the
interface is taken Down.
This has not caused a known problem, as other
state variables may be compensating for it. Never
the less, it is now properly tracked.
Signed-off-by: default avatarAli Bahar <ali@internetDog.org>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d1661dfd
...@@ -375,6 +375,12 @@ static void enable_video_mode(struct _adapter *padapter, int cbw40_value) ...@@ -375,6 +375,12 @@ static void enable_video_mode(struct _adapter *padapter, int cbw40_value)
r8712_fw_cmd(padapter, intcmd); r8712_fw_cmd(padapter, intcmd);
} }
/**
*
* This function intends to handle the activation of an interface
* i.e. when it is brought Up/Active from a Down state.
*
*/
static int netdev_open(struct net_device *pnetdev) static int netdev_open(struct net_device *pnetdev)
{ {
struct _adapter *padapter = (struct _adapter *)_netdev_priv(pnetdev); struct _adapter *padapter = (struct _adapter *)_netdev_priv(pnetdev);
...@@ -434,6 +440,12 @@ static int netdev_open(struct net_device *pnetdev) ...@@ -434,6 +440,12 @@ static int netdev_open(struct net_device *pnetdev)
return -1; return -1;
} }
/**
*
* This function intends to handle the shutdown of an interface
* i.e. when it is brought Down from an Up/Active state.
*
*/
static int netdev_close(struct net_device *pnetdev) static int netdev_close(struct net_device *pnetdev)
{ {
struct _adapter *padapter = (struct _adapter *) _netdev_priv(pnetdev); struct _adapter *padapter = (struct _adapter *) _netdev_priv(pnetdev);
...@@ -458,6 +470,8 @@ static int netdev_close(struct net_device *pnetdev) ...@@ -458,6 +470,8 @@ static int netdev_close(struct net_device *pnetdev)
r8712_free_network_queue(padapter); r8712_free_network_queue(padapter);
/*Stop driver mlme relation timer*/ /*Stop driver mlme relation timer*/
stop_drv_timers(padapter); stop_drv_timers(padapter);
/* The interface is no longer Up: */
padapter->bup = false;
return 0; return 0;
} }
......
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