summaryrefslogtreecommitdiff
path: root/sys/dev/ath/if_ath.c
Commit message (Collapse)AuthorAgeFilesLines
...
* use the ic's opmode instead of our hal equivalent to check for adhoc mode;Sam Leffler2008-10-271-1/+1
| | | | | | | they are always the same Notes: svn path=/head/; revision=184350
* intercept IEEE80211_IOC_TXPOWER and service tx power changes immediatelySam Leffler2008-10-271-1/+17
| | | | Notes: svn path=/head/; revision=184349
* remove driver-private equivalent of ni_txparms; it's now superfluousSam Leffler2008-10-271-22/+3
| | | | Notes: svn path=/head/; revision=184347
* now that the new association callback is used when joining a bss we canSam Leffler2008-10-271-5/+0
| | | | | | | eliminate the ath_rate_newassoc callback and associated code Notes: svn path=/head/; revision=184346
* o use the new association callback to notify the driver when joining a bssSam Leffler2008-10-271-4/+0
| | | | | | | | | | 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 Notes: svn path=/head/; revision=184345
* fix static key wep; r183248 caused drivers to be called for keys to beSam Leffler2008-10-191-1/+2
| | | | | | | | assigned to slots in the global key table but ath_key_alloc was not updated to handle that Notes: svn path=/head/; revision=184063
* Crypto api changes:Sam Leffler2008-09-211-2/+2
| | | | | | | | | | | | | | | | | o don't use the key index to identify when the driver has been asked to allocate a key slot, use an explicit flag; allows drivers to force s/w fallback for entries in the global table o change callback api to allocate driver resources for a crypto key: - de-const the key parameter so drivers can muck with the flags - on callback failure don't automatically try to setup s/w crypto; instead the driver must now mark the key entry for s/w crypto and the caller will re-attach the cipher module NB: api change permits drivers more control over fallback to s/w crypto (e.g. based on a limited number of h/w key slots) Notes: svn path=/head/; revision=183248
* fix compilation on 64-bit platform w/ ATH_DEBUGSam Leffler2008-09-211-1/+2
| | | | Notes: svn path=/head/; revision=183222
* Change the calling convention for ic_node_alloc to deal withSam Leffler2008-06-071-3/+4
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=179643
* correct rx radiotap channel flags construction for 11n framesSam Leffler2008-05-291-19/+18
| | | | Notes: svn path=/head/; revision=179402
* Cleanup power handling and fix suspend/resume:Sam Leffler2008-05-291-24/+61
| | | | | | | | | | | | | | | | | | | | | | o do not put the chip into full sleep in ath_stop as it gains nothing and causes many parts to hang in ath_detach because we may touch the chip during vap teardown; this may also fix issues with unloading the module o add a note in ath_detach to explain ath_hal_detach puts the chip in low power mode; this is useful to know as it means unloading the module will place a pci device in the lowest possible power state o leave an #ifdef notyet marker for powering down the chip when a device is marked down; we can't do that until we handle all the ways the driver may be entered and touch the chip o fix resume by reloading the h/w key cache as it's been clobbered (for pci) by the socket being powered off; for station mode we directly stop+init the chip and then simulate a beacon miss to get the upper layers sync'd up; for other configs we must brute force stop+start the vaps so they go through the state machine Notes: svn path=/head/; revision=179401
* close a race on detach by reordering bpfdetach and taskqueue_freeSam Leffler2008-05-281-4/+8
| | | | Notes: svn path=/head/; revision=179400
* send EAPOL frames at the same rate used for mgt framesSam Leffler2008-05-281-2/+10
| | | | Notes: svn path=/head/; revision=179399
* Minor cleanup of vap create work:Sam Leffler2008-05-121-1/+2
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=178957
* o unbreak handling of TKIP tx-only keys for splitmic chipsSam Leffler2008-05-031-9/+13
| | | | | | | | o yank compat support for hal's older than 0.9.20.3; leave a CTASSERT in place just in case Notes: svn path=/head/; revision=178752
* add back sysctl's to display the regdomain and country code from eeprom;Sam Leffler2008-05-031-6/+11
| | | | | | | useful for debugging Notes: svn path=/head/; revision=178751
* Unify all the wifi *_ioctl routinesAndrew Thompson2008-05-011-13/+7
| | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=178704
* remove old code to handle mcast address changes; this is all done throughSam Leffler2008-04-301-10/+0
| | | | | | | net80211 and pushed into the driver through non-ioctl callbacks Notes: svn path=/head/; revision=178696
* restore the hal's channel list when doing getradiocaps so it's in sync withSam Leffler2008-04-271-0/+5
| | | | | | | the 802.11 layer's list Notes: svn path=/head/; revision=178627
* Multi-bss (aka vap) support for 802.11 devices.Sam Leffler2008-04-201-866/+1309
| | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=178354
* (finally) add the hal status to the diagnostic generated afterSam Leffler2008-03-221-3/+4
| | | | | | | | | a failed ath_hal_reset call MFC after: 3 days Notes: svn path=/head/; revision=177502
* promote ath_defrag to m_collapse (and retire private+unusedSam Leffler2008-01-171-85/+1
| | | | | | | | | | m_collapse from cxgb) Reviewed by: pyun, jhb, kmacy MFC after: 2 weeks Notes: svn path=/head/; revision=175414
* Update beacon handling to sync w/ vap code base:Sam Leffler2007-09-171-3/+13
| | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=172211
* bandaid Dynamic Turbo A operation with old hal's: HAL_MODE_108ASam Leffler2007-09-171-0/+4
| | | | | | | | | | | | | does not have a rate table in older hal's so if we scan such a channel the driver will hit an assertion or crash; for old hal's fallback to using the static turbo rate table for this mode (not correct but good enough for now given none of the rate control algorithms understand how to switch between base+boost) Approved by: re (blanket wireless) Notes: svn path=/head/; revision=172206
* fix led blinking in RUN state: the addition of the CAC state movedSam Leffler2007-09-171-0/+3
| | | | | | | | | IEEE80211_S_RUN and broke the array lookup used to find the LED flags Approved by: re (blanket wireless) Notes: svn path=/head/; revision=172205
* Add missing bits that made bg scanning lame:Sam Leffler2007-09-051-9/+7
| | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=172060
* Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, whichRobert Watson2007-08-061-6/+2
| | | | | | | | | | | | | | | | | | previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases. While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency. Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith) Notes: svn path=/head/; revision=171744
* Process tx callbacks when draining the tx q; this fixes a problemSam Leffler2007-06-241-1/+3
| | | | | | | | | | | where a device timeout that occurs with a mgt frame on the tx q will leave the net80211 layer w/o any way to make progress. Reviewed by: thompsa, sephe Approved by: re (hrs) Notes: svn path=/head/; revision=171015
* Update 802.11 wireless support:Sam Leffler2007-06-111-227/+862
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=170530
* update copyrights to 2007 and convert to be 2-clause bsd-onlySam Leffler2007-06-061-8/+1
| | | | Notes: svn path=/head/; revision=170375
* disable taskqueue_drain calls on transition to INIT state; we need toSam Leffler2007-06-031-0/+2
| | | | | | | | find another way to do this as we cannot hold the softc mtx across these calls Notes: svn path=/head/; revision=170229
* Drain task q items when transitioning to INIT state; this closes aSam Leffler2007-05-291-5/+10
| | | | | | | | | | | | | race seen on smp laptops when suspending where the rx task can be entered after the interface is detach'd. NB: use of taskqueue_drain while holding the softc mutex is problematic Submitted by: ambrisko MFC after: 1 month Notes: svn path=/head/; revision=170104
* silence some compiler complaintsSam Leffler2007-05-271-10/+10
| | | | Notes: svn path=/head/; revision=170011
* make dev.ath.N.ledpin have an immediate effectSam Leffler2007-04-231-3/+24
| | | | | | | | | PR: kern/111810 Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk> MFC after: 1 week Notes: svn path=/head/; revision=168967
* - Fix mbuf/node leakage in drivers' raw_xmit().Sepherosa Ziehau2007-04-191-0/+2
| | | | | | | | | | | | | - 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) Notes: svn path=/head/; revision=168860
* Change mtx's to use the formulated name as type so witness does notSam Leffler2007-03-051-1/+2
| | | | | | | | | complain on nested tx q lock acquisitions when processing the cab q. MFC after: 2 weeks Notes: svn path=/head/; revision=167252
* Kick tx after processing rx'd frames; this fixes latency issuesSam Leffler2007-03-051-0/+5
| | | | | | | | | | | | for processing frames from the power save queue when operating in ap mode. This is especially noticeable for realtime data going to devices like voip phones. Submitted by: "J.R. Oldroyd" <jr@opal.com> MFC after: 2 weeks Notes: svn path=/head/; revision=167251
* don't call ath_reset when processing sysctl's before the deviceSam Leffler2007-02-241-4/+5
| | | | | | | | | | is marked running; we don't have all the needed state in place Noticed by: Hugo Silva <hugo@barafranca.com> MFC after: 1 week Notes: svn path=/head/; revision=166955
* set the antenna switch when fixing the tx antenna using theSam Leffler2007-02-241-3/+26
| | | | | | | | | | | dev.ath.X.txantenna sysctl; this is typically what folks want but beware this has the side effect of disabling rx diversity MFC after: 2 weeks Notes: svn path=/head/; revision=166954
* Change the remainder of the drivers for DMA'ing devices enabled in theMarius Strobl2007-01-211-1/+1
| | | | | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...). Notes: svn path=/head/; revision=166165
* Add initial support for 900MHz cards like the Ubiquiti SR9:Sam Leffler2007-01-151-34/+53
| | | | | | | | | | | o eliminate assumptions that half/quarter rate channels on exist in 11a o handle frequency mapping between hal and net80211; hal gives us freq's in the range 2422..2437 that we remap MFC after: 1 month Notes: svn path=/head/; revision=166013
* Add half/quarter rate 11a channel support:Sam Leffler2006-12-271-60/+99
| | | | | | | | | | | | | | | | | | | | o change handling of regdomain-related mib knobs so they can be set post-attach: regdomain, countrycode, outdoor, and xchanmode; the hal will not permit changing the regdomain but we expose it for now o on regdomain/countrycode change recalculate the channel list and push it to the net80211 layer (NB: looks to need more tweaking) o setup rate tables for half/quarter rate channels o honor half/quarter rate channel configs when changing channels o honor half/quarter rate channel configs when setting the slot time o use hack/nonstandard channel numbering scheme for the public safety band to avoid overlapping 2.4G channels on dual-band cards o remove setup of ic_sup_rates; the net80211 layer can do this for us and it simplifies handling of half/quarter rate channels Tested only in Public Safety Band with cards that have RF5112. Notes: svn path=/head/; revision=165571
* Track v0.9.20.3 hal:Sam Leffler2006-12-131-68/+71
| | | | | | | | | | | | | | | | | | | | | | | | o no more ds_vdata in tx/rx descriptors o split h/w tx/rx descriptor from s/w status o as part of the descriptor split change the rate control module api so the ath_buf is passed in to the module so it can fetch both descriptor and status information as needed o add some const poisoning Also for sample rate control algorithm: o split debug msgs (node, rate, any) o uniformly bounds check rate indices (and in some cases correct checks) o move array index ops to after bounds checking o use final tsi from the status block instead of the h/w descriptor o replace h/w descriptor struct's with proper mask+shift defs (this doesn't belong here; everything is known by the driver and should just be sent down so there's no h/w-specific knowledge) MFC after: 1 month Notes: svn path=/head/; revision=165185
* mark tx/rx descriptors COHERENT; we do not sync changes so onSam Leffler2006-11-241-1/+2
| | | | | | | | | architectures like arm this is necessary MFC after: 1 month Notes: svn path=/head/; revision=164598
* Add support for newer parts that do not require separate keycacheSam Leffler2006-09-181-38/+116
| | | | | | | | | | entries for tx+rx mic keys. This requires a newer hal, but works fine with the current hal in cvs. MFC after: 2 weeks Notes: svn path=/head/; revision=162410
* remove stub radar support; it's never been used and futureSam Leffler2006-09-181-22/+0
| | | | | | | | | hal's will not include the calls (due to redesign) MFC after: 1 week Notes: svn path=/head/; revision=162409
* o add noise floor to statsSam Leffler2006-08-101-0/+4
| | | | | | | | | | | o include current tx rate in stats so athstats gets a consistent snapshot and doesn't have to make an extra ioctl o record tx rate for raw frames MFC after: 3 weeks Notes: svn path=/head/; revision=161187
* check return value of ath_tx_dmasetupSam Leffler2006-08-081-0/+2
| | | | | | | Noticed by: yongari Notes: svn path=/head/; revision=161102
* raw 802.11 packet transmit supportSam Leffler2006-08-051-100/+355
| | | | | | | Joint work with: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Notes: svn path=/head/; revision=160992
* check tim is present in the beacon before defer'ing the mcast buffer bit;Sam Leffler2006-07-261-1/+2
| | | | | | | | | | insures we don't do this when operating in adhoc mode Submitted by: avatar@ MFC after: 1 week Notes: svn path=/head/; revision=160692