linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org,
	Chaoming Li <chaoming_li@realsil.com.cn>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/11] rtlwifi: use ether_addr_equal_64bits
Date: Mon, 30 Dec 2013 15:08:47 -0600	[thread overview]
Message-ID: <52C1E0DF.2000800@lwfinger.net> (raw)
In-Reply-To: <1388427307-8691-7-git-send-email-Julia.Lawall@lip6.fr>

On 12/30/2013 12:15 PM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
> used when each argument is an array within a structure that contains at
> least two bytes of data beyond the array.
>
> The structures involved are:
> ieee80211_hdr defined in include/linux/ieee80211.h and
> rtl_mac defined in drivers/net/wireless/rtlwifi/wifi.h
>
> This was done using Coccinelle (http://coccinelle.lip6.fr/).
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry


>
> ---
> The semantic patch used is rather long and can be found in message 0 of
> this patch series.
>
>   drivers/net/wireless/rtlwifi/base.c |    4 ++--
>   drivers/net/wireless/rtlwifi/ps.c   |    4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
> index 0d81f76..deedae3 100644
> --- a/drivers/net/wireless/rtlwifi/ps.c
> +++ b/drivers/net/wireless/rtlwifi/ps.c
> @@ -478,7 +478,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
>   		return;
>
>   	/* and only beacons from the associated BSSID, please */
> -	if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
> +	if (!ether_addr_equal_64bits(hdr->addr3, rtlpriv->mac80211.bssid))
>   		return;
>
>   	rtlpriv->psc.last_beacon = jiffies;
> @@ -923,7 +923,7 @@ void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len)
>   		return;
>
>   	/* and only beacons from the associated BSSID, please */
> -	if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
> +	if (!ether_addr_equal_64bits(hdr->addr3, rtlpriv->mac80211.bssid))
>   		return;
>
>   	/* check if this really is a beacon */
> diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
> index fcf9b62..d63a12c 100644
> --- a/drivers/net/wireless/rtlwifi/base.c
> +++ b/drivers/net/wireless/rtlwifi/base.c
> @@ -1293,7 +1293,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
>   		return;
>
>   	/* and only beacons from the associated BSSID, please */
> -	if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
> +	if (!ether_addr_equal_64bits(hdr->addr3, rtlpriv->mac80211.bssid))
>   		return;
>
>   	rtlpriv->link_info.bcn_rx_inperiod++;
> @@ -1781,7 +1781,7 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
>   		return;
>
>   	/* and only beacons from the associated BSSID, please */
> -	if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
> +	if (!ether_addr_equal_64bits(hdr->addr3, rtlpriv->mac80211.bssid))
>   		return;
>
>   	if (rtl_find_221_ie(hw, data, len))
>
>


  reply	other threads:[~2013-12-30 21:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 18:14 [PATCH 0/11] use ether_addr_equal_64bits Julia Lawall
2013-12-30 18:14 ` [PATCH 1/11] rt2x00: " Julia Lawall
2013-12-31 16:44   ` Gertjan van Wingerde
2013-12-30 18:14 ` [PATCH 2/11] ath5k: " Julia Lawall
2013-12-30 18:14 ` [PATCH 3/11] mac80211: " Julia Lawall
2013-12-30 18:10   ` Christian Lamparter
2013-12-30 18:15 ` [PATCH 4/11] " Julia Lawall
2013-12-30 18:56   ` Johannes Berg
2013-12-30 19:58     ` Julia Lawall
2013-12-30 21:25       ` Johannes Berg
2013-12-30 21:57         ` Henrique de Moraes Holschuh
2013-12-30 23:13           ` Johannes Berg
2013-12-30 23:17             ` Joe Perches
2013-12-31  6:32               ` Julia Lawall
2013-12-31 15:54                 ` Ben Greear
2013-12-31 16:09                   ` Julia Lawall
2013-12-31 16:27                     ` Ben Greear
2013-12-31 16:40                       ` Julia Lawall
2014-01-06  9:05                         ` Johannes Berg
2014-01-06  9:09                           ` Julia Lawall
2014-01-06 10:17                             ` Johannes Berg
2014-01-06  8:48               ` Julia Lawall
2014-01-06  8:59                 ` Joe Perches
2014-01-06  9:04                   ` Julia Lawall
2014-01-06  9:07                     ` Johannes Berg
2014-01-06  9:20                       ` Julia Lawall
2013-12-31  6:26             ` Emmanuel Grumbach
2014-01-06  9:24               ` Geert Uytterhoeven
2014-01-06  9:35                 ` Julia Lawall
2014-01-06 15:18                 ` Eric Dumazet
2014-01-06 10:48             ` Dan Carpenter
2014-01-17 10:18               ` Dan Carpenter
2013-12-30 18:15 ` [PATCH 5/11] mwl8k: " Julia Lawall
2013-12-30 18:15 ` [PATCH 6/11] rtlwifi: " Julia Lawall
2013-12-30 21:08   ` Larry Finger [this message]
2013-12-30 18:15 ` [PATCH 7/11] iwlegacy: " Julia Lawall
2013-12-30 18:15 ` [PATCH 8/11] " Julia Lawall
2013-12-30 18:15 ` [PATCH 9/11] ipw2x00: " Julia Lawall
2013-12-30 18:15 ` [PATCH 10/11] at76c50x-usb: " Julia Lawall
2013-12-30 18:15 ` [PATCH 11/11] carl9170: " Julia Lawall
2013-12-30 18:10   ` Christian Lamparter
2014-01-17 21:24 ` [PATCH 0/11] " Pavel Machek
2014-01-17 22:02   ` Oleksij Rempel
2014-01-17 22:43     ` Pavel Machek

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=52C1E0DF.2000800@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=Julia.Lawall@lip6.fr \
    --cc=chaoming_li@realsil.com.cn \
    --cc=kernel-janitors@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).