[v3,1/5] staging: rtl8188eu: use is_multicast_ether_addr in rtw_security.c
diff mbox series

Message ID 20180810105133.31224-1-straube.linux@gmail.com
State New
Headers show
Series
  • [v3,1/5] staging: rtl8188eu: use is_multicast_ether_addr in rtw_security.c
Related show

Commit Message

Michael Straube Aug. 10, 2018, 10:51 a.m. UTC
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_security.c. In all uses the address array is properly
aligned.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: checked that in all uses of is_multicast_ether_addr
    the address array/memory is properly aligned and
    updated the commit messages

v3: added "Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>"

 drivers/staging/rtl8188eu/core/rtw_security.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Dan Carpenter Aug. 10, 2018, 11:31 a.m. UTC | #1
No no...  I only gave it a Reviewed-by tag because I didn't want you to
resend again...  :P

regards,
dan carpenter
Michael Straube Aug. 10, 2018, 6:21 p.m. UTC | #2
On 08/10/18 13:31, Dan Carpenter wrote:
> No no...  I only gave it a Reviewed-by tag because I didn't want you to
> resend again...  :P

Ah, sorry. So I shouldn't have added the tag?
Should I remove it again? I guess not..
How are those tags (reviewed, acked, etc.) handled normaly?
I'm a bit confused now. ;)

Michael
Dan Carpenter Aug. 10, 2018, 6:47 p.m. UTC | #3
On Fri, Aug 10, 2018 at 08:21:23PM +0200, Michael Straube wrote:
> On 08/10/18 13:31, Dan Carpenter wrote:
> > No no...  I only gave it a Reviewed-by tag because I didn't want you to
> > resend again...  :P
> 
> Ah, sorry. So I shouldn't have added the tag?
> Should I remove it again? I guess not..
> How are those tags (reviewed, acked, etc.) handled normaly?
> I'm a bit confused now. ;)

Greg adds it.

regards,
dan carpenter

Patch
diff mbox series

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c
index 2a48b09ea9ae..a2ec0e403718 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -608,7 +608,7 @@  u32	rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 		if (stainfo != NULL) {
 			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
-			if (IS_MCAST(pattrib->ra))
+			if (is_multicast_ether_addr(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
 			else
 				prwskey = &stainfo->dot118021x_UncstKey.skey[0];
@@ -678,7 +678,7 @@  u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 	if (prxattrib->encrypt == _TKIP_) {
 		stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
 		if (stainfo) {
-			if (IS_MCAST(prxattrib->ra)) {
+			if (is_multicast_ether_addr(prxattrib->ra)) {
 				if (!psecuritypriv->binstallGrpkey) {
 					res = _FAIL;
 					DBG_88E("%s:rx bc/mc packets, but didn't install group key!!!!!!!!!!\n", __func__);
@@ -1250,7 +1250,7 @@  u32	rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 		if (stainfo) {
 			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
-			if (IS_MCAST(pattrib->ra))
+			if (is_multicast_ether_addr(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
 			else
 				prwskey = &stainfo->dot118021x_UncstKey.skey[0];
@@ -1296,7 +1296,7 @@  u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 			struct security_priv *psecuritypriv = &padapter->securitypriv;
 			char iv[8], icv[8];
 
-			if (IS_MCAST(prxattrib->ra)) {
+			if (is_multicast_ether_addr(prxattrib->ra)) {
 				/* in concurrent we should use sw descrypt in group key, so we remove this message */
 				if (!psecuritypriv->binstallGrpkey) {
 					res = _FAIL;