[RFC] Support for raw-ip only modems in libqmi/qmicli/qmi-network
Bjørn Mork
bjorn at mork.no
Sat Jan 2 14:14:27 PST 2016
Aleksander Morgado <aleksander at aleksander.es> writes:
> This series of patches includes a new set of APIs, qmicli commands and
> qmi-network logic to handle devices which only do raw-ip, like the
> MC7455.
>
> libqmi includes two new methods per QmiDevice:
> qmi_device_get_expected_data_format()
> qmi_device_set_expected_data_format()
> The implementation of these methods just reads/writes the sysfs file
> according to what's requested. I'm not 100% happy with the names here,
> maybe "qmi_device_[get|set]_kernel_expected_data_format()" or
> "qmi_device_[get|set]_kernel_data_format()" would have been better?
>
> qmicli includes two new commands:
> --get-expected-data-format
> --set-expected-data-format
> These commands will make use of the new libqmi APIs to read/write the sysfs file.
>
> qmi-network includes some new automatic logic to work with these new
> devices. If the kernel exposes the new sysfs file, qmi-network will
> try to update the link layer protocol expected by the kernel to match
> the one reported by WDA. If the kernel doesn't expose the sysfs file,
> we fallback to request 802.3 via WDA.
>
> What do you guys think? I know it's likely too much trouble to have
> these new APIs just to R/W the sysfs files, but I thought this
> integrates a bit better with the remaining QmiDevice implementation.
I don't have strong feelings in any direction here. Your ideas
certainly make sense.
This also made me realize one flaw in the kernel side solution:
bjorn at nemi:~$ qmicli -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip
error: cannot set expected data format: Expected data format not updated properly: Failed to open file '/sys/class/net/wwan0/qmi/raw_ip' for R/W: Permission denied
The sysfs file and the cdc-wdmX character device permissions are in no
way connected, but I guess that will be somewhat confusing. I really
haven't thought enough (or much at all..) on how this should work. But
I guess it can (and should?) be left for userspace to figure out?
In any case, qmicli works fine for me after fixing the permission
problem. I think I like having this setting there, making the
connection between character device name and sysfs file/netdev name
trivial.
Bjørn
More information about the libqmi-devel
mailing list