提交 e5c3ddd3 编写于 作者: M Martin Kaiser 提交者: Greg Kroah-Hartman

staging: r8188eu: use ether_addr_equal for address comparison

We can use ether_addr_equal instead of memcmp in
update_recvframe_phyinfo_88e for comparing the incoming frame's
destination address with our local address.

Both struct ieee80211_hdr and struct eeprom_priv's mac_addr component are
2-byte aligned.
Suggested-by: NJoe Perches <joe@perches.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: NMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221031205412.124871-2-martin@kaiser.cxSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ae85931f
......@@ -126,8 +126,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat
get_bssid(&padapter->mlmepriv), ETH_ALEN));
pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID &&
(!memcmp(ieee80211_get_DA(hdr),
myid(&padapter->eeprompriv), ETH_ALEN));
ether_addr_equal(ieee80211_get_DA(hdr),
myid(&padapter->eeprompriv));
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && ieee80211_is_beacon(fc);
if (pkt_info.bPacketBeacon) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册