diff options
author | Joe Perches <joe@perches.com> | 2012-05-09 13:17:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-10 23:33:01 -0400 |
commit | 2e42e4747ea72943c21551d8a206b51a9893b1e0 (patch) | |
tree | a92473c485911b51e1d960c9c8fa34dfc9be0a46 /drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |
parent | 39f1d94d300a58eb3e9b851d077cada4e2fa9d46 (diff) |
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/rtlwifi/rtl8192ce/trx.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 37b13636a778..3af874e69595 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -508,14 +508,14 @@ static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw, | |||
508 | 508 | ||
509 | packet_matchbssid = | 509 | packet_matchbssid = |
510 | ((IEEE80211_FTYPE_CTL != type) && | 510 | ((IEEE80211_FTYPE_CTL != type) && |
511 | (!compare_ether_addr(mac->bssid, | 511 | ether_addr_equal(mac->bssid, |
512 | (c_fc & IEEE80211_FCTL_TODS) ? | 512 | (c_fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : |
513 | hdr->addr1 : (c_fc & IEEE80211_FCTL_FROMDS) ? | 513 | (c_fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : |
514 | hdr->addr2 : hdr->addr3)) && | 514 | hdr->addr3) && |
515 | (!pstats->hwerror) && (!pstats->crc) && (!pstats->icv)); | 515 | (!pstats->hwerror) && (!pstats->crc) && (!pstats->icv)); |
516 | 516 | ||
517 | packet_toself = packet_matchbssid && | 517 | packet_toself = packet_matchbssid && |
518 | (!compare_ether_addr(praddr, rtlefuse->dev_addr)); | 518 | ether_addr_equal(praddr, rtlefuse->dev_addr); |
519 | 519 | ||
520 | if (ieee80211_is_beacon(fc)) | 520 | if (ieee80211_is_beacon(fc)) |
521 | packet_beacon = true; | 521 | packet_beacon = true; |