summaryrefslogtreecommitdiffstats
path: root/sys/net80211
Commit message (Collapse)AuthorAgeFilesLines
* Now that we have COMPAT_FREEBSD6 officially, use it from opt_compat.h.ru2006-09-261-1/+2
|
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldandre2006-09-172-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* More statistics fixups:sam2006-08-102-18/+76
| | | | | | | | | | | | | | | | | o change rssi to be signed in ieee80211_nodestats o add noise floor in ieee80211_nodestats (use an implicit hole to preserve layout); return it as zero until we can update the api's so the driver can provide noise floor data o add a bandaid so IEEE80211_IOC_STA_STATS works for sta mode; when all nodes are in the station table this will no longer be needed o fix braino in IEEE80211_IOC_STA_INFO implementation; was supposed to take a mac address and return info for that sta or all stations if ff:ff:ff:ff:ff was supplied--but somehow this didn't get implemented; implement the intended semantics and leave a compat shim at the old ioctl number for the previous api Reviewed by: mlaier MFC after: 3 weeks
* minor fixups:sam2006-08-102-8/+22
| | | | | | | | | 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
* add per-sta ucast/mcast statssam2006-08-101-0/+4
| | | | MFC after: 1 week
* add support for 802.11 packet injection via bpfsam2006-07-266-0/+171
| | | | | | Together with: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Reviewed by: arch@ MFC after: 1 month
* add IEEE80211_IOC_BMISSTHRESHOLD for managing the beacon misssam2006-07-262-0/+11
| | | | | | | threshold Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk> MFC after: 2 weeks
* o move min/max beacon interval and dtim period to public locationsam2006-07-262-7/+24
| | | | | | | o add min/max beacon miss threshold settings o delete IEEE80211_SWBMISS_THRESHOLD, it was never used MFC after: 2 weeks
* correct ie length check; need to include fixed part of iesam2006-07-161-4/+4
| | | | MFC after: 2 weeks
* power save mode state changes should not require clocking the 802.11sam2006-07-161-0/+7
| | | | | | state machine; use the reset method instead 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
* remove duplicate ifname in debug msgsam2006-06-241-2/+1
| | | | MFC after: 1 week
* Use kern_kldload() and kern_kldunload() to load and unload modules whenjhb2006-06-131-7/+2
| | | | | | | | we intend for the user to be able to unload them later via kldunload(2) instead of calling linker_load_module() and then directly adjusting the ref count on the linker file structure. This makes the resulting consumer code simpler and cleaner and better hides the linker internals making it possible to sanely lock the linker.
* 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
* Move conditional preprocessing out from the IEEE80211_DPRINTF macrodds2006-06-011-14/+8
| | | | | invocation. Per C99 6.10.3 paragraph 11 preprocessing directives appearing as macro arguments yield undefined behavior.
* Ensure outbound data packets in hostap mode are delivered only tosam2006-04-281-1/+12
| | | | | | | | | | | stations that are associated by making ieee80211_find_txnode return NULL when a unicast frame is to be delivered to an unassociated station. This will be handled differently in the future but for now putting the check here allows all drivers to immediately do the right thing. Reviewed by: avatar MFC after: 1 week
* back out public safety-specific channel number mapping; we can't dosam2006-04-261-9/+1
| | | | | | it until we know it should be applied as otherwise we can map 11a channels into the 2.4G range and choose the wrong item from the chanenl array
* implement set(IEEE80211_IOC_STA_STATS) for hostapd; forsam2006-03-271-0/+28
| | | | | | | | now just make it clear station statistics (could read a stat block and assign to caller can do partial changes) Reviewed by: avatar (previous version) MFC after: 1 week
* when doing s/w crypto make sure work is done w/ a writable mbuf chain;sam2006-03-151-0/+15
| | | | | | | | | this corrects problems with drivers that rely on the host to do crypto (iwi, ipw, ral, ural, wi (hostap), awi) Hard work by: luigi, mlaier Reviewed by: luigi, mlaier MFC after: 1 week
* fix switching between agressive and non-agressive wmm modessam2006-03-101-2/+2
| | | | | Obtained from: atheros MFC after: 3 days
* 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-065-12/+45
| | | | | | | 802.11 traffic is seen; fixes problems with ap's hiding their ssid Obtained from: atheros MFC after: 1 week
* consolidate calculation of capabilities iesam2006-02-251-47/+34
| | | | | Reviewed by: avatar MFC after: 2 weeks
* honor user-specified key index for global key slotssam2006-02-211-0/+6
| | | | | | Submitted by: Joe Love Reviewed by: avatar MFC after: 1 week
* treat setting the optional ie to a zero-length datum to mean "deletesam2006-02-201-7/+17
| | | | | | | | the ie"; this helps drivers that (wrongly) check ic_opt_ie against NULL when making decisions Reviewed by: luigi, avatar MFC after: 3 days
* o make driver override of net80211 parameter state consistentsam2006-02-142-5/+4
| | | | | | | | with methods: instead of honoring non-zero values expect drivers to write their own values on return from ieee80211_ifattach o add a define for the default h/w bmiss count MFC after: 2 weeks
* set the mgt frame tx timer before dispatching the frame to thesam2006-02-081-8/+10
| | | | | | | | | driver; this closes a race where a response could be processed before the timer was started and cause a RUN->SCAN state change when operating in station mode Reviewed by: avatar, dyoung MFC after: 1 week
* s/w beacon miss facility; need to add knobs to fiddle with the settingssam2006-01-233-1/+46
| | | | MFC after: 2 weeks
* switch beacon miss threshold from a time to the number of beaconsam2006-01-232-2/+2
| | | | | | frames; the time value was implicitly based on the beacon interval but never being updated so wrong when the negotiated beacon interval was not 100 TU
* bounds check each ie's length when parsingsam2006-01-231-0/+4
| | | | | Obtained from: madwifi MFC after: 1 week
* Rev ioctl to get scan results:sam2006-01-182-29/+175
| | | | | | | | | | | | | | | | o lock the list walk o malloc a results buffer instead of copying out one result at a time using an on-stack buffer o fix definition of ieee80211req_scan_result so size of variable-length information elements is large enough to hold all possible ie's (still only return wpa+wme, at some point may return all) o make rssi+noise data signed; they should've been so all along o add a bit more padding for future additions while we're here o define a new ioctl for new api and add compat code for old ioctl under COMPAT_FREEBSD6 (temporarily enabled local to the file) Reviewed by: Scott Long MFC after: 2 weeks
* bump the scan generation number before iterating so we're guaranteedsam2006-01-181-2/+2
| | | | | | | | | to have a value that's not been used before; this fixes the problem where the first traversal of the scan list did nothing because the entries were initialized with the current generation number (a separate issue) MFC after: 1 week
* Correct a buffer overflow when scanning for 802.11 wireless networks.cperciva2006-01-181-4/+16
| | | | Security: FreeBSD-SA-06:05.80211
* add flag to tag frames w/ a known bad FCSsam2006-01-091-0/+1
| | | | | Obtained from: netbsd MFC after: 1 week
* enable "aggressive mode" only when operating in ap or station mode; insam2006-01-021-1/+1
| | | | | | | | particular this fixes use of wme in adhoc demo mode, it wasn't possible to set the txop limit because the aggressive mode logic would override Reviewed by: apatti MFC after: 2 weeks
* update erp information element in the beacon frame to reflectsam2006-01-024-4/+21
| | | | | | | | changes in the bss Reviewed by: avatar Obtained from: atheros MFC after: 2 weeks
* correct checking for turbo channels: rev 1.24 fixed static turbo channelssam2005-12-301-4/+4
| | | | | | | | but broke handling of the turboG channel; since we aren't ready to revamp the channel list just check for turboA channels for now so channel 6 is considered in auto mode Noticed by: gibbs
* correct (reversed) ms<->tu macrossam2005-12-291-2/+2
| | | | Reviewed by: apatti, kcyu
* - 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
* make packet bursting configurable (default to on if device is capable)sam2005-12-145-1/+17
|
* When creating neighbor entries for an ahdemo bss apply the localsam2005-12-141-0/+9
| | | | | settings. In particular this allows us to use QoS frames in a bss and in turn enables disabling ack's.
* when creating an ahdemo bss use any requested bssid; otherwise use zerosam2005-12-141-0/+5
| | | | Obtained from: madwifi
* allow setting the bssid in any modesam2005-12-141-3/+0
| | | | Obtained from: netbsd
* disallow module unload when there are dynamic referencessam2005-12-123-3/+42
| | | | MFC after: 1 week
* propagate current bss state on sta join so, in particular, authmodesam2005-12-121-2/+4
| | | | | | is set properly in the new bss node MFC after: 2 weeks
* Bandaid ieee80211_set_chan to handle a channel parameter of "any";sam2005-12-121-1/+3
| | | | | | | | | this can happen under certain conditions when scanning. This logic will eventually go away with the new scanning code. While here de-inline the routine. MFC after: 1 week
* o correct auto mode logic for avoiding turbo channelssam2005-12-121-9/+9
| | | | | | | o correct assumption that a static turbo channel is also usable in 11a; the opposite is true MFC after: 1 week
* Add ieee80211_beacon_miss for processing sta mode beacon miss eventssam2005-12-125-0/+47
| | | | | | | 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
* add some useful definitions that'll be used soonsam2005-12-121-0/+6
|
OpenPOWER on IntegriCloud