aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index c307dba7ec03..7d2d5a041e26 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -106,7 +106,8 @@ static const struct header_ops ieee80211_header_ops = {
106 106
107static int ieee80211_master_open(struct net_device *dev) 107static int ieee80211_master_open(struct net_device *dev)
108{ 108{
109 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 109 struct ieee80211_master_priv *mpriv = netdev_priv(dev);
110 struct ieee80211_local *local = mpriv->local;
110 struct ieee80211_sub_if_data *sdata; 111 struct ieee80211_sub_if_data *sdata;
111 int res = -EOPNOTSUPP; 112 int res = -EOPNOTSUPP;
112 113
@@ -128,7 +129,8 @@ static int ieee80211_master_open(struct net_device *dev)
128 129
129static int ieee80211_master_stop(struct net_device *dev) 130static int ieee80211_master_stop(struct net_device *dev)
130{ 131{
131 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 132 struct ieee80211_master_priv *mpriv = netdev_priv(dev);
133 struct ieee80211_local *local = mpriv->local;
132 struct ieee80211_sub_if_data *sdata; 134 struct ieee80211_sub_if_data *sdata;
133 135
134 /* we hold the RTNL here so can safely walk the list */ 136 /* we hold the RTNL here so can safely walk the list */
@@ -141,7 +143,8 @@ static int ieee80211_master_stop(struct net_device *dev)
141 143
142static void ieee80211_master_set_multicast_list(struct net_device *dev) 144static void ieee80211_master_set_multicast_list(struct net_device *dev)
143{ 145{
144 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 146 struct ieee80211_master_priv *mpriv = netdev_priv(dev);
147 struct ieee80211_local *local = mpriv->local;
145 148
146 ieee80211_configure_filter(local); 149 ieee80211_configure_filter(local);
147} 150}
@@ -787,7 +790,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
787 int result; 790 int result;
788 enum ieee80211_band band; 791 enum ieee80211_band band;
789 struct net_device *mdev; 792 struct net_device *mdev;
790 struct wireless_dev *mwdev; 793 struct ieee80211_master_priv *mpriv;
791 794
792 /* 795 /*
793 * generic code guarantees at least one band, 796 * generic code guarantees at least one band,
@@ -829,16 +832,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
829 if (hw->queues < 4) 832 if (hw->queues < 4)
830 hw->ampdu_queues = 0; 833 hw->ampdu_queues = 0;
831 834
832 mdev = alloc_netdev_mq(sizeof(struct wireless_dev), 835 mdev = alloc_netdev_mq(sizeof(struct ieee80211_master_priv),
833 "wmaster%d", ether_setup, 836 "wmaster%d", ether_setup,
834 ieee80211_num_queues(hw)); 837 ieee80211_num_queues(hw));
835 if (!mdev) 838 if (!mdev)
836 goto fail_mdev_alloc; 839 goto fail_mdev_alloc;
837 840
838 mwdev = netdev_priv(mdev); 841 mpriv = netdev_priv(mdev);
839 mdev->ieee80211_ptr = mwdev; 842 mpriv->local = local;
840 mwdev->wiphy = local->hw.wiphy;
841
842 local->mdev = mdev; 843 local->mdev = mdev;
843 844
844 ieee80211_rx_bss_list_init(local); 845 ieee80211_rx_bss_list_init(local);