1
0
Fork 0

staging: rtl8723au: Eliminate RTW_STATUS_CODE23a()

Inline the parsing of status codes. Long term we should pass back the
proper status codes and get rid of the ugly _FAIL/_SUCCESS mess. This
is one small step in that direction.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wifi-calibration
Jes Sorensen 2014-05-09 15:04:00 +02:00 committed by Greg Kroah-Hartman
parent 794ff0530e
commit be4c50604d
3 changed files with 16 additions and 17 deletions

View File

@ -72,7 +72,10 @@ int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
ret = io_ops->_write8(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
if (ret < 0)
return _FAIL;
else
return _SUCCESS;
}
int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
@ -82,7 +85,10 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
ret = io_ops->_write16(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
if (ret < 0)
return _FAIL;
else
return _SUCCESS;
}
int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
@ -92,7 +98,10 @@ int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
ret = io_ops->_write32(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
if (ret < 0)
return _FAIL;
else
return _SUCCESS;
}
int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
@ -102,7 +111,10 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat
ret = io_ops->_writeN(adapter, addr, length, pdata);
return RTW_STATUS_CODE23a(ret);
if (ret < 0)
return _FAIL;
else
return _SUCCESS;
}
void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
{

View File

@ -126,8 +126,6 @@ static inline u32 CHKBIT(u32 x)
#define BIT35 0x0800000000
#define BIT36 0x1000000000
int RTW_STATUS_CODE23a(int error_code);
extern unsigned char REALTEK_96B_IE23A[];
extern unsigned char MCS_rate_2R23A[16];
extern unsigned char WPA_TKIP_CIPHER23A[4];

View File

@ -20,17 +20,6 @@
#include <drv_types.h>
#include <recv_osdep.h>
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE23a
* @return: one of RTW_STATUS_CODE23a
*/
inline int RTW_STATUS_CODE23a(int error_code)
{
if (error_code >= 0)
return _SUCCESS;
return _FAIL;
}
void _rtw_init_queue23a(struct rtw_queue *pqueue)
{
INIT_LIST_HEAD(&pqueue->queue);