From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com
Subject: [PATCH 2/4] rndis_wlan: update carrier flag when link state changes
Date: Mon, 02 Jun 2008 18:35:29 +0300 [thread overview]
Message-ID: <20080602153529.22793.91132.stgit@nanoha.lan> (raw)
In-Reply-To: <20080602153521.22793.4271.stgit@nanoha.lan>
Driver wasn't updating netif_carrier on link state changes but assumed
link layer was always up.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
drivers/net/wireless/rndis_wlan.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index aaeeec8..c281c0b 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2215,6 +2215,8 @@ static void rndis_wext_worker(struct work_struct *work)
int ret, offset;
if (test_and_clear_bit(WORK_LINK_UP, &priv->work_pending)) {
+ netif_carrier_on(usbdev->net);
+
info = kzalloc(assoc_size, GFP_KERNEL);
if (!info)
goto get_bssid;
@@ -2253,6 +2255,8 @@ get_bssid:
}
if (test_and_clear_bit(WORK_LINK_DOWN, &priv->work_pending)) {
+ netif_carrier_off(usbdev->net);
+
evt.data.flags = 0;
evt.data.length = 0;
memset(evt.ap_addr.sa_data, 0, ETH_ALEN);
@@ -2574,6 +2578,7 @@ static int rndis_wext_bind(struct usbnet *dev, struct usb_interface *intf)
/* turn radio on */
priv->radio_on = 1;
disassociate(dev, 1);
+ netif_carrier_off(dev->net);
/* because rndis_command() sleeps we need to use workqueue */
priv->workqueue = create_singlethread_workqueue("rndis_wlan");
next prev parent reply other threads:[~2008-06-02 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 15:35 [PATCH 1/4] rndis_wlan: do link-down state change in worker thread Jussi Kivilinna
2008-06-02 15:35 ` Jussi Kivilinna [this message]
2008-06-02 15:35 ` [PATCH 3/4] rndis_wlan: check if set_multicast_list work is already scheduled Jussi Kivilinna
2008-06-02 15:35 ` [PATCH 4/4] rndis_wlan: cleanup: rename and remove local pointers Jussi Kivilinna
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=20080602153529.22793.91132.stgit@nanoha.lan \
--to=jussi.kivilinna@mbnet.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).