summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/atw.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2020-07-101-2/+2
| | | | | | "new" API. ok dlg@ tobhe@
* Make wireless drivers call if_input() only once per interrupt.stsp2019-09-121-2/+4
| | | | | | | | | | | | | | 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@
* Use ieee80211_has_addr4() inline function where possible.kevlo2017-09-221-2/+2
| | | | ok stsp@
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-3/+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
|
* 'accomodate' -> 'accommodate' in comments.krw2016-03-151-2/+2
| | | | Started by diff from Mical Mazurek.
* 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-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-6/+1
|
* srom size is tracked, pass to free()deraadt2015-09-061-3/+3
|
* 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/+2
| | | | 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-3/+3
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-3/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Stop abusing the rcvif pointer to pass wireless nodes down to thempi2014-03-191-3/+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@
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-7/+4
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* #if 0 out atw_hw_decrypted() as it is currently an unused function as thebrad2013-12-031-1/+3
| | | | | | | | code calling it is also #if 0'd out. atw.c:3021:1: error: unused function 'atw_hw_decrypted' [-Werror,-Wunused-function] ok deraadt@ sthen@
* Instead of comparing the lower and higher addresses of all the multicastmpi2013-11-261-7/+6
| | | | | | | | | | | 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@
* replace workqs with tasks for handling resumedlg2013-11-141-3/+4
| | | | from kimberley manning
* - use nitems() no binary change on amd64jasper2011-04-051-3/+3
| | | | "reads OK" claudio@
* Pass a few more M_ZERO to malloc() or its wrappers, when useful; ok krw@miod2010-11-111-4/+4
|
* After the gcc4 switch the stack protector triggers in atwjsg2010-09-201-7/+12
| | | | | | | | when a buffer is overflowed. Fix this and increase the size of the rate buffer (which is still < IEEE80211_RATE_MAXSIZE due to hardware restrictions) while here. ok claudio@ damien@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-19/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* All PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME}deraadt2010-09-061-3/+3
|
* Massage the powerhook functions into activate functions, and then callderaadt2010-08-291-23/+30
| | | | | | them from the powerhook. Fix a few quibbles about the things done for the IFF_RUNNING and IFF_UP cases ok kettenis
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-4/+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
* remove use of BITS and BIT macros.jsg2009-08-161-2/+2
|
* start getting rid of some of these horrific bit macros, removejsg2009-08-161-2/+2
| | | | | | usage of BITS(). There is a binary change due to the way these macros are further used in the MASK_AND_RSHIFT specifically for ATW_SR_RFTYPE_MASK and ATW_SR_BBPTYPE_MASK.
* More cases of shutdown hooks not needed after card is already stopped. Inderaadt2009-08-101-20/+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
* put the values direct in the array, otherwise the nested macros are longerderaadt2009-06-031-3/+15
| | | | | than standards permit found & ok by jsg
* Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).grange2009-01-211-2/+2
| | | | | | No functional changes. ok krw@ miod@
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-8/+4
| | | | | | | | | | | | | | from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
* Remove a few small ifdef/ifndef OpenBSD sections which contained somebrad2008-10-031-54/+1
| | | | NetBSD code.
* the atw(4) man page says:damien2008-08-291-15/+5
| | | | | | | | "The driver lets you change to Host AP mode, but it does not work and it probably never will." so just remove the HOSTAP capability bit in the code and remove this sentence.
* introduce new IEEE80211_STA_ONLY kernel option that can be set todamien2008-08-271-9/+32
| | | | | | | | | 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.
* instead of passing rx tstamp and rssi to the ieee80211_input function,damien2008-07-211-6/+12
| | | | | | | pass a pointer to an ieee80211_rxinfo structure containing those two fields plus an extra flags field that indicates whether the frame was decrypted by hardware or not. required for a future fix.
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* Remove commented out NetBSD __KERNEL_RCSID macro usage.brad2008-05-131-6/+1
| | | | ok dlg@
* Kernel implementation of the 4-way handshake and group-keydamien2008-04-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | handshake protocols (both supplicant and authenticator state machines) as defined in the IEEE 802.11i standard. Software implementation of the TKIP (Temporal Key Integrity Protocol) and CCMP (CTR with CBC-MAC Protocol) protocols. This diff doesn't implement any of the 802.1X authentication protocols and thus only PSK authentication (using pre-shared keys) is currently supported. In concrete terms, this adds support for WPA-PSK and WPA2-PSK protocols, both in station and hostap modes. The following drivers are marked as WPA-capable and should work: bwi(4), malo(4), ral(4), iwn(4), wpi(4), ural(4), rum(4), upgt(4), and zyd(4) The following options have been added to ifconfig(8): wpa, wpapsk, wpaprotos, wpaakms, wpaciphers, wpagroupcipher wpa-psk(8) can be used to generate keys from passphrases. tested by many@ ok deraadt@
* Do not increment the input packet counter in these drivers asbrad2008-03-131-2/+1
| | | | | | | | ieee80211_input() already does this. Mentioned by Peter Philipp in PR 5248. ok claudio@ mglocker@
* s/NPBFILTER/NBPFILTER/ in #endif comment. No functional change.kettenis2007-09-301-2/+2
|
* convert code under #if 0 to the new ieee80211_key structure.damien2007-07-181-6/+6
|
* move ieee80211_compute_duration() and ieee80211_compute_duration1()damien2007-06-071-2/+170
| | | | | | | | | | functions into the two drivers that use them (atw and rtw.) this code is not generic enough to be used by other drivers and there is no chance that it will ever be used in newer driver since it supports 802.11b only. plus, it hurts my eyes each time i look into ieee80211_output.c. "fine with me as long as the logic doesn't change in the functions" jsg@
* put debug string tables under ATW_DEBUGjsg2007-02-141-1/+6
|
* remove no longer used rate related variable/definesjsg2007-02-141-5/+1
|
* M_DUP_PKTHDR() cleanup. On static buffers M_DUP_PKTHDR() will leak mbuf tags.claudio2007-01-031-5/+7
| | | | See similar rum(4) commit for more info. OK mglocker@
* Make use of ieee80211_std_ratesetjsg2006-11-261-8/+3
|