summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral
Commit message (Collapse)AuthorAgeFilesLines
* o use the new association callback to notify the driver when joining a bsssam2008-10-272-12/+2
| | | | | | | in sta and adhoc modes; this should've been done forever ago as most all drivers use this hook to set per-station transmit parameters such as for tx rate control o adjust drivers to remove explicit calls to the driver newassoc method
* Change the calling convention for ic_node_alloc to deal withsam2008-06-072-6/+8
| | | | | | | | | | | | 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
* Update PLCP<->rate mapping support:sam2008-05-122-4/+52
| | | | | | | | | | 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
* Minor cleanup of vap create work:sam2008-05-122-2/+4
| | | | | | | | | | | | | 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
* fix typo's that broke duration calculation on protection framessam2008-05-112-2/+2
|
* Only start the vaps if the init routine completed.thompsa2008-05-102-2/+4
|
* Unify all the wifi *_ioctl routinesthompsa2008-05-012-14/+16
| | | | | | | | | | | | | | - Limit grabbing the lock to SIOCSIFFLAGS. - Move ieee80211_start_all() to SIOCSIFFLAGS. - Remove SIOCSIFMEDIA as it is not useful. - Limit ether_ioctl to only SIOCGIFADDR. SIOCSIFADDR and SIOCSIFMTU have no affect as there is no input/output path in the vap parent. The vap code will handle the reinit of the mac address changes. - Split off ndis_ioctl_80211 as it was getting too different to wired devices. This fixes a copyout while locked and a lock recursion. Reviewed by: sam
* Multi-bss (aka vap) support for 802.11 devices.sam2008-04-209-3958/+1170
| | | | | | | | | | | 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)
* fix locking botchsam2008-04-091-1/+3
| | | | MFC after: 1 week
* Various bug fixes for 2560 parts of ral(4):sephe2008-02-033-37/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename rt2560_read_eeprom to rt2560_read_config, we already have rt2560_eeprom_read - If hardware gives us wrong encryption done index, shout out loudly and terminate the processing loop - Process encryption done if RX done bit is set in interrupt status register (according to Ralink Linux driver) - Turn VALID/BUSY bits in TX descriptor only after TX descriptor is fully setup - Fix BBP read: RT2560_BBPCSR can't be written until its RT2560_BBP_BUSY bit is off (according to Ralink Linux driver) - Skip invalid (0 of 0xffff) BBP register/value entries stored in EEPROM - Fix channel TX power location in EEPROM, if channel TX power is above 31 set it to 24 (TX power only has 5bits in RF register, "24" is according to Ralink Linux driver) - Configure BBP according to the BBP register/value stored in EEPROM, restore BBP17 (RX sensitivity tuning) to default value after this. - Set TX/RX antenna after BBP is initialized; these two operation will try to set BBP registers - Reconfigure ACK TX time registers according to 802.11g standard (TX @36Mb, other side's ACK should be sent @24Mb). - 2560 parts have two TX ring: one for management/control packets, one for data packets. Add private OACTIVE flag for each of them. Turn on IFF_DRV_OACTIVE if one of private OACTIVE is on; turn off IFF_DRV_OACTIVE iff all of them are off. - Rework watchdog to mimic old if_watchdog action. Process TX done/encryption done in watchdog function (according to Ralink Linux driver) Obtained from: DragonFly Approved by: sam (mentor) Tested by: sam Related to PR: kern/117655 # Forcing long slot time setting is not included in this commit, comment and # related code is in place, so if problem pops up, quick tests could be done.
* Check wep flag in *_tx_mgt since we need to encrypt some management framekevlo2007-11-062-0/+22
| | | | | | in case of shared authentification. Obtained from: NetBSD
* 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
OpenPOWER on IntegriCloud