From: Ali Bahar <ali@internetdog.org>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
linux-wireless@vger.kernel.org, Ali Bahar <ali@internetdog.org>
Subject: [PATCH 2/2] staging: r8712u: Interface-state not fully tracked.
Date: Tue, 12 Jul 2011 23:10:56 +0800 [thread overview]
Message-ID: <1310483456-10543-3-git-send-email-ali@internetDog.org> (raw)
In-Reply-To: <1310483456-10543-1-git-send-email-ali@internetDog.org>
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: Ali Bahar <ali@internetDog.org>
---
drivers/staging/rtl8712/os_intfs.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 3f38e8e..6697941 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -375,6 +375,12 @@ static void enable_video_mode(struct _adapter *padapter, int cbw40_value)
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)
{
struct _adapter *padapter = (struct _adapter *)_netdev_priv(pnetdev);
@@ -434,6 +440,12 @@ netdev_open_error:
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)
{
struct _adapter *padapter = (struct _adapter *) _netdev_priv(pnetdev);
@@ -458,6 +470,8 @@ static int netdev_close(struct net_device *pnetdev)
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;
}
--
1.7.6
next prev parent reply other threads:[~2011-07-12 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 15:10 [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Ali Bahar
2011-07-12 15:10 ` [PATCH 1/2] staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down Ali Bahar
2011-07-12 15:21 ` Larry Finger
2011-07-12 15:10 ` Ali Bahar [this message]
2011-07-12 15:22 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Larry Finger
-- strict thread matches above, loose matches on Subject: below --
2011-07-11 10:07 [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Ali Bahar
2011-07-11 10:07 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Ali Bahar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310483456-10543-3-git-send-email-ali@internetDog.org \
--to=ali@internetdog.org \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@suse.de \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).