From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 2/6] mac80211: switch to ieee80211_sdata_running
Date: Fri, 27 Aug 2010 12:35:55 +0200 [thread overview]
Message-ID: <20100827103658.158896919@sipsolutions.net> (raw)
In-Reply-To: 20100827103553.559128239@sipsolutions.net
From: Johannes Berg <johannes.berg@intel.com>
Since the introduction of ieee80211_sdata_running(),
some new code was introduced that uses netif_running()
instead. Switch all these instances over.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/cfg.c | 6 ++----
net/mac80211/main.c | 6 +++---
net/mac80211/util.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
--- wireless-testing.orig/net/mac80211/cfg.c 2010-08-26 16:00:16.000000000 +0200
+++ wireless-testing/net/mac80211/cfg.c 2010-08-26 16:00:30.000000000 +0200
@@ -81,16 +81,14 @@ static int ieee80211_add_key(struct wiph
u8 key_idx, const u8 *mac_addr,
struct key_params *params)
{
- struct ieee80211_sub_if_data *sdata;
+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta = NULL;
struct ieee80211_key *key;
int err;
- if (!netif_running(dev))
+ if (!ieee80211_sdata_running(sdata))
return -ENETDOWN;
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
/* reject WEP and TKIP keys if WEP failed to initialize */
switch (params->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
--- wireless-testing.orig/net/mac80211/main.c 2010-08-26 16:00:28.000000000 +0200
+++ wireless-testing/net/mac80211/main.c 2010-08-26 16:00:30.000000000 +0200
@@ -339,9 +339,6 @@ static int ieee80211_ifa_changed(struct
struct ieee80211_if_managed *ifmgd;
int c = 0;
- if (!netif_running(ndev))
- return NOTIFY_DONE;
-
/* Make sure it's our interface that got changed */
if (!wdev)
return NOTIFY_DONE;
@@ -352,6 +349,9 @@ static int ieee80211_ifa_changed(struct
sdata = IEEE80211_DEV_TO_SUB_IF(ndev);
bss_conf = &sdata->vif.bss_conf;
+ if (!ieee80211_sdata_running(sdata))
+ return NOTIFY_DONE;
+
/* ARP filtering is only supported in managed mode */
if (sdata->vif.type != NL80211_IFTYPE_STATION)
return NOTIFY_DONE;
--- wireless-testing.orig/net/mac80211/util.c 2010-08-26 16:00:17.000000000 +0200
+++ wireless-testing/net/mac80211/util.c 2010-08-26 16:00:30.000000000 +0200
@@ -1308,7 +1308,7 @@ void ieee80211_recalc_smps(struct ieee80
*/
list_for_each_entry(sdata, &local->interfaces, list) {
- if (!netif_running(sdata->dev))
+ if (!ieee80211_sdata_running(sdata))
continue;
if (sdata->vif.type != NL80211_IFTYPE_STATION)
goto set;
next prev parent reply other threads:[~2010-08-27 10:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 10:35 [PATCH 0/6] interface type switching while up Johannes Berg
2010-08-27 10:35 ` [PATCH 1/6] mac80211: clean up ifdown/cleanup paths Johannes Berg
2010-08-27 10:35 ` Johannes Berg [this message]
2010-08-27 10:35 ` [PATCH 3/6] mac80211: simplify zero address checks Johannes Berg
2010-08-27 18:36 ` Gábor Stefanik
2010-08-27 19:24 ` Johannes Berg
2010-08-27 10:35 ` [PATCH 4/6] mac80211: split out concurrent vif checks Johannes Berg
2010-08-27 10:35 ` [PATCH 5/6] mac80211: support runtime interface type changes Johannes Berg
2010-08-27 10:35 ` [PATCH 6/6] mac80211_hwsim: support runtime iftype changes Johannes Berg
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=20100827103658.158896919@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=johannes.berg@intel.com \
--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 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.