[PATCH 2/2] bearer-mbim: all bearers share one MBIM data port

Bjørn Mork bjorn at mork.no
Thu Jun 5 06:22:39 PDT 2014


Aleksander Morgado <aleksander at aleksander.es> writes:

> On Thu, Jun 5, 2014 at 1:51 PM, Bjørn Mork <bjorn at mork.no> wrote:
>> Signed-off-by: Bjørn Mork <bjorn at mork.no>
>> ---
>>  src/mm-bearer-mbim.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
>> index 1f4adb0..65245f2 100644
>> --- a/src/mm-bearer-mbim.c
>> +++ b/src/mm-bearer-mbim.c
>> @@ -84,10 +84,8 @@ peek_ports (gpointer self,
>>      }
>>
>>      if (o_data) {
>> -        MMPort *port;
>> +        MMPort *port = MM_PORT (mm_base_modem_peek_port_mbim (modem));
>>
>> -        /* Grab a data port */
>> -        port = mm_base_modem_peek_best_data_port (modem, MM_PORT_TYPE_NET);
>
> There's an issue here; the port needs to be a NET port, because that
> is what the Bearer should export in the interface. This is, if you
> have 2 bearers, they should both expose "wwan0", and not
> "/dev/cdc-wdm...".

Right.  I missed the finer details here.  Yes, that should filter out
the MM_PORT_TYPE_NET port instead.

> NetworkManager needs to know which is the NET port where the IP config
> is to be applied. Didn't your flow work with this code unchanged?

well, I didn't try this with NM because it will need to know the MBIM
session ID as well, and I couldn't figure out how you intended to export
that.

But it does work as far as connecting multiple sessions.  You still have
to create the corresponding subinterfaces manually, after guessing the
allocated MBIM session IDs.


Bjørn


More information about the ModemManager-devel mailing list