netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: netdev@vger.kernel.org
Cc: Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] airo: Implement netif_carrier_on/off
Date: Mon, 31 Aug 2015 21:19:54 +0200	[thread overview]
Message-ID: <1441048794-31237-2-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1441048794-31237-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 2066a1f..1a9ddcd 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -3266,6 +3266,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);
@@ -3276,7 +3277,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)
@@ -3612,6 +3615,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

  reply	other threads:[~2015-08-31 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 19:19 [PATCH 1/2] airo: fix IW_AUTH_ALG_OPEN_SYSTEM Ondrej Zary
2015-08-31 19:19 ` Ondrej Zary [this message]
2015-08-31 20:44 ` Dan Williams
2015-08-31 22:12   ` Ondrej Zary
2015-09-01  0:04     ` Dan Williams
2015-09-01 22:21       ` Ondrej Zary
  -- strict thread matches above, loose matches on Subject: below --
2015-09-15 15:18 [PATCH 1/2 v2] " Ondrej Zary
2015-09-15 15:18 ` [PATCH 2/2] airo: Implement netif_carrier_on/off Ondrej Zary
2015-09-16 14:30   ` Sergei Shtylyov

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=1441048794-31237-2-git-send-email-linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --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 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).