提交 14bc0d4f 编写于 作者: X Xenia Ragiadakou 提交者: Greg Kroah-Hartman

rtl8192u: fix whitespace around if statements in r819xU_firmware.c

This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if
Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a71d7679
...@@ -48,7 +48,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff ...@@ -48,7 +48,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff
//Fragmentation might be required //Fragmentation might be required
frag_threshold = pfirmware->cmdpacket_frag_thresold; frag_threshold = pfirmware->cmdpacket_frag_thresold;
do { do {
if((buffer_len - frag_offset) > frag_threshold) { if ((buffer_len - frag_offset) > frag_threshold) {
frag_length = frag_threshold ; frag_length = frag_threshold ;
bLastIniPkt = 0; bLastIniPkt = 0;
...@@ -89,7 +89,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff ...@@ -89,7 +89,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff
tcb_desc->txbuf_size= (u16)i; tcb_desc->txbuf_size= (u16)i;
skb_put(skb, i); skb_put(skb, i);
if(!priv->ieee80211->check_nic_enough_desc(dev,tcb_desc->queue_index)|| if (!priv->ieee80211->check_nic_enough_desc(dev,tcb_desc->queue_index)||
(!skb_queue_empty(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index]))||\ (!skb_queue_empty(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index]))||\
(priv->ieee80211->queue_stop) ) { (priv->ieee80211->queue_stop) ) {
RT_TRACE(COMP_FIRMWARE,"=====================================================> tx full!\n"); RT_TRACE(COMP_FIRMWARE,"=====================================================> tx full!\n");
...@@ -133,7 +133,7 @@ fwSendNullPacket( ...@@ -133,7 +133,7 @@ fwSendNullPacket(
memset(ptr_buf,0,Length); memset(ptr_buf,0,Length);
tcb_desc->txbuf_size= (u16)Length; tcb_desc->txbuf_size= (u16)Length;
if(!priv->ieee80211->check_nic_enough_desc(dev,tcb_desc->queue_index)|| if (!priv->ieee80211->check_nic_enough_desc(dev,tcb_desc->queue_index)||
(!skb_queue_empty(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index]))||\ (!skb_queue_empty(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index]))||\
(priv->ieee80211->queue_stop) ) { (priv->ieee80211->queue_stop) ) {
RT_TRACE(COMP_FIRMWARE,"===================NULL packet==================================> tx full!\n"); RT_TRACE(COMP_FIRMWARE,"===================NULL packet==================================> tx full!\n");
...@@ -170,12 +170,12 @@ bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) ...@@ -170,12 +170,12 @@ bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
do { do {
CPU_status = read_nic_dword(dev, CPU_GEN); CPU_status = read_nic_dword(dev, CPU_GEN);
if(CPU_status&CPU_GEN_PUT_CODE_OK) if (CPU_status&CPU_GEN_PUT_CODE_OK)
break; break;
}while(check_putcodeOK_time--); }while(check_putcodeOK_time--);
if(!(CPU_status&CPU_GEN_PUT_CODE_OK)) { if (!(CPU_status&CPU_GEN_PUT_CODE_OK)) {
RT_TRACE(COMP_ERR, "Download Firmware: Put code fail!\n"); RT_TRACE(COMP_ERR, "Download Firmware: Put code fail!\n");
goto CPUCheckMainCodeOKAndTurnOnCPU_Fail; goto CPUCheckMainCodeOKAndTurnOnCPU_Fail;
} else { } else {
...@@ -191,11 +191,11 @@ bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) ...@@ -191,11 +191,11 @@ bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
do { do {
CPU_status = read_nic_dword(dev, CPU_GEN); CPU_status = read_nic_dword(dev, CPU_GEN);
if(CPU_status&CPU_GEN_BOOT_RDY) if (CPU_status&CPU_GEN_BOOT_RDY)
break; break;
}while(check_bootOk_time--); }while(check_bootOk_time--);
if(!(CPU_status&CPU_GEN_BOOT_RDY)) { if (!(CPU_status&CPU_GEN_BOOT_RDY)) {
goto CPUCheckMainCodeOKAndTurnOnCPU_Fail; goto CPUCheckMainCodeOKAndTurnOnCPU_Fail;
} else { } else {
RT_TRACE(COMP_FIRMWARE, "Download Firmware: Boot ready!\n"); RT_TRACE(COMP_FIRMWARE, "Download Firmware: Boot ready!\n");
...@@ -220,12 +220,12 @@ bool CPUcheck_firmware_ready(struct net_device *dev) ...@@ -220,12 +220,12 @@ bool CPUcheck_firmware_ready(struct net_device *dev)
do { do {
CPU_status = read_nic_dword(dev, CPU_GEN); CPU_status = read_nic_dword(dev, CPU_GEN);
if(CPU_status&CPU_GEN_FIRM_RDY) if (CPU_status&CPU_GEN_FIRM_RDY)
break; break;
}while(check_time--); }while(check_time--);
if(!(CPU_status&CPU_GEN_FIRM_RDY)) if (!(CPU_status&CPU_GEN_FIRM_RDY))
goto CPUCheckFirmwareReady_Fail; goto CPUCheckFirmwareReady_Fail;
else else
RT_TRACE(COMP_FIRMWARE, "Download Firmware: Firmware ready!\n"); RT_TRACE(COMP_FIRMWARE, "Download Firmware: Firmware ready!\n");
...@@ -265,7 +265,7 @@ bool init_firmware(struct net_device *dev) ...@@ -265,7 +265,7 @@ bool init_firmware(struct net_device *dev)
starting_state = FW_INIT_STEP0_BOOT; starting_state = FW_INIT_STEP0_BOOT;
// TODO: system reset // TODO: system reset
}else if(pfirmware->firmware_status == FW_STATUS_5_READY) { }else if (pfirmware->firmware_status == FW_STATUS_5_READY) {
/* it is called by Initialize */ /* it is called by Initialize */
rst_opt = OPT_FIRMWARE_RESET; rst_opt = OPT_FIRMWARE_RESET;
starting_state = FW_INIT_STEP2_DATA; starting_state = FW_INIT_STEP2_DATA;
...@@ -282,19 +282,19 @@ bool init_firmware(struct net_device *dev) ...@@ -282,19 +282,19 @@ bool init_firmware(struct net_device *dev)
* Open image file, and map file to continuous memory if open file success. * Open image file, and map file to continuous memory if open file success.
* or read image file from array. Default load from IMG file * or read image file from array. Default load from IMG file
*/ */
if(rst_opt == OPT_SYSTEM_RESET) { if (rst_opt == OPT_SYSTEM_RESET) {
rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev); rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
if(rc < 0 ) { if (rc < 0 ) {
RT_TRACE(COMP_ERR, "request firmware fail!\n"); RT_TRACE(COMP_ERR, "request firmware fail!\n");
goto download_firmware_fail; goto download_firmware_fail;
} }
if(fw_entry->size > sizeof(pfirmware->firmware_buf)) { if (fw_entry->size > sizeof(pfirmware->firmware_buf)) {
RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n"); RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
goto download_firmware_fail; goto download_firmware_fail;
} }
if(init_step != FW_INIT_STEP1_MAIN) { if (init_step != FW_INIT_STEP1_MAIN) {
memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size); memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
mapped_file = pfirmware->firmware_buf; mapped_file = pfirmware->firmware_buf;
file_length = fw_entry->size; file_length = fw_entry->size;
...@@ -311,7 +311,7 @@ bool init_firmware(struct net_device *dev) ...@@ -311,7 +311,7 @@ bool init_firmware(struct net_device *dev)
#endif #endif
} }
pfirmware->firmware_buf_size = file_length; pfirmware->firmware_buf_size = file_length;
}else if(rst_opt == OPT_FIRMWARE_RESET ) { }else if (rst_opt == OPT_FIRMWARE_RESET ) {
/* we only need to download data.img here */ /* we only need to download data.img here */
mapped_file = pfirmware->firmware_buf; mapped_file = pfirmware->firmware_buf;
file_length = pfirmware->firmware_buf_size; file_length = pfirmware->firmware_buf_size;
...@@ -325,11 +325,11 @@ bool init_firmware(struct net_device *dev) ...@@ -325,11 +325,11 @@ bool init_firmware(struct net_device *dev)
* and Tx descriptor info * and Tx descriptor info
* */ * */
rt_status = fw_download_code(dev,mapped_file,file_length); rt_status = fw_download_code(dev,mapped_file,file_length);
if(rst_opt == OPT_SYSTEM_RESET) { if (rst_opt == OPT_SYSTEM_RESET) {
release_firmware(fw_entry); release_firmware(fw_entry);
} }
if(rt_status != TRUE) { if (rt_status != TRUE) {
goto download_firmware_fail; goto download_firmware_fail;
} }
...@@ -343,7 +343,7 @@ bool init_firmware(struct net_device *dev) ...@@ -343,7 +343,7 @@ bool init_firmware(struct net_device *dev)
#ifdef RTL8190P #ifdef RTL8190P
// To initialize IMEM, CPU move code from 0x80000080, hence, we send 0x80 byte packet // To initialize IMEM, CPU move code from 0x80000080, hence, we send 0x80 byte packet
rt_status = fwSendNullPacket(dev, RTL8190_CPU_START_OFFSET); rt_status = fwSendNullPacket(dev, RTL8190_CPU_START_OFFSET);
if(rt_status != true) if (rt_status != true)
{ {
RT_TRACE(COMP_INIT, "fwSendNullPacket() fail ! \n"); RT_TRACE(COMP_INIT, "fwSendNullPacket() fail ! \n");
goto download_firmware_fail; goto download_firmware_fail;
...@@ -362,7 +362,7 @@ bool init_firmware(struct net_device *dev) ...@@ -362,7 +362,7 @@ bool init_firmware(struct net_device *dev)
/* Check Put Code OK and Turn On CPU */ /* Check Put Code OK and Turn On CPU */
rt_status = CPUcheck_maincodeok_turnonCPU(dev); rt_status = CPUcheck_maincodeok_turnonCPU(dev);
if(rt_status != TRUE) { if (rt_status != TRUE) {
RT_TRACE(COMP_ERR, "CPUcheck_maincodeok_turnonCPU fail!\n"); RT_TRACE(COMP_ERR, "CPUcheck_maincodeok_turnonCPU fail!\n");
goto download_firmware_fail; goto download_firmware_fail;
} }
...@@ -376,7 +376,7 @@ bool init_firmware(struct net_device *dev) ...@@ -376,7 +376,7 @@ bool init_firmware(struct net_device *dev)
mdelay(1); mdelay(1);
rt_status = CPUcheck_firmware_ready(dev); rt_status = CPUcheck_firmware_ready(dev);
if(rt_status != TRUE) { if (rt_status != TRUE) {
RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status); RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status);
goto download_firmware_fail; goto download_firmware_fail;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册