Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: Convert compare_ether_addr to ether_addr_equal by hand

spatch/coccinelle isn't perfect. It doesn't understand
__aligned(x) and doesn't convert functions it can't parse.

Convert the remaining compare_ether_addr uses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
3bc7945e b203ca39

+3 -3
+2 -2
net/mac80211/rx.c
··· 1714 1714 * of whether the frame was encrypted or not. 1715 1715 */ 1716 1716 if (ehdr->h_proto == rx->sdata->control_port_protocol && 1717 - (compare_ether_addr(ehdr->h_dest, rx->sdata->vif.addr) == 0 || 1718 - compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0)) 1717 + (ether_addr_equal(ehdr->h_dest, rx->sdata->vif.addr) || 1718 + ether_addr_equal(ehdr->h_dest, pae_group_addr))) 1719 1719 return true; 1720 1720 1721 1721 if (ieee80211_802_1x_port_control(rx) ||
+1 -1
net/mac80211/sta_info.h
··· 501 501 nxt = _sta ? rcu_dereference(_sta->hnext) : NULL \ 502 502 ) \ 503 503 /* compare address and run code only if it matches */ \ 504 - if (compare_ether_addr(_sta->sta.addr, (_addr)) == 0) 504 + if (ether_addr_equal(_sta->sta.addr, (_addr))) 505 505 506 506 /* 507 507 * Get STA info by index, BROKEN!