1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 193655 2009-06-07 22:00:22Z sam $"); |
29 30#include "opt_wlan.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/mbuf.h> 35#include <sys/malloc.h> 36#include <sys/kernel.h> --- 245 unchanged lines hidden (view full) --- 282 */ 283 ni->ni_htrates = *ieee80211_get_suphtrates(ic, chan); 284 /* 285 * Setup bss tx parameters based on operating mode. We 286 * use legacy rates when operating in a mixed HT+non-HT bss 287 * and non-ERP rates in 11g for mixed ERP+non-ERP bss. 288 */ 289 if (mode == IEEE80211_MODE_11NA && |
290 (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0) |
291 mode = IEEE80211_MODE_11A; 292 else if (mode == IEEE80211_MODE_11NG && |
293 (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0) |
294 mode = IEEE80211_MODE_11G; 295 if (mode == IEEE80211_MODE_11G && 296 (vap->iv_flags & IEEE80211_F_PUREG) == 0) 297 mode = IEEE80211_MODE_11B; 298 } 299 ni->ni_txparms = &vap->iv_txparms[mode]; 300 ni->ni_rates = *ieee80211_get_suprates(ic, chan); 301} --- 343 unchanged lines hidden (view full) --- 645{ 646 if (ic->ic_htcaps & IEEE80211_HTC_HT) { 647 int flags = gethtadjustflags(ic); 648 /* 649 * Check for channel promotion required to support the 650 * set of running vap's. This assumes we are called 651 * after ni_chan is setup for each vap. 652 */ |
653 /* NB: this assumes IEEE80211_FHT_USEHT40 > IEEE80211_FHT_HT */ |
654 if (flags > ieee80211_htchanflags(c)) 655 c = ieee80211_ht_adjust_channel(ic, c, flags); 656 } 657 ic->ic_bsschan = ic->ic_curchan = c; 658 ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan); 659 ic->ic_rt = ieee80211_get_ratetable(ic->ic_curchan); 660} 661 --- 537 unchanged lines hidden (view full) --- 1199 */ 1200 if (vap->iv_flags & IEEE80211_F_WME) 1201 ni->ni_flags |= IEEE80211_NODE_QOS; 1202#ifdef IEEE80211_SUPPORT_SUPERG 1203 if (vap->iv_flags & IEEE80211_F_FF) 1204 ni->ni_flags |= IEEE80211_NODE_FF; 1205#endif 1206 if ((ic->ic_htcaps & IEEE80211_HTC_HT) && |
1207 (vap->iv_flags_ht & IEEE80211_FHT_HT)) { |
1208 /* 1209 * Device is HT-capable and HT is enabled for 1210 * the vap; setup HT operation. On return 1211 * ni_chan will be adjusted to an HT channel. 1212 */ 1213 ieee80211_ht_wds_init(ni); 1214 } else { 1215 struct ieee80211_channel *c = ni->ni_chan; --- 1350 unchanged lines hidden --- |