rtl8188eu: Fix checkpatch ERRORS in core/rtw_iol.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-29 11:54:09 -05:00
parent ee5b8bfeeb
commit dc4ccb5db1

View file

@ -27,12 +27,14 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
if ((xmit_frame = rtw_alloc_xmitframe(pxmitpriv)) == NULL) { xmit_frame = rtw_alloc_xmitframe(pxmitpriv);
if (xmit_frame == NULL) {
DBG_88E("%s rtw_alloc_xmitframe return null\n", __func__); DBG_88E("%s rtw_alloc_xmitframe return null\n", __func__);
goto exit; goto exit;
} }
if ((xmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL) { xmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if (xmitbuf == NULL) {
DBG_88E("%s rtw_alloc_xmitbuf return null\n", __func__); DBG_88E("%s rtw_alloc_xmitbuf return null\n", __func__);
rtw_free_xmitframe(pxmitpriv, xmit_frame); rtw_free_xmitframe(pxmitpriv, xmit_frame);
xmit_frame = NULL; xmit_frame = NULL;
@ -48,13 +50,12 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
update_mgntframe_attrib(adapter, pattrib); update_mgntframe_attrib(adapter, pattrib);
pattrib->qsel = 0x10;/* Beacon */ pattrib->qsel = 0x10;/* Beacon */
pattrib->subtype = WIFI_BEACON; pattrib->subtype = WIFI_BEACON;
pattrib->pktlen = pattrib->last_txcmdsz = 0; pattrib->pktlen = 0;
pattrib->last_txcmdsz = 0;
exit: exit:
return xmit_frame; return xmit_frame;
} }
int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len) int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len)
{ {
struct pkt_attrib *pattrib = &xmit_frame->attrib; struct pkt_attrib *pattrib = &xmit_frame->attrib;
@ -66,8 +67,8 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
/* check if the io_buf can accommodate new cmds */ /* check if the io_buf can accommodate new cmds */
if (ori_len + cmd_len + 8 > MAX_XMITBUF_SZ) { if (ori_len + cmd_len + 8 > MAX_XMITBUF_SZ) {
DBG_88E("%s %u is large than MAX_XMITBUF_SZ:%u, can't accommodate new cmds\n", __func__ DBG_88E("%s %u is large than MAX_XMITBUF_SZ:%u, can't accommodate new cmds\n",
, ori_len + cmd_len + 8, MAX_XMITBUF_SZ); __func__ , ori_len + cmd_len + 8, MAX_XMITBUF_SZ);
return _FAIL; return _FAIL;
} }
@ -97,6 +98,7 @@ int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary)
{ {
return _SUCCESS; return _SUCCESS;
} }
int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8 mask) int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8 mask)
{ {
struct ioreg_cfg cmd = {8, IOREG_CMD_WB_REG, 0x0, 0x0, 0x0}; struct ioreg_cfg cmd = {8, IOREG_CMD_WB_REG, 0x0, 0x0, 0x0};
@ -104,12 +106,10 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8
cmd.address = cpu_to_le16(addr); cmd.address = cpu_to_le16(addr);
cmd.data = cpu_to_le32(value); cmd.data = cpu_to_le32(value);
if (mask!=0xFF) if (mask != 0xFF) {
{
cmd.length = 12; cmd.length = 12;
cmd.mask = cpu_to_le32(mask); cmd.mask = cpu_to_le32(mask);
} }
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length); return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
} }
@ -120,16 +120,13 @@ int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, u
cmd.address = cpu_to_le16(addr); cmd.address = cpu_to_le16(addr);
cmd.data = cpu_to_le32(value); cmd.data = cpu_to_le32(value);
if (mask!=0xFFFF) if (mask != 0xFFFF) {
{
cmd.length = 12; cmd.length = 12;
cmd.mask = cpu_to_le32(mask); cmd.mask = cpu_to_le32(mask);
} }
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length); return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
} }
int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u32 mask) int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u32 mask)
{ {
struct ioreg_cfg cmd = {8, IOREG_CMD_WD_REG, 0x0, 0x0, 0x0}; struct ioreg_cfg cmd = {8, IOREG_CMD_WD_REG, 0x0, 0x0, 0x0};
@ -137,15 +134,11 @@ int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u
cmd.address = cpu_to_le16(addr); cmd.address = cpu_to_le16(addr);
cmd.data = cpu_to_le32(value); cmd.data = cpu_to_le32(value);
if (mask!=0xFFFFFFFF) if (mask != 0xFFFFFFFF) {
{
cmd.length = 12; cmd.length = 12;
cmd.mask = cpu_to_le32(mask); cmd.mask = cpu_to_le32(mask);
} }
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length); return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
} }
int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr, u32 value, u32 mask) int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr, u32 value, u32 mask)
@ -159,8 +152,6 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr,
cmd.length = 12; cmd.length = 12;
cmd.mask = cpu_to_le32(mask); cmd.mask = cpu_to_le32(mask);
} }
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length); return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
} }
@ -177,14 +168,14 @@ int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms)
struct ioreg_cfg cmd = {4, IOREG_CMD_DELAY_US, 0x0, 0x0, 0x0}; struct ioreg_cfg cmd = {4, IOREG_CMD_DELAY_US, 0x0, 0x0, 0x0};
cmd.address = cpu_to_le16(ms); cmd.address = cpu_to_le16(ms);
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, 4); return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, 4);
} }
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame) int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
{ {
struct ioreg_cfg cmd = {4, IOREG_CMD_END, cpu_to_le16(0xFFFF), cpu_to_le32(0xFF), 0x0}; struct ioreg_cfg cmd = {4, IOREG_CMD_END, cpu_to_le16(0xFFFF), cpu_to_le32(0xFF), 0x0};
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, 4);
} }
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame) u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
@ -205,12 +196,14 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf)
int i; int i;
int j = 1; int j = 1;
printk("###### %s ######\n",__func__); pr_info("###### %s ######\n", __func__);
for (i = 0; i < buf_len; i++) { for (i = 0; i < buf_len; i++) {
printk("%02x-", *(pbuf+i)); printk("%02x-", *(pbuf+i));
if (j%32 ==0) printk("\n");j++; if (j%32 == 0)
printk("\n");
j++;
} }
printk("\n"); printk("\n");
printk("============= ioreg_cmd len = %d ===============\n",buf_len); pr_info("=============ioreg_cmd len=%d===============\n", buf_len);
} }