netdev: Use util_is_broadcast_address

This commit is contained in:
Andrew Zaborowski 2017-09-22 05:06:32 +02:00 committed by Denis Kenzior
parent b55e080b21
commit 8db7725e0b
1 changed files with 1 additions and 5 deletions

View File

@ -2824,9 +2824,6 @@ static void netdev_mgmt_frame_event(struct l_genl_msg *msg,
const struct mmpdu_header *mpdu = NULL;
const uint8_t *body;
struct frame_prefix_info info;
static const uint8_t bcast_addr[6] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
if (!l_genl_attr_init(&attr, msg))
return;
@ -2851,10 +2848,9 @@ static void netdev_mgmt_frame_event(struct l_genl_msg *msg,
return;
if (memcmp(mpdu->address_1, netdev->addr, 6) &&
memcmp(mpdu->address_1, bcast_addr, 6))
!util_is_broadcast_address(mpdu->address_1))
return;
/* Only match the frame type and subtype like the kernel does */
#define FC_FTYPE_STYPE_MASK 0x00fc
info.frame_type = l_get_le16(mpdu) & FC_FTYPE_STYPE_MASK;