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:
committed by
David S. Miller
parent
39f1d94d30
commit
2e42e4747e
@@ -1751,7 +1751,7 @@ static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
* following workaround is necessary. If the TX frame is an
|
||||
* authentication frame extract the bssid and send the CMD_JOIN. */
|
||||
if (mgmt->frame_control & cpu_to_le16(IEEE80211_STYPE_AUTH)) {
|
||||
if (compare_ether_addr(priv->bssid, mgmt->bssid)) {
|
||||
if (!ether_addr_equal(priv->bssid, mgmt->bssid)) {
|
||||
memcpy(priv->bssid, mgmt->bssid, ETH_ALEN);
|
||||
ieee80211_queue_work(hw, &priv->work_join_bssid);
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
Reference in New Issue
Block a user