Commit 59e8d56f authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: check receiver address only once

Check only once in mgt_dispatcher that the receiver address is the local
address or the broadcast address. The second identical check can be
removed.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-2-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e3748816
......@@ -431,13 +431,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
ptable->func = &OnAuthClient;
}
if (ptable->func) {
/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
if (memcmp(hdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN) &&
!is_broadcast_ether_addr(hdr->addr1))
return;
if (ptable->func)
ptable->func(padapter, precv_frame);
}
}
static u32 p2p_listen_state_process(struct adapter *padapter, unsigned char *da)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment