WWAN framework support
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;