diff options
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 a72fbebb8ea2..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 | ||
59 | static int ieee80211_open(struct net_device *dev) | 59 | static 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 | ||
513 | static void ieee80211_set_multicast_list(struct net_device *dev) | 512 | static 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); |
@@ -625,6 +624,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, | |||
625 | /* and set some type-dependent values */ | 624 | /* and set some type-dependent values */ |
626 | sdata->vif.type = type; | 625 | sdata->vif.type = type; |
627 | sdata->dev->hard_start_xmit = ieee80211_subif_start_xmit; | 626 | sdata->dev->hard_start_xmit = ieee80211_subif_start_xmit; |
627 | sdata->wdev.iftype = type; | ||
628 | 628 | ||
629 | /* only monitor differs */ | 629 | /* only monitor differs */ |
630 | sdata->dev->type = ARPHRD_ETHER; | 630 | sdata->dev->type = ARPHRD_ETHER; |