From: Ondrej Zary <linux@rainbow-software.org>
To: Dan Williams <dcbw@redhat.com>
Cc: netdev@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] airo: Implement netif_carrier_on/off
Date: Tue, 15 Sep 2015 17:18:09 +0200 [thread overview]
Message-ID: <1442330289-2907-2-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1442330289-2907-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 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index a8f2767..629245c 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,7 +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);
}
static void airo_handle_rx(struct airo_info *ai)
@@ -3613,6 +3616,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-15 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 15:18 [PATCH 1/2 v2] airo: fix IW_AUTH_ALG_OPEN_SYSTEM Ondrej Zary
2015-09-15 15:18 ` Ondrej Zary [this message]
2015-09-16 14:30 ` [PATCH 2/2] airo: Implement netif_carrier_on/off Sergei Shtylyov
2015-09-18 16:54 ` [PATCH 1/2 v2] airo: fix IW_AUTH_ALG_OPEN_SYSTEM Dan Williams
2015-09-18 20:06 ` Ondrej Zary
2015-09-18 21:40 ` Dan Williams
2015-09-21 11:39 ` Kalle Valo
-- strict thread matches above, loose matches on Subject: below --
2015-08-31 19:19 [PATCH 1/2] " Ondrej Zary
2015-08-31 19:19 ` [PATCH 2/2] airo: Implement netif_carrier_on/off Ondrej Zary
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=1442330289-2907-2-git-send-email-linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=dcbw@redhat.com \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.