mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "David S. Miller" <davem@davemloft.net>,
	"John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 09/13] mac80211: Convert compare_ether_addr to ether_addr_equal by hand
Date: Tue,  8 May 2012 21:56:53 -0700	[thread overview]
Message-ID: <95ab271a19bf0fc4c4fa007e95b76edc8d6b5611.1336538938.git.joe@perches.com> (raw)
In-Reply-To: <cover.1336538937.git.joe@perches.com>

spatch/coccinelle isn't perfect.  It doesn't understand
__aligned(x) and doesn't convert functions it can't parse.

Convert the remaining compare_ether_addr uses.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/mac80211/rx.c       |    4 ++--
 net/mac80211/sta_info.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 26bfd6f..d722c40 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1714,8 +1714,8 @@ static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx, __le16 fc)
 	 * of whether the frame was encrypted or not.
 	 */
 	if (ehdr->h_proto == rx->sdata->control_port_protocol &&
-	    (compare_ether_addr(ehdr->h_dest, rx->sdata->vif.addr) == 0 ||
-	     compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0))
+	    (ether_addr_equal(ehdr->h_dest, rx->sdata->vif.addr) ||
+	     ether_addr_equal(ehdr->h_dest, pae_group_addr)))
 		return true;
 
 	if (ieee80211_802_1x_port_control(rx) ||
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index f75f5d9..e920b22 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -501,7 +501,7 @@ void for_each_sta_info_type_check(struct ieee80211_local *local,
 		nxt = _sta ? rcu_dereference(_sta->hnext) : NULL	\
 	     )								\
 	/* compare address and run code only if it matches */		\
-	if (compare_ether_addr(_sta->sta.addr, (_addr)) == 0)
+	if (ether_addr_equal(_sta->sta.addr, (_addr)))
 
 /*
  * Get STA info by index, BROKEN!
-- 
1.7.8.111.gad25c.dirty


  parent reply	other threads:[~2012-05-09  4:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  4:56 [PATCH 00/13] net: Add and use ether_addr_equal Joe Perches
2012-05-09  4:56 ` [PATCH 01/13] etherdevice.h: Add ether_addr_equal Joe Perches
2012-05-09  4:56 ` [PATCH 02/13] 802: Convert compare_ether_addr to ether_addr_equal Joe Perches
2012-05-09  4:56 ` [PATCH 03/13] 8021q: " Joe Perches
2012-05-09  4:56 ` [PATCH 04/13] bridge: netfilter: " Joe Perches
2012-05-09 15:07   ` Stephen Hemminger
2012-05-09  4:56 ` [PATCH 05/13] bridge: " Joe Perches
2012-05-09  4:56 ` [PATCH 06/13] atm: " Joe Perches
2012-05-09  4:56 ` [PATCH 07/13] bluetooth: " Joe Perches
2012-05-09  4:56 ` [PATCH 08/13] mac80211: " Joe Perches
2012-05-09  4:56 ` Joe Perches [this message]
2012-05-09  4:56 ` [PATCH 10/13] netfilter: " Joe Perches
2012-05-09  4:56 ` [PATCH 11/13] wireless: " Joe Perches
2012-05-09  4:56 ` [PATCH 12/13] wireless: Convert compare_ether_addr to ether_addr_equal by hand Joe Perches
2012-05-09  4:56 ` [PATCH 13/13] dsa: Convert compare_ether_addr to ether_addr_equal Joe Perches
2012-05-10  1:21 ` [PATCH 00/13] net: Add and use ether_addr_equal David Miller
2012-05-10  1:48   ` Joe Perches
2012-05-10  1:53     ` David Miller
2012-05-10  6:48   ` Johannes Berg
2012-05-10  6:54     ` Joe Perches
2012-05-10  6:56       ` Johannes Berg
2012-05-10  7:08         ` Emmanuel Grumbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95ab271a19bf0fc4c4fa007e95b76edc8d6b5611.1336538938.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®