Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: fix open parentheses alignment

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Alignment should match open parenthesis

Signed-off-by: Ryan England <rcengland@gmail.com>
Link: https://lore.kernel.org/r/ZYSemFbzTlgLROMc@kernel.ryanengland.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ryan England and committed by
Greg Kroah-Hartman
b249bedb 93235f62

+173 -301
+1 -2
drivers/staging/rtl8712/os_intfs.c
··· 221 221 222 222 static u32 start_drv_threads(struct _adapter *padapter) 223 223 { 224 - padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s", 225 - padapter->pnetdev->name); 224 + padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s", padapter->pnetdev->name); 226 225 if (IS_ERR(padapter->cmd_thread)) 227 226 return _FAIL; 228 227 return _SUCCESS;
+4 -5
drivers/staging/rtl8712/rtl8712_efuse.c
··· 213 213 u8 hworden = 0; 214 214 u8 efuse_data, word_cnts = 0; 215 215 216 - while (bContinual && efuse_one_byte_read(adapter, efuse_addr, 217 - &efuse_data) && (efuse_addr < efuse_available_max_size)) { 216 + while (bContinual && efuse_one_byte_read(adapter, efuse_addr, &efuse_data) && 217 + (efuse_addr < efuse_available_max_size)) { 218 218 if (efuse_data != 0xFF) { 219 219 hworden = efuse_data & 0x0F; 220 220 word_cnts = calculate_word_cnts(hworden); ··· 252 252 memset(tmpdata, 0xFF, PGPKT_DATA_SIZE); 253 253 for (tmpidx = 0; tmpidx < word_cnts * 2; 254 254 tmpidx++) { 255 - if (efuse_one_byte_read(adapter, 256 - efuse_addr + 1 + tmpidx, 257 - &efuse_data)) { 255 + if (efuse_one_byte_read(adapter, efuse_addr + 1 + tmpidx, 256 + &efuse_data)) { 258 257 tmpdata[tmpidx] = efuse_data; 259 258 } else { 260 259 ret = false;
+1 -2
drivers/staging/rtl8712/rtl8712_recv.c
··· 267 267 /*the first fragment*/ 268 268 if (!list_empty(&pdefrag_q->queue)) { 269 269 /*free current defrag_q */ 270 - r8712_free_recvframe_queue(pdefrag_q, 271 - pfree_recv_queue); 270 + r8712_free_recvframe_queue(pdefrag_q, pfree_recv_queue); 272 271 } 273 272 } 274 273 /* Then enqueue the 0~(n-1) fragment to the defrag_q */
+24 -36
drivers/staging/rtl8712/rtl8712_xmit.c
··· 147 147 } 148 148 149 149 static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, 150 - struct hw_xmit *phwxmit, 151 - struct tx_servq *ptxservq, 152 - struct __queue *pframe_queue) 150 + struct hw_xmit *phwxmit, struct tx_servq *ptxservq, 151 + struct __queue *pframe_queue) 153 152 { 154 153 struct list_head *xmitframe_plist, *xmitframe_phead; 155 154 struct xmit_frame *pxmitframe = NULL; ··· 166 167 } 167 168 168 169 static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv, 169 - struct hw_xmit *phwxmit_i, sint entry) 170 + struct hw_xmit *phwxmit_i, sint entry) 170 171 { 171 172 unsigned long irqL0; 172 173 struct list_head *sta_plist, *sta_phead; ··· 196 197 sta_phead = &phwxmit->sta_queue->queue; 197 198 sta_plist = sta_phead->next; 198 199 while (!end_of_queue_search(sta_phead, sta_plist)) { 199 - ptxservq = container_of(sta_plist, struct tx_servq, 200 - tx_pending); 200 + ptxservq = container_of(sta_plist, struct tx_servq, tx_pending); 201 201 pframe_queue = &ptxservq->sta_pending; 202 - pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, 203 - ptxservq, pframe_queue); 202 + pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, ptxservq, 203 + pframe_queue); 204 204 if (pxmitframe) { 205 205 phwxmit->accnt--; 206 206 goto exit_dequeue_xframe_ex; ··· 219 221 return pxmitframe; 220 222 } 221 223 222 - void r8712_do_queue_select(struct _adapter *padapter, 223 - struct pkt_attrib *pattrib) 224 + void r8712_do_queue_select(struct _adapter *padapter, struct pkt_attrib *pattrib) 224 225 { 225 226 unsigned int qsel = 0; 226 227 struct dvobj_priv *pdvobj = &padapter->dvobjpriv; ··· 289 292 r8712_xmit_complete(padapter, pxmitframe); 290 293 if (pxmitframe->attrib.ether_type != 0x0806) { 291 294 if ((pxmitframe->attrib.ether_type != 0x888e) && 292 - (pxmitframe->attrib.dhcp_pkt != 1)) { 293 - r8712_issue_addbareq_cmd(padapter, 294 - pxmitframe->attrib.priority); 295 + (pxmitframe->attrib.dhcp_pkt != 1)) { 296 + r8712_issue_addbareq_cmd(padapter, pxmitframe->attrib.priority); 295 297 } 296 298 } 297 299 pxmitframe->last[0] = 1; 298 - update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr), 299 - pxmitframe->attrib.last_txcmdsz); 300 + update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr), pxmitframe->attrib.last_txcmdsz); 300 301 /*padding zero */ 301 302 last_txcmdsz = pxmitframe->attrib.last_txcmdsz; 302 303 padding_sz = (8 - (last_txcmdsz % 8)); ··· 328 333 pxmitbuf->aggr_nr = 1; 329 334 } 330 335 331 - u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf, 332 - struct xmit_frame *pxmitframe) 336 + u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf, struct xmit_frame *pxmitframe) 333 337 { 334 338 pxmitframe->pxmitbuf = pxmitbuf; 335 339 pxmitbuf->priv_data = pxmitframe; ··· 368 374 pxmitframe->bpending[0] = false; 369 375 pxmitframe->mem_addr = pxmitbuf->pbuf; 370 376 371 - if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == 372 - 0) || ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 373 - 0x40) == 0))) { 377 + if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == 0) || 378 + ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 379 + 0x40) == 0))) { 374 380 ptxdesc->txdw0 |= cpu_to_le32 375 381 (((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) & 376 382 0x00ff0000); ··· 381 387 0x00ff0000); 382 388 /*default = 32 bytes for TX Desc*/ 383 389 } 384 - r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, 385 - total_length + TXDESC_SIZE, (u8 *)pxmitframe); 390 + r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, total_length + TXDESC_SIZE, 391 + (u8 *)pxmitframe); 386 392 } 387 393 388 394 #endif ··· 612 618 pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); 613 619 /* need to remember the 1st frame */ 614 620 if (pxmitframe) { 615 - 616 621 #ifdef CONFIG_R8712_TX_AGGR 617 622 /* 1. dequeue 2nd frame 618 623 * 2. aggr if 2nd xframe is dequeued, else dump directly 619 624 */ 620 625 if (AGGR_NR_HIGH_BOUND > 1) 621 - p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, 622 - hwentry); 626 + p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); 623 627 if (pxmitframe->frame_tag != DATA_FRAMETAG) { 624 628 r8712_free_xmitbuf(pxmitpriv, pxmitbuf); 625 629 return false; ··· 631 639 if (p2ndxmitframe) { 632 640 u16 total_length; 633 641 634 - total_length = r8712_xmitframe_aggr_next( 635 - pxmitbuf, p2ndxmitframe); 642 + total_length = r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe); 636 643 do { 637 - p2ndxmitframe = dequeue_xframe_ex( 638 - pxmitpriv, phwxmits, hwentry); 644 + p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); 639 645 if (p2ndxmitframe) 640 646 total_length = 641 - r8712_xmitframe_aggr_next( 642 - pxmitbuf, 643 - p2ndxmitframe); 647 + r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe); 644 648 else 645 649 break; 646 650 } while (total_length <= 0x1800 && ··· 650 662 xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf); 651 663 if (pxmitframe->frame_tag == DATA_FRAMETAG) { 652 664 if (pxmitframe->attrib.priority <= 15) 653 - res = r8712_xmitframe_coalesce(padapter, 654 - pxmitframe->pkt, pxmitframe); 665 + res = r8712_xmitframe_coalesce(padapter, pxmitframe->pkt, 666 + pxmitframe); 655 667 /* always return ndis_packet after 656 668 * r8712_xmitframe_coalesce 657 669 */ ··· 702 714 ff_hwaddr = get_ff_hwaddr(pxmitframe); 703 715 #ifdef CONFIG_R8712_TX_AGGR 704 716 r8712_write_port(padapter, RTL8712_DMA_H2CCMD, w_sz, 705 - (unsigned char *)pxmitframe); 717 + (unsigned char *)pxmitframe); 706 718 #else 707 719 r8712_write_port(padapter, ff_hwaddr, w_sz, 708 - (unsigned char *)pxmitframe); 720 + (unsigned char *)pxmitframe); 709 721 #endif 710 722 mem_addr += w_sz; 711 723 mem_addr = (u8 *)RND4(((addr_t)(mem_addr)));
+56 -103
drivers/staging/rtl8712/rtl871x_cmd.c
··· 242 242 kfree(ph2c); 243 243 return; 244 244 } 245 - init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara, 246 - GEN_CMD_CODE(_SetChannelPlan)); 245 + init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara, GEN_CMD_CODE(_SetChannelPlan)); 247 246 psetchplanpara->ChannelPlan = chplan; 248 247 r8712_enqueue_cmd(pcmdpriv, ph2c); 249 248 } ··· 301 302 padapter->mppriv.workparam.bcompleted = true; 302 303 } 303 304 304 - void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, 305 - struct cmd_obj *pcmd) 305 + void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd) 306 306 { 307 307 kfree(pcmd->parmbuf); 308 308 kfree(pcmd); ··· 372 374 psecuritypriv->authenticator_ie[0] = (unsigned char) 373 375 psecnetwork->IELength; 374 376 if ((psecnetwork->IELength - 12) < (256 - 1)) 375 - memcpy(&psecuritypriv->authenticator_ie[1], 376 - &psecnetwork->IEs[12], psecnetwork->IELength - 12); 377 + memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 378 + psecnetwork->IELength - 12); 377 379 else 378 - memcpy(&psecuritypriv->authenticator_ie[1], 379 - &psecnetwork->IEs[12], (256 - 1)); 380 + memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1)); 380 381 psecnetwork->IELength = 0; 381 382 /* 382 383 * If the driver wants to use the bssid to create the connection. ··· 385 388 if (!pmlmepriv->assoc_by_bssid) 386 389 ether_addr_copy(&pmlmepriv->assoc_bssid[0], 387 390 &pnetwork->network.MacAddress[0]); 388 - psecnetwork->IELength = r8712_restruct_sec_ie(padapter, 389 - &pnetwork->network.IEs[0], 390 - &psecnetwork->IEs[0], 391 - pnetwork->network.IELength); 391 + psecnetwork->IELength = r8712_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], 392 + &psecnetwork->IEs[0], pnetwork->network.IELength); 392 393 pqospriv->qos_option = 0; 393 394 if (pregistrypriv->wmm_enable) { 394 395 u32 tmp_len; 395 396 396 - tmp_len = r8712_restruct_wmm_ie(padapter, 397 - &pnetwork->network.IEs[0], 398 - &psecnetwork->IEs[0], 399 - pnetwork->network.IELength, 400 - psecnetwork->IELength); 397 + tmp_len = r8712_restruct_wmm_ie(padapter, &pnetwork->network.IEs[0], 398 + &psecnetwork->IEs[0], pnetwork->network.IELength, 399 + psecnetwork->IELength); 401 400 if (psecnetwork->IELength != tmp_len) { 402 401 psecnetwork->IELength = tmp_len; 403 402 pqospriv->qos_option = 1; /* WMM IE in beacon */ ··· 420 427 psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength; 421 428 if (psecnetwork->IELength < 255) 422 429 memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], 423 - psecnetwork->IELength); 430 + psecnetwork->IELength); 424 431 else 425 432 memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], 426 - 255); 433 + 255); 427 434 /* get cmdsz before endian conversion */ 428 435 pcmd->cmdsz = r8712_get_wlan_bssid_ex_sz(psecnetwork); 429 436 #ifdef __BIG_ENDIAN 430 437 /* wlan_network endian conversion */ 431 438 psecnetwork->Length = cpu_to_le32(psecnetwork->Length); 432 - psecnetwork->Ssid.SsidLength = cpu_to_le32( 433 - psecnetwork->Ssid.SsidLength); 439 + psecnetwork->Ssid.SsidLength = cpu_to_le32(psecnetwork->Ssid.SsidLength); 434 440 psecnetwork->Privacy = cpu_to_le32(psecnetwork->Privacy); 435 441 psecnetwork->Rssi = cpu_to_le32(psecnetwork->Rssi); 436 - psecnetwork->NetworkTypeInUse = cpu_to_le32( 437 - psecnetwork->NetworkTypeInUse); 438 - psecnetwork->Configuration.ATIMWindow = cpu_to_le32( 439 - psecnetwork->Configuration.ATIMWindow); 440 - psecnetwork->Configuration.BeaconPeriod = cpu_to_le32( 441 - psecnetwork->Configuration.BeaconPeriod); 442 - psecnetwork->Configuration.DSConfig = cpu_to_le32( 443 - psecnetwork->Configuration.DSConfig); 444 - psecnetwork->Configuration.FHConfig.DwellTime = cpu_to_le32( 445 - psecnetwork->Configuration.FHConfig.DwellTime); 446 - psecnetwork->Configuration.FHConfig.HopPattern = cpu_to_le32( 447 - psecnetwork->Configuration.FHConfig.HopPattern); 448 - psecnetwork->Configuration.FHConfig.HopSet = cpu_to_le32( 449 - psecnetwork->Configuration.FHConfig.HopSet); 450 - psecnetwork->Configuration.FHConfig.Length = cpu_to_le32( 451 - psecnetwork->Configuration.FHConfig.Length); 452 - psecnetwork->Configuration.Length = cpu_to_le32( 453 - psecnetwork->Configuration.Length); 454 - psecnetwork->InfrastructureMode = cpu_to_le32( 455 - psecnetwork->InfrastructureMode); 442 + psecnetwork->NetworkTypeInUse = cpu_to_le32(psecnetwork->NetworkTypeInUse); 443 + psecnetwork->Configuration.ATIMWindow = cpu_to_le32(psecnetwork->Configuration.ATIMWindow); 444 + psecnetwork->Configuration.BeaconPeriod = cpu_to_le32(psecnetwork->Configuration.BeaconPeriod); 445 + psecnetwork->Configuration.DSConfig = cpu_to_le32(psecnetwork->Configuration.DSConfig); 446 + psecnetwork->Configuration.FHConfig.DwellTime = cpu_to_le32(psecnetwork->Configuration.FHConfig.DwellTime); 447 + psecnetwork->Configuration.FHConfig.HopPattern = cpu_to_le32(psecnetwork->Configuration.FHConfig.HopPattern); 448 + psecnetwork->Configuration.FHConfig.HopSet = cpu_to_le32(psecnetwork->Configuration.FHConfig.HopSet); 449 + psecnetwork->Configuration.FHConfig.Length = cpu_to_le32(psecnetwork->Configuration.FHConfig.Length); 450 + psecnetwork->Configuration.Length = cpu_to_le32(psecnetwork->Configuration.Length); 451 + psecnetwork->InfrastructureMode = cpu_to_le32(psecnetwork->InfrastructureMode); 456 452 psecnetwork->IELength = cpu_to_le32(psecnetwork->IELength); 457 453 #endif 458 454 INIT_LIST_HEAD(&pcmd->list); ··· 467 485 kfree(pdisconnect_cmd); 468 486 return; 469 487 } 470 - init_h2fwcmd_w_parm_no_rsp(pdisconnect_cmd, pdisconnect, 471 - _DisConnect_CMD_); 488 + init_h2fwcmd_w_parm_no_rsp(pdisconnect_cmd, pdisconnect, _DisConnect_CMD_); 472 489 r8712_enqueue_cmd(pcmdpriv, pdisconnect_cmd); 473 490 } 474 491 475 492 void r8712_setopmode_cmd(struct _adapter *padapter, 476 - enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype) 493 + enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype) 477 494 { 478 495 struct cmd_obj *ph2c; 479 496 struct setopmode_parm *psetop; ··· 524 543 psetstakey_para->algorithm = (unsigned char) 525 544 psecuritypriv->PrivacyAlgrthm; 526 545 else 527 - GET_ENCRY_ALGO(psecuritypriv, sta, 528 - psetstakey_para->algorithm, false); 546 + GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false); 529 547 if (unicast_key) 530 548 memcpy(&psetstakey_para->key, &sta->x_UncstKey, 16); 531 549 else 532 - memcpy(&psetstakey_para->key, 533 - &psecuritypriv->XGrpKey[ 534 - psecuritypriv->XGrpKeyid - 1]. skey, 16); 550 + memcpy(&psetstakey_para->key, &psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1]. 551 + skey, 16); 535 552 r8712_enqueue_cmd(pcmdpriv, ph2c); 536 553 } 537 554 ··· 547 568 kfree(ph2c); 548 569 return; 549 570 } 550 - init_h2fwcmd_w_parm_no_rsp(ph2c, psetMacAddr_para, 551 - _SetMacAddress_CMD_); 571 + init_h2fwcmd_w_parm_no_rsp(ph2c, psetMacAddr_para, _SetMacAddress_CMD_); 552 572 ether_addr_copy(psetMacAddr_para->MacAddr, mac_addr); 553 573 r8712_enqueue_cmd(pcmdpriv, ph2c); 554 574 } ··· 567 589 return; 568 590 } 569 591 paddbareq_parm->tid = tid; 570 - init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, 571 - GEN_CMD_CODE(_AddBAReq)); 592 + init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq)); 572 593 r8712_enqueue_cmd_ex(pcmdpriv, ph2c); 573 594 } 574 595 ··· 621 644 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 622 645 623 646 if (pcmd->res != H2C_SUCCESS) 624 - mod_timer(&pmlmepriv->assoc_timer, 625 - jiffies + msecs_to_jiffies(1)); 647 + mod_timer(&pmlmepriv->assoc_timer, jiffies + msecs_to_jiffies(1)); 626 648 r8712_free_cmd_obj(pcmd); 627 649 } 628 650 629 - void r8712_createbss_cmd_callback(struct _adapter *padapter, 630 - struct cmd_obj *pcmd) 651 + void r8712_createbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd) 631 652 { 632 653 unsigned long irqL; 633 654 struct sta_info *psta = NULL; ··· 635 660 struct wlan_network *tgt_network = &(pmlmepriv->cur_network); 636 661 637 662 if (pcmd->res != H2C_SUCCESS) 638 - mod_timer(&pmlmepriv->assoc_timer, 639 - jiffies + msecs_to_jiffies(1)); 663 + mod_timer(&pmlmepriv->assoc_timer, jiffies + msecs_to_jiffies(1)); 640 664 del_timer(&pmlmepriv->assoc_timer); 641 665 #ifdef __BIG_ENDIAN 642 666 /* endian_convert */ ··· 644 670 pnetwork->Privacy = le32_to_cpu(pnetwork->Privacy); 645 671 pnetwork->Rssi = le32_to_cpu(pnetwork->Rssi); 646 672 pnetwork->NetworkTypeInUse = le32_to_cpu(pnetwork->NetworkTypeInUse); 647 - pnetwork->Configuration.ATIMWindow = 648 - le32_to_cpu(pnetwork->Configuration.ATIMWindow); 649 - pnetwork->Configuration.DSConfig = 650 - le32_to_cpu(pnetwork->Configuration.DSConfig); 651 - pnetwork->Configuration.FHConfig.DwellTime = 652 - le32_to_cpu(pnetwork->Configuration.FHConfig.DwellTime); 653 - pnetwork->Configuration.FHConfig.HopPattern = 654 - le32_to_cpu(pnetwork->Configuration.FHConfig.HopPattern); 655 - pnetwork->Configuration.FHConfig.HopSet = 656 - le32_to_cpu(pnetwork->Configuration.FHConfig.HopSet); 657 - pnetwork->Configuration.FHConfig.Length = 658 - le32_to_cpu(pnetwork->Configuration.FHConfig.Length); 659 - pnetwork->Configuration.Length = 660 - le32_to_cpu(pnetwork->Configuration.Length); 661 - pnetwork->InfrastructureMode = 662 - le32_to_cpu(pnetwork->InfrastructureMode); 673 + pnetwork->Configuration.ATIMWindow = le32_to_cpu(pnetwork->Configuration.ATIMWindow); 674 + pnetwork->Configuration.DSConfig = le32_to_cpu(pnetwork->Configuration.DSConfig); 675 + pnetwork->Configuration.FHConfig.DwellTime = le32_to_cpu(pnetwork->Configuration.FHConfig.DwellTime); 676 + pnetwork->Configuration.FHConfig.HopPattern = le32_to_cpu(pnetwork->Configuration.FHConfig.HopPattern); 677 + pnetwork->Configuration.FHConfig.HopSet = le32_to_cpu(pnetwork->Configuration.FHConfig.HopSet); 678 + pnetwork->Configuration.FHConfig.Length = le32_to_cpu(pnetwork->Configuration.FHConfig.Length); 679 + pnetwork->Configuration.Length = le32_to_cpu(pnetwork->Configuration.Length); 680 + pnetwork->InfrastructureMode = le32_to_cpu(pnetwork->InfrastructureMode); 663 681 pnetwork->IELength = le32_to_cpu(pnetwork->IELength); 664 682 #endif 665 683 spin_lock_irqsave(&pmlmepriv->lock, irqL); 666 684 if ((pmlmepriv->fw_state) & WIFI_AP_STATE) { 667 - psta = r8712_get_stainfo(&padapter->stapriv, 668 - pnetwork->MacAddress); 685 + psta = r8712_get_stainfo(&padapter->stapriv, pnetwork->MacAddress); 669 686 if (!psta) { 670 - psta = r8712_alloc_stainfo(&padapter->stapriv, 671 - pnetwork->MacAddress); 687 + psta = r8712_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress); 672 688 if (!psta) 673 689 goto createbss_cmd_fail; 674 690 } ··· 666 702 } else { 667 703 pwlan = _r8712_alloc_network(pmlmepriv); 668 704 if (!pwlan) { 669 - pwlan = r8712_get_oldest_wlan_network( 670 - &pmlmepriv->scanned_queue); 705 + pwlan = r8712_get_oldest_wlan_network(&pmlmepriv->scanned_queue); 671 706 if (!pwlan) 672 707 goto createbss_cmd_fail; 673 708 pwlan->last_scanned = jiffies; 674 709 } else { 675 - list_add_tail(&(pwlan->list), 676 - &pmlmepriv->scanned_queue.queue); 710 + list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); 677 711 } 678 712 pnetwork->Length = r8712_get_wlan_bssid_ex_sz(pnetwork); 679 713 memcpy(&(pwlan->network), pnetwork, pnetwork->Length); 680 714 pwlan->fixed = true; 681 - memcpy(&tgt_network->network, pnetwork, 682 - (r8712_get_wlan_bssid_ex_sz(pnetwork))); 715 + memcpy(&tgt_network->network, pnetwork, (r8712_get_wlan_bssid_ex_sz(pnetwork))); 683 716 if (pmlmepriv->fw_state & _FW_UNDER_LINKING) 684 717 pmlmepriv->fw_state ^= _FW_UNDER_LINKING; 685 718 /* ··· 689 728 r8712_free_cmd_obj(pcmd); 690 729 } 691 730 692 - void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, 693 - struct cmd_obj *pcmd) 731 + void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd) 694 732 { 695 733 struct sta_priv *pstapriv = &padapter->stapriv; 696 - struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *) 697 - (pcmd->rsp); 698 - struct sta_info *psta = r8712_get_stainfo(pstapriv, 699 - psetstakey_rsp->addr); 734 + struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *) (pcmd->rsp); 735 + struct sta_info *psta = r8712_get_stainfo(pstapriv, psetstakey_rsp->addr); 700 736 701 737 if (!psta) 702 738 goto exit; ··· 708 750 unsigned long irqL; 709 751 struct sta_priv *pstapriv = &padapter->stapriv; 710 752 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 711 - struct set_assocsta_parm *passocsta_parm = 712 - (struct set_assocsta_parm *)(pcmd->parmbuf); 713 - struct set_assocsta_rsp *passocsta_rsp = 714 - (struct set_assocsta_rsp *) (pcmd->rsp); 715 - struct sta_info *psta = r8712_get_stainfo(pstapriv, 716 - passocsta_parm->addr); 753 + struct set_assocsta_parm *passocsta_parm = (struct set_assocsta_parm *)(pcmd->parmbuf); 754 + struct set_assocsta_rsp *passocsta_rsp = (struct set_assocsta_rsp *) (pcmd->rsp); 755 + struct sta_info *psta = r8712_get_stainfo(pstapriv, passocsta_parm->addr); 717 756 718 757 if (!psta) 719 758 return; 720 759 psta->aid = psta->mac_id = passocsta_rsp->cam_id; 721 760 spin_lock_irqsave(&pmlmepriv->lock, irqL); 722 - if ((check_fwstate(pmlmepriv, WIFI_MP_STATE)) && 723 - (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))) 761 + if ((check_fwstate(pmlmepriv, WIFI_MP_STATE)) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))) 724 762 pmlmepriv->fw_state ^= _FW_UNDER_LINKING; 725 763 set_fwstate(pmlmepriv, _FW_LINKED); 726 764 spin_unlock_irqrestore(&pmlmepriv->lock, irqL); 727 765 r8712_free_cmd_obj(pcmd); 728 766 } 729 767 730 - void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, 731 - u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO) 768 + void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt, 769 + u32 tryPktInterval, u32 firstStageTO) 732 770 { 733 771 struct cmd_obj *ph2c; 734 772 struct DisconnectCtrlEx_param *param; ··· 744 790 param->TryPktInterval = (unsigned char)tryPktInterval; 745 791 param->FirstStageTO = (unsigned int)firstStageTO; 746 792 747 - init_h2fwcmd_w_parm_no_rsp(ph2c, param, 748 - GEN_CMD_CODE(_DisconnectCtrlEx)); 793 + init_h2fwcmd_w_parm_no_rsp(ph2c, param, GEN_CMD_CODE(_DisconnectCtrlEx)); 749 794 r8712_enqueue_cmd(pcmdpriv, ph2c); 750 795 }
+13 -24
drivers/staging/rtl8712/rtl871x_cmd.h
··· 716 716 #define H2C_RESERVED 0x07 717 717 718 718 void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr); 719 - u8 r8712_sitesurvey_cmd(struct _adapter *padapter, 720 - struct ndis_802_11_ssid *pssid); 719 + u8 r8712_sitesurvey_cmd(struct _adapter *padapter, struct ndis_802_11_ssid *pssid); 721 720 int r8712_createbss_cmd(struct _adapter *padapter); 722 721 void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key); 723 - int r8712_joinbss_cmd(struct _adapter *padapter, 724 - struct wlan_network *pnetwork); 722 + int r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork); 725 723 void r8712_disassoc_cmd(struct _adapter *padapter); 726 - void r8712_setopmode_cmd(struct _adapter *padapter, 727 - enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); 724 + void r8712_setopmode_cmd(struct _adapter *padapter, enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); 728 725 int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset); 729 726 void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan); 730 727 int r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval); 731 728 int r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val); 732 729 void r8712_addbareq_cmd(struct _adapter *padapter, u8 tid); 733 730 void r8712_wdg_wk_cmd(struct _adapter *padapter); 734 - void r8712_survey_cmd_callback(struct _adapter *padapter, 735 - struct cmd_obj *pcmd); 736 - void r8712_disassoc_cmd_callback(struct _adapter *padapter, 737 - struct cmd_obj *pcmd); 738 - void r8712_joinbss_cmd_callback(struct _adapter *padapter, 739 - struct cmd_obj *pcmd); 740 - void r8712_createbss_cmd_callback(struct _adapter *padapter, 741 - struct cmd_obj *pcmd); 742 - void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, 743 - struct cmd_obj *pcmd); 744 - void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, 745 - struct cmd_obj *pcmd); 746 - void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, 747 - struct cmd_obj *pcmd); 748 - void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter, 749 - struct cmd_obj *pcmd); 750 - void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, 751 - u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO); 731 + void r8712_survey_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 732 + void r8712_disassoc_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 733 + void r8712_joinbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 734 + void r8712_createbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 735 + void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 736 + void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 737 + void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 738 + void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd); 739 + void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt, 740 + u32 tryPktInterval, u32 firstStageTO); 752 741 753 742 struct _cmd_callback { 754 743 u32 cmd_code;
+74 -129
drivers/staging/rtl8712/rtl871x_ioctl_linux.c
··· 59 59 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 60 60 61 61 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 62 - memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, 63 - ETH_ALEN); 62 + memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN); 64 63 wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL); 65 64 } 66 65 ··· 110 111 memcpy(grk[param->u.crypt.idx - 1].skey, 111 112 &param->u.crypt.key[24], 8); 112 113 padapter->securitypriv.binstallGrpkey = true; 113 - r8712_set_key(padapter, &padapter->securitypriv, 114 - param->u.crypt.idx); 114 + r8712_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx); 115 115 if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE) { 116 - if (padapter->registrypriv.power_mgnt != 117 - padapter->pwrctrlpriv.pwr_mode) 116 + if (padapter->registrypriv.power_mgnt != padapter->pwrctrlpriv.pwr_mode) 118 117 mod_timer(&padapter->mlmepriv.dhcp_timer, 119 118 jiffies + msecs_to_jiffies(60000)); 120 119 } ··· 145 148 memset(iwe, 0, sizeof(*iwe)); 146 149 iwe->cmd = IWEVCUSTOM; 147 150 iwe->u.data.length = (u16)strlen(buf); 148 - start = iwe_stream_add_point(info, start, stop, 149 - iwe, buf); 151 + start = iwe_stream_add_point(info, start, stop, iwe, buf); 150 152 memset(iwe, 0, sizeof(*iwe)); 151 153 iwe->cmd = IWEVGENIE; 152 154 iwe->u.data.length = (u16)wpa_len; 153 - start = iwe_stream_add_point(info, start, stop, 154 - iwe, wpa_ie); 155 + start = iwe_stream_add_point(info, start, stop, iwe, wpa_ie); 155 156 } 156 157 if (rsn_len > 0) { 157 158 memset(buf, 0, MAX_WPA_IE_LEN); ··· 163 168 memset(iwe, 0, sizeof(*iwe)); 164 169 iwe->cmd = IWEVCUSTOM; 165 170 iwe->u.data.length = strlen(buf); 166 - start = iwe_stream_add_point(info, start, stop, 167 - iwe, buf); 171 + start = iwe_stream_add_point(info, start, stop, iwe, buf); 168 172 memset(iwe, 0, sizeof(*iwe)); 169 173 iwe->cmd = IWEVGENIE; 170 174 iwe->u.data.length = rsn_len; 171 - start = iwe_stream_add_point(info, start, stop, iwe, 172 - rsn_ie); 175 + start = iwe_stream_add_point(info, start, stop, iwe, rsn_ie); 173 176 } 174 177 175 178 return start; ··· 182 189 u8 wps_ie[512]; 183 190 uint wps_ielen; 184 191 185 - if (r8712_get_wps_ie(pnetwork->network.IEs, 186 - pnetwork->network.IELength, 187 - wps_ie, &wps_ielen)) { 192 + if (r8712_get_wps_ie(pnetwork->network.IEs, pnetwork->network.IELength, wps_ie, &wps_ielen)) { 188 193 if (wps_ielen > 2) { 189 194 iwe->cmd = IWEVGENIE; 190 195 iwe->u.data.length = (u16)wps_ielen; 191 - start = iwe_stream_add_point(info, start, stop, 192 - iwe, wps_ie); 196 + start = iwe_stream_add_point(info, start, stop, iwe, wps_ie); 193 197 } 194 198 } 195 199 ··· 249 259 start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN); 250 260 /* Add mode */ 251 261 iwe.cmd = SIOCGIWMODE; 252 - memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs), 253 - 2); 262 + memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs), 2); 254 263 le16_to_cpus(&cap); 255 264 if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_ESS)) { 256 265 if (cap & WLAN_CAPABILITY_ESS) 257 266 iwe.u.mode = (u32)IW_MODE_MASTER; 258 267 else 259 268 iwe.u.mode = (u32)IW_MODE_ADHOC; 260 - start = iwe_stream_add_event(info, start, stop, &iwe, 261 - IW_EV_UINT_LEN); 269 + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_UINT_LEN); 262 270 } 263 271 /* Add frequency/channel */ 264 272 iwe.cmd = SIOCGIWFREQ; ··· 264 276 /* check legal index */ 265 277 u8 dsconfig = pnetwork->network.Configuration.DSConfig; 266 278 267 - if (dsconfig >= 1 && dsconfig <= sizeof( 268 - ieee80211_wlan_frequencies) / sizeof(long)) 269 - iwe.u.freq.m = 270 - (s32)(ieee80211_wlan_frequencies 271 - [dsconfig - 1] * 100000); 279 + if (dsconfig >= 1 && dsconfig <= sizeof(ieee80211_wlan_frequencies) / sizeof(long)) 280 + iwe.u.freq.m = (s32)(ieee80211_wlan_frequencies[dsconfig - 1] * 100000); 272 281 else 273 282 iwe.u.freq.m = 0; 274 283 } 275 284 iwe.u.freq.e = (s16)1; 276 285 iwe.u.freq.i = (u8)pnetwork->network.Configuration.DSConfig; 277 286 start = iwe_stream_add_event(info, start, stop, &iwe, 278 - IW_EV_FREQ_LEN); 287 + IW_EV_FREQ_LEN); 279 288 /* Add encryption capability */ 280 289 iwe.cmd = SIOCGIWENCODE; 281 290 if (cap & WLAN_CAPABILITY_PRIVACY) 282 - iwe.u.data.flags = (u16)(IW_ENCODE_ENABLED | 283 - IW_ENCODE_NOKEY); 291 + iwe.u.data.flags = (u16)(IW_ENCODE_ENABLED | IW_ENCODE_NOKEY); 284 292 else 285 293 iwe.u.data.flags = (u16)(IW_ENCODE_DISABLED); 286 294 iwe.u.data.length = (u16)0; 287 - start = iwe_stream_add_point(info, start, stop, &iwe, 288 - pnetwork->network.Ssid.Ssid); 295 + start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid); 289 296 /*Add basic and extended rates */ 290 297 current_val = start + iwe_stream_lcp_len(info); 291 298 iwe.cmd = SIOCGIWRATE; ··· 290 307 i = 0; 291 308 while (pnetwork->network.rates[i] != 0) { 292 309 /* Bit rate given in 500 kb/s units */ 293 - iwe.u.bitrate.value = (pnetwork->network.rates[i++] & 294 - 0x7F) * 500000; 295 - current_val = iwe_stream_add_value(info, start, current_val, 296 - stop, &iwe, IW_EV_PARAM_LEN); 310 + iwe.u.bitrate.value = (pnetwork->network.rates[i++] & 0x7F) * 500000; 311 + current_val = iwe_stream_add_value(info, start, current_val, stop, &iwe, 312 + IW_EV_PARAM_LEN); 297 313 } 298 314 /* Check if we added any event */ 299 315 if ((current_val - start) > iwe_stream_lcp_len(info)) ··· 306 324 iwe.cmd = IWEVQUAL; 307 325 rssi = r8712_signal_scale_mapping(pnetwork->network.Rssi); 308 326 /* we only update signal_level (signal strength) that is rssi. */ 309 - iwe.u.qual.updated = (u8)(IW_QUAL_QUAL_INVALID | IW_QUAL_LEVEL_UPDATED | 310 - IW_QUAL_NOISE_INVALID); 327 + iwe.u.qual.updated = (u8)(IW_QUAL_QUAL_INVALID | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_INVALID); 311 328 iwe.u.qual.level = rssi; /* signal strength */ 312 329 iwe.u.qual.qual = 0; /* signal quality */ 313 330 iwe.u.qual.noise = 0; /* noise level */ ··· 471 490 goto exit; 472 491 } 473 492 if (r8712_parse_wpa_ie(buf, ielen, &group_cipher, 474 - &pairwise_cipher) == 0) { 493 + &pairwise_cipher) == 0) { 475 494 padapter->securitypriv.AuthAlgrthm = 2; 476 495 padapter->securitypriv.ndisauthtype = 477 496 Ndis802_11AuthModeWPAPSK; 478 497 } 479 498 if (r8712_parse_wpa2_ie(buf, ielen, &group_cipher, 480 - &pairwise_cipher) == 0) { 499 + &pairwise_cipher) == 0) { 481 500 padapter->securitypriv.AuthAlgrthm = 2; 482 501 padapter->securitypriv.ndisauthtype = 483 502 Ndis802_11AuthModeWPA2PSK; 484 503 } 485 504 switch (group_cipher) { 486 505 case WPA_CIPHER_NONE: 487 - padapter->securitypriv.XGrpPrivacy = 488 - _NO_PRIVACY_; 489 - padapter->securitypriv.ndisencryptstatus = 490 - Ndis802_11EncryptionDisabled; 506 + padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_; 507 + padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; 491 508 break; 492 509 case WPA_CIPHER_WEP40: 493 510 padapter->securitypriv.XGrpPrivacy = _WEP40_; 494 - padapter->securitypriv.ndisencryptstatus = 495 - Ndis802_11Encryption1Enabled; 511 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 496 512 break; 497 513 case WPA_CIPHER_TKIP: 498 514 padapter->securitypriv.XGrpPrivacy = _TKIP_; 499 - padapter->securitypriv.ndisencryptstatus = 500 - Ndis802_11Encryption2Enabled; 515 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled; 501 516 break; 502 517 case WPA_CIPHER_CCMP: 503 518 padapter->securitypriv.XGrpPrivacy = _AES_; 504 - padapter->securitypriv.ndisencryptstatus = 505 - Ndis802_11Encryption3Enabled; 519 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled; 506 520 break; 507 521 case WPA_CIPHER_WEP104: 508 522 padapter->securitypriv.XGrpPrivacy = _WEP104_; 509 - padapter->securitypriv.ndisencryptstatus = 510 - Ndis802_11Encryption1Enabled; 523 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 511 524 break; 512 525 } 513 526 switch (pairwise_cipher) { 514 527 case WPA_CIPHER_NONE: 515 - padapter->securitypriv.PrivacyAlgrthm = 516 - _NO_PRIVACY_; 517 - padapter->securitypriv.ndisencryptstatus = 518 - Ndis802_11EncryptionDisabled; 528 + padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_; 529 + padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; 519 530 break; 520 531 case WPA_CIPHER_WEP40: 521 532 padapter->securitypriv.PrivacyAlgrthm = _WEP40_; 522 - padapter->securitypriv.ndisencryptstatus = 523 - Ndis802_11Encryption1Enabled; 533 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 524 534 break; 525 535 case WPA_CIPHER_TKIP: 526 536 padapter->securitypriv.PrivacyAlgrthm = _TKIP_; 527 - padapter->securitypriv.ndisencryptstatus = 528 - Ndis802_11Encryption2Enabled; 537 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled; 529 538 break; 530 539 case WPA_CIPHER_CCMP: 531 540 padapter->securitypriv.PrivacyAlgrthm = _AES_; 532 - padapter->securitypriv.ndisencryptstatus = 533 - Ndis802_11Encryption3Enabled; 541 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled; 534 542 break; 535 543 case WPA_CIPHER_WEP104: 536 544 padapter->securitypriv.PrivacyAlgrthm = _WEP104_; 537 - padapter->securitypriv.ndisencryptstatus = 538 - Ndis802_11Encryption1Enabled; 545 + padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 539 546 break; 540 547 } 541 548 padapter->securitypriv.wps_phase = false; ··· 543 574 (buf[cnt + 1] + 2) : 544 575 (MAX_WPA_IE_LEN << 2); 545 576 memcpy(padapter->securitypriv.wps_ie, 546 - &buf[cnt], 547 - padapter->securitypriv.wps_ie_len); 577 + &buf[cnt], 578 + padapter->securitypriv.wps_ie_len); 548 579 padapter->securitypriv.wps_phase = 549 580 true; 550 581 netdev_info(padapter->pnetdev, "r8712u: SET WPS_IE, wps_phase==true\n"); ··· 561 592 return ret; 562 593 } 563 594 564 - static int r8711_wx_get_name(struct net_device *dev, 565 - struct iw_request_info *info, 595 + static int r8711_wx_get_name(struct net_device *dev, struct iw_request_info *info, 566 596 union iwreq_data *wrqu, char *extra) 567 597 { 568 598 struct _adapter *padapter = netdev_priv(dev); ··· 572 604 struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; 573 605 u8 *prates; 574 606 575 - if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == 576 - true) { 607 + if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == true) { 577 608 /* parsing HT_CAP_IE */ 578 609 p = r8712_get_ie(&pcur_bss->IEs[12], WLAN_EID_HT_CAPABILITY, 579 610 &ht_ielen, pcur_bss->IELength - 12); ··· 625 658 int rc = 0; 626 659 627 660 /* If setting by frequency, convert to a channel */ 628 - if ((fwrq->e == 1) && 629 - (fwrq->m >= 241200000) && 630 - (fwrq->m <= 248700000)) { 661 + if ((fwrq->e == 1) && (fwrq->m >= 241200000) && (fwrq->m <= 248700000)) { 631 662 int f = fwrq->m / 100000; 632 663 int c = 0; 633 664 ··· 650 685 return rc; 651 686 } 652 687 653 - static int r8711_wx_get_freq(struct net_device *dev, 654 - struct iw_request_info *info, 688 + static int r8711_wx_get_freq(struct net_device *dev, struct iw_request_info *info, 655 689 union iwreq_data *wrqu, char *extra) 656 690 { 657 691 struct _adapter *padapter = netdev_priv(dev); ··· 709 745 if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) 710 746 wrqu->mode = IW_MODE_INFRA; 711 747 else if (check_fwstate(pmlmepriv, 712 - WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)) 748 + WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)) 713 749 wrqu->mode = IW_MODE_ADHOC; 714 750 else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) 715 751 wrqu->mode = IW_MODE_MASTER; ··· 718 754 return 0; 719 755 } 720 756 721 - static int r871x_wx_set_pmkid(struct net_device *dev, 722 - struct iw_request_info *a, 723 - union iwreq_data *wrqu, char *extra) 757 + static int r871x_wx_set_pmkid(struct net_device *dev, struct iw_request_info *a, 758 + union iwreq_data *wrqu, char *extra) 724 759 { 725 760 struct _adapter *padapter = netdev_priv(dev); 726 761 struct security_priv *psecuritypriv = &padapter->securitypriv; ··· 791 828 break; 792 829 case IW_PMKSA_FLUSH: 793 830 memset(psecuritypriv->PMKIDList, 0, 794 - sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE); 831 + sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE); 795 832 psecuritypriv->PMKIDIndex = 0; 796 833 intReturn = true; 797 834 break; ··· 813 850 return 0; 814 851 } 815 852 816 - static int r8711_wx_get_range(struct net_device *dev, 817 - struct iw_request_info *info, 818 - union iwreq_data *wrqu, char *extra) 853 + static int r8711_wx_get_range(struct net_device *dev, struct iw_request_info *info, 854 + union iwreq_data *wrqu, char *extra) 819 855 { 820 856 struct iw_range *range = (struct iw_range *)extra; 821 857 u16 val; ··· 874 912 union iwreq_data *wrqu, char *extra); 875 913 876 914 static int r871x_wx_set_priv(struct net_device *dev, 877 - struct iw_request_info *info, 878 - union iwreq_data *awrq, 879 - char *extra) 915 + struct iw_request_info *info, 916 + union iwreq_data *awrq, 917 + char *extra) 880 918 { 881 919 int ret = 0, len = 0; 882 920 char *ext; ··· 957 995 ); 958 996 sprintf(ext, "OK"); 959 997 } else { 960 - netdev_info(dev, "r8712u: %s: unknown Command %s.\n", 961 - __func__, ext); 998 + netdev_info(dev, "r8712u: %s: unknown Command %s.\n", __func__, ext); 962 999 goto FREE_EXT; 963 1000 } 964 - if (copy_to_user(dwrq->pointer, ext, 965 - min(dwrq->length, (__u16)(strlen(ext) + 1)))) 1001 + if (copy_to_user(dwrq->pointer, ext, min(dwrq->length, (__u16)(strlen(ext) + 1)))) 966 1002 ret = -EFAULT; 967 1003 968 1004 FREE_EXT: ··· 981 1021 * For this operation to succeed, there is no need for the interface to be up. 982 1022 * 983 1023 */ 984 - static int r8711_wx_set_wap(struct net_device *dev, 985 - struct iw_request_info *info, 986 - union iwreq_data *awrq, 987 - char *extra) 1024 + static int r8711_wx_set_wap(struct net_device *dev, struct iw_request_info *info, 1025 + union iwreq_data *awrq, char *extra) 988 1026 { 989 1027 int ret = -EINPROGRESS; 990 1028 struct _adapter *padapter = netdev_priv(dev); ··· 1030 1072 return ret; 1031 1073 } 1032 1074 1033 - static int r8711_wx_get_wap(struct net_device *dev, 1034 - struct iw_request_info *info, 1035 - union iwreq_data *wrqu, char *extra) 1075 + static int r8711_wx_get_wap(struct net_device *dev, struct iw_request_info *info, 1076 + union iwreq_data *wrqu, char *extra) 1036 1077 { 1037 1078 struct _adapter *padapter = netdev_priv(dev); 1038 1079 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 1039 1080 struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; 1040 1081 1041 1082 wrqu->ap_addr.sa_family = ARPHRD_ETHER; 1042 - if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE | 1043 - WIFI_AP_STATE)) 1083 + if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE | WIFI_AP_STATE)) 1044 1084 ether_addr_copy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress); 1045 1085 else 1046 1086 eth_zero_addr(wrqu->ap_addr.sa_data); ··· 1078 1122 * For this operation to succeed, the interface is brought Up beforehand. 1079 1123 * 1080 1124 */ 1081 - static int r8711_wx_set_scan(struct net_device *dev, 1082 - struct iw_request_info *a, 1083 - union iwreq_data *wrqu, char *extra) 1125 + static int r8711_wx_set_scan(struct net_device *dev, struct iw_request_info *a, 1126 + union iwreq_data *wrqu, char *extra) 1084 1127 { 1085 1128 struct _adapter *padapter = netdev_priv(dev); 1086 1129 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 1105 1150 unsigned long irqL; 1106 1151 u32 len = min_t(u8, req->essid_len, IW_ESSID_MAX_SIZE); 1107 1152 1108 - memset((unsigned char *)&ssid, 0, 1109 - sizeof(struct ndis_802_11_ssid)); 1153 + memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid)); 1110 1154 memcpy(ssid.Ssid, req->essid, len); 1111 1155 ssid.SsidLength = len; 1112 1156 spin_lock_irqsave(&pmlmepriv->lock, irqL); ··· 1127 1173 return 0; 1128 1174 } 1129 1175 1130 - static int r8711_wx_get_scan(struct net_device *dev, 1131 - struct iw_request_info *a, 1132 - union iwreq_data *wrqu, char *extra) 1176 + static int r8711_wx_get_scan(struct net_device *dev, struct iw_request_info *a, 1177 + union iwreq_data *wrqu, char *extra) 1133 1178 { 1134 1179 struct _adapter *padapter = netdev_priv(dev); 1135 1180 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 1142 1189 1143 1190 if (padapter->driver_stopped) 1144 1191 return -EINVAL; 1145 - while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | 1146 - _FW_UNDER_LINKING)) { 1192 + while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) { 1147 1193 msleep(30); 1148 1194 cnt++; 1149 1195 if (cnt > 100) ··· 1180 1228 * For this operation to succeed, there is no need for the interface to be Up. 1181 1229 * 1182 1230 */ 1183 - static int r8711_wx_set_essid(struct net_device *dev, 1184 - struct iw_request_info *a, 1185 - union iwreq_data *wrqu, char *extra) 1231 + static int r8711_wx_set_essid(struct net_device *dev, struct iw_request_info *a, 1232 + union iwreq_data *wrqu, char *extra) 1186 1233 { 1187 1234 struct _adapter *padapter = netdev_priv(dev); 1188 1235 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 1219 1268 if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength)) 1220 1269 && (pnetwork->network.Ssid.SsidLength == 1221 1270 ndis_ssid.SsidLength)) { 1222 - if (check_fwstate(pmlmepriv, 1223 - WIFI_ADHOC_STATE)) { 1271 + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { 1224 1272 if (pnetwork->network. 1225 1273 InfrastructureMode 1226 1274 != ··· 1241 1291 return -EINPROGRESS; 1242 1292 } 1243 1293 1244 - static int r8711_wx_get_essid(struct net_device *dev, 1245 - struct iw_request_info *a, 1246 - union iwreq_data *wrqu, char *extra) 1294 + static int r8711_wx_get_essid(struct net_device *dev, struct iw_request_info *a, 1295 + union iwreq_data *wrqu, char *extra) 1247 1296 { 1248 1297 struct _adapter *padapter = netdev_priv(dev); 1249 1298 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 1260 1311 return ret; 1261 1312 } 1262 1313 1263 - static int r8711_wx_set_rate(struct net_device *dev, 1264 - struct iw_request_info *a, 1265 - union iwreq_data *wrqu, char *extra) 1314 + static int r8711_wx_set_rate(struct net_device *dev, struct iw_request_info *a, 1315 + union iwreq_data *wrqu, char *extra) 1266 1316 { 1267 1317 struct _adapter *padapter = netdev_priv(dev); 1268 1318 u32 target_rate = wrqu->bitrate.value; ··· 1330 1382 return r8712_setdatarate_cmd(padapter, datarates); 1331 1383 } 1332 1384 1333 - static int r8711_wx_get_rate(struct net_device *dev, 1334 - struct iw_request_info *info, 1385 + static int r8711_wx_get_rate(struct net_device *dev, struct iw_request_info *info, 1335 1386 union iwreq_data *wrqu, char *extra) 1336 1387 { 1337 1388 struct _adapter *padapter = netdev_priv(dev); ··· 1384 1437 return 0; 1385 1438 } 1386 1439 1387 - static int r8711_wx_get_rts(struct net_device *dev, 1388 - struct iw_request_info *info, 1389 - union iwreq_data *wrqu, char *extra) 1440 + static int r8711_wx_get_rts(struct net_device *dev, struct iw_request_info *info, 1441 + union iwreq_data *wrqu, char *extra) 1390 1442 { 1391 1443 struct _adapter *padapter = netdev_priv(dev); 1392 1444 ··· 1394 1448 return 0; 1395 1449 } 1396 1450 1397 - static int r8711_wx_set_frag(struct net_device *dev, 1398 - struct iw_request_info *info, 1399 - union iwreq_data *wrqu, char *extra) 1451 + static int r8711_wx_set_frag(struct net_device *dev, struct iw_request_info *info, 1452 + union iwreq_data *wrqu, char *extra) 1400 1453 { 1401 1454 struct _adapter *padapter = netdev_priv(dev); 1402 1455