diff options
author | Simon Glass <sjg@chromium.org> | 2015-07-06 16:47:55 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:41 -0600 |
commit | b86f795a378fdeb873cdc464367660fb3b49c443 (patch) | |
tree | 55eb85ffe39700247dc4b31b544d49abf33add96 /include/net.h | |
parent | fbc4b8af469459425de72530dbded0ddbe157004 (diff) | |
download | u-boot-imx-b86f795a378fdeb873cdc464367660fb3b49c443.zip u-boot-imx-b86f795a378fdeb873cdc464367660fb3b49c443.tar.gz u-boot-imx-b86f795a378fdeb873cdc464367660fb3b49c443.tar.bz2 |
net: Allow drivers to return -ENOSYS with the write_hwaddr() method
Some drivers may want to implement this method for some of their devices but
not for others. So it is not possible to just leave the operation out of
the table. Drivers could get around this by masquerading as two separate
drivers but that seems unpleasant.
Allow the driver to return an error when it does not want to process the
write_hwaddr() method.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index b9c13f2..d09bec9 100644 --- a/include/net.h +++ b/include/net.h @@ -119,7 +119,9 @@ enum eth_recv_flags { * mcast: Join or leave a multicast group (for TFTP) - optional * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux * on some platforms like ARM). This function expects the - * eth_pdata::enetaddr field to be populated - optional + * eth_pdata::enetaddr field to be populated. The method can + * return -ENOSYS to indicate that this is not implemented for + this hardware - optional. * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a * ROM on the board. This is how the driver should expose it * to the network stack. This function should fill in the |