staging: rtl8712: fix checkpatch warnings
This patch fixes multiline dereference warnings in rtl871x_xmit.c: WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrptxmickey' 379: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:379: + psecuritypriv-> + XGrptxmickey[psecuritypriv-> WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrpKeyid' 380: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:380: + XGrptxmickey[psecuritypriv-> + XGrpKeyid].skey); Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/ddd296c34c5b0206dfe5cf2e6cbe40e0a118c257.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
45afa5637b
commit
f476c5901f
|
@ -351,7 +351,7 @@ static int xmitframe_addmic(struct _adapter *padapter,
|
|||
struct sta_info *stainfo;
|
||||
struct qos_priv *pqospriv = &(padapter->mlmepriv.qospriv);
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
struct security_priv *psecpriv = &padapter->securitypriv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
|
||||
bool bmcst = is_multicast_ether_addr(pattrib->ra);
|
||||
|
@ -369,15 +369,14 @@ static int xmitframe_addmic(struct _adapter *padapter,
|
|||
0x0, 0x0};
|
||||
pframe = pxmitframe->buf_addr + TXDESC_OFFSET;
|
||||
if (bmcst) {
|
||||
if (!memcmp(psecuritypriv->XGrptxmickey
|
||||
[psecuritypriv->XGrpKeyid].skey,
|
||||
if (!memcmp(psecpriv->XGrptxmickey
|
||||
[psecpriv->XGrpKeyid].skey,
|
||||
null_key, 16))
|
||||
return -ENOMEM;
|
||||
/*start to calculate the mic code*/
|
||||
r8712_secmicsetkey(&micdata,
|
||||
psecuritypriv->
|
||||
XGrptxmickey[psecuritypriv->
|
||||
XGrpKeyid].skey);
|
||||
psecpriv->XGrptxmickey
|
||||
[psecpriv->XGrpKeyid].skey);
|
||||
} else {
|
||||
if (!memcmp(&stainfo->tkiptxmickey.skey[0],
|
||||
null_key, 16))
|
||||
|
@ -417,7 +416,7 @@ static int xmitframe_addmic(struct _adapter *padapter,
|
|||
length = pattrib->last_txcmdsz -
|
||||
pattrib->hdrlen -
|
||||
pattrib->iv_len -
|
||||
((psecuritypriv->sw_encrypt)
|
||||
((psecpriv->sw_encrypt)
|
||||
? pattrib->icv_len : 0);
|
||||
r8712_secmicappend(&micdata, payload,
|
||||
length);
|
||||
|
@ -425,7 +424,7 @@ static int xmitframe_addmic(struct _adapter *padapter,
|
|||
} else {
|
||||
length = pxmitpriv->frag_len -
|
||||
pattrib->hdrlen - pattrib->iv_len -
|
||||
((psecuritypriv->sw_encrypt) ?
|
||||
((psecpriv->sw_encrypt) ?
|
||||
pattrib->icv_len : 0);
|
||||
r8712_secmicappend(&micdata, payload,
|
||||
length);
|
||||
|
|
Loading…
Reference in New Issue