aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-27 12:35:55 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:53:30 -0400
commit26a58456be40d8181b884eb5b4e61e3f73ba94e0 (patch)
treed3284dcba4f286d1f666b1efca136c018791e692 /net/mac80211/cfg.c
parentb9dcf712d1fb98bf279fcd453a42a763b104961d (diff)
downloadkernel_samsung_smdk4412-26a58456be40d8181b884eb5b4e61e3f73ba94e0.zip
kernel_samsung_smdk4412-26a58456be40d8181b884eb5b4e61e3f73ba94e0.tar.gz
kernel_samsung_smdk4412-26a58456be40d8181b884eb5b4e61e3f73ba94e0.tar.bz2
mac80211: switch to ieee80211_sdata_running
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f149b4e..f82b18e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -81,16 +81,14 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
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: