summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_umb.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Check v6 availablilty mask instead of v4.gerhard2020-05-041-2/+2
| | | | go for it deraadt@
* IPv6 is no longer on by default. It must be enabled with "inet6 eui64".gerhard2020-04-271-2/+3
| | | | Input from sthen@, ok claudio@
* Add IPv6 support to umb(4).gerhard2020-02-181-36/+243
| | | | | | | ok job@ bluhm@ claudio@ job@ tested with 'telnet -6 towel.blinkenlights.nl' on Fibocom L831-EAU on IIJ MIO's network (Japan), with 'inet6 autoconf' in /etc/hostname.umb0.
* When there is no network around the state timeout fires over and over again.claudio2019-11-261-2/+5
| | | | | Change the printf into a log and only under IFF_DEBUG to reduce dmesg spam. Loudly requested by beck@ OK deraadt@
* Add umb_rtrequest() to handle RTM_PROPOSAL events and send back theclaudio2019-11-241-7/+24
| | | | | | DNS proposals in that case. Also clear the DNS proposals when the interface is deconfigured (e.g. when going down). OK florian@
* Use rtm_proposal() to send out DNS updates. Both when DNS are added andclaudio2019-11-221-1/+28
| | | | when the interface is deconfigured (when going down).
* Only set the IPv4 address in umb(4) if both MBIM_IPCONF_HAS_ADDRINFO andclaudio2019-10-101-6/+5
| | | | | | | MBIM_IPCONF_HAS_GWINFO are available. Configuring umb(4) without gateway wont work the system needs a destination address for the interface. Problem found by jsg@. OK jsg@ deraadt@
* Switch the bpf of umb(4) from DTL_RAW to DTL_LOOP. DTL_RAW is limited toclaudio2019-10-031-13/+31
| | | | | | | | | | ip only whereas DTL_LOOP passes the address family of the packet and so supports more address families. To make this work umb_decap() prepends the AF to the packet and which is consumed then by umb_input(). Similar umb_output() sets ph_family in the mbuf header which is used by umb_start(). OK deraadt@ dlg@
* turn the success paths of FCC registration into debug prints. Thederaadt2019-09-291-3/+3
| | | | | (unlikely) failure path remains noisy. discussed with claudio
* Make umb(4) add a default route when configuring the interface. This routeclaudio2019-09-271-52/+97
| | | | | | | | has a lower priority than wifi or wired LAN and so should only be used when no other interface is available. With this using umb(4) becomes less painful Now ifconfig umb0 up will be enough especially if unwind(8) is used to handle DNS requests. OK deraadt@ job@ benno@
* Replace umb_ntop() with sockaddr_ntop() which does almost the same thing.claudio2019-08-261-36/+24
| | | | | | Also change the storage type for the DNS addresses to struct in_addr since that is more convinient for userland. This includes some minor other cleanup. OK gerhard@
* Create IF_WWAN_DEFAULT_PRIORITY which is lower thanclaudio2019-06-261-1/+2
| | | | | IF_WIRELESS_DEFAULT_PRIORITY and use it in umb(4) as default prio. OK kettenis@, sthen@
* Fix typosfeinerer2019-01-141-8/+8
| | | | ok sthen@
* Make some USB ioctls return ENXIO, instead of EIO, if usbd_is_dying().stsp2018-10-021-2/+2
| | | | | | | Brings us one step closer towards making this condition's error code consistent across all USB drivers. Patch by Moritz Buhl ok mpi@ bluhm@
* Prevent a panic in umb(4) when roaming is diabled.gerhard2018-09-101-8/+11
| | | | Found by beck@, tested and ok by bluhm@
* Reduce the scope of the NET_LOCK() in in_control(). Two functions weretb2018-04-301-5/+1
| | | | | | | | | | protected: mrt_ioctl() and in_ioctl(). The former has no other callers and only needs a read lock. The latter will need refactoring to reduce the lock's scope further. In a first step, establish a single exit point and protect most of the function body with the NET_LOCK() while removing the NET_LOCK() from a handful of callers. suggested by & ok mpi, ok visa
* Remove almost unused `flags' argument of suser().mpi2018-02-191-2/+2
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
* Even if a USB transfer fails, call umb_start() so that processinggerhard2017-10-231-5/+4
| | | | | | of the if_snd queue doesn't stall. ok stsp@
* Kill dead ioctl handlers.mpi2017-10-201-7/+1
| | | | | | | SIOCGIF{HARD,}MTU are handled by ifioctl() and not passed down to drivers. ok visa@
* Remove NET_LOCK()'s argument.mpi2017-08-111-7/+7
| | | | Tested by Hrvoje Popovski, ok bluhm@
* Introduce ipv{4,6}_input(), two wrappers around IP queues.mpi2017-05-301-7/+5
| | | | | | | This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
* Grab the netlock in umb_state_task() and umb_decode_ip_configuration()bluhm2017-05-181-4/+9
| | | | | | | when calling in_ioctl(). These ioctls modify the routing table, which is global. So they need the lock. Found with Zaur Molotnikov's static lock analyzer. OK gerhard@ mpi@
* Byte order of IP addresses was broken on big endian machines.gerhard2017-05-031-5/+3
| | | | | | | MBIM already uses network byte order for IP addresses, so just use them as they are. ok stsp@, deraadt@
* Support packet aggregation for umb(4) on tx.gerhard2017-04-181-69/+146
| | | | | tested by bluhm@, ststp@ and Bryan Vyhmeister. ok bluhm@ ststp@
* Do not clear IFF_UP, even in the error path.mpi2017-03-081-4/+1
| | | | | | | This flag should only be set by the stack, drivers shouldn't mess with it. Discussed with dlg@ and mikeb@, ok gerhard@
* 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@
* The NCM encoding allows to aggregate multiple segments in one singlegerhard2016-11-251-18/+35
| | | | | | | | | | | | transfer. Using wMaxSegmentSize for bulk-in could break the rx-path because xfer length can be smaller than the messages sent by the device. And using some constant value for rx/tx size is also a bad idea, because we might be sending messages to the device that are too big for it to handle them. Therefore use the NCM GET_NTB_PARAMETERS request to query the device's configuration. Found, tested, and ok'ed by otto@
* Some MBIM devices need a FCC Authentication before they're willing togerhard2016-11-211-12/+234
| | | | | | | | turn on the radio. This is done by encapsulating QMI requests inside a MBIM message. Based on prio work by sthen@, tested by Bryan Vyhmeister. ok sthen@
* Stop looking for further NCM datagrams if either length or offset ofgerhard2016-11-141-2/+2
| | | | | | | the next datagram is zero. Tested by otto@ ok mpi@ kettnis@ otto@
* Use the NdpIndex of the NCM header as the offset of the NCM pointer insteadgerhard2016-11-101-4/+5
| | | | | | | of assuming tha the NCM pointer will follow immediately after the header. Tested by Bryan Vyhmeister and Otte Moerbeek ok otto
* Make kernel without INET6 compile again.bluhm2016-10-251-1/+3
| | | | OK mikeb@
* Make umb(4) less verbose by default. 'ifconfig umb0 debug' enables verbose mode.stsp2016-06-201-59/+94
| | | | ok mpi deraadt gerhard
* Rework how umb(4) attaches such that it also works with devices that implementkettenis2016-06-191-83/+90
| | | | | | both NCM 1.0 and MBIM. ok gerhard@
* Add umb(4) - a driver for the Mobile Broadband Interface Model (MBIM)gerhard2016-06-151-0/+2318
The umb(4) driver provides support for USB MBIM devices. Those devices establish connections via celluar networks such as GPRS, UMTS, and LTE. ok mpi@ sthen@ additional feedback from deraadt@ jmc@ stsp@ kettenis@