X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fmac80211%2Fiface.c;h=eeb16926aa7deb1068ab4d0720b25fc13737c257;hb=feccb466944cb1aeaabc701cfde6771f3be74919;hp=f41c7e0de622cd14cd65ca5cd3f3f6f975189888;hpb=988c0f723d0b1abb399e6e71d8bf3f8bf1949a70;p=linux-2.6 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index f41c7e0de6..eeb16926aa 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -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); }