mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 06:07:31 -04:00
LinuxKPI: add is_unicast_ether_addr()
Needed by mediatek/mt76 wireless driver. While here adjust the way is_multicast_ether_addr() is implemented to not look weird. [1] Sponsored by: The FreeBSD Foundation Suggested by: emaste [1] Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50152 (cherry picked from commit a4618caa43c16e6e672c27dac1943fd833f8bd8f)
This commit is contained in:
parent
ddb311ffab
commit
2ca8d402df
1 changed files with 7 additions and 1 deletions
|
|
@ -57,10 +57,16 @@ is_zero_ether_addr(const u8 * addr)
|
|||
0x00);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_unicast_ether_addr(const u8 * addr)
|
||||
{
|
||||
return ((addr[0] & 0x01) == 0x00);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_multicast_ether_addr(const u8 * addr)
|
||||
{
|
||||
return (0x01 & addr[0]);
|
||||
return ((addr[0] & 0x01) == 0x01);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
|
|
|||
Loading…
Reference in a new issue