summaryrefslogtreecommitdiff
path: root/sys/dev/ath/if_ath.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new counter which tracks frames TX'ed with HT protection.Adrian Chadd2011-02-211-0/+2
| | | | Notes: svn path=/head/; revision=218924
* Disable short-GI in 20mhz mode - the hardware doesn't support this.Adrian Chadd2011-02-171-0/+3
| | | | Notes: svn path=/head/; revision=218778
* Some statistics additions - prepare for error codes > 32 (since the AR5416Adrian Chadd2011-02-141-4/+26
| | | | | | | | error mask is > 5 bits) and add some extra CRC/HT40/ShortGI counters to help debug 802.11n issues. Notes: svn path=/head/; revision=218689
* Add in the (very!) optional glue to flip the 11n bits for if_ath.Adrian Chadd2011-02-091-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's still a lot of random issues to sort out with the radio side of things and AMPDU RX handling (and completely missing AMPDU TX handling!) but if people wish to give this a go and assist in debugging the issues, they can define ATH_DO_11N to enable it. I'm just re-iterating - this is here to allow people to assist in further 11n development; it is not any indication that the 11n support is complete and functional. Important notes: * This doesn't support 1-stream cards yet - (eg AR9285) - the various bits that negotiate TX/RX MCS don't know not to try >1 stream TX or negotiate 1-stream RX; so don't enable 11n unless you've first taught the rate control module and the net80211 stack to negotiate 1-stream stuff; * The only rate control module minimally 11n aware is ath_rate_sample; * ath_rate_sample doesn't know about HT/40; so airtime will be incorrectly calculated; * The AR9160 and AR9280 radio code is unreliable at the higher MCS rates for some reason; this will definitely impact 11n performance; * AMPDU-TX isn't yet implemented; * AMPDU-RX may be a bit buggy still and will definitely suffer from the radio unreliability mentioned above (ie, don't expect 150/300mbit RX just yet.) Notes: svn path=/head/; revision=218488
* Fix the keycache behaviour for multicast keycache search.Adrian Chadd2011-02-091-2/+2
| | | | | | | | | | | | | | | | | | The correct bit to set is 0x1 in the high MAC address byte, not 0x80. The hardware isn't programmed with that bit (which is the multicast adress bit.) The linux ath9k keycache code uses that bit in the MAC as a "this is a multicast key!" and doesn't set the AR_KEYTABLE_VALID bit. This tells the hardware the MAC isn't to be used for unicast destination matching but it can be used for multicast bssid traffic. This fixes some encryption problems in station mode. PR: kern/154598 Notes: svn path=/head/; revision=218483
* net80211 really doesn't want A_MPDU to appear on non-11n station node mbufs.Adrian Chadd2011-02-081-0/+9
| | | | | | | | | | | Revert back to the previous method of doing it for where a node can be identified and it's an 11n node. I'll have to do some further research into exactly what is being messed up with the sequence number matching and I'll then revisit this. Notes: svn path=/head/; revision=218453
* Add in a per phy error sysctl.Adrian Chadd2011-02-071-0/+20
| | | | Notes: svn path=/head/; revision=218402
* Just tag all RX packets as needing reorder processing for now.Adrian Chadd2011-02-061-5/+12
| | | | | | | | | | | | | | | | | | | | This fixes two problems - * All packets need to be processed here, not just aggregate ones - as any received frames (AMPDU or otherwise) in the given TID (traffic class id) will update the sequence number and, implied with that, update the window; * It seems there's situations where packets aren't matching a current node but somehow need to be tracked. Thus just tag them all for now; I'll figure out the why later. Whilst I'm here, bump the stats counters whilst I'm at it. This fixes AMPDU RX in my tests; the main problems now stem from what look like PHY level error/retransmits which are impeding general throughput, incl. AMPDU. Notes: svn path=/head/; revision=218379
* Only tag packets with the A-MPDU bit if they were part of an A-MPDU RX.Adrian Chadd2011-02-061-10/+7
| | | | | | | Whilst I'm here, add a counter to count said packets. Notes: svn path=/head/; revision=218378
* Oops, fix newbie mistake that breaks the normal build.Adrian Chadd2011-02-041-1/+1
| | | | Notes: svn path=/head/; revision=218243
* Disable the code I previously added from Rui's 802.11n branch.Adrian Chadd2011-02-031-0/+6
| | | | | | | | | | | | | | | A-MPDU RX interferes with packet retransmission/reordering. In local testing, I was seeing A-MPDU being negotiated and then not used by the AP sending frames to the STA; the STA would then treat non A-MPDU frames that are retransmits as out of the window and get plain confused. The hardware RX status descriptor has a "I'm part of an aggregate" bit; so this should eventually be tested and then punted to the A-MPDU reorder handling only if it has this bit set. Notes: svn path=/head/; revision=218238
* Remove the now unneeded XXX.Adrian Chadd2011-01-311-1/+0
| | | | Notes: svn path=/head/; revision=218146
* Enable AMPDU reorder processing and receiving BAR frames when doing 802.11n.Adrian Chadd2011-01-311-0/+6
| | | | | | | Obtained from: rpaulo@ Notes: svn path=/head/; revision=218145
* Migrate the TX path code out of if_ath and into a separate source file.Adrian Chadd2011-01-291-952/+5
| | | | | | | | | | | There's two reasons for this: * the raw and non-raw TX path shares a lot of duplicate code which should be refactored; * the 11n-ready chip TX path needs a little reworking. Notes: svn path=/head/; revision=218065
* Break out the debug macros from if_ath.c into if_ath_debug.[ch] .Adrian Chadd2011-01-291-118/+2
| | | | | | | | This is prep work for breaking out the TX path into a separate set of source files. Notes: svn path=/head/; revision=218058
* ANI changes #1 - split out the ANI polling from the RxMonitor hook.Adrian Chadd2011-01-211-12/+47
| | | | | | | | | | | | | The rxmonitor hook is called on each received packet. This can get very, very busy as the tx/rx/chanbusy registers are thus read each time a packet is received. Instead, shuffle out the true per-packet processing which is needed and move the rest of the ANI processing into a periodic event which runs every 100ms by default. Notes: svn path=/head/; revision=217684
* Include the initial support for external EEPROMs.Adrian Chadd2011-01-201-1/+1
| | | | | | | | | | | | | | | | | The AR9100 at least doesn't have an external serial EEPROM attached to the MAC; it instead stores the calibration data in the normal system flash. I believe earlier parts can do something similar but I haven't experienced it first-hand. This commit introduces an eepromdata pointer into the API but doesn't at all commit to using it. A future commit will include the glue needed to allow the AR9100 support code to use this data pointer as the EEPROM. Notes: svn path=/head/; revision=217624
* Use the now-exposed diag code, rather than a hard-coded magic number.Adrian Chadd2011-01-201-1/+1
| | | | Notes: svn path=/head/; revision=217619
* Break out the diagnostic codes from ah_internal.h and place them in ↵Adrian Chadd2011-01-201-0/+1
| | | | | | | | | | | | | | | ah_diagcodes.h. Since we now have the source code, there's no reason to hide the diag codes from other areas. They live in the HAL as they form part of the HAL API and should still be treate as "potentially flexible; don't publish as a public API." But since they're already used as a public API (see follow-up commit), we may as well use them in place of magic constants. Notes: svn path=/head/; revision=217618
* Fix up a few more sysctl(9) mis-typing found in various LINT builds.Matthew D Fleming2011-01-131-4/+4
| | | | Notes: svn path=/head/; revision=217368
* sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.Matthew D Fleming2011-01-121-6/+6
| | | | | | | Commit the rest of the devices. Notes: svn path=/head/; revision=217323
* Export ath stats via snmp, rather than requiring a debugging interfaceAdrian Chadd2010-08-141-0/+188
| | | | | | | and "athstats". Notes: svn path=/head/; revision=211303
* Add a global counter of missed beacons.Adrian Chadd2010-08-141-0/+1
| | | | | | | The existing missed beacon count is reset once a beacon isn't missed. Notes: svn path=/head/; revision=211299
* Don't delay updating the longcal timer - instead, update the longcalAdrian Chadd2010-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | flag immediately so it's only set once per longcal interval. Without this, the current AR5416 code will continuously spam NF calibrations during a periodic calibration if the longcal flag is set. The longcal flag wouldn't be cleared until the calibration method indicates that calibrations are "complete". This drops the rate of NF calibration updates down from "once every shortcal" (ie, every 100ms) during a periodic calibration, to only once per "longcal" interval. Spamming NF calibrations every 100ms caused some potentially horrific issues in noisy environments as NF calibrations can take longer than 100ms and this spamming can cause invalid NF calibration results to be read back - leading to missed beacons, and thus leading to a stuck beacon situation. Stuck beacons cause interface resets, which restart calibrations. This means that the longcal calibration runs every 100ms (shortcal) until all initial calibrations are completed. This spamming can then cause the above issues which leads to stuck beacons, leading to interface resets, etc, etc. Quite annoying. Notes: svn path=/head/; revision=211136
* Extend the ath debugging a little to log the interface name.Adrian Chadd2010-07-081-1/+1
| | | | | | | | Some devices have >1 atheros card and the current debug prints make it impossible to tell which interface is being unhappy. Notes: svn path=/head/; revision=209799
* sc_lastrs is also used in case the sending station is not known, forBernhard Schmidt2010-06-141-9/+3
| | | | | | | | | | example in a split IBSS scenario. Therefore always assign sc_lastrs. This removes a hack I committed in r206457. Approved by: rpaulo (mentor) Notes: svn path=/head/; revision=209156
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-2/+2
| | | | | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
* Add WPA-None support:Bernhard Schmidt2010-04-101-2/+8
| | | | | | | | | | | | | | | | | | | | | * WPA-None requires ap_scan=2: The major difference between ap_scan=1 (default) and 2 is, that no IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a dependency on those. For example the call to wpa_driver_bsd_scan() sets the interface UP, this never happens, therefore the interface must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID also is not called, which means that the SSID has not been set prior to the IEEE80211_MLME_ASSOC call. * WPA-None has no support for sequence number updates, it doesn't make sense to check for replay violations.. * I had some crashes right after the switch to RUN state, issue is that sc->sc_lastrs was not yet defined. Approved by: rpaulo (mentor) MFC after: 3 weeks Notes: svn path=/head/; revision=206457
* Correct spelling of reseting (found while researching the "bb hang detected"Daniel Eischen2010-02-191-19/+19
| | | | | | | messages that are plaguing me). While I'm here, delete trailing whitespace. Notes: svn path=/head/; revision=204100
* Fix typo in comment.Rui Paulo2010-02-101-1/+1
| | | | | | | Pointed out by: danfe Notes: svn path=/head/; revision=203751
* Fixing compilation bustage by removing a stray comment fragment.Tai-hwa Liang2010-02-091-1/+0
| | | | Notes: svn path=/head/; revision=203695
* Add multicast key search support. This fixes corrupted mcast packetsRui Paulo2010-02-081-7/+28
| | | | | | | | | | when we have more than one hostap vap. Submitted by: Russell Yount <russell.yount at gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=203683
* Spell "Hz" correctly wherever it is user-visible.Gavin Atkinson2010-01-121-1/+1
| | | | | | | | | | PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Approved by: ed (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=202161
* cardbus -> CardBusWarner Losh2010-01-031-1/+1
| | | | Notes: svn path=/head/; revision=201453
* Take a step towards removing if_watchdog/if_timer. Don't explicitly setJohn Baldwin2009-11-061-1/+0
| | | | | | | | if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Notes: svn path=/head/; revision=198988
* correct typo that was a noop on 32-bit machines but a bug on 64-bit machinesSam Leffler2009-09-071-1/+1
| | | | | | | Submitted by: phk Notes: svn path=/head/; revision=196933
* On resume in sta mode program the beacon timers so when roaming (andSam Leffler2009-08-311-1/+10
| | | | | | | | | | | | | the previous ap is no longer in range) the device will deliver bmiss interrupts and trigger the state machine. Also arrange to sync the beacon timers on the next received beacon frame so that when we don't roam we re-synchronize with the ap. Tested by: trasz MFC after: 1 week Notes: svn path=/head/; revision=196717
* track whether any mesh vaps are present to correctly setup the rx filterSam Leffler2009-07-211-1/+5
| | | | | | | | | | when, for example, an ap vap is created first Reviewed by: rpaulo Approved by: re (kib) Notes: svn path=/head/; revision=195807
* Fix something bogus deletion that got it during mesh commit.Rui Paulo2009-07-111-0/+1
| | | | | | | Approved by: re (implicit) Notes: svn path=/head/; revision=195620
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on theRui Paulo2009-07-111-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net80211 wireless stack. This work is based on the March 2009 D3.0 draft standard. This standard is expected to become final next year. This includes two main net80211 modules, ieee80211_mesh.c which deals with peer link management, link metric calculation, routing table control and mesh configuration and ieee80211_hwmp.c which deals with the actually routing process on the mesh network. HWMP is the mandatory routing protocol on by the mesh standard, but others, such as RA-OLSR, can be implemented. Authentication and encryption are not implemented. There are several scripts under tools/tools/net80211/scripts that can be used to test different mesh network topologies and they also teach you how to setup a mesh vap (for the impatient: ifconfig wlan0 create wlandev ... wlanmode mesh). A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled by default on GENERIC kernels for i386, amd64, sparc64 and pc98. Drivers that support mesh networks right now are: ath, ral and mwl. More information at: http://wiki.freebsd.org/WifiMesh Please note that this work is experimental. Also, please note that bridging a mesh vap with another network interface is not yet supported. Many thanks to the FreeBSD Foundation for sponsoring this project and to Sam Leffler for his support. Also, I would like to thank Gateworks Corporation for sending me a Cambria board which was used during the development of this project. Reviewed by: sam Approved by: re (kensmith) Obtained from: projects/mesh11s Notes: svn path=/head/; revision=195618
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson2009-06-261-2/+2
| | | | | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks Notes: svn path=/head/; revision=195049
* purge HAL_TXSTAT_ALTRATE; you can figure this out by checking ts_finaltsiSam Leffler2009-06-131-1/+1
| | | | | | | and it cannot be used with MCS rate codes Notes: svn path=/head/; revision=194135
* treat IEEE80211_S_CSA as a "running state"; this fixesSam Leffler2009-06-031-4/+4
| | | | | | | ap mode 11h channel switch announcements Notes: svn path=/head/; revision=193389
* improve raw xmit failure handlingSam Leffler2009-06-021-17/+21
| | | | Notes: svn path=/head/; revision=193352
* count frag tx failures as an ifnet errorSam Leffler2009-06-021-0/+1
| | | | Notes: svn path=/head/; revision=193351
* fix commentSam Leffler2009-06-021-1/+1
| | | | Notes: svn path=/head/; revision=193350
* restart tdma beacons after vap destroySam Leffler2009-06-021-4/+10
| | | | Notes: svn path=/head/; revision=193349
* Overhaul monitor mode handling:Sam Leffler2009-05-201-85/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO and remove explicit bpf support from wireless drivers; drivers now use ieee80211_radiotap_attach to setup shared data structures that hold the radiotap header for each packet tx/rx o remove rx timestamp from the rx path; it was used only by the tdma support for debugging and was mostly useless due to it being 32-bits and mostly unavailable o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and per-com state when there are active taps o track the number of monitor mode vaps o use bpf tap and monitor mode vap state to decide when to collect radiotap state and dispatch frames; drivers no longer explicitly directly check bpf state or use bpf calls to tap frames o handle radiotap state updates on channel change in net80211; drivers should not do this (unless they bypass net80211 which is almost always a mistake) o update various drivers to be more consistent/correct in handling radiotap o update ral to include TSF in radiotap'd frames o add promisc mode callback to wi Reviewed by: cbzimmer, rpaulo, thompsa Notes: svn path=/head/; revision=192468
* optimize ath_tx_findrix: there's no need to walk the rates table asSam Leffler2009-05-071-20/+18
| | | | | | | | | | | sc_rixmap is an inverse map NB: could eliminate the check for an invalid rate by filling in 0 for invalid entries but the rate control modules use it to identify bogus rates so leave it for now Notes: svn path=/head/; revision=191866
* o cleanup checks for which vap combinations are permitted and what toSam Leffler2009-05-061-20/+32
| | | | | | | | | use for ic_opmode o fixes the case where creating ahdemo+wds vaps caused ic_opmode to be set to hostap Notes: svn path=/head/; revision=191865