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

staging: rtl8712: Fix coding style warnings on Block comments

Fixed checkpatch.pl warnings related to Block comments in
staging/rtl8712/*.c files.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vijai Kumar K and committed by
Greg Kroah-Hartman
09b080f7 8d130c3b

+101 -113
+8 -6
drivers/staging/rtl8712/rtl871x_ioctl_set.c
··· 139 139 if (!memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, 140 140 ETH_ALEN)) { 141 141 if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) 142 - goto _Abort_Set_BSSID; /* driver is in 143 - * WIFI_ADHOC_MASTER_STATE 144 - */ 142 + /* driver is in 143 + * WIFI_ADHOC_MASTER_STATE 144 + */ 145 + goto _Abort_Set_BSSID; 145 146 } else { 146 147 r8712_disassoc_cmd(padapter); 147 148 if (check_fwstate(pmlmepriv, _FW_LINKED)) ··· 204 203 WIFI_ADHOC_STATE); 205 204 } 206 205 } else { 207 - goto _Abort_Set_SSID; /* driver is in 208 - * WIFI_ADHOC_MASTER_STATE 209 - */ 206 + /* driver is in 207 + * WIFI_ADHOC_MASTER_STATE 208 + */ 209 + goto _Abort_Set_SSID; 210 210 } 211 211 } 212 212 } else {
+13 -17
drivers/staging/rtl8712/rtl871x_mlme.c
··· 137 137 } 138 138 139 139 140 - /* 141 - return the wlan_network with the matching addr 142 - Shall be called under atomic context... 143 - to avoid possible racing condition... 144 - */ 140 + /* return the wlan_network with the matching addr 141 + * Shall be called under atomic context... 142 + * to avoid possible racing condition... 143 + */ 145 144 static struct wlan_network *_r8712_find_network(struct __queue *scanned_queue, 146 145 u8 *addr) 147 146 { ··· 238 239 } 239 240 240 241 /* 241 - return the wlan_network with the matching addr 242 - 243 - Shall be called under atomic context... 244 - to avoid possible racing condition... 245 - */ 242 + * return the wlan_network with the matching addr 243 + * Shall be called under atomic context... 244 + * to avoid possible racing condition... 245 + */ 246 246 static struct wlan_network *r8712_find_network(struct __queue *scanned_queue, 247 247 u8 *addr) 248 248 { ··· 367 369 } 368 370 } 369 371 370 - /* 371 - Caller must hold pmlmepriv->lock first. 372 - */ 372 + /* Caller must hold pmlmepriv->lock first */ 373 373 static void update_scanned_network(struct _adapter *adapter, 374 374 struct wlan_bssid_ex *target) 375 375 { ··· 647 651 } 648 652 649 653 /* 650 - *r8712_indicate_connect: the caller has to lock pmlmepriv->lock 651 - */ 654 + * r8712_indicate_connect: the caller has to lock pmlmepriv->lock 655 + */ 652 656 void r8712_indicate_connect(struct _adapter *padapter) 653 657 { 654 658 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 664 668 665 669 666 670 /* 667 - *r8712_ind_disconnect: the caller has to lock pmlmepriv->lock 668 - */ 671 + * r8712_ind_disconnect: the caller has to lock pmlmepriv->lock 672 + */ 669 673 void r8712_ind_disconnect(struct _adapter *padapter) 670 674 { 671 675 struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+14 -20
drivers/staging/rtl8712/rtl871x_pwrctrl.c
··· 190 190 } 191 191 192 192 /* 193 - Caller: r8712_cmd_thread 194 - 195 - Check if the fw_pwrstate is okay for issuing cmd. 196 - If not (cpwm should be is less than P2 state), then the sub-routine 197 - will raise the cpwm to be greater than or equal to P2. 198 - 199 - Calling Context: Passive 200 - 201 - Return Value: 202 - 203 - _SUCCESS: r8712_cmd_thread can issue cmds to firmware afterwards. 204 - _FAIL: r8712_cmd_thread can not do anything. 205 - */ 193 + * Caller: r8712_cmd_thread 194 + * Check if the fw_pwrstate is okay for issuing cmd. 195 + * If not (cpwm should be is less than P2 state), then the sub-routine 196 + * will raise the cpwm to be greater than or equal to P2. 197 + * Calling Context: Passive 198 + * Return Value: 199 + * _SUCCESS: r8712_cmd_thread can issue cmds to firmware afterwards. 200 + * _FAIL: r8712_cmd_thread can not do anything. 201 + */ 206 202 sint r8712_register_cmd_alive(struct _adapter *padapter) 207 203 { 208 204 uint res = _SUCCESS; ··· 215 219 } 216 220 217 221 /* 218 - Caller: ISR 219 - 220 - If ISR's txdone, 221 - No more pkts for TX, 222 - Then driver shall call this fun. to power down firmware again. 223 - */ 224 - 222 + * Caller: ISR 223 + * If ISR's txdone, 224 + * No more pkts for TX, 225 + * Then driver shall call this fun. to power down firmware again. 226 + */ 225 227 void r8712_unregister_cmd_alive(struct _adapter *padapter) 226 228 { 227 229 struct pwrctrl_priv *pwrctrl = &padapter->pwrctrlpriv;
+4 -7
drivers/staging/rtl8712/rtl871x_recv.c
··· 125 125 } 126 126 127 127 /* 128 - caller : defrag; recvframe_chk_defrag in recv_thread (passive) 129 - pframequeue: defrag_queue : will be accessed in recv_thread (passive) 130 - 131 - using spin_lock to protect 132 - 133 - */ 134 - 128 + * caller : defrag; recvframe_chk_defrag in recv_thread (passive) 129 + * pframequeue: defrag_queue : will be accessed in recv_thread (passive) 130 + * using spin_lock to protect 131 + */ 135 132 void r8712_free_recvframe_queue(struct __queue *pframequeue, 136 133 struct __queue *pfree_recv_queue) 137 134 {
+40 -40
drivers/staging/rtl8712/rtl871x_security.c
··· 159 159 } 160 160 161 161 /* 162 - Need to consider the fragment situation 163 - */ 162 + * Need to consider the fragment situation 163 + */ 164 164 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe) 165 165 { /* exclude ICV */ 166 166 unsigned char crc[4]; ··· 467 467 }; 468 468 469 469 /* 470 - ********************************************************************** 471 - * Routine: Phase 1 -- generate P1K, given TA, TK, IV32 472 - * 473 - * Inputs: 474 - * tk[] = temporal key [128 bits] 475 - * ta[] = transmitter's MAC address [ 48 bits] 476 - * iv32 = upper 32 bits of IV [ 32 bits] 477 - * Output: 478 - * p1k[] = Phase 1 key [ 80 bits] 479 - * 480 - * Note: 481 - * This function only needs to be called every 2**16 packets, 482 - * although in theory it could be called every packet. 483 - * 484 - ********************************************************************** 485 - */ 470 + ********************************************************************** 471 + * Routine: Phase 1 -- generate P1K, given TA, TK, IV32 472 + * 473 + * Inputs: 474 + * tk[] = temporal key [128 bits] 475 + * ta[] = transmitter's MAC address [ 48 bits] 476 + * iv32 = upper 32 bits of IV [ 32 bits] 477 + * Output: 478 + * p1k[] = Phase 1 key [ 80 bits] 479 + * 480 + * Note: 481 + * This function only needs to be called every 2**16 packets, 482 + * although in theory it could be called every packet. 483 + * 484 + ********************************************************************** 485 + */ 486 486 static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) 487 487 { 488 488 sint i; ··· 506 506 } 507 507 508 508 /* 509 - ********************************************************************** 510 - * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 511 - * 512 - * Inputs: 513 - * tk[] = Temporal key [128 bits] 514 - * p1k[] = Phase 1 output key [ 80 bits] 515 - * iv16 = low 16 bits of IV counter [ 16 bits] 516 - * Output: 517 - * rc4key[] = the key used to encrypt the packet [128 bits] 518 - * 519 - * Note: 520 - * The value {TA,IV32,IV16} for Phase1/Phase2 must be unique 521 - * across all packets using the same key TK value. Then, for a 522 - * given value of TK[], this TKIP48 construction guarantees that 523 - * the final RC4KEY value is unique across all packets. 524 - * 525 - * Suggested implementation optimization: if PPK[] is "overlaid" 526 - * appropriately on RC4KEY[], there is no need for the final 527 - * for loop below that copies the PPK[] result into RC4KEY[]. 528 - * 529 - ********************************************************************** 530 - */ 509 + ********************************************************************** 510 + * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 511 + * 512 + * Inputs: 513 + * tk[] = Temporal key [128 bits] 514 + * p1k[] = Phase 1 output key [ 80 bits] 515 + * iv16 = low 16 bits of IV counter [ 16 bits] 516 + * Output: 517 + * rc4key[] = the key used to encrypt the packet [128 bits] 518 + * 519 + * Note: 520 + * The value {TA,IV32,IV16} for Phase1/Phase2 must be unique 521 + * across all packets using the same key TK value. Then, for a 522 + * given value of TK[], this TKIP48 construction guarantees that 523 + * the final RC4KEY value is unique across all packets. 524 + * 525 + * Suggested implementation optimization: if PPK[] is "overlaid" 526 + * appropriately on RC4KEY[], there is no need for the final 527 + * for loop below that copies the PPK[] result into RC4KEY[]. 528 + * 529 + ********************************************************************** 530 + */ 531 531 static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) 532 532 { 533 533 sint i;
+22 -23
drivers/staging/rtl8712/rtl871x_xmit.c
··· 71 71 memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv)); 72 72 spin_lock_init(&pxmitpriv->lock); 73 73 /* 74 - Please insert all the queue initialization using _init_queue below 75 - */ 74 + *Please insert all the queue initialization using _init_queue below 75 + */ 76 76 pxmitpriv->adapter = padapter; 77 77 _init_queue(&pxmitpriv->be_pending); 78 78 _init_queue(&pxmitpriv->bk_pending); ··· 83 83 _init_queue(&pxmitpriv->apsd_queue); 84 84 _init_queue(&pxmitpriv->free_xmit_queue); 85 85 /* 86 - Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME, 87 - and initialize free_xmit_frame below. 88 - Please also apply free_txobj to link_up all the xmit_frames... 89 - */ 86 + * Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME, 87 + * and initialize free_xmit_frame below. 88 + * Please also apply free_txobj to link_up all the xmit_frames... 89 + */ 90 90 pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4, 91 91 GFP_ATOMIC); 92 92 if (!pxmitpriv->pallocated_frame_buf) { ··· 109 109 } 110 110 pxmitpriv->free_xmitframe_cnt = NR_XMITFRAME; 111 111 /* 112 - init xmit hw_txqueue 113 - */ 112 + * init xmit hw_txqueue 113 + */ 114 114 _r8712_init_hw_txqueue(&pxmitpriv->be_txqueue, BE_QUEUE_INX); 115 115 _r8712_init_hw_txqueue(&pxmitpriv->bk_txqueue, BK_QUEUE_INX); 116 116 _r8712_init_hw_txqueue(&pxmitpriv->vi_txqueue, VI_QUEUE_INX); ··· 780 780 } 781 781 782 782 /* 783 - Calling context: 784 - 1. OS_TXENTRY 785 - 2. RXENTRY (rx_thread or RX_ISR/RX_CallBack) 786 - 787 - If we turn on USE_RXTHREAD, then, no need for critical section. 788 - Otherwise, we must use _enter/_exit critical to protect free_xmit_queue... 789 - 790 - Must be very very cautious... 791 - 792 - */ 793 - 783 + * Calling context: 784 + * 1. OS_TXENTRY 785 + * 2. RXENTRY (rx_thread or RX_ISR/RX_CallBack) 786 + * 787 + * If we turn on USE_RXTHREAD, then, no need for critical section. 788 + * Otherwise, we must use _enter/_exit critical to protect free_xmit_queue... 789 + * 790 + * Must be very very cautious... 791 + * 792 + */ 794 793 struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv) 795 794 { 796 795 /* 797 - Please remember to use all the osdep_service api, 798 - and lock/unlock or _enter/_exit critical to protect 799 - pfree_xmit_queue 800 - */ 796 + * Please remember to use all the osdep_service api, 797 + * and lock/unlock or _enter/_exit critical to protect 798 + * pfree_xmit_queue 799 + */ 801 800 unsigned long irqL; 802 801 struct xmit_frame *pxframe; 803 802 struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;