New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 651247 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Modify cdc-ncm driver to obtain initial MAC address via GET_NET_ADDRESS request

Project Member Reported by benchan@chromium.org, Sep 28 2016

Issue description

When debugging issue 457364, we observed that the MAC address of a MBIM modem keeps changing across reboots. The issue lies in the current implementation of the cdc-ncm driver in Linux kernel.

When binding the cdc_ncm driver to a USB device that exposes a CDC NCM function, the driver sets the MAC address of the associated net device only if the device also implements the CDC ECM function as the associated Ethernet Functional Descriptor provides the EUI-48 address via the iMACAddress field.

However, a NCM device doesn't always implement the ECM function. For example, a MBIM device may not implement the ECM function, or even if it does, the ECM function may be implemented under a different USB configuration. In those cases, the net device uses a randomized MAC address generated in the usbnet driver.

The MAC address is typically a useful identifier that we want to obtain it reliably. Fortunately, CDC NCM supports a class-specific "GET_NET_ADDRESS" request for retrieving the current EUI-48 address, which is expected to be same as the permanent EUI-48 address given by the iMACAddress field on the Ethernet Functional Descriptor unless a "SET_NET_ADDRESS" request is issued to change the current EUI-48 address.

This issue proposes modifying the cdc-ncm driver to retrieve the EUI-48 address via a GET_NET_ADDRESS request during binding, and if the request succeeds, assign the EUI-48 address as the initial MAC address on the associated net device, which addresses the situation when no Ethernet Functional Descriptor is available. If the Ethernet Functional Descriptor is available, the initial MAC address will still be updated according to the iMACAddress field. In the worst case when the EUI-48 address can't be obtained via GET_NET_ADDRESS or iMACAddress, the randomized MAC address is used.
 
Status: Started (was: Assigned)
Here's the proposed fix: https://chromium-review.googlesource.com/#/c/390361/
Blocking: -457364
Status: Wontfix (was: Started)
https://chromium-review.googlesource.com/#/c/390361/ tries to use NCM GET_NET_ADDRESS control command, as a fallback, but unfortunately, GET_NET_ADDRESS isn't always available. Instead of trying to get a consistent MAC address from the modem, shill has been modified to use other modem identifiers (https://chromium-review.googlesource.com/#/c/403519/). Closing this bug as WontFix.

Sign in to add a comment