]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: fixups for "make master iface not wireless"
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 26 Sep 2008 11:34:54 +0000 (13:34 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 30 Sep 2008 18:07:23 +0000 (14:07 -0400)
In "mac80211: make master iface not wireless" I accidentally
forgot to include these changes ... leading to the expected
BUG_ON errors.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/iface.c
net/mac80211/wme.c

index b5cd91e8971292d3342d63d828f45f761ece7da6..8336fee68d3e05b717047e4d8a1ac5f3623542a8 100644 (file)
@@ -58,8 +58,9 @@ static inline int identical_mac_addr_allowed(int type1, int type2)
 
 static int ieee80211_open(struct net_device *dev)
 {
-       struct ieee80211_sub_if_data *sdata, *nsdata;
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+       struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+       struct ieee80211_sub_if_data *nsdata;
+       struct ieee80211_local *local = sdata->local;
        struct sta_info *sta;
        struct ieee80211_if_init_conf conf;
        u32 changed = 0;
@@ -67,8 +68,6 @@ static int ieee80211_open(struct net_device *dev)
        bool need_hw_reconfig = 0;
        u8 null_addr[ETH_ALEN] = {0};
 
-       sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
        /* fail early if user set an invalid address */
        if (compare_ether_addr(dev->dev_addr, null_addr) &&
            !is_valid_ether_addr(dev->dev_addr))
@@ -512,8 +511,8 @@ static int ieee80211_stop(struct net_device *dev)
 
 static void ieee80211_set_multicast_list(struct net_device *dev)
 {
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+       struct ieee80211_local *local = sdata->local;
        int allmulti, promisc, sdata_allmulti, sdata_promisc;
 
        allmulti = !!(dev->flags & IFF_ALLMULTI);
index c703f8b44e92735214056c548a8495dab5c0ca7d..139b5f267b34b4e38d2925996936ab7f389061a9 100644 (file)
@@ -73,9 +73,8 @@ static int wme_downgrade_ac(struct sk_buff *skb)
 
 
 /* Indicate which queue to use.  */
-static u16 classify80211(struct sk_buff *skb, struct net_device *dev)
+static u16 classify80211(struct ieee80211_local *local, struct sk_buff *skb)
 {
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 
        if (!ieee80211_is_data(hdr->frame_control)) {
@@ -113,14 +112,15 @@ static u16 classify80211(struct sk_buff *skb, struct net_device *dev)
 
 u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
 {
+       struct ieee80211_master_priv *mpriv = netdev_priv(dev);
+       struct ieee80211_local *local = mpriv->local;
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct sta_info *sta;
        u16 queue;
        u8 tid;
 
-       queue = classify80211(skb, dev);
+       queue = classify80211(local, skb);
        if (unlikely(queue >= local->hw.queues))
                queue = local->hw.queues - 1;