summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_input.c
Commit message (Collapse)AuthorAgeFilesLines
...
* clear/reclaim challenge text when switching auth mode and operating as an apsam2007-02-041-0/+9
| | | | Obtained from: Atheros
* Correct several issues with rate set negotiation:sam2007-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | o add IEEE80211_F_JOIN flag to ieee80211_fix_rate to indicate a station is joining a BSS; this is used to control whether or not we over-write the basic rate bit in the calculated rate set o fix ieee80211_fix_rate to honor IEEE80211_F_DODEL when IEEE80211_F_DONEGO is not specified (e.g. when joining an ibss network) o on sta join always delete unusable rates from the negotiated rate set, this was being done only ibss networks but is also needed for 11g bss with mixed stations o on sta join delete unusable rates from the bss node's rate set, not the scan table entry's rate set o when calculating a rate set for new neighbors in an ibss caculate a negotiated rate set so drivers are not presented with rates they should not use Submitted by: Sepherosa Ziehau (w/ modifications) Obtained from: DragonFly MFC after: 1 month
* back out use of LLC_SNAPFRAMELEN now that sizeof(struct llc) isn'tsam2006-12-011-1/+1
| | | | padded on arm
* sizeof(struct llc) includes padding on arm; use LLC_SNAPFRAMELEN for nowsam2006-12-011-1/+1
| | | | | Submitted by: jhay MFC after: 2 weeks
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldandre2006-09-171-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content. Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field: m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG; to mark the packet m with the specified VLAN tag. On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid: if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... } VLAN tags are stored in host byte order. Byte swapping may be necessary. (Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.) Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done. Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
* minor fixups:sam2006-08-101-7/+18
| | | | | | | | | o add some missing stats to the global stat structure o move accounting work for data frame rx into ieee80211_deliver_data o add per-sta stats for rx ucast/mcast frames o set rcvif in ieee80211_deliver_data so callers don't need to MFC after: 2 weeks
* correct ie length check; need to include fixed part of iesam2006-07-161-4/+4
| | | | MFC after: 2 weeks
* tighten invariant on loops used to parse ie's; this ensures we neversam2006-07-161-4/+4
| | | | | | | | touch data outside the packet (previously we might touch 1 byte); it also has the happy side effect of working around broken orinoco/agere firmware that sends malformed association response frames Help by: Vladimir Egorin
* Fix the following bpf(4) race condition which can result in a panic:csjp2006-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) bpf peer attaches to interface netif0 (2) Packet is received by netif0 (3) ifp->if_bpf pointer is checked and handed off to bpf (4) bpf peer detaches from netif0 resulting in ifp->if_bpf being initialized to NULL. (5) ifp->if_bpf is dereferenced by bpf machinery (6) Kaboom This race condition likely explains the various different kernel panics reported around sending SIGINT to tcpdump or dhclient processes. But really this race can result in kernel panics anywhere you have frequent bpf attach and detach operations with high packet per second load. Summary of changes: - Remove the bpf interface's "driverp" member - When we attach bpf interfaces, we now set the ifp->if_bpf member to the bpf interface structure. Once this is done, ifp->if_bpf should never be NULL. [1] - Introduce bpf_peers_present function, an inline operation which will do a lockless read bpf peer list associated with the interface. It should be noted that the bpf code will pickup the bpf_interface lock before adding or removing bpf peers. This should serialize the access to the bpf descriptor list, removing the race. - Expose the bpf_if structure in bpf.h so that the bpf_peers_present function can use it. This also removes the struct bpf_if; hack that was there. - Adjust all consumers of the raw if_bpf structure to use bpf_peers_present Now what happens is: (1) Packet is received by netif0 (2) Check to see if bpf descriptor list is empty (3) Pickup the bpf interface lock (4) Hand packet off to process From the attach/detach side: (1) Pickup the bpf interface lock (2) Add/remove from bpf descriptor list Now that we are storing the bpf interface structure with the ifnet, there is is no need to walk the bpf interface list to locate the correct bpf interface. We now simply look up the interface, and initialize the pointer. This has a nice side effect of changing a bpf interface attach operation from O(N) (where N is the number of bpf interfaces), to O(1). [1] From now on, we can no longer check ifp->if_bpf to tell us whether or not we have any bpf peers that might be interested in receiving packets. In collaboration with: sam@ MFC after: 1 month
* use m_dup instead of m_copypacket when doing internal bridgingsam2006-03-071-1/+1
| | | | | | in case packets are modified (e.g. encrypted) MFC after: 1 week
* deliver an l2uf frame on sta join to prime the bridgesam2006-03-061-0/+51
| | | | | Obtained from: madwifi MFC after: 1 week
* when scanning channels marked passive defer probe request untilsam2006-03-061-0/+12
| | | | | | | 802.11 traffic is seen; fixes problems with ap's hiding their ssid Obtained from: atheros MFC after: 1 week
* s/w beacon miss facility; need to add knobs to fiddle with the settingssam2006-01-231-1/+3
| | | | MFC after: 2 weeks
* bounds check each ie's length when parsingsam2006-01-231-0/+4
| | | | | Obtained from: madwifi MFC after: 1 week
* - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag inglebius2005-12-181-2/+3
| | | | | | | | | case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam
* Add ieee80211_beacon_miss for processing sta mode beacon miss eventssam2005-12-121-0/+1
| | | | | | | in the 802.11 layer: we send a directed probe request frame to the current ap bmiss_max times (w/o answer) before scanning for a new ap. MFC after: 2 weeks
* Adhoc mode fixups:sam2005-12-041-9/+20
| | | | | | | | | | | | | | o plug memory leak in adhoc mode: on rx the sender may be the current master so simply checking against ic_bss is not enough to identify if the packet comes from an unknown sender; must also check the mac address o split neighbor node creation into two routines and fillin state of nodes faked up on xmit when a beacon or probe response frame is later received; this ensures important state like the rate set and advertised capabilities are correct Obtained from: netbsd MFC after: 1 week
* fix dynamic changes in short slottime for 11g sta mode: set thesam2005-11-301-1/+1
| | | | | | | slot time based on the rcvd capabilities, not the existing ones Obtained from: atheros MFC after: 1 week
* Clarify/fix handling of the current channel:sam2005-08-101-166/+77
| | | | | | | | | | | | | | | | | | | o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
* Cleanup beacon/listen interval handling:sam2005-08-081-3/+13
| | | | | | | | | | | | | | | | | o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
* fix debug msg typosam2005-08-061-1/+1
| | | | MFC after: 3 days
* Fix handling of frames sent prior to a station being authorizedsam2005-08-061-2/+2
| | | | | | | | | | | | when operating in ap mode. Previously we allocated a node from the station table, sent the frame (using the node), then released the reference that "held the frame in the table". But while the frame was in flight the node might be reclaimed which could lead to problems. The solution is to add an ieee80211_tmp_node routine that crafts a node that does exist in a table and so isn't ever reclaimed; it exists only so long as the associated frame is in flight. MFC after: 5 days
* close a race between reclaiming a node when a station is inactivesam2005-07-311-1/+1
| | | | | | and sending the null data frame used to probe inactive stations MFC after: 5 days
* when bridging internally bypass the bss node as traffic to itsam2005-07-271-11/+21
| | | | | | | must follow the normal input path Submitted by: Michal Mertl MFC after: 5 days
* simplify tim callback apisam2005-07-221-4/+4
| | | | MFC after: 3 days
* simplify ieee80211_node_authorize and ieee80211_node_unauthorize api'ssam2005-07-221-2/+2
| | | | MFC after: 3 days
* simplifiy ieee80211_send_nulldata apisam2005-07-221-1/+1
| | | | MFC after: 3 days
* simplify rate set api's by removing ic parameter (implicit in node reference)sam2005-07-221-8/+9
| | | | MFC after: 3 days
* reject association requests with a wpa/rsn ie when wpa/rsn is notsam2005-07-221-8/+15
| | | | | | | | configured on the ap; previously we either ignored the ie or (possibly) failed an assertion Obtained from: Atheros MFC after: 3 days
* missed one in last commit; add device name to discard msgssam2005-07-221-1/+1
|
* include device name in discard msgssam2005-07-221-2/+4
|
* add diag msgs for frames discarded because the direction field is wrongsam2005-07-221-0/+8
|
* split data frame delivery out to a new function ieee80211_deliver_datasam2005-07-221-38/+56
|
* Diff reduction against p4:sam2005-07-221-0/+42
| | | | | | | | | o add ic_flags_ext for eventual extention of ic_flags o define/reserve flag+capabilities bits for superg, bg scan, and roaming support o refactor debug msg macros MFC after: 3 days
* send a response when an auth request is denied due to an acl;sam2005-07-221-0/+5
| | | | | might be better to silently ignore the frame but this way we give stations a chance of figuring out what's wrong
* remove excess whitespacesam2005-07-221-6/+6
|
* use IF_HANDOFF when bridging frames internally so if_start getssam2005-07-221-8/+3
| | | | | | called; fixes communication between associated sta's MFC after: 3 days
* nuke assert that duplicates real checksam2005-07-111-3/+0
| | | | | Reviewed by: avatar Approved by: re (scottl)
* correct check for high priority wme trafficsam2005-07-081-1/+1
| | | | | | Noticed by: Ralf Assmann Reviewed by: apatti Approved by: re (scottl)
* fix another instance of the MORE_DATA bit handling for frames on thesam2005-07-081-2/+1
| | | | | | | power save queue (missed in previous commit) Submitted by: Bruno Randolf Approved by: re (scottl)
* add "pureg" mode for ap operation: reject association requests fromsam2005-07-061-1/+8
| | | | | | | 11b-only stations when operating in 11g Reviewed by: avatar Approved by: re (scottl)
* Fix handling of data frames queued for a station in power save mode:sam2005-07-061-6/+4
| | | | | | | | | | don't mark the MORE_DATA bit when taking it off the ps queue, there's no 802.11 header then; we must wait to do this at encap time so mark the mbuf instead. Reviewed by: avatar Approved by: re (scottl) Obtained from: Atheros
* Fix race condition in handling node reference counts for authenticatingsam2005-07-061-2/+16
| | | | | | | | | stations in ap mode. Track when a node's first auth frame is received and use this to decide whether or not to bump the refcnt. This insures we only ever bump the refcnt once. Reviewed by: avatar Approved by: re (scottl)
* Only update the scan entry state based on newly received frames.avatar2005-07-061-1/+2
| | | | | | | | This fixes duplicative BSS entries(memory leaks as well) listed in "ifconfig dev list scan" when a station fails to associate with an AP. Reviewed by: sam Approved by: re (scottl)
* revert 1.53; it breaks ibss mergesam2005-06-131-2/+2
| | | | | Noticed by: Bruno Randolf Approved by: re (dwhite)
* don't look at the wme ie in a beacon unless we negotiated usesam2005-06-101-0/+1
|
* validate the bssid for non-data frames too when operating insam2005-06-101-2/+2
| | | | adhoc/ahdemo/hostap modes
* o fix wpa w/ wme: don't strip the QoS header on recv as tkip requiressam2005-06-101-43/+25
| | | | | | | | it; instead pass the space occupied by the header down into the crypto modules (except in the demic case which needs it only when doing int in s/w) o while here fix defrag to strip the header from 2nd and later frames o teach decap code how to handle 4-address frames
* mark stations authorized during recv processing instead of doing itsam2005-06-101-0/+7
| | | | | as a side effect of sending an auth success frame; sending mgmt frames should not have side effects
* accept diassoc frame in ASSOC statesam2005-06-101-0/+1
|
OpenPOWER on IntegriCloud