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

Dan Williams dcbw at redhat.com
Thu Jun 5 07:49:49 PDT 2014


On Thu, 2014-06-05 at 15:22 +0200, Bjørn Mork wrote:
> 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.

No way that ModemManager could create the sub-interface, since it knows
the details of how to do that on a per-plugin basis?

I'd really, really like to keep most of the specific logic in MM, since
otherwise clients like NM would need to know that MBIM uses one model
and QMI uses another and Ericsson uses another... (for example, I know
that's not really the case).

Dan



More information about the ModemManager-devel mailing list