summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_rsu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Follow up on jmatthew's suggestion:kevlo2019-04-251-3/+3
| | | | | | | in x_media_change(), return the errno from ieee80211_media_change() and do the error check from x_init(). ok stsp@, jmatthew@, phessler@
* net80211: stub SIOCS80211SCAN, make ifconfig scan instant.pirofti2018-04-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The following removes the functionality of the SIOCS80211SCAN ioctl. After long discussions with stps@, mpi@, and deraadt@ we decided that this was the correct way of fixing ifconfig scan from blocking the network stack. The kernel will continue scanning in the background and filling the nodes array, but ifconfig scan commands will now basically do just a SIOCG80211ALLNODES and pretty print the array. So the output stays the same but is instant. In fact, when the interface is freshly brought up, if you type fast enough, you can see the array being filled by running multiple ifconfig scans in sequence. The SIOCS80211SCAN ioctl stays for now as wi(4), pgt(4) and malo(4) still need it around. But not for long... Another change that this introduces is the fact that ifconfig scan no longer plays with UP and DOWN. If the interface is down it complains and exits. This is needed in order to maintain the nodes list. Works on iwm(4), iwn(4), urtwn(4), run(4) and athn(4). Tested by mpi@, landry@, florian@, thanks! OK mpi@.
* Some wifi drivers don't call ieee80211_newstate() during some statestsp2018-01-311-4/+14
| | | | | | transitions, which means those state transition won't be shown in dmesg in interface debug mode. Make drivers print these transitions themselves. ok patrick@
* Move common code to add/remove multicast filters to ieee80211_ioctl(9).mpi2017-10-261-12/+1
| | | | ok jsg@, stsp@
* Unbreak the rsu(4) driver which was not kept up-to-date with recent WPAstsp2017-07-211-4/+12
| | | | | | supplicant and net80211 state machine changes. While here, make rsu(4) report the correct channel for received frames to tcpdump(8). ok deraadt@
* Fix frame length bounds checks in rsu(4).stsp2017-07-211-5/+16
| | | | | | Due to signedness issues the existing checks didn't work as intended. Problem reported by Ilja Van Sprundel. ok deraadt@
* Add sizes to various free(9) calls. Fixing the simpler ones first.deraadt2017-03-261-2/+2
| | | | ok natano visa
* 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@
* In rsu(4), put code that twiddles HT data in the ic under #ifdef notyet.stsp2016-07-261-1/+3
| | | | | | Some code paths in this driver peek at ic_htcaps and act upon it, so let's play it safe until this driver gets its 11n support enabled on purpose. Spotted while investigating the bug fixed in r1.35.
* Unbreak rsu(4) which was broken since r1.32. Reported by Jake Swensen.stsp2016-07-261-2/+2
| | | | ok deraadt@
* G/C IFQ_SET_READY().mpi2016-04-131-2/+1
|
* Remove the IEEE80211_NO_HT macro. Reduces ifdef spaghetti, enables 11n modestsp2016-01-051-13/+2
| | | | | in bsd.rd, and might uncover some bugs. Suggested by tedu@ and deraadt@. ok sthen@ jasper@ deraadt@
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* No need to include <net/if_arp.h>mpi2015-11-241-2/+1
| | | | | | | | | 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.
* The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.mpi2015-11-241-2/+1
|
* Declare 802.11n mode and channel flags. Tweak 11n related fields in structstsp2015-11-151-2/+7
| | | | | | | ieee80211com and move them inside #ifndef IEEE80211_NO_HT without breaking the build in rsu(4) for RAMDISK_CD. Also declare 11n protection modes and MCS count. ok deraadt mpi kettenis guenther
* arp_ifinit() is no longer needed.mpi2015-10-251-5/+1
|
* Only match devices with a valid configuration.mpi2015-06-121-17/+4
| | | | | | | | 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@
* 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-3/+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-3/+1
|
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-191-2/+2
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* No need for <netinet/in_systm.h> here.mpi2014-07-131-3/+1
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were tompi2014-07-121-20/+2
| | | | | | | | | | | | | | 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@
* Do not define per-driver DEBUG variable when USB_DEBUG is defined. It'smpi2014-03-071-5/+1
| | | | | really impossible to debug the USB stack when any single device you plug in your machine starts to vomit its own poetry,
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-071-2/+1
| | | | | don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
* Get rid of various 'typedef struct' definitions and use plain structuremglocker2013-04-151-8/+8
| | | | | | | | | 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@
* Instead of using a wrapper around usbd_transfer() when submitting ampi2013-04-121-5/+7
| | | | | | | transfer synchronously just pass the USBD_SYNCHRONOUS flag like any other flags when creating a transfer. ok sthen@, mglocker@
* The firmware isn't always happy with the length of the "join BSS" commandkettenis2013-02-041-2/+2
| | | | | | | | that we send. It seems to want some extra padding, but it isn't entirely clear how much. So pass the size of the entire buffer that we allocate for this command instead, which seems to always work. ok stsp@
* Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingmatthew2011-07-031-3/+1
| | | | | | | | 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
* now that usb_wait_task() is back, bring back recently revertedjakemsr2011-02-101-9/+28
| | | | | | | | | | | | | 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@
* revert usb.c to r1.72, and all subsequent changes that depend on it.jakemsr2011-02-091-28/+9
| | | | this is causing problems with suspend/resume for some people.
* * use usb_ref_{incr,decr,wait}() to avoid detaching the driver while ajakemsr2011-02-051-9/+28
| | | | | | | | | | 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@
* garbage collect "usb events". without /dev/usb there is no way to accessjakemsr2011-01-251-4/+1
| | | | | | them from userland, and nothing in the kernel uses them. ok krw@, miod@
* grrr... use the same style in the activate functions than in thedamien2010-12-311-4/+2
| | | | surrounding code.
* * add cfattach activate functions and call usbd_deactivate() in thejakemsr2010-12-271-2/+21
| | | | | | | | DVACT_DEACTIVATE case for drivers that don't have activate finctions * fill out cfattach activate functions and call usbd_deactivate() in the DVACT_DEACTIVATE case for drivers that don't have a dying flag "ok with the intent" miod@
* rsu(4) supports the Sweex LW154jakemsr2010-12-181-2/+3
|
* attach the Hercules HWGUn-54 to rsu(4)damien2010-12-151-6/+5
| | | | from pea@
* Match the Sitecom WL-349 v1.kettenis2010-12-141-1/+2
| | | | ok damien@
* #undef RSU_DEBUGdamien2010-12-131-8/+6
| | | | print the firmware diagnostic messages only if IFF_DEBUG is set.
* cosmeticdamien2010-12-121-9/+31
|
* Match the Planex GW-USNano.jsg2010-12-121-1/+2
| | | | ok damien@
* rsu(4), a driver for Realtek RTL8188SU, RTL8191SU and RTL8192SUdamien2010-12-111-0/+2318
802.11n USB devices. These are FullMAC devices that require a firmware to operate; see man page for details. Great thanks to Brad for donating hardware. Committed over the TRENDnet TEW-649UB. ok deraadt@