Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ModemManager ModemManager
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 221
    • Issues 221
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mobile broadband connectivity
  • ModemManagerModemManager
  • Merge requests
  • !582

Merged
Created Jul 21, 2021 by Loic Poulain@loicpoulain

WWAN framework support

  • Overview 18
  • Commits 2
  • Pipelines 8
  • Changes 5

The new WWAN framework offers a generic wwan link management over netlink (wwan type), but it's not yet supported by MM or libmbim, so disable multiplex support for now.

I'm currently testing this with a new version of mhi-mbim net driver: https://git.linaro.org/people/loic.poulain/linux.git/log/?h=wwan-mbim

But it should also apply for intel iosm.

The connection is successful but there is still a remaining issue, probably on NM side: NetworkManager: cannot find network interface wwan0 in platform cache

Look like NM does not like iface with a link type?

ref: #385 (closed)


Note: Adding link mgmt should be quite simple though, something like:

NetlinkMessage *msg;
guint           linkinfo_pos, datainfo_pos;
struct rtattr   info;

g_assert (session_id != MBIM_DEVICE_SESSION_ID_AUTOMATIC);

msg = netlink_message_new (RTM_NEWLINK, NLM_F_CREATE | NLM_F_EXCL);
append_netlink_attribute_uint32 (msg, IFLA_PARENT_DEV_NAME, "wwan0");
append_netlink_attribute_string (msg, IFLA_IFNAME, ifname);

/* Store the position of the next attribute to adjust its length later. */
linkinfo_pos = get_pos_of_next_attr (msg);
append_netlink_attribute_nested (msg, IFLA_LINKINFO);
append_netlink_attribute_string (msg, IFLA_INFO_KIND, WWAN_DATA_TYPE);

/* Store the position of the next attribute to adjust its length later. */
datainfo_pos = get_pos_of_next_attr (msg);
append_netlink_attribute_nested (msg, IFLA_INFO_DATA);
append_netlink_attribute_uint16 (msg, IFLA_WWAN_LINK_ID, session_id);

/* Use memcpy to preserve byte alignment */
memcpy (&info, (char *) msg->data + datainfo_pos, sizeof (struct rtattr));
info.rta_len = msg->len - datainfo_pos;
memcpy ((char *) msg->data + datainfo_pos, &info, sizeof (struct rtattr));

memcpy (&info, (char *) msg->data + linkinfo_pos, sizeof (struct rtattr));
info.rta_len = msg->len - linkinfo_pos;
memcpy ((char *) msg->data + linkinfo_pos, &info, sizeof (struct rtattr));

return msg;

Edited Jul 26, 2021 by Aleksander Morgado
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: wwan