[LEDE-DEV] [PATCH] uqmi: fix raw-ip mode for newer lte modems

Bjørn Mork bjorn at mork.no
Mon Nov 27 09:15:50 PST 2017


Koen Vandeputte <koen.vandeputte at ncentric.com> writes:

> On 2017-11-27 17:53, Bjørn Mork wrote:
>> Koen Vandeputte <koen.vandeputte at ncentric.com> writes:
>>
>>> @@ -99,6 +99,13 @@ proto_qmi_setup() {
>>>     	uqmi -s -d "$device" --set-data-format 802.3
>>>   	uqmi -s -d "$device" --wda-set-data-format 802.3
>>> +	dataformat="$(uqmi -s -d "$device" --wda-get-data-format)"
>>> +
>>> +	if [ "$dataformat" = '"raw-ip"' ]; then
>>> +		echo "Device detected which does not support 802.3 mode. Informing driver of raw-ip only for $ifname .."
>>> +		echo "Y" > /sys/class/net/$ifname/qmi/raw_ip
>>> +	fi
>>
>> It might be good to test for existence here since this attribute was
>> added as late as Linux v4.5?  Maybe provide some helpful warning in case
>> it doesn't exist and the modem refuses to run in 802.3 mode?
>>
>>
>> Bjørn
> This sounds fair. :)
> I'll send a V2 adding the test.
>
>
>
> As you are the author of the fixing patch upstream:
>
> Would you also force this attribute to "No" in case it exists and
> format is detected as 802.3?

I don't have any strong opinion.  The driver defaults to N and will
alwyas do that for backwards userspace compatibility, so you can depend
on that.  But if you want to be 100% sure that something else didn't
mess with this, then you could of course force it to N.  Not sure what
"something else" would be, though.  Probably the admin, and admins
should be allowed to shoot themselves in the foot :-)



Bjørn



More information about the Lede-dev mailing list