• Bjorn Andersson's avatar
    net: usb: ax88179_178a: Implement ethtool_ops set_eeprom · 78734404
    Bjorn Andersson authored
    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: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    78734404
ax88179_178a.c 47 KB