Commit 75f3f039 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_security.c: Clean up mess of error return code types

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69632480
...@@ -610,9 +610,9 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) ...@@ -610,9 +610,9 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
} }
/* The hlen isn't include the IV */ /* The hlen isn't include the IV */
u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, int rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe) struct xmit_frame *pxmitframe)
{ /* exclude ICV */ {
u16 pnl; u16 pnl;
u32 pnh; u32 pnh;
u8 rc4key[16]; u8 rc4key[16];
...@@ -622,14 +622,13 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, ...@@ -622,14 +622,13 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
struct arc4context mycontext; struct arc4context mycontext;
int curfragnum, length; int curfragnum, length;
u32 prwskeylen; u32 prwskeylen;
u8 *pframe, *payload,*iv,*prwskey; u8 *pframe, *payload,*iv,*prwskey;
union pn48 dot11txpn; union pn48 dot11txpn;
struct sta_info *stainfo; struct sta_info *stainfo;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
u32 res = _SUCCESS; int res = _SUCCESS;
if (!pxmitframe->buf_addr) if (!pxmitframe->buf_addr)
return _FAIL; return _FAIL;
...@@ -716,10 +715,9 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, ...@@ -716,10 +715,9 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
} }
/* The hlen isn't include the IV */ /* The hlen isn't include the IV */
u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, int rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
struct recv_frame *precvframe) struct recv_frame *precvframe)
{ {
/* exclude ICV */
u16 pnl; u16 pnl;
u32 pnh; u32 pnh;
u8 rc4key[16]; u8 rc4key[16];
...@@ -734,7 +732,7 @@ u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, ...@@ -734,7 +732,7 @@ u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
struct rx_pkt_attrib *prxattrib = &precvframe->attrib; struct rx_pkt_attrib *prxattrib = &precvframe->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct sk_buff * skb = precvframe->pkt; struct sk_buff * skb = precvframe->pkt;
u32 res = _SUCCESS; int res = _SUCCESS;
pframe = skb->data; pframe = skb->data;
...@@ -1303,7 +1301,8 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) ...@@ -1303,7 +1301,8 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
return _SUCCESS; return _SUCCESS;
} }
u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe) int rtw_aes_encrypt23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe)
{ /* exclude ICV */ { /* exclude ICV */
/* Intermediate Buffers */ /* Intermediate Buffers */
int curfragnum, length; int curfragnum, length;
...@@ -1314,7 +1313,7 @@ u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitfra ...@@ -1314,7 +1313,7 @@ u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitfra
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
u32 res = _SUCCESS; int res = _SUCCESS;
if (!pxmitframe->buf_addr) if (!pxmitframe->buf_addr)
return _FAIL; return _FAIL;
...@@ -1586,7 +1585,8 @@ static int aes_decipher(u8 *key, uint hdrlen, ...@@ -1586,7 +1585,8 @@ static int aes_decipher(u8 *key, uint hdrlen,
return res; return res;
} }
u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe) int rtw_aes_decrypt23a(struct rtw_adapter *padapter,
struct recv_frame *precvframe)
{ /* exclude ICV */ { /* exclude ICV */
struct sta_info *stainfo; struct sta_info *stainfo;
struct rx_pkt_attrib *prxattrib = &precvframe->attrib; struct rx_pkt_attrib *prxattrib = &precvframe->attrib;
...@@ -1594,7 +1594,7 @@ u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvfra ...@@ -1594,7 +1594,7 @@ u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvfra
struct sk_buff *skb = precvframe->pkt; struct sk_buff *skb = precvframe->pkt;
int length; int length;
u8 *pframe, *prwskey; /* *payload,*iv */ u8 *pframe, *prwskey; /* *payload,*iv */
u32 res = _SUCCESS; int res = _SUCCESS;
pframe = skb->data; pframe = skb->data;
/* 4 start to encrypt each fragment */ /* 4 start to encrypt each fragment */
......
...@@ -323,15 +323,15 @@ void rtw_secgetmic23a(struct mic_data *pmicdata, u8 *dst); ...@@ -323,15 +323,15 @@ void rtw_secgetmic23a(struct mic_data *pmicdata, u8 *dst);
void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len, void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len,
u8 *Miccode, u8 priorityi); u8 *Miccode, u8 priorityi);
u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, int rtw_aes_encrypt23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe); struct xmit_frame *pxmitframe);
u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, int rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe); struct xmit_frame *pxmitframe);
void rtw_wep_encrypt23a(struct rtw_adapter *padapter, void rtw_wep_encrypt23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe); struct xmit_frame *pxmitframe);
u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, int rtw_aes_decrypt23a(struct rtw_adapter *padapter,
struct recv_frame *precvframe); struct recv_frame *precvframe);
u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, int rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
struct recv_frame *precvframe); struct recv_frame *precvframe);
void rtw_wep_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe); void rtw_wep_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment