From: Jes Sorensen Date: Fri, 16 May 2014 08:04:37 +0000 (+0200) Subject: staging: rtl8723au: rtw_security.c: Clean up mess of error return code types X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=75f3f039563c85e6dc89e937e253051a07336348;p=linux-beck.git staging: rtl8723au: rtw_security.c: Clean up mess of error return code types Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index fd43e71bf6d6..77709fea856c 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c @@ -610,9 +610,9 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) } /* The hlen isn't include the IV */ -u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, - struct xmit_frame *pxmitframe) -{ /* exclude ICV */ +int rtw_tkip_encrypt23a(struct rtw_adapter *padapter, + struct xmit_frame *pxmitframe) +{ u16 pnl; u32 pnh; u8 rc4key[16]; @@ -622,14 +622,13 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, struct arc4context mycontext; int curfragnum, length; u32 prwskeylen; - u8 *pframe, *payload,*iv,*prwskey; union pn48 dot11txpn; struct sta_info *stainfo; struct pkt_attrib *pattrib = &pxmitframe->attrib; struct security_priv *psecuritypriv = &padapter->securitypriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - u32 res = _SUCCESS; + int res = _SUCCESS; if (!pxmitframe->buf_addr) return _FAIL; @@ -716,10 +715,9 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, } /* The hlen isn't include the IV */ -u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, - struct recv_frame *precvframe) +int rtw_tkip_decrypt23a(struct rtw_adapter *padapter, + struct recv_frame *precvframe) { - /* exclude ICV */ u16 pnl; u32 pnh; u8 rc4key[16]; @@ -734,7 +732,7 @@ u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, struct rx_pkt_attrib *prxattrib = &precvframe->attrib; struct security_priv *psecuritypriv = &padapter->securitypriv; struct sk_buff * skb = precvframe->pkt; - u32 res = _SUCCESS; + int res = _SUCCESS; pframe = skb->data; @@ -1303,7 +1301,8 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) 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 */ /* Intermediate Buffers */ int curfragnum, length; @@ -1314,7 +1313,7 @@ u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitfra struct pkt_attrib *pattrib = &pxmitframe->attrib; struct security_priv *psecuritypriv = &padapter->securitypriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - u32 res = _SUCCESS; + int res = _SUCCESS; if (!pxmitframe->buf_addr) return _FAIL; @@ -1586,7 +1585,8 @@ static int aes_decipher(u8 *key, uint hdrlen, 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 */ struct sta_info *stainfo; struct rx_pkt_attrib *prxattrib = &precvframe->attrib; @@ -1594,7 +1594,7 @@ u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvfra struct sk_buff *skb = precvframe->pkt; int length; u8 *pframe, *prwskey; /* *payload,*iv */ - u32 res = _SUCCESS; + int res = _SUCCESS; pframe = skb->data; /* 4 start to encrypt each fragment */ diff --git a/drivers/staging/rtl8723au/include/rtw_security.h b/drivers/staging/rtl8723au/include/rtw_security.h index 702dd845a3ff..e9e850616359 100644 --- a/drivers/staging/rtl8723au/include/rtw_security.h +++ b/drivers/staging/rtl8723au/include/rtw_security.h @@ -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, u8 *Miccode, u8 priorityi); -u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, +int rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe); -u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter, +int rtw_tkip_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe); void rtw_wep_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe); -u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, +int rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe); -u32 rtw_tkip_decrypt23a(struct rtw_adapter *padapter, +int rtw_tkip_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe); void rtw_wep_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvframe);