Skip to content
Commit f30e25a9 authored by Petko Manolov's avatar Petko Manolov Committed by David S. Miller
Browse files

net: usb: pegasus: Proper error handing when setting pegasus' MAC address



v2:

If reading the MAC address from eeprom fail don't throw an error, use randomly
generated MAC instead.  Either way the adapter will soldier on and the return
type of set_ethernet_addr() can be reverted to void.

v1:

Fix a bug in set_ethernet_addr() which does not take into account possible
errors (or partial reads) returned by its helpers.  This can potentially lead to
writing random data into device's MAC address registers.

Signed-off-by: default avatarPetko Manolov <petko.manolov@konsulko.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a93bdcb9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment