]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: usb: ax88179_178a: Implement ethtool_ops set_eeprom
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 28 Apr 2020 07:01:39 +0000 (00:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 03:45:35 +0000 (20:45 -0700)
commit78734404ef9c133eac70339415c8028dbe19109a
tree7c09b9640abbe5fc752abe766d79ec5c6bffa206
parent97fff7c8de1e54e5326dfeb66085796864bceb64
net: usb: ax88179_178a: Implement ethtool_ops set_eeprom

The vendor driver does upon failing to read a valid MAC address from
EEPROM write the netdev's address back to EEPROM and invoking a EEPROM
reload operation. Based on this we can implement the ethtool_ops
set_eeprom and provide the means to populate the EEPROM from within
Linux.

It's worth noting that ax88179_get_eeprom() will return some default
data unless the content of the EEPROM is deemed "complete", so until the
EEPROM is fully populated (e.g. by running ethtool -e | ethtool -E)
data written with ax88179_set_eeprom() will appear not to stick.

The implementation is based on asix_set_eeprom(), from asix_common.c

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/ax88179_178a.c