drivers/net: Convert compare_ether_addr to ether_addr_equal
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
39f1d94d30
commit
2e42e4747e
31 changed files with 85 additions and 86 deletions
|
@ -480,7 +480,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
|
|||
return;
|
||||
|
||||
/* and only beacons from the associated BSSID, please */
|
||||
if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
|
||||
if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
|
||||
return;
|
||||
|
||||
rtlpriv->psc.last_beacon = jiffies;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue