[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0612d8cc-50ef-4787-bb4d-9661655cdd72@lunn.ch>
Date: Tue, 5 Sep 2023 22:49:07 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Sergio Callegari <sergio.callegari@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: Regression with AX88179A: can't manually set MAC address anymore
On Tue, Sep 05, 2023 at 01:02:22PM +0200, Sergio Callegari wrote:
> Hi, reporting here as the issue I am seeing is cross distro and relevant to
> recent kernels. Hope this is appropriate.
>
> I have a USB hub with AX88179A ethernet. I was able to use it regularly,
> until something changed in recent kernels to have this interface supported
> by the cdc_ncm driver. After this change it is not possible anymore to work
> with a manually set MAC address.
>
> More details:
>
> - before the kernel changes, the interface was supported by a dedicated
> kernel driver. The driver had glitches but was more or less working. The
> main issue was that after some usage the driver stopped working. Could fix
> these glitches with the driver at
> https://github.com/nothingstopsme/AX88179_178A_Linux_Driver
>
> - after the kernel changes, loading the ax88179_178a.ko does not create a
> network device anymore. The interface can be used with the cdc_ncm driver,
> however it is not possible anymore to use a manually set MAC address.
The cdc_ncm driver has a .ndo_set_mac_address implementation which
only changes the MAC address in the net_device structure. The
ax88179_178a driver however performs a hardware access:
/* Set the MAC address */
ret = ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN,
ETH_ALEN, net->dev_addr);
So it is quite likely that with the cdc_ncm driver, the hardware is
still performing ingress filtering based on the manufacturers assigned
MAC address, not the MAC address configured via ip link set.
I don't know the CDC NCM protocol, so i've no idea if this access is
part of the protocol. If it is, the cdc_ncm driver should be extended.
Andrew
Powered by blists - more mailing lists