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/iface.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/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index a6e6da3cab70..1ceca14331d4 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -65,7 +65,7 @@ static int ieee80211_change_mac(struct net_device *dev, void *addr) | |||
65 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 65 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
66 | int ret; | 66 | int ret; |
67 | 67 | ||
68 | if (netif_running(dev)) | 68 | if (ieee80211_sdata_running(sdata)) |
69 | return -EBUSY; | 69 | return -EBUSY; |
70 | 70 | ||
71 | ret = eth_mac_addr(dev, addr); | 71 | ret = eth_mac_addr(dev, addr); |
@@ -111,7 +111,7 @@ static int ieee80211_open(struct net_device *dev) | |||
111 | list_for_each_entry(nsdata, &local->interfaces, list) { | 111 | list_for_each_entry(nsdata, &local->interfaces, list) { |
112 | struct net_device *ndev = nsdata->dev; | 112 | struct net_device *ndev = nsdata->dev; |
113 | 113 | ||
114 | if (ndev != dev && netif_running(ndev)) { | 114 | if (ndev != dev && ieee80211_sdata_running(nsdata)) { |
115 | /* | 115 | /* |
116 | * Allow only a single IBSS interface to be up at any | 116 | * Allow only a single IBSS interface to be up at any |
117 | * time. This is restricted because beacon distribution | 117 | * time. This is restricted because beacon distribution |
@@ -197,7 +197,7 @@ static int ieee80211_open(struct net_device *dev) | |||
197 | struct net_device *ndev = nsdata->dev; | 197 | struct net_device *ndev = nsdata->dev; |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * No need to check netif_running since we do not allow | 200 | * No need to check running since we do not allow |
201 | * it to start up with this invalid address. | 201 | * it to start up with this invalid address. |
202 | */ | 202 | */ |
203 | if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) { | 203 | if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) { |
@@ -756,7 +756,7 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata, | |||
756 | * and goes into the requested mode. | 756 | * and goes into the requested mode. |
757 | */ | 757 | */ |
758 | 758 | ||
759 | if (netif_running(sdata->dev)) | 759 | if (ieee80211_sdata_running(sdata)) |
760 | return -EBUSY; | 760 | return -EBUSY; |
761 | 761 | ||
762 | /* Purge and reset type-dependent state. */ | 762 | /* Purge and reset type-dependent state. */ |
@@ -930,7 +930,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
930 | return ieee80211_idle_off(local, "scanning"); | 930 | return ieee80211_idle_off(local, "scanning"); |
931 | 931 | ||
932 | list_for_each_entry(sdata, &local->interfaces, list) { | 932 | list_for_each_entry(sdata, &local->interfaces, list) { |
933 | if (!netif_running(sdata->dev)) | 933 | if (!ieee80211_sdata_running(sdata)) |
934 | continue; | 934 | continue; |
935 | /* do not count disabled managed interfaces */ | 935 | /* do not count disabled managed interfaces */ |
936 | if (sdata->vif.type == NL80211_IFTYPE_STATION && | 936 | if (sdata->vif.type == NL80211_IFTYPE_STATION && |