ieee80211.c (184273) | ieee80211.c (184278) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2008 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> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2008 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.c 184273 2008-10-25 23:31:20Z sam $"); | 28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211.c 184278 2008-10-25 23:43:08Z sam $"); |
29 30/* 31 * IEEE 802.11 generic handler 32 */ 33#include "opt_wlan.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 308 unchanged lines hidden (view full) --- 345 vap->iv_flags = ic->ic_flags; /* propagate common flags */ 346 vap->iv_flags_ext = ic->ic_flags_ext; 347 vap->iv_flags_ven = ic->ic_flags_ven; 348 vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE; 349 vap->iv_htcaps = ic->ic_htcaps; 350 vap->iv_opmode = opmode; 351 vap->iv_caps |= ieee80211_opcap[opmode]; 352 switch (opmode) { | 29 30/* 31 * IEEE 802.11 generic handler 32 */ 33#include "opt_wlan.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 308 unchanged lines hidden (view full) --- 345 vap->iv_flags = ic->ic_flags; /* propagate common flags */ 346 vap->iv_flags_ext = ic->ic_flags_ext; 347 vap->iv_flags_ven = ic->ic_flags_ven; 348 vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE; 349 vap->iv_htcaps = ic->ic_htcaps; 350 vap->iv_opmode = opmode; 351 vap->iv_caps |= ieee80211_opcap[opmode]; 352 switch (opmode) { |
353 case IEEE80211_M_STA: 354 /* auto-enable s/w beacon miss support */ 355 if (flags & IEEE80211_CLONE_NOBEACONS) 356 vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; 357 break; | |
358 case IEEE80211_M_WDS: 359 /* 360 * WDS links must specify the bssid of the far end. 361 * For legacy operation this is a static relationship. 362 * For non-legacy operation the station must associate 363 * and be authorized to pass traffic. Plumbing the 364 * vap to the proper node happens when the vap 365 * transitions to RUN state. 366 */ 367 IEEE80211_ADDR_COPY(vap->iv_des_bssid, bssid); 368 vap->iv_flags |= IEEE80211_F_DESBSSID; 369 if (flags & IEEE80211_CLONE_WDSLEGACY) 370 vap->iv_flags_ext |= IEEE80211_FEXT_WDSLEGACY; 371 break; 372 } | 353 case IEEE80211_M_WDS: 354 /* 355 * WDS links must specify the bssid of the far end. 356 * For legacy operation this is a static relationship. 357 * For non-legacy operation the station must associate 358 * and be authorized to pass traffic. Plumbing the 359 * vap to the proper node happens when the vap 360 * transitions to RUN state. 361 */ 362 IEEE80211_ADDR_COPY(vap->iv_des_bssid, bssid); 363 vap->iv_flags |= IEEE80211_F_DESBSSID; 364 if (flags & IEEE80211_CLONE_WDSLEGACY) 365 vap->iv_flags_ext |= IEEE80211_FEXT_WDSLEGACY; 366 break; 367 } |
368 /* auto-enable s/w beacon miss support */ 369 if (flags & IEEE80211_CLONE_NOBEACONS) 370 vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; |
|
373 /* 374 * Enable various functionality by default if we're 375 * capable; the driver can override us if it knows better. 376 */ 377 if (vap->iv_caps & IEEE80211_C_WME) 378 vap->iv_flags |= IEEE80211_F_WME; 379 if (vap->iv_caps & IEEE80211_C_BURST) 380 vap->iv_flags |= IEEE80211_F_BURST; --- 1088 unchanged lines hidden --- | 371 /* 372 * Enable various functionality by default if we're 373 * capable; the driver can override us if it knows better. 374 */ 375 if (vap->iv_caps & IEEE80211_C_WME) 376 vap->iv_flags |= IEEE80211_F_WME; 377 if (vap->iv_caps & IEEE80211_C_BURST) 378 vap->iv_flags |= IEEE80211_F_BURST; --- 1088 unchanged lines hidden --- |