mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
netdev: Use util_is_broadcast_address
This commit is contained in:
parent
b55e080b21
commit
8db7725e0b
@ -2824,9 +2824,6 @@ static void netdev_mgmt_frame_event(struct l_genl_msg *msg,
|
|||||||
const struct mmpdu_header *mpdu = NULL;
|
const struct mmpdu_header *mpdu = NULL;
|
||||||
const uint8_t *body;
|
const uint8_t *body;
|
||||||
struct frame_prefix_info info;
|
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))
|
if (!l_genl_attr_init(&attr, msg))
|
||||||
return;
|
return;
|
||||||
@ -2851,10 +2848,9 @@ static void netdev_mgmt_frame_event(struct l_genl_msg *msg,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (memcmp(mpdu->address_1, netdev->addr, 6) &&
|
if (memcmp(mpdu->address_1, netdev->addr, 6) &&
|
||||||
memcmp(mpdu->address_1, bcast_addr, 6))
|
!util_is_broadcast_address(mpdu->address_1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
/* Only match the frame type and subtype like the kernel does */
|
/* Only match the frame type and subtype like the kernel does */
|
||||||
#define FC_FTYPE_STYPE_MASK 0x00fc
|
#define FC_FTYPE_STYPE_MASK 0x00fc
|
||||||
info.frame_type = l_get_le16(mpdu) & FC_FTYPE_STYPE_MASK;
|
info.frame_type = l_get_le16(mpdu) & FC_FTYPE_STYPE_MASK;
|
||||||
|
Loading…
Reference in New Issue
Block a user