summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/at76c50x-usb.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-09 21:17:46 +0400
committerDavid S. Miller <davem@davemloft.net>2012-05-11 07:33:01 +0400
commit2e42e4747ea72943c21551d8a206b51a9893b1e0 (patch)
treea92473c485911b51e1d960c9c8fa34dfc9be0a46 /drivers/net/wireless/at76c50x-usb.c
parent39f1d94d300a58eb3e9b851d077cada4e2fa9d46 (diff)
downloadlinux-2e42e4747ea72943c21551d8a206b51a9893b1e0.tar.xz
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>
Diffstat (limited to 'drivers/net/wireless/at76c50x-usb.c')
-rw-r--r--drivers/net/wireless/at76c50x-usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index faa8bcb4aac1..5ad74c85a038 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -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);