rtl8188eu: More sparse cleanups

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-05-29 14:26:48 -05:00
parent aae7d37e24
commit 61b38d5714
7 changed files with 88 additions and 153 deletions

View file

@ -148,6 +148,7 @@ int _rtw_write8(_adapter *adapter, u32 addr, u8 val)
return RTW_STATUS_CODE(ret);
}
int _rtw_write16(_adapter *adapter, u32 addr, u16 val)
{
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
@ -155,11 +156,12 @@ int _rtw_write16(_adapter *adapter, u32 addr, u16 val)
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
int ret;
__le16 ival;
_func_enter_;
_write16 = pintfhdl->io_ops._write16;
val = rtw_cpu_to_le16(val);
ret = _write16(pintfhdl, addr, val);
ival = rtw_cpu_to_le16(val);
ret = _write16(pintfhdl, addr, ival);
_func_exit_;
return RTW_STATUS_CODE(ret);
@ -171,11 +173,12 @@ int _rtw_write32(_adapter *adapter, u32 addr, u32 val)
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
int ret;
__le32 ival;
_func_enter_;
_write32 = pintfhdl->io_ops._write32;
val = rtw_cpu_to_le32(val);
ret = _write32(pintfhdl, addr, val);
ival = rtw_cpu_to_le32(val);
ret = _write32(pintfhdl, addr, ival);
_func_exit_;
return RTW_STATUS_CODE(ret);

View file

@ -19,6 +19,7 @@
******************************************************************************/
#include <drv_types.h>
#include "rtw_led.h"
//
// Description:
@ -139,7 +140,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed);
#define CONFIG_LED_REMOVE_HAL
void
static void
SwLedBlink(
PLED_871x pLed
)
@ -257,7 +258,7 @@ SwLedBlink(
}
}
void
static void
SwLedBlink1(
PLED_871x pLed
)
@ -469,7 +470,7 @@ SwLedBlink1(
}
void
static void
SwLedBlink2(
PLED_871x pLed
)
@ -591,7 +592,7 @@ SwLedBlink2(
}
void
static void
SwLedBlink3(
PLED_871x pLed
)
@ -762,7 +763,7 @@ SwLedBlink3(
}
void
static void
SwLedBlink4(
PLED_871x pLed
)
@ -961,7 +962,7 @@ SwLedBlink4(
}
void
static void
SwLedBlink5(
PLED_871x pLed
)
@ -1079,7 +1080,7 @@ SwLedBlink5(
}
void
static void
SwLedBlink6(
PLED_871x pLed
)

View file

@ -1122,9 +1122,10 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame)
{
#ifdef CONFIG_AP_MODE
_irqL irqL;
unsigned int auth_mode, seq, ie_len;
unsigned int auth_mode, ie_len;
__le16 seq;
unsigned char *sa, *p;
u16 algorithm;
__le16 algorithm;
int status;
static struct sta_info stat;
struct sta_info *pstat=NULL;
@ -2240,7 +2241,7 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame)
unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame)
{
unsigned short reason;
__le16 reason;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);

View file

@ -212,7 +212,7 @@ _func_enter_;
length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
*((unsigned long *)crc)=cpu_to_le32(getcrc32(payload,length));
*((__le32 *)crc)=cpu_to_le32(getcrc32(payload,length));
arcfour_init(&mycontext, wepkey,3+keylength);
arcfour_encrypt(&mycontext, payload, payload, length);
@ -222,7 +222,7 @@ _func_enter_;
else
{
length=pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len ;
*((unsigned long *)crc)=cpu_to_le32(getcrc32(payload,length));
*((__le32 *)crc)=cpu_to_le32(getcrc32(payload,length));
arcfour_init(&mycontext, wepkey,3+keylength);
arcfour_encrypt(&mycontext, payload, payload, length);
arcfour_encrypt(&mycontext, payload+length, crc, 4);
@ -725,8 +725,10 @@ _func_enter_;
if ((curfragnum+1)==pattrib->nr_frags){ //4 the last fragment
length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
RT_TRACE(_module_rtl871x_security_c_,_drv_info_,("pattrib->iv_len =%x, pattrib->icv_len =%x\n", pattrib->iv_len,pattrib->icv_len));
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
RT_TRACE(_module_rtl871x_security_c_, _drv_info_,
("pattrib->iv_len =%x, pattrib->icv_len =%x\n",
pattrib->iv_len,pattrib->icv_len));
*((__le32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
arcfour_init(&mycontext, rc4key,16);
arcfour_encrypt(&mycontext, payload, payload, length);
@ -735,7 +737,7 @@ _func_enter_;
}
else{
length=pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len ;
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
*((__le32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
arcfour_init(&mycontext,rc4key,16);
arcfour_encrypt(&mycontext, payload, payload, length);
arcfour_encrypt(&mycontext, payload+length, crc, 4);