]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/main.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[linux-2.6-omap-h63xx.git] / net / mac80211 / main.c
index c307dba7ec034ce215975c26af7b86012dfd82be..ae62ad40ad63715bed2372be5344ce3c4e4889bc 100644 (file)
@@ -106,7 +106,8 @@ static const struct header_ops ieee80211_header_ops = {
 
 static int ieee80211_master_open(struct net_device *dev)
 {
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+       struct ieee80211_master_priv *mpriv = netdev_priv(dev);
+       struct ieee80211_local *local = mpriv->local;
        struct ieee80211_sub_if_data *sdata;
        int res = -EOPNOTSUPP;
 
@@ -128,7 +129,8 @@ static int ieee80211_master_open(struct net_device *dev)
 
 static int ieee80211_master_stop(struct net_device *dev)
 {
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+       struct ieee80211_master_priv *mpriv = netdev_priv(dev);
+       struct ieee80211_local *local = mpriv->local;
        struct ieee80211_sub_if_data *sdata;
 
        /* we hold the RTNL here so can safely walk the list */
@@ -141,7 +143,8 @@ static int ieee80211_master_stop(struct net_device *dev)
 
 static void ieee80211_master_set_multicast_list(struct net_device *dev)
 {
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+       struct ieee80211_master_priv *mpriv = netdev_priv(dev);
+       struct ieee80211_local *local = mpriv->local;
 
        ieee80211_configure_filter(local);
 }
@@ -539,6 +542,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        u16 frag, type;
        __le16 fc;
+       struct ieee80211_supported_band *sband;
        struct ieee80211_tx_status_rtap_hdr *rthdr;
        struct ieee80211_sub_if_data *sdata;
        struct net_device *prev_dev = NULL;
@@ -585,7 +589,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                        sta->tx_retry_count += info->status.retry_count;
                }
 
-               rate_control_tx_status(local->mdev, skb);
+               sband = local->hw.wiphy->bands[info->band];
+               rate_control_tx_status(local, sband, sta, skb);
        }
 
        rcu_read_unlock();
@@ -787,7 +792,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
        int result;
        enum ieee80211_band band;
        struct net_device *mdev;
-       struct wireless_dev *mwdev;
+       struct ieee80211_master_priv *mpriv;
 
        /*
         * generic code guarantees at least one band,
@@ -829,16 +834,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
        if (hw->queues < 4)
                hw->ampdu_queues = 0;
 
-       mdev = alloc_netdev_mq(sizeof(struct wireless_dev),
+       mdev = alloc_netdev_mq(sizeof(struct ieee80211_master_priv),
                               "wmaster%d", ether_setup,
                               ieee80211_num_queues(hw));
        if (!mdev)
                goto fail_mdev_alloc;
 
-       mwdev = netdev_priv(mdev);
-       mdev->ieee80211_ptr = mwdev;
-       mwdev->wiphy = local->hw.wiphy;
-
+       mpriv = netdev_priv(mdev);
+       mpriv->local = local;
        local->mdev = mdev;
 
        ieee80211_rx_bss_list_init(local);
@@ -1012,6 +1015,10 @@ static int __init ieee80211_init(void)
        BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, driver_data) +
                     IEEE80211_TX_INFO_DRIVER_DATA_SIZE > sizeof(skb->cb));
 
+       ret = rc80211_minstrel_init();
+       if (ret)
+               return ret;
+
        ret = rc80211_pid_init();
        if (ret)
                return ret;
@@ -1024,6 +1031,7 @@ static int __init ieee80211_init(void)
 static void __exit ieee80211_exit(void)
 {
        rc80211_pid_exit();
+       rc80211_minstrel_exit();
 
        /*
         * For key todo, it'll be empty by now but the work