History log of /openbsd/sys/dev/usb/if_umb.c (Results 1 – 25 of 58)
Revision Date Author Comments
# 81508fe3 23-May-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok mpi@


# 3b9d585e 13-Apr-2024 jsg <jsg@openbsd.org>

correct indentation

no functional change, found by smatch warnings
ok miod@ bluhm@


# 32a3b737 24-Oct-2023 jmatthew <jmatthew@openbsd.org>

Delete any existing v4 address before setting a new one. This allows us
to keep a working default route when the address changes.

ok dlg@ kn@


# aa68484a 01-Sep-2023 mvs <mvs@openbsd.org>

Call rtm_send() with netlock held to protect dereference of sockaddr
structure data returned by rtable_getsource(). Netlock can't be pushed
within rtm_send() because we have paths where caller alread

Call rtm_send() with netlock held to protect dereference of sockaddr
structure data returned by rtable_getsource(). Netlock can't be pushed
within rtm_send() because we have paths where caller already holds it.

tested by jca

ok bluhm jca

show more ...


# a077d710 29-Aug-2023 dlg <dlg@openbsd.org>

fix handling of unknown error rate in mbim signal state info

from gerhard@:

> According to MBIM spec, table 10-58 (MBIM_SIGNAL_STATE_INFO) a value
> of 99 means the error rate is "Unknown or undete

fix handling of unknown error rate in mbim signal state info

from gerhard@:

> According to MBIM spec, table 10-58 (MBIM_SIGNAL_STATE_INFO) a value
> of 99 means the error rate is "Unknown or undetectable".

the code was using -99 before, but properly reports unknown/null now.

show more ...


# 16cce00f 29-Aug-2023 dlg <dlg@openbsd.org>

export mbim signal stats

tested by mbuhl@ gerhard@


# f41dbf71 26-Aug-2023 dlg <dlg@openbsd.org>

umb can use p2p_input as an if_input handler.

umb(4) is a hardware p2p driver, it just has ip coming in, so we can do
the same thing we do for the address family and input processing as
other p2p in

umb can use p2p_input as an if_input handler.

umb(4) is a hardware p2p driver, it just has ip coming in, so we can do
the same thing we do for the address family and input processing as
other p2p interfaces.

the short packet check that umb_input does is already done by the ip
stacks, so we're not losing anything.

tested by gerhard@ mbuhl@
ok gerhard@

show more ...


# 46d22571 18-Apr-2023 mvs <mvs@openbsd.org>

Remove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
Netlock protects `if_list', `ifa_list' and returned `ifa' dereference,
so put netlock assertion within.

Please note, rtable_setsourc

Remove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
Netlock protects `if_list', `ifa_list' and returned `ifa' dereference,
so put netlock assertion within.

Please note, rtable_setsource() doesn't destroy data pointed by
`ar_source'. This is the `ifa_addr' data belongs to `ifa' and exclusive
netlock is required to destroy it. So the kernel lock is not required
within rt_setsource(). Take netlock by rt_setsource() caller to make
`ifa' dereference safe.

Suggestions and ok by bluhm@

show more ...


# 208d6d98 31-Mar-2023 dlg <dlg@openbsd.org>

dont match quectel ec25 by vendor+product id

quectel seem to provide a sane and consistent set of functionality
built on top of the qualcomm qmi stuff. their linux drivers guide
says quectel modems

dont match quectel ec25 by vendor+product id

quectel seem to provide a sane and consistent set of functionality
built on top of the qualcomm qmi stuff. their linux drivers guide
says quectel modems provide a set of umsm usb interfaces and a
network interface that can be in qmi, ecm, or mbim mode.

if the modem is in mbim mode, it will present the mbim classes which
umb should be able to attach to without this explicit vendor+product
match (assuming umsm doesn't claim the interface first).

based on info in the Quectel LTE&5G Linux USB Driver User Guide V2.0

discussed with and tested by kevlo@
ok patrick@ sthen@ kevlo@

show more ...


# a76e37e6 11-Jan-2022 claudio <claudio@openbsd.org>

Remove KASSERT(0) and default switch case. No other sc_ncm_format
switch has a default case and umb_ncm_setup_format() ensures that
only 16 and 32bit formats are accepted. Fixes build error without
D

Remove KASSERT(0) and default switch case. No other sc_ncm_format
switch has a default case and umb_ncm_setup_format() ensures that
only 16 and 32bit formats are accepted. Fixes build error without
DIAGNOSTIC set.
Found by and OK robert@

show more ...


# 4b1a56af 09-Jan-2022 jsg <jsg@openbsd.org>

spelling
feedback and ok tb@ jmc@ ok ratchov@


# 0d18b60b 24-Sep-2021 kevlo <kevlo@openbsd.org>

Add support for SIMCom SIM7600.
To issue AT commands (AT+CUSBPIDSWITCH=9003,1,1 and AT+CLANMODE=1) to
change to MBIM mode.

ok deraadt@


# 5a5baf73 04-Jul-2021 sthen <sthen@openbsd.org>

store provider ID in umb(4), and display it in ifconfig. OK stsp deraadt

Previously only the provider's display name was used. The text used depends
on how the SIM is configured and not just on the

store provider ID in umb(4), and display it in ifconfig. OK stsp deraadt

Previously only the provider's display name was used. The text used depends
on how the SIM is configured and not just on the network in use (for example,
an MVNO SIM on another network will often display the MVNO's name rather
than that of the underlying network).

I have a SIM that roams to any network in my country - whichever network
it roams onto, the display name is the same, so you can't tell which
network you're really using. By printing the provider ID (in GSM-land this
is MCC+MNC) it's easy to lookup and check this.

As the provider was printed on the ifconfig line also showing subscriber-id
and ICCID it was already a bit long, and adding the provider-id there is
a bit too much, so move it to the output line showing APN, now looking like

: subscriber-id 2400xxxxxxxxxxx ICC-id 8946203xxxxxxxxxxxxx
: device EM7455 IMEI 01458xxxxxxxxxx firmware SWI9X30C_02.24.0
: APN key provider Tele2 IoT provider-id 23420

show more ...


# b10a2237 18-May-2021 kevlo <kevlo@openbsd.org>

Add support for Quectel EC25.
To issue an AT command (AT+QCFG="usbnet",2) to change to MBIM mode.

Tested by Shawn Chiou on rpi4; "of course" deraadt@


# 44f8ddd8 22-Apr-2021 patrick <patrick@openbsd.org>

Mark umb(4) as network device instead of a generic one. This also makes
it show up with the proper category in hotplug scripts.

From Tilo Stritzky
ok groth@ sthen@


# 99ae0d52 01-Apr-2021 mvs <mvs@openbsd.org>

Push kernel lock down to umb_rtrequest().

We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.

umb_rtrequest() calls umb_send_inet_propo

Push kernel lock down to umb_rtrequest().

We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.

umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock
protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler
which requires kernel lock to be held. So push the lock down to
umb_rtrequest() instead of grab it around `if_rtrequest' call.

