]> err.no Git - linux-2.6/blobdiff - net/mac80211/iface.c
mac80211: remove useless tid assignment for management and control frames
[linux-2.6] / net / mac80211 / iface.c
index f41c7e0de622cd14cd65ca5cd3f3f6f975189888..eeb16926aa7deb1068ab4d0720b25fc13737c257 100644 (file)
@@ -53,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;
@@ -157,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;
@@ -174,9 +184,9 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
                sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
                                      MONITOR_FLAG_OTHER_BSS;
                break;
-       default:
-               printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
-                      dev->name, __func__, type);
+       case IEEE80211_IF_TYPE_INVALID:
+               BUG();
+               break;
        }
        ieee80211_debugfs_change_if_type(sdata, oldtype);
 }