summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/ath.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stop exporting `wt_hwqueue' now that drivers don't advertise it.mpi2020-10-111-2/+1
| | | | Pointed by and ok jsg@
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-101-2/+2
| | | | ok dlg@ tobhe@
* Change users of IFQ_PURGE() to use the "new" API.patrick2020-07-101-2/+2
| | | | ok dlg@ tobhe@
* Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2020-07-101-2/+2
| | | | | | "new" API. ok dlg@ tobhe@
* Similar to other wireless drivers use bpf_mtap_hdr() to prepend theclaudio2020-02-191-19/+5
| | | | | radiotap header instead of using a fack mbuf in the stack. OK stsp@
* Make wireless drivers call if_input() only once per interrupt.stsp2019-09-121-3/+6
| | | | | | | | | | | | | | This reduces drops caused by the ifq pressure drop mechanism and hence increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'. Not all affected drivers have been tested yet but these changes are largely mechanical and should be safe. As usual, please report any regressions. With help from dlg@ and mpi@ Problem found by robert@ Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars ok mpi@
* Fix 11g ifmedia modes in ath(4) (shown by 'ifconfig ath0 media').stsp2018-01-311-33/+8
| | | | | | | | | | | | There was code which set them up but didn't include 11b channels which are part of 11g. And there was a hack which effectively stripped important flag bits away and wouldn't work for modes with overlapping channels (b/g). As a result, some flags were missing from 11g channels the driver reported to net80211, which skipped over those channels when building the media list. This gets us one step closer to supporting the AR5424. ok mpi@
* The net80211 stack was providing a 'beacon miss timeout' value (in ms)stsp2017-05-311-8/+4
| | | | | | | | | | which specified how much time may elapse without beacons before drivers begin searching for a new AP. Drivers convert this timeout value into the amount of beacons they're allowed to miss. Having the stack provide this number upfront simplifies things. ok mpi@
* Partially revert previous mallocarray conversions that containdhill2017-04-111-2/+2
| | | | | | | | | constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
* Convert some malloc(9) to mallocarray(9)dhill2017-04-091-2/+2
| | | | ok deraadt@
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-2/+1
| | | | | | | this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
* G/C IFQ_SET_READY().mpi2016-04-131-2/+1
|
* Remove wireless turbo mode support. It is a non-standard extensionstsp2016-01-121-7/+1
| | | | | | which only worked with ath(4) devices from a decade ago. Diff tested on ath(4) hardware by me to verify that 11a/b modes still work. ok reyk deraadt chris sthen kettenis
* No trailers has been the default and only option for 20 years, yet sometedu2015-12-081-3/+2
| | | | | | | drivers still set IFF_NOTRAILERS while others do not. Remove all usage of the flag from the drivers which in ancient times used it (and the modern drivers which blindly copied it from those drivers of yore). suggested by guenther. ok mpi
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
* replace the ifqueues in net80211 with mbuf_queues.dlg2015-11-041-2/+2
| | | | | | | | the specific queues are ic_mgtq, ic_pwrsaveq, and ni_savedq. rtw had its own queue for beacons. tested by mpi@ and jmc@ ok mpi@
* arp_ifinit() is no longer needed.mpi2015-10-251-5/+1
|
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Wireless drivers call if_input() via ieee80211_input() which set `rcvif'mpi2015-02-101-2/+1
| | | | | | | on every received mbuf, so there's no need to initialize this pointer in the drivers. Tested by and ok phessler@
* unifdef INETtedu2014-12-221-5/+1
|
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-191-3/+3
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-4/+4
| | | | after discussions with beck deraadt kettenis.
* Show eeprom version of ath devices in dmesg; ok reykstsp2014-07-101-1/+6
|
* Stop abusing the rcvif pointer to pass wireless nodes down to thempi2014-03-191-12/+2
| | | | | | | | | | driver start routines. Instead add & use a pointer in the pkthdr since we don't want the overhead of using a mbuf_tags(9). claudio@ pointed out that other subsystems might want to use this pointer too, so here's a new cookie! ok claudio@, mikeb@, deraadt@
* Instead of comparing the lower and higher addresses of all the multicastmpi2013-11-261-8/+10
| | | | | | | | | | | entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
* Remove unneeded include.mpi2013-11-211-2/+1
| | | | ok deraadt@
* AH_BYTE_ORDER and AH_BIG_ENDIAN are holdovers from the old FreeBSDjsg2012-10-171-2/+2
| | | | | | | | code, we test but don't define them. Replace with _BYTE_ORDER and _BIG_ENDIAN to make the iv show up properly for big endian bpf consumers. ok stsp@ reyk@
* Fix another instance of the 11a->11b switch panic (see previous commit).stsp2012-01-291-6/+8
| | | | | It could also trigger during a scan. Moving the fix into ath_setcurmode() should fix the problem for good. Pointed out by ml@extensibl.com; ok mikeb
* Don't panic when switching an ath interface in hostap mode from 11a to 11b.stsp2012-01-281-2/+6
| | | | | | | The driver forgot to reconfigure the ic_bss' rate table during the switch. This triggered an assertion in ieee80211_newstate() which is present to prevent an out-of-bounds array access (11a has more rates than 11b). Problem reported by ml@extensibl.com; ok mikeb deraadt
* Make ath(4) send multicast frames once, not multiple times.stsp2011-10-141-3/+4
| | | | | | | Fixes TKIP replays seen by STAs connecting to an ath(4) hostap and matches the FreeBSD driver. Tested with several cards by Theo and myself. Thanks mikeb for providing some cards, your next beer in Berlin is on me. ok deraadt
* Don't increase if_oerrors for every multicast frame leaving the interface.stsp2011-04-171-2/+1
| | | | ok deraadt
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-15/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Get rid of the clumsy pci_activate function and do this job inside ath.cderaadt2010-08-271-53/+18
| | | | | so that the powerhook wrapper can get at it ok kettenis
* remove the unused if_init callback in struct ifnetjsg2010-08-271-2/+1
| | | | ok deraadt@ henning@ claudio@
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-2/+1
| | | | | | | PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
* on resume: calling sc_power after ath_init() is silly. ath_init()deraadt2010-08-041-3/+1
| | | | | gets down to there through ath_init() -> ath_enable() -> ... from a discussion with damien
* cleanup and remove some #ifdef junk in the power hooks.reyk2010-07-021-11/+1
| | | | ok deraadt@
* remove proc.h include from uvm_map.h. This has far reaching effects, astedu2010-04-201-2/+1
| | | | | | sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-2/+2
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* M_DUP_PKTHDR() define -> m_dup_pkthdr() function to properly dealkrw2009-09-131-17/+2
| | | | | | | | | | | | | with m_tag_copy_chain() failures. Use m_defrag() to eliminate hand rolled defragging of mbufs and some uses of M_DUP_PKTHDR(). Original diff from thib@, claudio@'s feedback integrated by me. Tests kevlo@ claudio@, "reads ok" blambert@ ok thib@ claudio@, "m_defrag() bits ok" kettenis@
* More cases of shutdown hooks not needed after card is already stopped. Inderaadt2009-08-101-14/+1
| | | | | | these cases the xxstop function is a bit more complicated and has a flag of some sort, but the use of that flag does not matter; DMA is already ceased ok dlg
* timeout_add -> timeout_add_msecblambert2009-07-311-3/+3
| | | | ok jsg@
* Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).grange2009-01-211-2/+2
| | | | | | No functional changes. ok krw@ miod@
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-3/+3
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* Switch ath(4) to softcrypto to enable support for WPA/WPA2.reyk2008-09-011-2/+2
| | | | Tested by ckuethe@ and many users, thanks!
* add support for software crypto to allow WPA/WPA2/RSN. it is disabledreyk2008-08-291-21/+52
| | | | | | | | | | | for now because it needs more testing, but basic WPA/WPA2 and WEP seems to work. to enable it, set the compiled-in ath_softcrypto variable to 1. this is based on a previous diff from damien@ with some changes to disable the hardware crypto engine if softcrypto is enabled and to keeps the hardware crypto code in place to allow later work on hardware WPA/WPA2.
* add IEEE80211_RADIOTAP_F_FCS radiotap flag from NetBSD.damien2008-08-271-1/+2
| | | | | | | | | use it in drivers that leave the 802.11 FCS in frames passed to radiotap BPF. otherwise, userland has no way to know if FCS is included or not as it depends on drivers. this is required by some ports (aircrack). requested by dhill@
* introduce new IEEE80211_STA_ONLY kernel option that can be set todamien2008-08-271-5/+30
| | | | | | | | | remove IBSS and HostAP support from net80211 and 802.11 drivers. it can be used to shrink RAMDISK kernels for instance (like what was done for wi(4)). it also has the benefit of highlighting what is specific to IBSS and HostAP modes in the code. the cost is that we now have two code paths to maintain.
* two spelling fixes from Anathae Townsend;jmc2008-08-251-3/+3
|
* in ieee80211_input(), call if_start() after enqueuing frames in if_snddamien2008-08-141-4/+1
| | | | | | | when acting as an access point instead of having each driver doing the job. tested by krw@ (ral AP) and me with several drivers.