staging: rtl8712: r8712_tkip_decrypt(): Change return type
Change return type of r8712_tkip_decrypt from u8 to void as the return value is never used. Modify or remove return statements accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190802064212.30476-6-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dcca75a495
commit
f8dbe3f0ac
|
@ -636,7 +636,7 @@ u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The hlen doesn't include the IV */
|
/* The hlen doesn't include the IV */
|
||||||
u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe)
|
void r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe)
|
||||||
{ /* exclude ICV */
|
{ /* exclude ICV */
|
||||||
u16 pnl;
|
u16 pnl;
|
||||||
u32 pnh;
|
u32 pnh;
|
||||||
|
@ -670,7 +670,7 @@ u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe)
|
||||||
prwskey = &psecuritypriv->XGrpKey[
|
prwskey = &psecuritypriv->XGrpKey[
|
||||||
((idx >> 6) & 0x3) - 1].skey[0];
|
((idx >> 6) & 0x3) - 1].skey[0];
|
||||||
if (!psecuritypriv->binstallGrpkey)
|
if (!psecuritypriv->binstallGrpkey)
|
||||||
return _FAIL;
|
return;
|
||||||
} else {
|
} else {
|
||||||
prwskey = &stainfo->x_UncstKey.skey[0];
|
prwskey = &stainfo->x_UncstKey.skey[0];
|
||||||
}
|
}
|
||||||
|
@ -686,16 +686,8 @@ u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe)
|
||||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||||
*((__le32 *)crc) = cpu_to_le32(getcrc32(payload,
|
*((__le32 *)crc) = cpu_to_le32(getcrc32(payload,
|
||||||
length - 4));
|
length - 4));
|
||||||
if (crc[3] != payload[length - 1] ||
|
|
||||||
crc[2] != payload[length - 2] ||
|
|
||||||
crc[1] != payload[length - 3] ||
|
|
||||||
crc[0] != payload[length - 4])
|
|
||||||
return _FAIL;
|
|
||||||
} else {
|
|
||||||
return _FAIL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 3 =====AES related===== */
|
/* 3 =====AES related===== */
|
||||||
|
|
|
@ -210,7 +210,7 @@ u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe);
|
||||||
u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe);
|
u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe);
|
||||||
void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe);
|
void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe);
|
||||||
u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe);
|
u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe);
|
||||||
u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe);
|
void r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe);
|
||||||
void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe);
|
void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe);
|
||||||
void r8712_use_tkipkey_handler(struct timer_list *t);
|
void r8712_use_tkipkey_handler(struct timer_list *t);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue