Commit Graph

398 Commits

Author SHA1 Message Date
Warner Losh
3dfff737f3 Verify that the WPA flags set are actually compatible with the
driver's set of valid flags.  Otherwise, wpa_supplicant wouldn't
report an error for old wi cards that can't do WPA.

Reviewed by:	sam@
2008-08-09 05:46:01 +00:00
Sam Leffler
ba0c757772 add WPS oui
Submitted by:	"Chuck Tuffli" <chuck@tuffli.net>
MFC after:	3 days
2008-08-06 15:54:59 +00:00
Sam Leffler
d3d6c95298 add missing lock for htinfo update
Submitted by:	Chris Zimmermann
2008-08-02 18:04:09 +00:00
Sam Leffler
6bbdc70146 correct decap of of AppleTalk and IPX frames; don't strip the SNAP
header as they have one natively

Submitted by:	Chris Zimmermann
2008-08-02 18:02:57 +00:00
Sam Leffler
ac5ae6986f add a sysctl to deliver a radar event for testing 2008-08-02 18:00:33 +00:00
Sam Leffler
5c9b0f1d07 schedule the correct timer when receiving a radar event during CAC 2008-08-02 17:58:39 +00:00
Sam Leffler
693e312235 don't deauth a station because it sends a ps-poll w/ a bogus aid in it;
turns out some devices do this and since we otherwise validate the station
is associated and don't use the aid for anything being lenient here allows
them to function

Submitted by:	Chris Zimmermann
MFC after:	2 weeks
2008-07-26 23:50:27 +00:00
Sam Leffler
688fe74d0c reorder RSN/WPA2 ie in beacon and probe response frames to comply
with IEEE802.11-2007 spec

Submitted by:	Chris Zimmermann
2008-07-07 17:24:55 +00:00
Sam Leffler
4d5ed46093 correct construction of delba action frame; don't shift+mask the initiator
argument

Submitted by:	Marvell
2008-07-05 19:56:47 +00:00
Sam Leffler
38c208f876 Change the calling convention for ic_node_alloc to deal with
some longstanding issues:
o pass the vap since it's now the "coin of the realm" and required
  to do things like set initial tx parameters in private node
  state for use prior to association
o pass the mac address as cards that maintain outboard station
  tables require this to create an entry (e.g. in ibss mode)
o remove the node table reference, we only have one node table
  and it's unlikely this will change so this is not needed to
  find the com structure
2008-06-07 18:38:02 +00:00
Sam Leffler
2dc4d8dc89 Split ieee80211_notify_erp into locked and unlocked variants
and use the locked version to handle the hostap input path
case where the com lock is not already held.

Noticed by:	Jared Go
2008-06-07 17:51:41 +00:00
Sam Leffler
37e9743a00 Fix node cleanup issues when the last reference is held by
the driver (e.g. in the tx q); ni_vap may not be valid, we
must carefully check before using it.
2008-06-07 17:50:24 +00:00
Sam Leffler
13f91245d2 correct code returned in AsssocResp; the previous code is spec'd for use
only in deauth+disassoc frames

Submitted by:	Chris Zimmermann
MFC after:	1 month
2008-06-07 17:43:41 +00:00
Sam Leffler
06b2d888f6 Add ieee80211_crypto_reload_keys to push all keys known
to net80211 back into the device; intended for use on resume
by devices that lose the contents of their h/w key table.
2008-05-28 23:33:29 +00:00
Sam Leffler
71fe06ca7f Add a mac address to the key definition as otherwise we lose the
address specified in the ioctl and for drivers that need the address
to locate a key (e.g. for delete).

Note this changes net80211-private api's but not the driver callback;
may want to change that in the future.

Reviewed by:	sephe, thompsa
2008-05-28 23:32:00 +00:00
Sam Leffler
5c1f7f19b6 Split s/w crypt/mic attributes to allow future hackery; this change
should be a noop.
2008-05-28 23:25:36 +00:00
Sam Leffler
c4810a1bff missing piece of last commit; add RESUME flag bit definition 2008-05-28 23:20:27 +00:00
Sam Leffler
6076cbacea Add ieee80211_suspend_all and ieee80211_resume_all for
brute force suspend/resume handling of vaps.
2008-05-28 23:19:20 +00:00
Sam Leffler
34c9a6c7f0 Don't override the txpower cap installed by ieee80211_alloc_node;
we use ic_txpowlimit (for now) to initialize all new sta entries.
2008-05-28 23:18:17 +00:00
Sam Leffler
aa0fbc732a Simplify some contorted logic that wrongly left ISCAN_DISCARD set
in certain cases causing the current ap to be lost from the scan cache.

Obtained from:	Atheros (original bug)
2008-05-28 23:15:24 +00:00
Sam Leffler
978359b3f6 Revise lock name handling:
o construct a name for the com lock as done for other locks
o pass the device name to IEEE80211_LOCK_INIT so the mtx name
  is constructed as foo_com_lock
o introduce *_LOCK_OBJ macro's to hide the lock contents and
  minimize redundant code
2008-05-28 23:10:53 +00:00
Sam Leffler
a2cfa5b7ee special-case broadcast probe request in ieee80211_find_rxnode; we need
to spam all vaps and this won't happen if the frame comes from a station
that is associated to an ap vap (and so has an entry in the table)

Noticed by:	Jared Go
Reviewed by:	thompsa
2008-05-22 22:22:10 +00:00
Sam Leffler
c448998d5b ignore sw beacon miss while scanning, just reset the beacon count and timer
Reviewed by:	thompsa
2008-05-22 22:17:27 +00:00
Sam Leffler
5f5cf81567 no need to stop the sw beacon miss timer; it's not used with adhoc or wds 2008-05-22 22:14:58 +00:00
Sam Leffler
e8f5c7a839 declare ieee80211_phymode_name with an array size 2008-05-12 00:34:28 +00:00
Sam Leffler
8215d906ff Update PLCP<->rate mapping support:
o correct mapping of CCK rates to PLCP; was using nonstandard Ralink
  values which just happened to also be used by Zydas (so went unnoticed)
o change ieee80211_plcp2rate api to take a phy type instead of a flag
  that indicates ofdm/!ofdm
o update drivers to match (restore per-driver code to map rate->PLCP)

Reviewed by:	sephe, weongyo, thompsa
2008-05-12 00:32:52 +00:00
Sam Leffler
c43feede8b Minor cleanup of vap create work:
o add IEEE80211_C_STA capability to indicate sta mode is supported
  (was previously assumed) and mark drivers as capable
o add ieee80211_opcap array to map an opmode to the equivalent capability bit
o move IEEE80211_C_OPMODE definition to where capabilities are defined so it's
  clear it should be kept in sync (on future additions)
o check device capabilities in clone create before trying to create a vap;
  this makes driver checks unneeded
o make error codes return on failed clone request unique
o temporarily add console printfs on clone request failures to aid in
  debugging; these will move under DIAGNOSTIC or similar before release
2008-05-12 00:15:30 +00:00
Sam Leffler
fb39d28da5 we have a DFS capability now so enable check 2008-05-11 23:36:58 +00:00
Sam Leffler
bb77492f68 use c99-style initialization for ieee80211_phymode_name 2008-05-11 23:33:56 +00:00
Sam Leffler
82fd2577a8 add DFS capability bit and use it to auto-enable DFS support 2008-05-11 23:32:07 +00:00
Sam Leffler
7f5144364e use the current left edge of the BA window when forming ADDBA request
so an existing session is re-established with the correct seq#
2008-05-11 23:27:57 +00:00
Sam Leffler
e5d6bfc3c9 add PLCP service bit definitions 2008-05-11 23:20:26 +00:00
Sam Leffler
f4488925ad move inline keyword to silence compiler complaints 2008-05-11 23:18:11 +00:00
Sam Leffler
92172ed85a fix build w/ IEEE80211_DEBUG_REFCNT enabled 2008-05-01 20:26:25 +00:00
Sam Leffler
a239061a54 re-enable WME by default; after a full day of testing on iwi I see no
issues and the only way we'll identify them is for people to use it
2008-05-01 03:49:59 +00:00
Sam Leffler
bfa82ae8b0 disable default enabling of WME until we resolve driver regressions 2008-04-30 16:05:57 +00:00
Sam Leffler
0095127918 hookup the parent device's if_input and if_output to stub routines
to catch unintended use (one might argue about if_output but it's
behaviour is ill-defined without vap context)

