]> git.baikalelectronics.ru Git - kernel.git/commit
net: split eth_mac_addr for better error handling
authorStefan Hajnoczi <stefanha@gmail.com>
Mon, 21 Jan 2013 01:17:22 +0000 (01:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jan 2013 19:07:44 +0000 (14:07 -0500)
commitb001fa5c389c545f8840d12efbd65aa9cf12bc1a
tree04a7a3b6464b582a86d8193692a1588bf7049e53
parent0046a35c77b54c348aa35018fff9d002be31add3
net: split eth_mac_addr for better error handling

When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.

This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/etherdevice.h
net/ethernet/eth.c