]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/iface.c
netdev: Add support for rx flow hash configuration, using ethtool.
[linux-2.6-omap-h63xx.git] / net / mac80211 / iface.c
index 80954a512185ca66ab65bbc087bce1b8f3a0b743..98447270238149d7c0b8b1cdc3fab8ecba0b7aee 100644 (file)
@@ -33,9 +33,8 @@ static void ieee80211_if_sdata_deinit(struct ieee80211_sub_if_data *sdata)
 {
        int i;
 
-       for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++) {
+       for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++)
                __skb_queue_purge(&sdata->fragments[i].skb_list);
-       }
 }
 
 /* Must be called with rtnl lock held. */
@@ -54,6 +53,15 @@ int ieee80211_if_add(struct net_device *dev, const char *name,
        if (!ndev)
                return -ENOMEM;
 
+       ndev->needed_headroom = local->tx_headroom +
+                               4*6 /* four MAC addresses */
+                               + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
+                               + 6 /* mesh */
+                               + 8 /* rfc1042/bridge tunnel */
+                               - ETH_HLEN /* ethernet hard_header_len */
+                               + IEEE80211_ENCRYPT_HEADROOM;
+       ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
+
        ret = dev_alloc_name(ndev, ndev->name);
        if (ret < 0)
                goto fail;
@@ -158,9 +166,10 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
                ifsta->auth_algs = IEEE80211_AUTH_ALG_OPEN |
                        IEEE80211_AUTH_ALG_SHARED_KEY;
                ifsta->flags |= IEEE80211_STA_CREATE_IBSS |
-                       IEEE80211_STA_WMM_ENABLED |
                        IEEE80211_STA_AUTO_BSSID_SEL |
                        IEEE80211_STA_AUTO_CHANNEL_SEL;
+               if (ieee80211_num_regular_queues(&sdata->local->hw) >= 4)
+                       ifsta->flags |= IEEE80211_STA_WMM_ENABLED;
 
                msdata = IEEE80211_DEV_TO_SUB_IF(sdata->local->mdev);
                sdata->bss = &msdata->u.ap;