aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index b5cd91e89712..8336fee68d3e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -58,8 +58,9 @@ static inline int identical_mac_addr_allowed(int type1, int type2)
58 58
59static int ieee80211_open(struct net_device *dev) 59static int ieee80211_open(struct net_device *dev)
60{ 60{
61 struct ieee80211_sub_if_data *sdata, *nsdata; 61 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
62 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 62 struct ieee80211_sub_if_data *nsdata;
63 struct ieee80211_local *local = sdata->local;
63 struct sta_info *sta; 64 struct sta_info *sta;
64 struct ieee80211_if_init_conf conf; 65 struct ieee80211_if_init_conf conf;
65 u32 changed = 0; 66 u32 changed = 0;
@@ -67,8 +68,6 @@ static int ieee80211_open(struct net_device *dev)
67 bool need_hw_reconfig = 0; 68 bool need_hw_reconfig = 0;
68 u8 null_addr[ETH_ALEN] = {0}; 69 u8 null_addr[ETH_ALEN] = {0};
69 70
70 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
71
72 /* fail early if user set an invalid address */ 71 /* fail early if user set an invalid address */
73 if (compare_ether_addr(dev->dev_addr, null_addr) && 72 if (compare_ether_addr(dev->dev_addr, null_addr) &&
74 !is_valid_ether_addr(dev->dev_addr)) 73 !is_valid_ether_addr(dev->dev_addr))
@@ -512,8 +511,8 @@ static int ieee80211_stop(struct net_device *dev)
512 511
513static void ieee80211_set_multicast_list(struct net_device *dev) 512static void ieee80211_set_multicast_list(struct net_device *dev)
514{ 513{
515 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
516 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 514 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
515 struct ieee80211_local *local = sdata->local;
517 int allmulti, promisc, sdata_allmulti, sdata_promisc; 516 int allmulti, promisc, sdata_allmulti, sdata_promisc;
518 517
519 allmulti = !!(dev->flags & IFF_ALLMULTI); 518 allmulti = !!(dev->flags & IFF_ALLMULTI);