From: Ondrej Zary <linux@rainbow-software.org>
To: linux-wireless@vger.kernel.org
Cc: Dan Williams <dcbw@redhat.com>,
netdev@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 2/2] airo: Implement netif_carrier_on/off
Date: Mon, 21 Sep 2015 15:44:25 +0200 [thread overview]
Message-ID: <1442843065-30234-2-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1442843065-30234-1-git-send-email-linux@rainbow-software.org>
Add calls to netif_carrier_on and netif_carrier_off
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
drivers/net/wireless/airo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 67001a8..8ae838d 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -3267,6 +3267,7 @@ static void airo_handle_link(struct airo_info *ai)
wake_up_interruptible(&ai->thr_wait);
} else
airo_send_event(ai->dev);
+ netif_carrier_on(ai->dev);
} else if (!scan_forceloss) {
if (auto_wep && !ai->expires) {
ai->expires = RUN_AT(3*HZ);
@@ -3277,6 +3278,9 @@ static void airo_handle_link(struct airo_info *ai)
eth_zero_addr(wrqu.ap_addr.sa_data);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(ai->dev, SIOCGIWAP, &wrqu, NULL);
+ netif_carrier_off(ai->dev);
+ } else {
+ netif_carrier_off(ai->dev);
}
}
@@ -3613,6 +3617,7 @@ static void disable_MAC( struct airo_info *ai, int lock ) {
return;
if (test_bit(FLAG_ENABLED, &ai->flags)) {
+ netif_carrier_off(ai->dev);
memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_DISABLE; // disable in case already enabled
issuecommand(ai, &cmd, &rsp);
--
Ondrej Zary
next prev parent reply other threads:[~2015-09-21 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 13:44 [PATCH v3 1/2] airo: fix IW_AUTH_ALG_OPEN_SYSTEM Ondrej Zary
2015-09-21 13:44 ` Ondrej Zary [this message]
[not found] ` <1442843065-30234-1-git-send-email-linux-ZCIryABCsrmttCpgsWEBFmD2FQJk+8+b@public.gmane.org>
2015-09-21 16:22 ` Dan Williams
2015-09-29 8:08 ` [v3,1/2] " Kalle Valo
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=1442843065-30234-2-git-send-email-linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=dcbw@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@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).