aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192de
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-09 13:17:46 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-10 23:33:01 -0400
commit2e42e4747ea72943c21551d8a206b51a9893b1e0 (patch)
treea92473c485911b51e1d960c9c8fa34dfc9be0a46 /drivers/net/wireless/rtlwifi/rtl8192de
parent39f1d94d300a58eb3e9b851d077cada4e2fa9d46 (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/rtl8192de')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/trx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index a7f6126e2f86..1666ef7fd87b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -466,12 +466,13 @@ static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw,
466 type = WLAN_FC_GET_TYPE(fc); 466 type = WLAN_FC_GET_TYPE(fc);
467 praddr = hdr->addr1; 467 praddr = hdr->addr1;
468 packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) && 468 packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) &&
469 (!compare_ether_addr(mac->bssid, (cfc & IEEE80211_FCTL_TODS) ? 469 ether_addr_equal(mac->bssid,
470 hdr->addr1 : (cfc & IEEE80211_FCTL_FROMDS) ? 470 (cfc & IEEE80211_FCTL_TODS) ? hdr->addr1 :
471 hdr->addr2 : hdr->addr3)) && (!pstats->hwerror) && 471 (cfc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 :
472 (!pstats->crc) && (!pstats->icv)); 472 hdr->addr3) &&
473 (!pstats->hwerror) && (!pstats->crc) && (!pstats->icv));
473 packet_toself = packet_matchbssid && 474 packet_toself = packet_matchbssid &&
474 (!compare_ether_addr(praddr, rtlefuse->dev_addr)); 475 ether_addr_equal(praddr, rtlefuse->dev_addr);
475 if (ieee80211_is_beacon(fc)) 476 if (ieee80211_is_beacon(fc))
476 packet_beacon = true; 477 packet_beacon = true;
477 _rtl92de_query_rxphystatus(hw, pstats, pdesc, p_drvinfo, 478 _rtl92de_query_rxphystatus(hw, pstats, pdesc, p_drvinfo,