Commit 371a255e authored by Johannes Berg's avatar Johannes Berg

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 17124361
...@@ -97,15 +97,12 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, ...@@ -97,15 +97,12 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
{ {
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct ieee80211_sub_if_data *nsdata; struct ieee80211_sub_if_data *nsdata;
struct net_device *dev = sdata->dev;
ASSERT_RTNL(); ASSERT_RTNL();
/* we hold the RTNL here so can safely walk the list */ /* we hold the RTNL here so can safely walk the list */
list_for_each_entry(nsdata, &local->interfaces, list) { list_for_each_entry(nsdata, &local->interfaces, list) {
struct net_device *ndev = nsdata->dev; if (nsdata != sdata && ieee80211_sdata_running(nsdata)) {
if (ndev != dev && ieee80211_sdata_running(nsdata)) {
/* /*
* Allow only a single IBSS interface to be up at any * Allow only a single IBSS interface to be up at any
* time. This is restricted because beacon distribution * time. This is restricted because beacon distribution
...@@ -124,7 +121,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, ...@@ -124,7 +121,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
* The remaining checks are only performed for interfaces * The remaining checks are only performed for interfaces
* with the same MAC address. * 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; continue;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment