summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral
Commit message (Collapse)AuthorAgeFilesLines
* Update beacon handling to sync w/ vap code base:sam2007-09-172-3/+14
| | | | | | | | | | | | | | | | | | | o add driver callback to handle notification of beacon changes; this is required for devices that manage beacon frames themselves (devices must override the default handler which does nothing) o move beacon update-related flags from ieee80211com to the beacon offsets storage (or handle however a driver wants) o expand beacon offsets structure with members needed for 11h/dfs and appie's o change calling convention for ieee80211_beacon_alloc and ieee80211_beacon_update o add overlapping bss support for 11g; requires driver to pass beacon frames from overlapping bss up to net80211 which is not presently done by any driver o move HT beacon contents update to a routine in the HT code area Reviewed by: avatar, thompsa, sephe Approved by: re (blanket wireless)
* Add missing bits that made bg scanning lame:sam2007-09-052-0/+12
| | | | | | | | | | o update ic_lastdata to reflect time of last outbound frame o outbound traffic must preempt/cancel bg scanning to avoid delays This stuff was somehow missed in the initial import. Reviewed by: thompsa, avatar, sephe (earlier version) Approved by: re (blanket wireless)
* o add 802.11 state machine states for DFS and client-side power savesam2007-09-052-0/+2
| | | | | | | o fixup drivers to ignore new states Reviewed by: avatar (?) Approved by: re (blanket wireless)
* Use bus_get_dma_tag() to obtain the parent DMA tag.kevlo2007-07-222-24/+29
| | | | | Reviewed by: sam, sephe, thompsa Approved by: re (kensmith)
* Don't use 64-byte header on each packet in radiotap.kevlo2007-06-292-6/+8
| | | | | Reviewed by: sam Approved by: re(bmah)
* Update 802.11 wireless support:sam2007-06-117-276/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o major overhaul of the way channels are handled: channels are now fully enumerated and uniquely identify the operating characteristics; these changes are visible to user applications which require changes o make scanning support independent of the state machine to enable background scanning and roaming o move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resources o add background scanning in station mode (no support for adhoc/ibss mode yet) o significantly speedup sta mode scanning with a variety of techniques o add roaming support when background scanning is supported; for now we use a simple algorithm to trigger a roam: we threshold the rssi and tx rate, if either drops too low we try to roam to a new ap o add tx fragmentation support o add first cut at 802.11n support: this code works with forthcoming drivers but is incomplete; it's included now to establish a baseline for other drivers to be developed and for user applications o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locally o add support for Atheros protocol extensions; mainly the fast frames encapsulation (note this can be used with any card that can tx+rx large frames correctly) o add sta support for ap's that beacon both WPA1+2 support o change all data types from bsd-style to posix-style o propagate noise floor data from drivers to net80211 and on to user apps o correct various issues in the sta mode state machine related to handling authentication and association failures o enable the addition of sta mode power save support for drivers that need net80211 support (not in this commit) o remove old WI compatibility ioctls (wicontrol is officially dead) o change the data structures returned for get sta info and get scan results so future additions will not break user apps o fixed tx rate is now maintained internally as an ieee rate and not an index into the rate set; this needs to be extended to deal with multi-mode operation o add extended channel specifications to radiotap to enable 11n sniffing Drivers: o ath: add support for bg scanning, tx fragmentation, fast frames, dynamic turbo (lightly tested), 11n (sniffing only and needs new hal) o awi: compile tested only o ndis: lightly tested o ipw: lightly tested o iwi: add support for bg scanning (well tested but may have some rough edges) o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data o wi: lightly tested This work is based on contributions by Atheros, kmacy, sephe, thompsa, mlaier, kevlo, and others. Much of the scanning work was supported by Atheros. The 11n work was supported by Marvell.
* - Fix mbuf/node leakage in drivers' raw_xmit().sephe2007-04-191-1/+7
| | | | | | | | | | - For ural(4): o Fix node leakage in ural_start(), if ural_tx_mgt() fails. o Fix mbuf leakage in ural_tx_{mgt,data}(), if usbd_transfer() fails. o In ural_tx_{mgt,data}(), set ural_tx_data.{m,ni} to NULL, if usbd_transfer() fails, so they will not be freed again in ural_stop(). Approved by: sam (mentor)
* allow net80211 to fillin rate setssam2007-03-112-40/+3
| | | | MFC after: 2 weeks
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Remove dependency on deprecated if_watchdog ABI.bms2006-12-194-31/+19
| | | | Tested with a Sitecom RT2661 based card.
* Add header files <sys/lock.h> and <sys/mutex.h> for mtx_init() and friends.kevlo2006-12-072-0/+4
| | | | Approved by: cognet
* remove unnecessary null ptr checksam2006-08-021-2/+1
| | | | Coverity ID: 173911
* support for 802.11 packet injection via bpfsam2006-07-261-0/+125
| | | | | Reviewed by: arch@ MFC after: 1 month
* Fix kernel panic in rt2661_tx_intr() if no frames has been sent.fjoe2006-06-051-0/+4
| | | | Obtained from: OpenBSD (sys/dev/ic/rt2661.c rev. 1.15)
* add missed calls to bpf_peers_presentsam2006-06-021-2/+2
|
* Fix the following bpf(4) race condition which can result in a panic:csjp2006-06-022-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-163-3/+0
| | | | unnecessary.
* o fixes the locking of if_init().damien2006-03-212-3/+45
| | | | | | | | | o don't send management frames if the IFF_DRV_RUNNING flag is not set. this prevents the timeout watchdog from being potentially re-armed when the interface is brought down. fixes a crash that occurs with RT2661 based adapters. reported by Arnaud Lacombe.
* Disable 802.11e support for now. Did some cleanup while I'm here.damien2006-03-071-4/+2
|
* Fix include paths to make this compile.silby2006-03-053-10/+10
|
* Import microcodes for RT2561, RT2561S and RT2661 chipsets.damien2006-03-051-0/+2268
| | | | With permission from Ralink Technology.
* Add support for the second (RT2561/RT2561S) and third (RT2661 MIMO XR)damien2006-03-059-1296/+4814
| | | | | | | | generations of 802.11abg chipsets from Ralink Technology. Get rid of the pccard front-end while I'm here since all adapters are cardbus ones. Obtained from: OpenBSD
* use s/w bmiss facilitysam2006-02-181-0/+2
| | | | MFC after: 1 week
* stop device so we don't panic on card ejectsam2006-02-181-0/+1
| | | | MFC after: 1 week
* Adjust tx power based on user preferences.damien2006-01-291-0/+3
|
* o Fix short preamble supportdamien2006-01-293-60/+95
| | | | | | | o Fix contention window o Feed rx rate to radiotap o Clean ral_setup_txdesc (sync w/ ural) o s/ic_ibss_chan/ic_curchan/
* Sync with ural:damien2005-11-292-18/+19
| | | | | o Send management frames at the lowest possible rate. o Cosmetic tweaks.
* Optimize PLCP length field computation for 802.11b rates.damien2005-11-231-5/+4
|
* Optimize and clean TX time computation.damien2005-11-151-22/+7
| | | | | | Avoid a test and a modulus operation. MFC after: 2 weeks
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-21/+41
| | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. MFC after: 2 weeks
* Remove OLDCARD shimsimp2005-09-211-23/+4
|
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-1/+1
| | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
* Avoid deferencing NULL in if_free().ru2005-09-161-3/+2
|
* if_ral_pccard does not depend on pccard module directly, but ratherimp2005-08-221-1/+0
| | | | | | | depends, like all other pccard drivers, indirectly through kobj on pccard. Therefore, it is not appropriate to force pccard to be loaded when if_ral.ko is loaded. This makes it possible to load if_ral w/o loading pccard.ko on, eg, pci only systems.
* Fix basic rates set for 802.11a/g operating modes. This can significantlydamien2005-08-211-16/+29
| | | | | | improve transfer rates in 802.11a/g. Fix IFS settings in ral(4) too. MFC after: 6 days
* Don't automatically start scanning in if_init() if IEEE80211_ROAMING_MANUALdamien2005-08-201-4/+6
| | | | | | flag is set. MFC after: 1 week
* Clarify/fix handling of the current channel:sam2005-08-101-7/+8
| | | | | | | | | | | | | | | | | | | 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
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-092-13/+14
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* diff reduction against p4: define IEEE80211_FIXED_RATE_NONE and usesam2005-07-221-2/+2
| | | | it instead of -1
* remove local mods that snuck into rev 1.6sam2005-07-101-4/+1
| | | | Approved by: re (scottl implicit)
* remove driver-private key allocators; use the default one insteadsam2005-07-101-12/+0
| | | | | | | so wpa keys are handled properly Reviewed by: avatar Approved by: re (scottl)
* oops ... forgot to declare sc in my previous commit. unbreak build.damien2005-07-081-0/+1
| | | | Approved by: re (scottl)
* ral_init() takes a struct ral_softc as parameter not a struct ifnet.damien2005-07-081-1/+1
| | | | | | | Fixes a panic that occured when setting the interface parameters while the interface was associated. Approved by: re (scottl)
* reclaim node reference when ieee80211_encap failssam2005-07-081-2/+7
| | | | | Reviewed by: avatar Approved by: re (scottl)
* reclaim mbuf when ieee80211_crypto_encap failssam2005-07-071-1/+3
| | | | | Approved by: re (scottl) Obtained from: netbsd
* o Fix a write mbuf-after-free bug. The duration field of the 802.11 headerdamien2005-06-291-9/+23
| | | | | | | | | | | was written in the old fragmented mbuf chain instead of the defragmented one. Thus, the duration field of outgoing frames was incorrect. o Only call m_defrag() if the mbuf fragmentation threshold is greater than what is currently supported by the driver. Reviewed by: silby (mentor) Approved by: re (scottl)
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-1/+1
| | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-5/+11
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Fix WPA (802.11i) support.damien2005-05-221-0/+12
| | | | Approved by: silby (mentor)
* Initial import of ipw, iwi, ral and ural drivers:damien2005-04-187-0/+3868
ipw - Intel PRO/Wireless 2100 iwi - Intel PRO/Wireless 2200BG/2225BG/2915ABG ral - Ralink Technology RT2500 ural - Ralink Technology RT2500USB Approved by: silby (mentor)
OpenPOWER on IntegriCloud