diff mbox series

[net-next,1/2] wifi: ath: Use is_multicast_ether_addr() to check multicast Ether address

Message ID 20230814124212.302738-2-ruanjinjie@huawei.com (mailing list archive)
State Accepted
Commit 4c2964ef553b9c7c4ae1803158386a8b169f8f4e
Delegated to: Kalle Valo
Headers show
Series wifi: Use helpers to check multicast Ether addresses | expand

Commit Message

Jinjie Ruan Aug. 14, 2023, 12:42 p.m. UTC
Use is_multicast_ether_addr() to perform the Checking.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/net/wireless/ath/key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Johnson Aug. 14, 2023, 2:40 p.m. UTC | #1
On 8/14/2023 5:42 AM, Ruan Jinjie wrote:
> Use is_multicast_ether_addr() to perform the Checking.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>

> ---
>   drivers/net/wireless/ath/key.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
> index b7b61d4f02ba..21a93fec284d 100644
> --- a/drivers/net/wireless/ath/key.c
> +++ b/drivers/net/wireless/ath/key.c
> @@ -104,7 +104,7 @@ bool ath_hw_keysetmac(struct ath_common *common, u16 entry, const u8 *mac)
>   		 * Not setting this bit allows the hardware to use the key
>   		 * for multicast frame decryption.
>   		 */
> -		if (mac[0] & 0x01)
> +		if (is_multicast_ether_addr(mac))
>   			unicast_flag = 0;
>   
>   		macLo = get_unaligned_le32(mac);
Kalle Valo Aug. 25, 2023, 7:39 a.m. UTC | #2
Ruan Jinjie <ruanjinjie@huawei.com> wrote:

> Use is_multicast_ether_addr() to perform the Checking.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

4c2964ef553b wifi: ath: Use is_multicast_ether_addr() to check multicast Ether address
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
index b7b61d4f02ba..21a93fec284d 100644
--- a/drivers/net/wireless/ath/key.c
+++ b/drivers/net/wireless/ath/key.c
@@ -104,7 +104,7 @@  bool ath_hw_keysetmac(struct ath_common *common, u16 entry, const u8 *mac)
 		 * Not setting this bit allows the hardware to use the key
 		 * for multicast frame decryption.
 		 */
-		if (mac[0] & 0x01)
+		if (is_multicast_ether_addr(mac))
 			unicast_flag = 0;
 
 		macLo = get_unaligned_le32(mac);