summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_ral.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@
* Validate that the interface passed to *match() is the expected onempi2019-01-131-12/+3
| | | | | | instead of calling usbd_device2interface_handle() during *attach(). ok stsp@
* Move common code to add/remove multicast filters to ieee80211_ioctl(9).mpi2017-10-261-13/+1
| | | | ok jsg@, stsp@
* Replace slot time durations with macros.kevlo2017-07-031-2/+3
| | | | ok stsp@
* 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@
* Avoid calling usbd_set_config_no() in *_attach() and let the stack dompi2016-11-061-8/+2
| | | | | | | | | it instead. If anything bad happen due to a malformed descriptor it makes no sense to try to attach a driver, and bail before probing. This is similar to the change to avoid calling usbd_set_config_index().
* Unbreak ural(4), which had been dropping frames on Tx whilestsp2016-07-201-2/+2
| | | | | | | the IFF_RUNNING flag was set since last November (r1.138). Apparently nobody is using this driver, except for martijn@. Fix tested by martijn@ and myself. ok dlg@
* G/C IFQ_SET_READY().mpi2016-04-131-2/+1
|
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
|
* Check for space on the ring before dequeuing packets.mpi2015-11-131-13/+8
| | | | | | | Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames. Tested by stsp@, ok dlg@, stsp@
* replace the ifqueues in net80211 with mbuf_queues.dlg2015-11-041-3/+3
| | | | | | | | 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-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
|
* Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were tompi2014-07-121-30/+11
| | | | | | | | | | | | | | 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@
* 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@
* 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/+6
| | | | | | | transfer synchronously just pass the USBD_SYNCHRONOUS flag like any other flags when creating a transfer. ok sthen@, mglocker@
* Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingmatthew2011-07-031-4/+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
* garbage collect "usb events". without /dev/usb there is no way to accessjakemsr2011-01-251-7/+1
| | | | | | them from userland, and nothing in the kernel uses them. ok krw@, miod@
* * do not add timeouts if the driver is dyingjakemsr2010-12-301-10/+40
| | | | | | | | | | | | * use usbd_ref_{incr,decr,wait} to not detach while another process/thread is using the driver * s/usb_rem_task/usb_rem_wait_task/ in detach functions because detach doesn't always happen in the task thread; otherwise a task could be running while the driver detaches * in detach functions, first delete pending timeouts, then wait for processes to be done with the driver before freeing resources ok martynas@
* - use nitems()jasper2010-12-171-7/+3
| | | | ok jakemsr@
* * replace per-driver dying and/or other state variables with use ofjakemsr2010-12-061-1/+4
| | | | | | | usbd_deactivete() and usbd_is_dying() * use usbd_deactivate() in activate()/DEACTIVATE * convert a few more direct checks of the associated bus' dying flag with usbd_is_dying()
* don't free network related resources if they were not allocatedjakemsr2010-10-271-3/+5
|
* check that a timeout(9) has been initialized before deleting itjakemsr2010-10-231-3/+5
| | | | ok phessler
* create another kthread to run xfer abort tasks. xfer abort tasks cannotjakemsr2010-10-231-2/+2
| | | | | | | | | | | be run from the generic task kthread, because xfers that need to be aborted block newly queued tasks from running (i.e. the xfer to be aborted blocks the abort of that task). as there are now three types of usb tasks, add an argument to usb_init_task() and another member to struct usb_task to specify the task type. fixes boot hangs that are showing up because we now use usb tasks to attach/detach usb devices.
* remove the unused if_init callback in struct ifnetjsg2010-08-271-2/+1
| | | | ok deraadt@ henning@ claudio@
* 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-3/+3
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* timeout_add -> timeout_add_msecblambert2009-07-101-2/+2
| | | | ok damien@
* 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@
* pass FCS to radiotap.damien2008-08-271-3/+3
|
* introduce new IEEE80211_STA_ONLY kernel option that can be set todamien2008-08-271-6/+27
| | | | | | | | | 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.
* in ieee80211_input(), call if_start() after enqueuing frames in if_snddamien2008-08-141-8/+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.
* Free the correct buffer list on failure.damien2008-07-301-2/+2
| | | | From Andrew Thompson at FreeBSD.
* instead of passing rx tstamp and rssi to the ieee80211_input function,damien2008-07-211-2/+6
| | | | | | | 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.
* Kernel implementation of the 4-way handshake and group-keydamien2008-04-161-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* treat usb vendor/product names as a locator, and have usbd_print handle it,deraadt2007-10-111-6/+1
| | | | | | so that it shows up before the :. as a result, all the usb devices do not need to have name printing code anymore. all this now works and prints nicely because usbd_probe_and_attach() is serialized. ok kettenis
* use new malloc M_ZERO flag to shrink kernel.damien2007-09-071-2/+1
| | | | remove <malloc.h> from files where malloc is not used.
* replace the ieee80211_wepkey structure with a more generic ieee80211_keydamien2007-07-181-3/+3
| | | | one that can be used with other ciphers than WEP.
* Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andmbalmer2007-06-141-2/+17
| | | | | | | | USB_DECLARE_DRIVER macros. No binary change. ok dlg.
* Remove the definition and use of the device_ptr_t which was a struct device *.mbalmer2007-06-121-2/+2
| | | | | | No binary change. ok mk.
* Remove the definition and use of the USBDEVNAME macro.mbalmer2007-06-101-38/+38
| | | | | | | (This might look easy, but it was a big diff. Thanks to dlg and especially jsg for looking over it; we found at least four mistakes in the initial diff.) ok jsg.