public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Martin Kaiser <martin@kaiser.cx>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	Pavel Skripkin <paskripkin@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Joe Perches <joe@perches.com>
Subject: Re: [PATCH] staging: r8188eu: use ether_addr_equal in OnAction
Date: Mon, 31 Oct 2022 23:00:55 +0100	[thread overview]
Message-ID: <3fc39e22-c352-ecd0-3caa-b2376747b505@gmail.com> (raw)
In-Reply-To: <20221031205140.124682-1-martin@kaiser.cx>

On 10/31/22 21:51, Martin Kaiser wrote:
> Use ether_addr_equal to compare two mac addresses in OnAction.
> 
> Both struct ieee80211_mgmt and struct eeprom_priv's mac_addr component
> are 2-byte aligned.
> 
> Suggested-by: Joe Perches <joe@perches.com>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index e985fc5fc575..6679d4037d6b 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -3823,7 +3823,7 @@ static void OnAction(struct adapter *padapter, struct recv_frame *precv_frame)
>   {
>   	struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
>   
> -	if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN))
> +	if (!ether_addr_equal(myid(&padapter->eeprompriv), mgmt->da))
>   		return;
>   
>   	switch (mgmt->u.action.category) {

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

      reply	other threads:[~2022-10-31 22:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 20:51 [PATCH] staging: r8188eu: use ether_addr_equal in OnAction Martin Kaiser
2022-10-31 22:00 ` Philipp Hortmann [this message]

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=3fc39e22-c352-ecd0-3caa-b2376747b505@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /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