diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2024-08-08 00:00:00 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2024-08-08 16:39:14 +0000 |
| commit | a1295b24842d209e6bf93a4823193d56ad2db064 (patch) | |
| tree | dd1769751fcf3ff0236cf1b99ee499d95a53b92e /sys/compat/linuxkpi/common/include/linux/etherdevice.h | |
| parent | 57cc80e6e39ecef3d11b7a787866f79ad1310da1 (diff) | |
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/etherdevice.h')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/etherdevice.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h index 89cd4c8e0ba0..5d3df744ae0e 100644 --- a/sys/compat/linuxkpi/common/include/linux/etherdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h @@ -53,7 +53,8 @@ struct ethtool_modinfo { static inline bool is_zero_ether_addr(const u8 * addr) { - return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00); + return ((addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]) == + 0x00); } static inline bool @@ -65,7 +66,8 @@ is_multicast_ether_addr(const u8 * addr) static inline bool is_broadcast_ether_addr(const u8 * addr) { - return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff)); + return ((addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == + 0xff); } static inline bool |
