staging: et131x: using is_zero_ether_addr() to simplify the code
Using is_zero_ether_addr() to simplify the code Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1e9ee6f7b6
commit
c14d01b8a1
1 changed files with 1 additions and 6 deletions
|
@ -3955,12 +3955,7 @@ static void et131x_hwaddr_init(struct et131x_adapter *adapter)
|
||||||
* EEPROM then we need to generate the last octet and set it on the
|
* EEPROM then we need to generate the last octet and set it on the
|
||||||
* device
|
* device
|
||||||
*/
|
*/
|
||||||
if (adapter->rom_addr[0] == 0x00 &&
|
if (is_zero_ether_addr(adapter->rom_addr)) {
|
||||||
adapter->rom_addr[1] == 0x00 &&
|
|
||||||
adapter->rom_addr[2] == 0x00 &&
|
|
||||||
adapter->rom_addr[3] == 0x00 &&
|
|
||||||
adapter->rom_addr[4] == 0x00 &&
|
|
||||||
adapter->rom_addr[5] == 0x00) {
|
|
||||||
/*
|
/*
|
||||||
* We need to randomly generate the last octet so we
|
* We need to randomly generate the last octet so we
|
||||||
* decrease our chances of setting the mac address to
|
* decrease our chances of setting the mac address to
|
||||||
|
|
Loading…
Add table
Reference in a new issue