summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_urndis.c
AgeCommit message (Collapse)Author
2015-10-25arp_ifinit() is no longer needed.Martin Pieuchot
2015-06-24Increment if_ipackets in if_input().Martin Pieuchot
Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
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-03-11Convert to if_input().Martin Pieuchot
Tested and ok armani@
2015-01-09The "SunMicro Virtual Eth Device" found on Oracle's more recent SPARC systemsMark Kettenis
claims to support both RNDIS and CDC Ethernet. However, RNDIS doesn't seem to work, at least not with our driver. So blacklist it here such that cdce(4) takes over. ok miod@, armani@ (both a while back)
2014-12-22unifdef INETTed Unangst
2014-11-30Don't overwrite fields in the message when setting up the REMOTE_NDIS_SET_MSGMark Kettenis
command in urndis_ctrl_set(). Seems many RNDIS hardware doesn't care about the overwritten fields, but the SunMicro Virtual Eth Device found in newer Oracle SPARC hardware does. ok armani@
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@
2013-12-09Fix crash on urndis(4) detachPaul Irofti
When detaching my nokia c2-01 dohooks in if_detach would panic. This was due to a failure to setup a pipe in urndis_ctrl_init() which results in a TIMEOUT on receive with side-effects later on during detach due to assumptions regarding the existence of interface hooks during dohooks on if_detach tear-down. That resulted on dereferencing a NULL function pointer which triggered a panic. Discussed with mpi@, tested and okay giovanni@.
2013-12-07Some cleaning up of the ioctl handling bits to bring things in lineBrad Smith
with the other drivers. No functional change.
2013-11-21Revert r1.41, in this driver sc_attached does not indicate that theMartin Pieuchot
driver is not yet attached, it is here to prevent the driver to free unitialized structures in case something wrong happened during the the initialization... Found the hard way and ok giovanni@
2013-11-15Clean-up usbd_abort_pipe() usage.Paul Irofti
This function never fails. So change it's return type to void and adjust the copy-pasted callers that were checking the return. "If it compiles, ok" mpi@
2013-11-08Replace sc_dying in favour of usbd_is_dying() and usbd_deactivate().Paul Irofti
Okay mpi@
2013-10-29Kill sc_attached, attach and detach events for USB devices are triggeredMartin Pieuchot
by the same explore task and cannot happen in parallel.
2013-10-01Use %z* for size_tStefan Fritsch
while there, fix a few %d into %u
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-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@
2013-03-28proc.h is way too much header for usb to handle.Ted Unangst
2013-02-02- remove product/vendor table and let the driver attach based on class, etc.Federico G. Schwindt
- print what type of device is. tested by sthen@. similar diff tested by jasper@ and gonzalo@. ok mpi@ and sthen@ if you have one of these devices please give it a try and mail the details.
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-06-20- urndis_match() should support multiple interface descriptors.Federico G. Schwindt
- in urndis_attach() use the first interface descriptor that's different from the control interface as the data interface. from armani's colleague with some tweaks by me. kettenis@ sthen@ ok
2012-03-24add ZTE HSUSB.Federico G. Schwindt
committed over it.
2011-07-20this works on the galaxy s2 too.Jasper Lievisse Adriaanse
ok dlg@
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-05-05Attach to Samsung Galaxy S, from Erik Mugele. ok jsg@ mk@Stuart Henderson
It may be possible to use better heuristics to detect compatible devices (Linux driver appears to hand over from CDC to urndis) which would avoid listing IDs, but this gets tethering working on this phone for now.
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-16* instead of NULLing pointers to interface descriptors in the uaa, markJacob Meuser
interfaces as being claimed in the usbd_device's copy of the interface descriptors * allow ugen(4) to be attached if there are unused interfaces in a configuration that has had drivers attached * make ugen(4) aware that it may be sharing a device with (an)other driver(s), and if so: * do not let ugen(4) change the configuration * do not let ugen(4) access the already claimed interfaces discussed with deraadt and miod
2010-10-27don't free network related resources if they were not allocatedJacob Meuser
2010-09-24remove dying flag in detach() function.Yojiro Uo
The dying flag will be set in activate()/DEACTIVATE. ok deraadt@
2010-07-31The code referencing urndis_watchdog() is #if 0'd out, but the actualMichael Knudsen
function is not. This change #if 0's urndis_watchdog() and some functions that are only called from here. At some point we probably want to use the watchdog functionality but the current code is completely untested so disable it entirely rather than enabling it this close to release.
2010-07-31Break some really long lines.Michael Knudsen
2010-07-14In urndis_decap(), delay the memcpy() for as long as possible. There isMichael Knudsen
no point in copying before having done the final sanity check (we copied before the last one). ok armani
2010-07-14urndis_newbuf() is only called with NULL as it's third argument so justMichael Knudsen
get rid of it. ok armani
2010-06-06Use usb_lookup() instead of rolling our own. ok armani@ fabien@Miod Vallat
2010-04-05Remove a useless usbd_get_interface_descriptor.Jonathan Armani
"iff you commit over the Hero" mk@
2010-03-25Update to match renamed product id.Michael Knudsen
ok armani
2010-03-15Correct return from attach on error, add splx() and urndis_stop().Fabien Romano
This fix a crash on detach.
2010-03-14Rewrite urndis_match() logic for the HTC Hero to match on vendor andMichael Knudsen
product ID. The former code was a bit promiscuous and would attempt to attach urndis(4) to e.g. E71 (as noticed by jmc) and then fail. ok fabien armani deraadt
2010-03-11Correct a wrong printf and move a check than should be before the debug.Jonathan Armani
Found when looking at ckuethe problem. with and ok fabien@, "definitivly" mk@, "that diff can go in" kettenis
2010-03-07Garbage collect a softc member that we don't use because we don't doMichael Knudsen
multipacket tx. ok fabien "if you commit over urndis" armani
2010-03-07Update my address, while there update armani's too per his request.Fabien Romano
ok armani, mk.
2010-03-07Rename RNDIS_DEBUG to match device name.Fabien Romano
Now option to debug is URNDIS_DEBUG. ok mk, armani.
2010-03-07Some cleanup and dead code removal to bring us in line with otherMichael Knudsen
usb ethernet drivers. ok armani
2010-03-07We're only sending one packet at a time, so garbage collect sc_lim_pktcntMichael Knudsen
that shows how many packets the device will accept in one transfer. ok armani fabien
2010-03-06Add a flag to know if the interface successfully attached likeJonathan Armani
other drivers do otherwise we panic trying to remove an unexistent ifp during detach. looks good to fabien@, with comments from mk@, ok mk
2010-03-05Correct a wrong printf message, from fabien, ok mk@Jonathan Armani
2010-03-04Add defines for header and data offset, offsetof() uses from mk@.Jonathan Armani
ok mk@
2010-03-03Change third parameter for urndis_decap() to be of type u_int32_t.Michael Knudsen