From: Jiri Benc <jbenc@suse.cz>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 6/19] mac80211: Set carrier status for STA interfaces
Date: Fri, 23 Mar 2007 21:44:48 +0100 (CET) [thread overview]
Message-ID: <20070323204448.7F593484C4@silver.suse.cz> (raw)
In-Reply-To: <20070323214400.642621638.midnight@suse.cz>
From: Michael Wu <flamingice@sourmilk.net>
This makes STA interfaces set the carrier status based on the current
association status.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
---
net/mac80211/ieee80211.c | 4 ++++
net/mac80211/ieee80211_sta.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
22abe7f30c0e34ac94eda86e6aad66f74e582317
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 18caa2b..30330b9 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -2368,6 +2368,10 @@ static int ieee80211_open(struct net_dev
else
ieee80211_if_config(dev);
+ if (sdata->type == IEEE80211_IF_TYPE_STA &&
+ !local->user_space_mlme)
+ netif_carrier_off(dev);
+
netif_start_queue(dev);
return 0;
}
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index a264008..9d08a37 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -375,11 +375,13 @@ static void ieee80211_set_associated(str
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (sdata->type != IEEE80211_IF_TYPE_STA)
return;
+ netif_carrier_on(dev);
ifsta->prev_bssid_set = 1;
memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN);
memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN);
ieee80211_sta_send_associnfo(dev, ifsta);
} else {
+ netif_carrier_off(dev);
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
}
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -2007,6 +2009,7 @@ static void ieee80211_sta_reset_auth(str
ifsta->auth_alg);
ifsta->auth_transaction = -1;
ifsta->associated = ifsta->auth_tries = ifsta->assoc_tries = 0;
+ netif_carrier_off(dev);
}
--
1.3.0
next prev parent reply other threads:[~2007-03-23 20:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 20:44 [PATCH 0/19] d80211: pull request Jiri Benc
2007-03-23 20:44 ` [PATCH 1/19] mac80211: drop packets from nonexisting interfaces in PS mode Jiri Benc
2007-03-23 20:44 ` [PATCH 2/19] mac80211: remove useless callbacks from wmaster Jiri Benc
2007-03-23 20:44 ` [PATCH 3/19] mac80211: fix rtnl locking in ieee80211_register_hw Jiri Benc
2007-03-23 20:44 ` [PATCH 4/19] mac80211: Remove curr_rates and fix related concurrency issues Jiri Benc
2007-03-23 20:44 ` [PATCH 5/19] mac80211: Remove tx_timeout callback Jiri Benc
2007-03-23 20:44 ` Jiri Benc [this message]
2007-03-23 20:44 ` [PATCH 7/19] mac80211: Stop virtual interfaces during scan Jiri Benc
2007-03-23 20:44 ` [PATCH 8/19] mac80211: Fix pkt_type annotations Jiri Benc
2007-03-23 20:44 ` [PATCH 9/19] mac80211: move PHY things to debugfs Jiri Benc
2007-03-23 20:44 ` [PATCH 10/19] mac80211: move sta dir " Jiri Benc
2007-03-23 20:44 ` [PATCH 11/19] mac80211: move per-netdev and key stuff " Jiri Benc
2007-03-23 20:44 ` [PATCH 12/19] mac80211 debugfs Kconfig Jiri Benc
2007-03-23 20:44 ` [PATCH 13/19] mac80211: fix remaining sparse warnings Jiri Benc
2007-03-23 20:44 ` [PATCH 14/19] mac80211: switch STA interfaces to PS mode during scan Jiri Benc
2007-03-23 20:44 ` [PATCH 15/19] mac80211: fix wrong keyidx will change default key Jiri Benc
2007-03-23 20:44 ` [PATCH 16/19] mac80211: fix passing wrong pointer to ieee80211_dump_frame Jiri Benc
2007-03-23 20:45 ` [PATCH 17/19] mac80211: Properly kill tasklets before shutdown Jiri Benc
2007-03-23 20:45 ` [PATCH 18/19] mac80211: Prevent unregistering of unregistered hw Jiri Benc
2007-03-23 20:45 ` [PATCH 19/19] mac80211: Add software sequence support Jiri Benc
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=20070323204448.7F593484C4@silver.suse.cz \
--to=jbenc@suse.cz \
--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).