summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-19 15:54:05 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-06-26 09:37:25 +0200
commit371a255e863857f988a91a3850d6feeaa4f3c536 (patch)
tree77022654c1686dcdbb9753d097a3c3ea1aa396e0 /net/mac80211
parent171243612f1612402fbf83f3f034a1beefcdea61 (diff)
mac80211: make ieee80211_check_concurrent_iface netdev-independent
ieee80211_check_concurrent_iface() need not use the netdev. Remove the use of the netdev here to prepare the function for P2P device addition. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/iface.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 576880317d0..58c2ab3d483 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -97,15 +97,12 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_sub_if_data *nsdata;
- struct net_device *dev = sdata->dev;
ASSERT_RTNL();
/* we hold the RTNL here so can safely walk the list */
list_for_each_entry(nsdata, &local->interfaces, list) {
- struct net_device *ndev = nsdata->dev;
-
- if (ndev != dev && ieee80211_sdata_running(nsdata)) {
+ if (nsdata != sdata && ieee80211_sdata_running(nsdata)) {
/*
* Allow only a single IBSS interface to be up at any
* time. This is restricted because beacon distribution
@@ -124,7 +121,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
* The remaining checks are only performed for interfaces
* with the same MAC address.
*/
- if (!ether_addr_equal(dev->dev_addr, ndev->dev_addr))
+ if (!ether_addr_equal(sdata->vif.addr,
+ nsdata->vif.addr))
continue;
/*