This hunk was commited separately for decreases PF_ROUTE sockets
unlocking diff.

ok gerhard@ deraadt@

show more ...


# cb6aabf8 30-Mar-2021 sthen <sthen@openbsd.org>

fix typos in comments


# 83adad25 30-Mar-2021 patrick <patrick@openbsd.org>

Some cards announce support for the NTB16 format, but that support does not
work. Hence, add support for NTB32 in the transmit path. We already have
support for NTB32 in the receive path. We detec

Some cards announce support for the NTB16 format, but that support does not
work. Hence, add support for NTB32 in the transmit path. We already have
support for NTB32 in the receive path. We detect the supported format on
boot and can then decide on transmit which format to use.

From ehrhardt@ with gerhard@
Tested by jan@
ok sthen@

show more ...


# e77540ad 30-Mar-2021 patrick <patrick@openbsd.org>

Some umb(4) devices require the NDP pointer behind the NDP datagram.

From gerhard@
"broadly OK" sthen@


# af33e5c8 29-Mar-2021 sthen <sthen@openbsd.org>

combine umb_products and umb_fccauth_devs into one umb_quirks table
ok gerhard@


# c2fcfdc9 28-Mar-2021 sthen <sthen@openbsd.org>

Add vid/pid table to umb(4) allowing matching to alternate config

Some devices present multiple configurations and the one chosen by default
is not always usable - for example, some have an CDC ECM

Add vid/pid table to umb(4) allowing matching to alternate config

Some devices present multiple configurations and the one chosen by default
is not always usable - for example, some have an CDC ECM config that does
not work with our cdce(4) - allow overriding to a specific config in those
cases.

From gerhard@ with tweaks to comments by me, ok patrick@

show more ...


# 2b01c74b 29-Jan-2021 sthen <sthen@openbsd.org>

update usb.org URLs


# 23293512 22-Jul-2020 dlg <dlg@openbsd.org>

deprecate interface input handler lists, just use one input function.

the interface input handler lists were originally set up to help
us during the intial mpsafe network stack work. at the time not

deprecate interface input handler lists, just use one input function.

the interface input handler lists were originally set up to help
us during the intial mpsafe network stack work. at the time not all
the virtual ethernet interfaces (vlan, svlan, bridge, trunk, etc)
were mpsafe, so we wanted a way to avoid them by default, and only
take the kernel lock hit when they were specifically enabled on the
interface. since then, they have been fixed up to be mpsafe.

i could leave the list in place, but it has some semantic problems.
because virtual interfaces filter packets based on the order they
were attached to the parent interface, you can get packets taken
away in surprising ways, especially when you reboot and netstart
does something different to what you did by hand. by hardcoding the
order that things like vlan and bridge get to look at packets, we
can document the behaviour and get consistency.

it also means we can get rid of a use of SRPs which were difficult
to replace with SMRs. the interface input handler list is an SRPL,
which we would like to deprecate. it turns out that you can sleep
during stack processing, which you're not supposed to do with SRPs
or SMRs, but SRPs are a lot more forgiving and it worked.

lastly, it turns out that this code is faster than the input list
handling, so lots of winning all around.

special thanks to hrvoje popovski and aaron bieber for testing.
this has been in snaps as part of a larger diff for over a week.

show more ...


# 0cae21bd 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@


# 5edbfb72 04-May-2020 gerhard <gerhard@openbsd.org>

Check v6 availablilty mask instead of v4.

go for it deraadt@


123