summaryrefslogtreecommitdiffstats
path: root/sys/net80211
Commit message (Collapse)AuthorAgeFilesLines
* change ic_modecaps to a bit vector and use setbit, et. al.sam2007-03-113-16/+16
|
* Update to reflect correct usage:sam2007-03-111-18/+16
| | | | | | | | | | | | | | o leave IEEE80211_RADIOTAP_HDRLEN for portability to other systems but correct comment about radiotap headers being padded to 64-bytes (hasn't been true for many years) o remove reference to IEEE80211_RADIOTAP_FCS; it was never used, instead the flags are marked with IEEE80211_RADIOTAP_F_FCS to indicate whether or not FCS is present Might be better to just remove IEEE80211_RADIOTAP_HDRLEN so drivers don't bogusly pad. MFC after: 2 weeks
* change ieee80211_fix_rate to take a rate set instead of usingsam2007-03-114-7/+8
| | | | | | ni_rates; this lets us re-use the code to check 11n HT rates MFC after: 2 weeks
* expose IEEE80211_DISCARD, IEEE80211_DISCARD_IE, and IEEE80211_DISCARD_MACsam2007-03-112-33/+34
| | | | | | so they can be used within net80211 but outside ieee80211_input.c MFC after: 2 weeks
* improve debug msg for ie's that are too shortsam2007-03-111-1/+2
| | | | MFC after: 2 weeks
* keep tx/rx seq #'s for non-QoS traffic separate from QoS; stationssam2007-03-115-10/+11
| | | | | | | aren't supposed mix traffic but if they did frames might be mis-handled Obtained from: Atheros MFC after: 2 weeks
* split check for rate set mismatch on assoc req away from checksam2007-03-111-10/+21
| | | | | | for pure 11g mode so we can give meaningful diagnostic msgs MFC after: 2 weeks
* disallow re-associate with a slot time mismatchsam2007-03-111-8/+27
| | | | | Obtained from: Atheros MFC after: 2 weeks
* move __inline before type to appease gcc 4.xsam2007-03-111-5/+5
| | | | Obtained from: netbsd
* white space diff reductionsam2007-03-111-1/+1
|
* add IEEE80211_KEY_UNDEFINED and use it instead of local defssam2007-03-113-7/+10
| | | | Obtained from: netbsd
* discard deauth+disassoc frames that are not destined for us; thesesam2007-03-111-0/+10
| | | | | | | can be received when the interface is in promisc mode Reviewed by: sephe Obtained from: netbsd
* change ieee80211_mhz2ieee to use the PSB mapping when the frequencysam2007-03-111-2/+4
| | | | | | falls in the proper place, not when we're handed a 1/2 or 1/4-rate channel MFC after: 2 weeks
* When dispatching frames saved on the power save queue to asam2007-03-072-13/+38
| | | | | | | | | | | | station exiting power save mode prepend them to the driver's send q instead of appending them. This insures the packets are not misordered wrt any packets already q'd for the station. This corrects a problem noticed when using a VoIP phone talking to an ath card in ap mode; the misordered packets caused noise. Submitted by: "J.R. Oldroyd" <jr@opal.com> MFC after: 2 weeks
* add ieee80211_opmode_name array for mapping the opmode to a stringsam2007-03-073-0/+12
| | | | | | for printing diagnostic msgs MFC after: 2 weeks
* when starting up an ibss master use a random address forsam2007-03-071-2/+5
| | | | | | | the bssid; this is required for wifi alliance compliance Obtained from: Atheros MFC after: 2 weeks
* correct inital bounds check on returning scan results; this does notsam2007-03-051-1/+1
| | | | | | | | paper over catching an error as the case was already handled, albeit in a somewhat surprising way (the caller received zero'd data) Submitted by: sephe MFC after: 2 weeks
* correct conversions between TU and ms/ticks; these are not usedsam2007-03-051-3/+3
| | | | | | | | | by any code in the tree[1] and are close enough for common values that this change is a noop [1] ath uses one macro to calculate a value that is not used Submitted by: sephe MFC after: 1 week
* clear/reclaim challenge text when switching auth mode and operating as an apsam2007-02-041-0/+9
| | | | Obtained from: Atheros
* add IEEE80211_IS_CHAN_PASSIVEsam2007-02-021-0/+2
| | | | MFC after: 1 week
* Add initial support for 900MHz cards like the Ubiquiti SR9:sam2007-01-153-49/+65
| | | | | | | | | | | | | | | | o add channel flag to enable freq <-> ieee channel # mapping (can go away in the future when ieee number is precomputed) o add mapping between 900mhz freq's and channel #'s that gives a unique channel # for each half/quarter/full width channel o remove assumptions that half/quarter rate channels on happen in 11a o remove assumptions that all 11g channels are full width o ensure ic_curchan is reset on mode change so changing the channel list (e.g. on countrycode change) doesn't leave curchan set to an invalid channel There is still an issue with switching rate sets; to be fixed separately. MFC after: 1 month
* reduce user-visible namespace to just what is neededsam2007-01-091-0/+2
| | | | MFC after: 2 weeks
* bandaid to unbreak build (user code includes this file)sam2007-01-091-0/+1
|
* Fix potential node refcnt leak. If mbufs are q'd on ic_mgtq whensam2007-01-083-7/+31
| | | | | | | | | | the state machine clocks to INIT, node references are not reclaimed. Add a new routine ieee80211_drain_ifq that does this and use it instead of IF_DRAIN. Submitted by: Sepherosa Ziehau Obtained from: DragonFly MFC after: 1 month
* Correct several issues with rate set negotiation:sam2007-01-084-40/+46
| | | | | | | | | | | | | | | | | | | | 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
* Fix compile error.mjacob2007-01-061-1/+1
|
* fix declaration / definition mismatch with ieee80211_chan2ieeekmacy2007-01-061-1/+1
|
* o unbreak rate set defaultingsam2006-12-281-5/+3
| | | | | | o mark 11g mode support on finding 11g or pure 11g (OFDM-only) channels; was requiring pure 11g which caused some contortions in drivers that manually setup their channel lists
* First cut at half/quarter-rate 11a channel support (e.g. for usesam2006-12-276-52/+121
| | | | | | | | | | | | | | | | | | | | in the Public Safety Band): o add channel flags to identify half/quarter-rate operation o add rate sets (need to check spec on 4Mb/s in 1/4 rate) o add if_media definitions for new rates o split net80211 channel setup out into ieee80211_chan_init o fixup ieee80211_mhz2ieee and ieee80211_ieee2mhz to understand half/quarter rate channels: note we temporarily use a nonstandard/hack numbering that avoids overlap with 2.4G channels because we don't (yet) have enough state to identify and/or map overlapping channel sets o fixup ieee80211_ifmedia_init so it can be called post attach and will recalculate the channel list and associated state; this enables changing channel-related state like the regulatory domain after attach (will be needed for 802.11d support too) o add ieee80211_get_suprates to return a reference to the supported rate set for a given channel o add 3, 4.5, and 27 MB/s tx rates to rate <-> media conversion routines o const-poison channel arg to ieee80211_chan2mode
* Fix packing on the country band descriptor. No real change since thisimp2006-12-011-1/+1
| | | | | | is unused. Reviewed by: sam
* back out use of LLC_SNAPFRAMELEN now that sizeof(struct llc) isn'tsam2006-12-012-4/+4
| | | | padded on arm
* sizeof(struct llc) includes padding on arm; use LLC_SNAPFRAMELEN for nowsam2006-12-012-4/+4
| | | | | Submitted by: jhay MFC after: 2 weeks
* Default the rate sets for 802.11 operating modes so drivers aren'tsam2006-11-261-0/+28
| | | | | | | | required to. Note this only happens when drivers don't set them up before calling ieee80211_ifattach so this change is backwards compatible. MFC after: 1 month
* add rate control debug msg bitsam2006-11-261-0/+1
| | | | MFC after: 1 month
* device-independent implementation of AMRR tx rate control algorithmsam2006-11-262-0/+228
| | | | | Obtained from: openbsd (w/ mods) MFC after: 1 month
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-5/+6
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* 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
OpenPOWER on IntegriCloud