bearer-qmi: Add fallback for firmware with broken "Bind Data Port"
"Bind Data Port" does not work correctly on newer platforms with BAM-DMUX (e.g. MSM8909). It returns "device unsupported" even for valid SIO port numbers.
As an alternative, it seems to be possible to use the newer "Bind Mux
Data Port" instead. This works even when QMAP multiplexing is disabled
(using WDA "Set Data Format"). In this case the mux-id seems to be
entirely ignored and can be a dummy value such as MUX_ID_UNBOUND
.
Implement this by checking for the error code of "Bind Data Port" and fallback to "Bind Mux Data Port" instead.
The important part in this case is that the endpoint type and interface
number are set correctly. At the moment this works only with !852 (merged) and only
for the wwan0
interface because the endpoint information is currently maintained
globally as part of the QMI control port instead of being handled
separately per data/net port. Further refactoring is needed to enable
multiplexing on these platforms. (I would prefer to leave this up to future work
as I'm not really familiar enough with the ModemManager code base to do larger
refactorings...)