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

Staging: rtl8192e: Less verbose function headers

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Mike McCormack and committed by
Greg Kroah-Hartman
533d1ffe 7f440f49

+75 -385
+26 -195
drivers/staging/rtl8192e/r8192E_dm.c
··· 145 145 static void dm_send_rssi_tofw(struct net_device *dev); 146 146 static void dm_ctstoself(struct net_device *dev); 147 147 148 - //================================================================================ 149 - // HW Dynamic mechanism interface. 150 - //================================================================================ 151 - 152 - // 153 - // Description: 154 - // Prepare SW resource for HW dynamic mechanism. 155 - // 156 - // Assumption: 157 - // This function is only invoked at driver intialization once. 158 - // 159 - // 148 + /* 149 + * Prepare SW resource for HW dynamic mechanism. 150 + * This function is only invoked at driver intialization once. 151 + */ 160 152 void init_hal_dm(struct net_device *dev) 161 153 { 162 154 struct r8192_priv *priv = ieee80211_priv(dev); ··· 342 350 } 343 351 344 352 345 - /*----------------------------------------------------------------------------- 346 - * Function: dm_check_rate_adaptive() 347 - * 348 - * Overview: 349 - * 350 - * Input: NONE 351 - * 352 - * Output: NONE 353 - * 354 - * Return: NONE 355 - * 356 - * Revised History: 357 - * When Who Remark 358 - * 05/26/08 amy Create version 0 proting from windows code. 359 - * 360 - *---------------------------------------------------------------------------*/ 361 353 static void dm_check_rate_adaptive(struct net_device * dev) 362 354 { 363 355 struct r8192_priv *priv = ieee80211_priv(dev); ··· 1867 1891 } 1868 1892 1869 1893 #endif 1870 - /*----------------------------------------------------------------------------- 1871 - * Function: dm_change_dynamic_initgain_thresh() 1872 - * 1873 - * Overview: 1874 - * 1875 - * Input: NONE 1876 - * 1877 - * Output: NONE 1878 - * 1879 - * Return: NONE 1880 - * 1881 - * Revised History: 1882 - * When Who Remark 1883 - * 05/29/2008 amy Create Version 0 porting from windows code. 1884 - * 1885 - *---------------------------------------------------------------------------*/ 1894 + 1886 1895 void dm_change_dynamic_initgain_thresh(struct net_device *dev, u32 dm_type, u32 dm_value) 1887 1896 { 1888 1897 if (dm_type == DIG_TYPE_THRESH_HIGH) ··· 1937 1976 } 1938 1977 1939 1978 1940 - /*----------------------------------------------------------------------------- 1941 - * Function: dm_dig_init() 1942 - * 1943 - * Overview: Set DIG scheme init value. 1944 - * 1945 - * Input: NONE 1946 - * 1947 - * Output: NONE 1948 - * 1949 - * Return: NONE 1950 - * 1951 - * Revised History: 1952 - * When Who Remark 1953 - * 05/15/2008 amy Create Version 0 porting from windows code. 1954 - * 1955 - *---------------------------------------------------------------------------*/ 1979 + /* Set DIG scheme init value. */ 1956 1980 static void dm_dig_init(struct net_device *dev) 1957 1981 { 1958 1982 struct r8192_priv *priv = ieee80211_priv(dev); ··· 1969 2023 } 1970 2024 1971 2025 1972 - /*----------------------------------------------------------------------------- 1973 - * Function: dm_ctrl_initgain_byrssi() 1974 - * 1975 - * Overview: Driver must monitor RSSI and notify firmware to change initial 1976 - * gain according to different threshold. BB team provide the 1977 - * suggested solution. 1978 - * 1979 - * Input: struct net_device *dev 1980 - * 1981 - * Output: NONE 1982 - * 1983 - * Return: NONE 1984 - * 1985 - * Revised History: 1986 - * When Who Remark 1987 - * 05/27/2008 amy Create Version 0 porting from windows code. 1988 - *---------------------------------------------------------------------------*/ 2026 + /* 2027 + * Driver must monitor RSSI and notify firmware to change initial 2028 + * gain according to different threshold. BB team provide the 2029 + * suggested solution. 2030 + */ 1989 2031 static void dm_ctrl_initgain_byrssi(struct net_device *dev) 1990 2032 { 1991 2033 ··· 2199 2265 2200 2266 } 2201 2267 2202 - 2203 - /*----------------------------------------------------------------------------- 2204 - * Function: dm_ctrl_initgain_byrssi_highpwr() 2205 - * 2206 - * Overview: 2207 - * 2208 - * Input: NONE 2209 - * 2210 - * Output: NONE 2211 - * 2212 - * Return: NONE 2213 - * 2214 - * Revised History: 2215 - * When Who Remark 2216 - * 05/28/2008 amy Create Version 0 porting from windows code. 2217 - * 2218 - *---------------------------------------------------------------------------*/ 2219 2268 static void dm_ctrl_initgain_byrssi_highpwr( 2220 2269 struct net_device * dev) 2221 2270 { ··· 2702 2785 2703 2786 2704 2787 2705 - /*----------------------------------------------------------------------------- 2706 - * Function: dm_check_rfctrl_gpio() 2707 - * 2708 - * Overview: Copy 8187B template for 9xseries. 2709 - * 2710 - * Input: NONE 2711 - * 2712 - * Output: NONE 2713 - * 2714 - * Return: NONE 2715 - * 2716 - * Revised History: 2717 - * When Who Remark 2718 - * 05/28/2008 amy Create Version 0 porting from windows code. 2719 - * 2720 - *---------------------------------------------------------------------------*/ 2788 + /* Copy 8187B template for 9xseries */ 2721 2789 #if 1 2722 2790 static void dm_check_rfctrl_gpio(struct net_device * dev) 2723 2791 { ··· 2728 2826 } 2729 2827 2730 2828 #endif 2731 - /*----------------------------------------------------------------------------- 2732 - * Function: dm_check_pbc_gpio() 2733 - * 2734 - * Overview: Check if PBC button is pressed. 2735 - * 2736 - * Input: NONE 2737 - * 2738 - * Output: NONE 2739 - * 2740 - * Return: NONE 2741 - * 2742 - * Revised History: 2743 - * When Who Remark 2744 - * 05/28/2008 amy Create Version 0 porting from windows code. 2745 - * 2746 - *---------------------------------------------------------------------------*/ 2829 + /* Check if PBC button is pressed. */ 2747 2830 static void dm_check_pbc_gpio(struct net_device *dev) 2748 2831 { 2749 2832 #ifdef RTL8192U ··· 2753 2866 2754 2867 #ifdef RTL8192E 2755 2868 2756 - /*----------------------------------------------------------------------------- 2757 - * Function: dm_GPIOChangeRF 2758 - * Overview: PCI will not support workitem call back HW radio on-off control. 2759 - * 2760 - * Input: NONE 2761 - * 2762 - * Output: NONE 2763 - * 2764 - * Return: NONE 2765 - * 2766 - * Revised History: 2767 - * When Who Remark 2768 - * 02/21/2008 MHC Create Version 0. 2769 - * 2770 - *---------------------------------------------------------------------------*/ 2869 + /* PCI will not support workitem call back HW radio on-off control. */ 2771 2870 void dm_gpio_change_rf_callback(struct work_struct *work) 2772 2871 { 2773 2872 struct delayed_work *dwork = container_of(work,struct delayed_work,work); 2774 - struct r8192_priv *priv = container_of(dwork,struct r8192_priv,gpio_change_rf_wq); 2775 - struct net_device *dev = priv->ieee80211->dev; 2873 + struct r8192_priv *priv = container_of(dwork,struct r8192_priv,gpio_change_rf_wq); 2874 + struct net_device *dev = priv->ieee80211->dev; 2776 2875 u8 tmp1byte; 2777 2876 RT_RF_POWER_STATE eRfPowerStateToSet; 2778 2877 bool bActuallySet = false; ··· 2794 2921 } 2795 2922 2796 2923 #endif 2797 - /*----------------------------------------------------------------------------- 2798 - * Function: DM_RFPathCheckWorkItemCallBack() 2799 - * 2800 - * Overview: Check if Current RF RX path is enabled 2801 - * 2802 - * Input: NONE 2803 - * 2804 - * Output: NONE 2805 - * 2806 - * Return: NONE 2807 - * 2808 - * Revised History: 2809 - * When Who Remark 2810 - * 01/30/2008 MHC Create Version 0. 2811 - * 2812 - *---------------------------------------------------------------------------*/ 2924 + 2925 + /* Check if Current RF RX path is enabled */ 2813 2926 void dm_rf_pathcheck_workitemcallback(struct work_struct *work) 2814 2927 { 2815 2928 struct delayed_work *dwork = container_of(work,struct delayed_work,work); ··· 3106 3247 } 3107 3248 } 3108 3249 3109 - /*----------------------------------------------------------------------------- 3110 - * Function: dm_check_rx_path_selection() 3111 - * 3112 - * Overview: Call a workitem to check current RXRF path and Rx Path selection by RSSI. 3113 - * 3114 - * Input: NONE 3115 - * 3116 - * Output: NONE 3117 - * 3118 - * Return: NONE 3119 - * 3120 - * Revised History: 3121 - * When Who Remark 3122 - * 05/28/2008 amy Create Version 0 porting from windows code. 3123 - * 3124 - *---------------------------------------------------------------------------*/ 3125 - static void dm_check_rx_path_selection(struct net_device *dev) 3250 + /* 3251 + * Call a workitem to check current RXRF path and Rx Path selection by RSSI. 3252 + */ 3253 + static void dm_check_rx_path_selection(struct net_device *dev) 3126 3254 { 3127 3255 struct r8192_priv *priv = ieee80211_priv(dev); 3128 3256 queue_delayed_work(priv->priv_wq,&priv->rfpath_check_wq,0); 3129 3257 } 3130 - 3131 3258 3132 3259 static void dm_init_fsync (struct net_device *dev) 3133 3260 { ··· 3509 3664 } 3510 3665 } 3511 3666 3512 - /*---------------------------Define function prototype------------------------*/ 3513 - /*----------------------------------------------------------------------------- 3514 - * Function: DM_DynamicTxPower() 3515 - * 3516 - * Overview: Detect Signal strength to control TX Registry 3517 - Tx Power Control For Near/Far Range 3518 - * 3519 - * Input: NONE 3520 - * 3521 - * Output: NONE 3522 - * 3523 - * Return: NONE 3524 - * 3525 - * Revised History: 3526 - * When Who Remark 3527 - * 03/06/2008 Jacken Create Version 0. 3528 - * 3529 - *---------------------------------------------------------------------------*/ 3667 + /* 3668 + * Detect Signal strength to control TX Registry 3669 + * Tx Power Control For Near/Far Range 3670 + */ 3530 3671 static void dm_init_dynamic_txpower(struct net_device *dev) 3531 3672 { 3532 3673 struct r8192_priv *priv = ieee80211_priv(dev);
+44 -169
drivers/staging/rtl8192e/r819xE_cmdpkt.c
··· 25 25 #include "r8192E_hw.h" 26 26 #include "r819xE_cmdpkt.h" 27 27 28 - /*----------------------------------------------------------------------------- 29 - * Function: cmpk_message_handle_tx() 30 - * 31 - * Overview: Driver internal module can call the API to send message to 32 - * firmware side. For example, you can send a debug command packet. 33 - * Or you can send a request for FW to modify RLX4181 LBUS HW bank. 34 - * Otherwise, you can change MAC/PHT/RF register by firmware at 35 - * run time. We do not support message more than one segment now. 36 - * 37 - * Input: NONE 38 - * 39 - * Output: NONE 40 - * 41 - * Return: NONE 42 - * 43 - * Revised History: 44 - * When Who Remark 45 - * 05/06/2008 amy porting from windows code. 46 - * 47 - *---------------------------------------------------------------------------*/ 28 + /* 29 + * Driver internal module can call the API to send message to 30 + * firmware side. For example, you can send a debug command packet. 31 + * Or you can send a request for FW to modify RLX4181 LBUS HW bank. 32 + * Otherwise, you can change MAC/PHT/RF register by firmware at 33 + * run time. We do not support message more than one segment now. 34 + */ 48 35 RT_STATUS cmpk_message_handle_tx( 49 36 struct net_device *dev, 50 37 u8* code_virtual_address, ··· 131 144 #endif 132 145 } 133 146 134 - /*----------------------------------------------------------------------------- 135 - * Function: cmpk_counttxstatistic() 136 - * 137 - * Overview: 138 - * 139 - * Input: PADAPTER pAdapter - . 140 - * CMPK_TXFB_T *psTx_FB - . 141 - * 142 - * Output: NONE 143 - * 144 - * Return: NONE 145 - * 146 - * Revised History: 147 - * When Who Remark 148 - * 05/12/2008 amy Create Version 0 porting from windows code. 149 - * 150 - *---------------------------------------------------------------------------*/ 151 - static void 147 + static void 152 148 cmpk_count_txstatistic( 153 149 struct net_device *dev, 154 150 cmpk_txfb_t *pstx_fb) ··· 210 240 211 241 212 242 213 - /*----------------------------------------------------------------------------- 214 - * Function: cmpk_handle_tx_feedback() 215 - * 216 - * Overview: The function is responsible for extract the message inside TX 217 - * feedbck message from firmware. It will contain dedicated info in 218 - * ws-06-0063-rtl8190-command-packet-specification. Please 219 - * refer to chapter "TX Feedback Element". We have to read 20 bytes 220 - * in the command packet. 221 - * 222 - * Input: struct net_device * dev 223 - * u8 * pmsg - Msg Ptr of the command packet. 224 - * 225 - * Output: NONE 226 - * 227 - * Return: NONE 228 - * 229 - * Revised History: 230 - * When Who Remark 231 - * 05/08/2008 amy Create Version 0 porting from windows code. 232 - * 233 - *---------------------------------------------------------------------------*/ 234 - static void 243 + /* 244 + * The function is responsible for extract the message inside TX 245 + * feedbck message from firmware. It will contain dedicated info in 246 + * ws-06-0063-rtl8190-command-packet-specification. Please 247 + * refer to chapter "TX Feedback Element". We have to read 20 bytes 248 + * in the command packet. 249 + */ 250 + static void 235 251 cmpk_handle_tx_feedback( 236 252 struct net_device *dev, 237 253 u8 * pmsg) ··· 279 323 } 280 324 281 325 282 - /*----------------------------------------------------------------------------- 283 - * Function: cmpk_handle_interrupt_status() 284 - * 285 - * Overview: The function is responsible for extract the message from 286 - * firmware. It will contain dedicated info in 287 - * ws-07-0063-v06-rtl819x-command-packet-specification-070315.doc. 288 - * Please refer to chapter "Interrupt Status Element". 289 - * 290 - * Input: struct net_device *dev, 291 - * u8* pmsg - Message Pointer of the command packet. 292 - * 293 - * Output: NONE 294 - * 295 - * Return: NONE 296 - * 297 - * Revised History: 298 - * When Who Remark 299 - * 05/12/2008 amy Add this for rtl8192 porting from windows code. 300 - * 301 - *---------------------------------------------------------------------------*/ 326 + /* 327 + * The function is responsible for extract the message from 328 + * firmware. It will contain dedicated info in 329 + * ws-07-0063-v06-rtl819x-command-packet-specification-070315.doc. 330 + * Please refer to chapter "Interrupt Status Element". 331 + */ 302 332 static void 303 333 cmpk_handle_interrupt_status( 304 334 struct net_device *dev, ··· 341 399 } 342 400 343 401 344 - /*----------------------------------------------------------------------------- 345 - * Function: cmpk_handle_query_config_rx() 346 - * 347 - * Overview: The function is responsible for extract the message from 348 - * firmware. It will contain dedicated info in 349 - * ws-06-0063-rtl8190-command-packet-specification. Please 350 - * refer to chapter "Beacon State Element". 351 - * 352 - * Input: u8 * pmsg - Message Pointer of the command packet. 353 - * 354 - * Output: NONE 355 - * 356 - * Return: NONE 357 - * 358 - * Revised History: 359 - * When Who Remark 360 - * 05/12/2008 amy Create Version 0 porting from windows code. 361 - * 362 - *---------------------------------------------------------------------------*/ 402 + /* 403 + * The function is responsible for extract the message from 404 + * firmware. It will contain dedicated info in 405 + * ws-06-0063-rtl8190-command-packet-specification. Please 406 + * refer to chapter "Beacon State Element". 407 + */ 363 408 static void 364 409 cmpk_handle_query_config_rx( 365 410 struct net_device *dev, ··· 376 447 } 377 448 378 449 379 - /*----------------------------------------------------------------------------- 380 - * Function: cmpk_count_tx_status() 381 - * 382 - * Overview: Count aggregated tx status from firmwar of one type rx command 383 - * packet element id = RX_TX_STATUS. 384 - * 385 - * Input: NONE 386 - * 387 - * Output: NONE 388 - * 389 - * Return: NONE 390 - * 391 - * Revised History: 392 - * When Who Remark 393 - * 05/12/2008 amy Create Version 0 porting from windows code. 394 - * 395 - *---------------------------------------------------------------------------*/ 450 + /* 451 + * Count aggregated tx status from firmwar of one type rx command 452 + * packet element id = RX_TX_STATUS. 453 + */ 396 454 static void cmpk_count_tx_status( struct net_device *dev, 397 455 cmpk_tx_status_t *pstx_status) 398 456 { ··· 430 514 431 515 432 516 433 - /*----------------------------------------------------------------------------- 434 - * Function: cmpk_handle_tx_status() 435 - * 436 - * Overview: Firmware add a new tx feedback status to reduce rx command 437 - * packet buffer operation load. 438 - * 439 - * Input: NONE 440 - * 441 - * Output: NONE 442 - * 443 - * Return: NONE 444 - * 445 - * Revised History: 446 - * When Who Remark 447 - * 05/12/2008 amy Create Version 0 porting from windows code. 448 - * 449 - *---------------------------------------------------------------------------*/ 517 + /* 518 + * Firmware add a new tx feedback status to reduce rx command 519 + * packet buffer operation load. 520 + */ 450 521 static void 451 522 cmpk_handle_tx_status( 452 523 struct net_device *dev, ··· 448 545 } 449 546 450 547 451 - /*----------------------------------------------------------------------------- 452 - * Function: cmpk_handle_tx_rate_history() 453 - * 454 - * Overview: Firmware add a new tx rate history 455 - * 456 - * Input: NONE 457 - * 458 - * Output: NONE 459 - * 460 - * Return: NONE 461 - * 462 - * Revised History: 463 - * When Who Remark 464 - * 05/12/2008 amy Create Version 0 porting from windows code. 465 - * 466 - *---------------------------------------------------------------------------*/ 548 + /* Firmware add a new tx rate history */ 467 549 static void 468 550 cmpk_handle_tx_rate_history( 469 551 struct net_device *dev, ··· 513 625 } 514 626 515 627 516 - /*----------------------------------------------------------------------------- 517 - * Function: cmpk_message_handle_rx() 518 - * 519 - * Overview: In the function, we will capture different RX command packet 520 - * info. Every RX command packet element has different message 521 - * length and meaning in content. We only support three type of RX 522 - * command packet now. Please refer to document 523 - * ws-06-0063-rtl8190-command-packet-specification. 524 - * 525 - * Input: NONE 526 - * 527 - * Output: NONE 528 - * 529 - * Return: NONE 530 - * 531 - * Revised History: 532 - * When Who Remark 533 - * 05/06/2008 amy Create Version 0 porting from windows code. 534 - * 535 - *---------------------------------------------------------------------------*/ 628 + /* 629 + * In the function, we will capture different RX command packet 630 + * info. Every RX command packet element has different message 631 + * length and meaning in content. We only support three type of RX 632 + * command packet now. Please refer to document 633 + * ws-06-0063-rtl8190-command-packet-specification. 634 + */ 536 635 u32 cmpk_message_handle_rx(struct net_device *dev, struct ieee80211_rx_stats *pstats) 537 636 { 538 637 // u32 debug_level = DBG_LOUD;
+5 -21
drivers/staging/rtl8192e/r819xE_firmware.c
··· 3 3 * 4 4 * Description: This routine will initialize firmware. If any error occurs 5 5 * during the initialization process, the routine shall terminate 6 - * immediately and return fail. NIC driver should call 7 - * NdisOpenFile only from MiniportInitialize. 8 - * 9 - * Arguments: The pointer of the adapter 10 - * 11 - * Returns: 12 - * NDIS_STATUS_FAILURE - the following initialization process 13 - * should be terminated 14 - * NDIS_STATUS_SUCCESS - if firmware initialization process 15 - * success 6 + * immediately and return fail. 16 7 */ 17 8 18 9 #include "r8192E.h" ··· 107 116 } 108 117 109 118 /* 110 - * Procedure: Check whether main code is download OK. If OK, turn on CPU 119 + * Check whether main code is download OK. If OK, turn on CPU 111 120 * 112 - * Description: CPU register locates in different page against general 113 - * register. Switch to CPU register in the begin and switch 114 - * back before return 115 - * 116 - * Arguments: The pointer of the adapter 117 - * 118 - * Returns: 119 - * NDIS_STATUS_FAILURE - the following initialization process should be 120 - * terminated 121 - * NDIS_STATUS_SUCCESS - if firmware initialization process success 121 + * CPU register locates in different page against general 122 + * register. Switch to CPU register in the begin and switch 123 + * back before return 122 124 */ 123 125 static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) 124 126 {