diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:54:49 -0500 |
commit | 9607e6b66a0d25ca63b70d54a4283fa13d8f7c9d (patch) | |
tree | 706cb2c2db2df69fa446eb3848b27107b67f2d25 /net/mac80211/cfg.c | |
parent | d30506e0357e5448c7d38bb3739c451dbe4c174e (diff) |
mac80211: add ieee80211_sdata_running
Instead of always using netif_running(sdata->dev)
use ieee80211_sdata_running(sdata) now which is
just an inline containing netif_running() for now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 63843e3e576a..fdac1bcbfcc0 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -78,17 +78,15 @@ static int ieee80211_change_iface(struct wiphy *wiphy, | |||
78 | enum nl80211_iftype type, u32 *flags, | 78 | enum nl80211_iftype type, u32 *flags, |
79 | struct vif_params *params) | 79 | struct vif_params *params) |
80 | { | 80 | { |
81 | struct ieee80211_sub_if_data *sdata; | 81 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
82 | int ret; | 82 | int ret; |
83 | 83 | ||
84 | if (netif_running(dev)) | 84 | if (ieee80211_sdata_running(sdata)) |
85 | return -EBUSY; | 85 | return -EBUSY; |
86 | 86 | ||
87 | if (!nl80211_params_check(type, params)) | 87 | if (!nl80211_params_check(type, params)) |
88 | return -EINVAL; | 88 | return -EINVAL; |
89 | 89 | ||
90 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
91 | |||
92 | ret = ieee80211_if_change_type(sdata, type); | 90 | ret = ieee80211_if_change_type(sdata, type); |
93 | if (ret) | 91 | if (ret) |
94 | return ret; | 92 | return ret; |