* [PATCH] staging: r8188eu: use ether_addr_equal in OnAction
@ 2022-10-31 20:51 Martin Kaiser
2022-10-31 22:00 ` Philipp Hortmann
0 siblings, 1 reply; 2+ messages in thread
From: Martin Kaiser @ 2022-10-31 20:51 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
linux-staging, linux-kernel, Martin Kaiser, Joe Perches
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) {
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: r8188eu: use ether_addr_equal in OnAction
2022-10-31 20:51 [PATCH] staging: r8188eu: use ether_addr_equal in OnAction Martin Kaiser
@ 2022-10-31 22:00 ` Philipp Hortmann
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hortmann @ 2022-10-31 22:00 UTC (permalink / raw)
To: Martin Kaiser, Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
linux-staging, linux-kernel, Joe Perches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-31 22:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 20:51 [PATCH] staging: r8188eu: use ether_addr_equal in OnAction Martin Kaiser
2022-10-31 22:00 ` Philipp Hortmann
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).