summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_run.c
AgeCommit message (Collapse)Author
2020-11-27As in urtwn(4), don't bring link up (getting dhclient(8) excited) untilKenneth R Westerback
all the keys are negotiated and installed. ok stsp@
2020-10-11Stop exporting `wt_hwqueue' now that drivers don't advertise it.Martin Pieuchot
Pointed by and ok jsg@
2020-07-31Nuke all occurrences of usbd_abort_pipe() if it gets called rightMarcus Glocker
before usbd_close_pipe(), since usbd_close_pipe() already takes care about aborting non-empty pipes. As investigated by gerhard@ usbdi.c rev. 1.57 did add usbd_abort_pipe() to usbd_close_pipe(), but the drivers didn't get cleaned up afterwards. ok gerhard@
2020-07-10Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thePatrick Wildt
"new" API. ok dlg@ tobhe@
2020-01-05remove duplicate device idsJonathan Gray
2019-09-12Make wireless drivers call if_input() only once per interrupt.Stefan Sperling
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@
2019-04-25Follow up on jmatthew's suggestion:Kevin Lo
in x_media_change(), return the errno from ieee80211_media_change() and do the error check from x_init(). ok stsp@, jmatthew@, phessler@
2018-01-30Add D-Link DWA-125 rev B2 to list of devices supported by run(4).Vadim Zhukov
Works for me on amd64. okay stsp@, who also noted this matches Linux commit fd7b9270120ca7e53fbf0469febe0c68acf6a0a2
2017-10-26Move common code to add/remove multicast filters to ieee80211_ioctl(9).Martin Pieuchot
ok jsg@, stsp@
2017-08-14Attach run(4) to D-Link DWA-137 and DWA-140 rev D1.Stefan Sperling
Patch by Mike Korbakov
2017-08-02Match D-Link DWA-130 rev F1 devices. These work with run(4).Stefan Sperling
Patch by Jacqueline Jolicoeur ok deraadt
2017-07-21Drop Rx'd frames larger than MCLBYTES.Kevin Lo
Problem reported by Ilja Van Sprundel. ok stsp@, tb@
2017-07-03Replace slot time durations with macros.Kevin Lo
ok stsp@
2017-06-02Remove a bogus run_read() call about getting MAC version.Kevin Lo
ok stsp@
2017-03-26Add sizes to various free(9) calls. Fixing the simpler ones first.Theo de Raadt
ok natano visa
2017-01-22move counting if_opackets next to counting if_obytes in if_enqueue.David Gwynne
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@
2016-04-13G/C IFQ_SET_READY().Martin Pieuchot
2015-11-25replace IFF_OACTIVE manipulation with mpsafe operations.David Gwynne
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@
2015-11-24No need to include <net/if_arp.h>Martin Pieuchot
This header is only needed because <netinet/if_ether.h> declares a structure that needs it. But it turns out that <net/if.h> already includes it as workaround. A proper solution would be to stop declarting "struct ether_arp" there. But no driver should need this header.
2015-11-24The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.Martin Pieuchot
2015-11-04replace the ifqueues in net80211 with mbuf_queues.David Gwynne
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@
2015-10-25arp_ifinit() is no longer needed.Martin Pieuchot
2015-08-28Fix compiling a kernel without NBPFILTER > 0.Reyk Floeter
OK mikeb@
2015-06-12Only match devices with a valid configuration.Martin Pieuchot
Most of the WiFi/Ethernet USB adapter only have one configuration and always use its first interface. In order to improve USB descriptors parsing start by reducing the number of places where a configuration is set. Tests & ok stsp@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-10Wireless drivers call if_input() via ieee80211_input() which set `rcvif'Martin Pieuchot
on every received mbuf, so there's no need to initialize this pointer in the drivers. Tested by and ok phessler@
2014-12-22unifdef INETTed Unangst
2014-12-19Use <sys/endian.h> instead of <machine/endian.h>Philip Guenther
ok dlg@ mpi@ bcook@ millert@ miod@
2014-09-26Revert a part of r1.98 if_run.c which caused a regression on older genMike Larkin
run(4) devices. ok stsp@
2014-07-13No need for <netinet/in_systm.h> here.Martin Pieuchot
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were toMartin Pieuchot
set the 'dying' flag of a device. Such handlers are useless now that usbd_detach() already set this flag. Even if the purpose of this flag is questionnable on OpenBSD because DVACT_DEACTIVATE acts as a pre-detach event, this is just a first small step towards the simplification of the autoconf(9) device states. This cleaning is now possible thanks to the work of pirofti@ to convert all the USB drivers to properly use usbd_is_dying(). Discussed many times with deraadt@
2014-06-13Make run(4) attach to RT5572.Stefan Sperling
Tested with "MAC/BBP RT5592 (rev 0x0222), RF RT5592 (MIMO 2T2R)" device.
2014-06-07In run(4), fix TXWI and RXWI offset calculations for RT5592 devices.Stefan Sperling
Makes RT5592 devices work, except for an 11a scanning issue, according to Brendan MacDonell who submitted this patch on tech@. Thanks! ok claudio@
2014-05-24Support for newer run(4) hardware ported from FreeBSD's run(4) driver.Stefan Sperling
Committing over MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R). Tested by myself, matthieu@, juanfra@ Diff glanced over by kettenis@
2014-03-19Stop abusing the rcvif pointer to pass wireless nodes down to theMartin Pieuchot
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@
2014-03-07Do not define per-driver DEBUG variable when USB_DEBUG is defined. It'sMartin Pieuchot
really impossible to debug the USB stack when any single device you plug in your machine starts to vomit its own poetry,
2013-09-30add some additional run(4)/urtwn(4) devices found in FreeBSDJonathan Gray
2013-08-07Most network drivers include netinet/in_var.h, but apparently theyAlexander Bluhm
don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
2013-06-11Replace more ovbcopy with memmove; swap the src and dst arguments tooTheo de Raadt
2013-04-15Get rid of various 'typedef struct' definitions and use plain structureMarcus Glocker
definitions instead. We don't change usb.h for now to stay compatible with userland. Tested by mpi@ on macppc and myself on i386. ok mpi@
2012-10-12Cleanup false positives for uninitialized uses.Christiano F. Haesbaert
Part of the work to remove -Wno-uninitialized. ok blambert jsg
2012-03-24add a bunch of run devices found in the linux driverJonathan Gray
2011-07-03Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingMatthew Dempsky
that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
2011-02-10now that usb_wait_task() is back, bring back recently revertedJacob Meuser
changes: * use usb_ref_{incr,decr,wait}() to avoid detaching the driver while a process is still using the hardware. * don't add timeout(9)s if the device is detached. * add checks to see if the device has been detached before running ioctls, timeouts, and tasks. * use usb_wait_task() to wait for tasks to complete. ok damien@
2011-02-09revert usb.c to r1.72, and all subsequent changes that depend on it.Jacob Meuser
this is causing problems with suspend/resume for some people.
2011-02-05* use usb_ref_{incr,decr,wait}() to avoid detaching the driver while aJacob Meuser
process is still using the hardware. * don't add timeout(9)s if the device is detached. * add checks to see if the device has been detached before running ioctls, timeouts, and tasks. * use usb_wait_task() to wait for tasks to complete. ok damien@
2011-01-30another runTed Unangst
2011-01-25garbage collect "usb events". without /dev/usb there is no way to accessJacob Meuser
them from userland, and nothing in the kernel uses them. ok krw@, miod@
2011-01-10add the Buffalo WLI-UC-GNHP.Damien Bergamini
from Jordi Beltran Creix.