History log of /haiku/src/add-ons/kernel/drivers/network/ether/usb_rndis/RNDISDevice.cpp (Results 1 – 11 of 11)
Revision Date Author Comments
# f0427429 17-Nov-2024 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: fix handling of canceled transfers

When the transfer is canceled, there is no new data received. So we
should stop the processing and inform the network stack that the
transfer is cancele

usb_rndis: fix handling of canceled transfers

When the transfer is canceled, there is no new data received. So we
should stop the processing and inform the network stack that the
transfer is canceled.

Change-Id: I5c991899292b84e6d9bc589348a5ab32384ea09a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8577
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# 9548274e 17-Nov-2024 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: remove reattach code

The MAC address is randomly generated each time the device is connected.
So there is no way to match with a previous session and reattach the
interface transparently.

usb_rndis: remove reattach code

The MAC address is randomly generated each time the device is connected.
So there is no way to match with a previous session and reattach the
interface transparently.

Change-Id: I8aea95d5a09621a0dcdd7ce89787663a38435001
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8576
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 3e8df064 04-Feb-2024 Oscar Lesta <oscar.lesta@gmail.com>

usb_rndis: fix minor copy/paste and typo errors.

Change-Id: Ie75b763ec241a12bad107e1b48f89079c462c248
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7396
Tested-by: Commit checker robot <no-repl

usb_rndis: fix minor copy/paste and typo errors.

Change-Id: Ie75b763ec241a12bad107e1b48f89079c462c248
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7396
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 45311bd6 22-Jul-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: synchronize writes

The write function can be called concurrently by multiple threads. The
way it is implemented now means this desn't work, since there is no
guarantee the correct thread

usb_rndis: synchronize writes

The write function can be called concurrently by multiple threads. The
way it is implemented now means this desn't work, since there is no
guarantee the correct thread will be released from the semaphore by the
USB completion callback.

I tried to allow mutiple requests to run "in parallel" (really letting
the USB stack schedule them) by having he callback track which thread to
wake up (using send_message/receive_message as a synchronization tool)
but that still resulted in lockups.

The simplest solution is to ensure there is only a single thread doing a
write transaction at a time, which is achieved here with an extra mutex.

Fixes #18521.

Change-Id: I0b737acab6f5665cbe5b0e40a20ce99c16bdf21c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6707
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>

show more ...


# 97f11716 04-Sep-2022 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Merge remote-tracking branch 'origin/master' into dev/netservices

Change-Id: I588c4a840523995f820161d63741c137bc5c719c


# ed666fb4 11-Jun-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: fix 32bit build


# fb021427 11-Jun-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: fix handling of multiple packets in one USB transaction

I got my pointer math wrong because some things in RNDIS use uint32 as
the base, but some things are in bytes. Most of the time thi

usb_rndis: fix handling of multiple packets in one USB transaction

I got my pointer math wrong because some things in RNDIS use uint32 as
the base, but some things are in bytes. Most of the time this would result
in an offset past the end of the USB buffer, so it would just lead to
ignoring all but the first packet. But if the first packet was small enough,
it would point somewhere still in the buffer, and we would read the wrong
data.

Fixes #17775

Change-Id: I32ec0081336b1f772d4dc3099a0ac2c691aa12f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5377
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 4dda1c03 10-Jun-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: use the "data offset" field instead of hardcoding it

Not sure if other phones could use another value, but it's better to
follow the spec. Also add some bounds checks with traces for now

usb_rndis: use the "data offset" field instead of hardcoding it

Not sure if other phones could use another value, but it's better to
follow the spec. Also add some bounds checks with traces for now if we
see something strange.

Change-Id: I5c7bc37c4730e6a08bf0bf10fed975bf2012102e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5376
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 2e75ef07 16-May-2022 Máximo Castañeda <antiswen@yahoo.es>

Fix 32bit build

Change-Id: If7c2da0a28302f5535eda25999b1f877cbca1152
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5315
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 3ad6b5ec 14-May-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: accept incoming USB transfers up to 0x4000 size

As required by the spec. Then split them into multiple ethernet frames
as needed.

Fixes #17738.

Change-Id: I71ebff0fe1fc5c8a342d6d06b26ed

usb_rndis: accept incoming USB transfers up to 0x4000 size

As required by the spec. Then split them into multiple ethernet frames
as needed.

Fixes #17738.

Change-Id: I71ebff0fe1fc5c8a342d6d06b26eda8e87115e04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5312
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# b2489546 18-Apr-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_rndis: new driver for Android phones USB connection sharing

Based on usb_ecm and other native USB ethernet drivers which share a
similar structure.

References used to implement this:
- FreeBSD

usb_rndis: new driver for Android phones USB connection sharing

Based on usb_ecm and other native USB ethernet drivers which share a
similar structure.

References used to implement this:
- FreeBSD urndis driver
- [MS-RNDIS].pdf v20140501
- Microsoft list of RNDIS OIDs

TODO:
- Better handling of "request id" field to make sure the replies we get
match up with the requests we sent, and it could allow to have
multiple requests in flight. However, the FreeBSD driver doesn't
bother to implement this, if you only ever have one request in flight
and wait for a reply before sending another, this isn't really needed.
- Endian safety, this code will only work on little endian systems for
now. Several structures sent/received to/from the device must be little
endian, so on big endian platforms a lot of byteswapping will be needed,
or the code rewritten to use some smarter object and not a plain
struct for all of these.
- Investigate if it's possible to send/receive multiple ethernet frames
in a single USB transaction for better performance. Our driver
structure doesn't really allow for it unless the driver implements
some buffering on its own.

Change-Id: I2c6dacf0c1aeb6c7c1c112e9b16a63e586ea979a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5281
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>

show more ...