Noticed by:	Paul B. Mahol
2008-04-25 19:45:42 +00:00
Sam Leffler
b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral).  Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by:	Hobnob and Marvell
Reviewed by:	many
Obtained from:	Atheros (some bits)
2008-04-20 20:35:46 +00:00
Sam Leffler
98fed7a4ab Fix adhoc mode to scan all available channels for a bss to join
while still restricting auto-channel select to only those channels
permitted by regulatory constraints (sorta, we're still missing the
checks to honor radar and noadhoc status on channels).  This somehow
got lost in the initial merge of the revised scanning code.

Reviewed by:	jhay
MFC after:	2 weeks
2008-02-29 04:07:07 +00:00
Sepherosa Ziehau
12c5f8a8e3 - Correctly handle ALTQ in ieee80211_deliver_data()
- Add comment from sam that ALTQ probably does not work well with WME

PR: kern/119548
Approved by: sam (mentor)
2008-02-03 12:00:03 +00:00
Sam Leffler
2d165aedd9 add opaque pointer to tx ampdu state for drivers
MFC after:	3 days
2008-02-02 00:38:02 +00:00
Sam Leffler
ddc5368476 o correct typo that broke check when handling addba response
o add a comment about the ht rates being for 20MHz channels w/ long GI;
  needs a separate fix after more thought

MFC after:	3 days
2008-02-01 21:31:10 +00:00
Sam Leffler
1f0598ffe0 update channel flag defs to match _ieee80211.h so cpp doesn't complain
about redefinitions

MFC after:	1 week
2007-12-13 01:23:40 +00:00
Kip Macy
2de2af32a0 Add padding for anticipated functionality
- vimage
 - TOE
 - multiq
 - host rtentry caching

Rename spare used by 80211 to if_llsoftc

Reviewed by: rwatson, gnn
MFC after: 1 day
2007-12-07 01:46:13 +00:00
Sam Leffler
1a4ae5c45b Be more careful handling off-channel frames: if the driver (wrongly)
sends frames up the stack after changing the current channel then
the lookup by ieee channel number may fail leaving a null ptr in
se_chan; if this happens fallback to the channel recorded when the
frame is processed (curchan).  Since the frame doesn't contribute
to scan results for the sta this is acceptable.

Reviewed by:	thompsa
MFC after:	3 days
2007-11-26 21:28:18 +00:00
Sam Leffler
f4558c9a6f correct WMM packet classification:
o use TID_TO_WME_AC on vlan tag priority
o ignore ECN bits in DSCP when mapping IP TOS and use TID_TO_WME_AC

MFC after:	3 days
2007-11-23 06:24:57 +00:00
Sam Leffler
ce8977dff3 o correct re-association indicator dispatched in node join event
o remove misleading "reassociation" msg on sta join

MFC after:	3 days
2007-11-23 06:23:12 +00:00
Sam Leffler
849b4d998c correct sta mode setup: adopt ap's ampdu density and max ampdu size
instead of using local settings

MFC after:	3 days
2007-11-23 06:14:32 +00:00
Sam Leffler
cb42c5bba6 parse htcap ie early so ampdu density and max rx size are available
for constructing the AssocReq frame

MFC after:	3 days
2007-11-23 06:13:39 +00:00
Sam Leffler
d4a401b619 correct TID_TO_WME_AC handling of BE
MFC after:	3 days
2007-11-23 06:12:46 +00:00