aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-08staging:rtl8192u: Remove unused macro definitions - StyleJohn Whitmore1-8/+0
Removed unused macro definitions as they add nothing to the code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging:rtl8192u: Add spaces around '+' operator - StyleJohn Whitmore1-2/+2
Add spaces around '+' operator as required by the coding standard. This clears the checkpatch issue. This change is purely coding style in nature and should have not effect on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging:rtl8192u: Remove stale comment - StyleJohn Whitmore1-2/+0
Remove a comment which appears to be from a previous version of code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Replace magic number with defined constant - StyleJohn Whitmore1-1/+1
Replace the magic number '8' with defined constant which is normally used 'MAX_DEV_ADDR_SIZE'. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove comments - StyleJohn Whitmore1-3/+3
Removal of three comments. The comments in question do not add anything to the understanding of the code, and if they are necessary it would imply that the structure and its member variables are badly named. This is a simple style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove blank line - StyleJohn Whitmore1-1/+0
Removal of a blank like which causes a checkpatch issue. This is a simple coding style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename multiple variables - StyleJohn Whitmore1-33/+33
All of the variables used within the structures of the union qos_tclas cause checkpatch issue due to CamelCase naming. As none the member variables are used in code all have been changed on one patch. These changes are coding style in nature and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename types in QOS_TCLAS union - StyleJohn Whitmore1-10/+10
Whilst none of the structures inside the qos_tclas union are used, their names conflict with the coding standard being named in uppercase. The names of all five have been changed to lowercase. This is a style change, and since none of the structures are referenced, these changes should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove typedef and rename QOS_TCLAS - StyleJohn Whitmore2-6/+6
Remove the typedef from the union QOS_TCLAS, which causes a checkpatch issue with defining new types. In addition, as a type, the name should be in lowercase so has been changed. These are coding style changes and should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Clean up of spacing - StyleJohn Whitmore1-65/+58
Multiple blank line, which cause an issue with checkpath, have been removed and the spacing of definitions have been aligned to look cleaner. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename Register Constants - StyleJohn Whitmore2-12/+12
The four register constants, 'Current_Tx_Rate_Reg', 'Initial_Tx_Rate_Reg', 'Tx_Retry_Count_Reg' and 'RegC38_TH' all cause checkpatch issue with CamelCase naming. The three have been renamed to 'CURRENT_TX_RATE_REG', 'INITIAL_TX_RATE_REG', 'TX_RETRY_COUNT_REG' and 'REG_C38_TH' respectively. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename constants - StyleJohn Whitmore3-4/+4
The constants 'VeryLowRSSI' and 'CTSToSelfTHVal' generate warnings from checkpatch due to the use of CamelCase naming. The two constants have been renamed to 'VERY_LOW_RSSI' and 'CTS_TO_SELF_TH_VAL' respectively. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - StyleJohn Whitmore3-10/+10
The two constants, RateAdaptiveTH_Low_20M and RateAdaptiveTH_Low_40M generate a checkpatch warning about CamelCase naming. The two have been renamed to clear this issue. RATE_ADAPTIVE_TH_LOW_20M and RATE_ADAPTIVE_TH_LOW_40M This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename RateAdaptiveTH_High - StyleJohn Whitmore3-5/+5
The constant RateAdaptiveTH_High causes a checkpatch issue with respect to CamelCase naming. As a result the constant has been renamed to RATE_ADAPTIVE_TH_HIGH. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename DM_DIG_MIN_Netcore - StyleJohn Whitmore2-2/+2
The constant DM_DIG_MIN_Netcore causes a checkpatch issue with CamelCase naming so has been renamed to DM_DIG_MIN_NETCORE. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Refactor DCMD_TXCMD_T structure - StyleJohn Whitmore2-10/+11
The structure DCMD_TXCMD_T is declared with a typedef, which causes a checkpatch issue with defining new types. As a result the typedef has been removed. The structure's name DCMD_TXCMD_T, as a type, is meant to be lowercase so has been renamed to tx_config_cmd. The structures three members, (Op, Length, and Value) are all violating the coding standard policy on CamelCase naming, so have all been renamed. They have been renamed with longer names, (cmd_op, cmd_length and cmd_value), to make the variable names easier to search for in code. The magic numbers '4' and '12' have both been replaced with sizeof() calls, as they both represent the size of data elements. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove member reserved - StyleJohn Whitmore1-1/+0
The structure dynamic_rx_path_sel contains a u8 member variable called reserved. This member variable is never actually used in the code. The naming suggests that the sizeof the structure is significant but the only use of the structure is a local static in r8192U_dm.c: static struct dynamic_rx_path_sel DM_RxPathSelTable; There is no apparent significance to the sizeof the declared structure DM_RxPathSelTable. As a result the reserved member variable has been removed from the structure. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename member disabledRF - StyleJohn Whitmore2-6/+6
Rename the member variable disabledRF to disabled_rf. This change resolves the checkpatch issue with CamelCase naming. The change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove member diff_TH - StyleJohn Whitmore2-4/+2
The member variable diff_TH is assigned a constant value and then used in a comparison. The variable is never changed so the comparison can as easily be performed directly with the defined constant. The member variable has been removed and the defined constant RxPathSelection_diff_TH renamed to RX_PATH_SELECTION_DIFF_TH, to clear the checkpatch issue with CamelCase naming. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove SS_TH_low - StyleJohn Whitmore2-4/+2
The member variable SS_TH_low is assigned a constant and then used in a comparison. This member variable is redundant as the constant can be used directly for the comparison. In addition the constant RxPathSelection_SS_TH_low has been renamed to RX_PATH_SELECTION_SS_TH_LOW, to clear the checkpatch issue with CamelCase naming. These changes are coding style in nature and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename cck_Rx_path - StyleJohn Whitmore2-5/+5
Rename the member variable cck_Rx_path to cck_rx_path. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact one runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove member variable Enable - StyleJohn Whitmore2-4/+0
The structure dynamic_rx_path_sel defines a member variable 'Enable' which is initialised and later tested. The variable is however never changed to the test is redundant and the member variable is then never used. The member variable, initialisation and test have all been removed. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove unused extern DM_RxPathSelTable - StyleJohn Whitmore2-2/+1
The file r8192U_dm.h defines the structure DM_RxPathSelTable as being external. The structure is however declared in r8192U_dm.c and only used locally in that file. As a result the external definition has been removed and the declaration in r8192U_dm.c changed to being of type static. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Rename enum constants - StyleJohn Whitmore2-8/+8
Rename the two constants defined in the enumerated type enum cck_rx_path_method so that they are both uppercase, as suggested by the coding style. This is purely a coding style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove member initialgain_lowerbound_state - StyleJohn Whitmore2-2/+0
The structure 'dig' defines a member variable 'initialgain_lowerbound_state', which although initialised to false, is never used in the code. As a result this unused member variable has been removed. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove member variable rx_gain_range_max - StyleJohn Whitmore2-4/+2
The structure 'dig' defines a member variable, (rx_gain_range_max) which is initialised to the value 'DM_DIG_MAX', (a defined constant). The variable is then used to test and set another variable. Since the member rx_gain_range_max is never assigned any other value then the constant 'DM_DIG_MAX' the code might as well simply use that constant, rather the a member variable set to that constant. The member variable has been removed and the constant used directly in the code. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging:rtl8192u: Remove debug member from structures - StyleJohn Whitmore2-14/+2
Two structures, (struct dig and struct dynamic_rx_path_sel) contain a u8 member variable representing debug setting. In the file r8192U_dm.c these member variables, for both structures, are initialised to an enumerated constant 'DM_DBG_OFF'. The member variables are never assigned another value, other then off. Later in code the member variables are tested to for equality to 'DM_DBG_OFF' and if that is the case an assignment statement is executed. Since the value of the variables is always off the test is redundant and the conditional branch can just be executed without the test. Since the member variables are then actually used both have been removed, along with the enumerated type which defines debug status, on/off. These are coding style changes to remove unused or redundant code, there should be no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Change clock comment - StyleJohn Whitmore1-7/+7
A number of block comments have been changed to comply with the coding standard. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Rename IsACValid and add parenthesis - StyleJohn Whitmore2-2/+2
The macro IsACValid is renamed to resolve the checkpatch issue with CamelCase naming. In addition the parameter has parenthesis added to clear the checkpatch issue with precedence issues. These changes are coding style changes and as such should have not impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Remove unused UP2AC - StyleJohn Whitmore1-3/+0
The macro UP2AC is commented out of the header file so the macro and its associated comment are removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Rename octet_string members - StyleJohn Whitmore3-21/+21
Rename the structure octet_string's member variables Octet to octet and Length to length. This change clears the checkpatch issue with CamelCase naming of variables. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: rename OCTET_STRING - StyleJohn Whitmore3-7/+7
Rename the structure OCTET_STRING to octet_string. This is to comply with the coding style of using lowercase for types. In addition the typedef directive is removed to clear the checkpatch issue with defining new types. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Move QOS_TCLAS to rtl819x_TS.h - StyleJohn Whitmore2-51/+51
Move the union QOS_TCLAS from the header file rtl819x_Qos.h to header file rtl819x_TS.h, where the structure is actually used, as the member of another structure. This is a coding style change, which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Remove commented out code - StyleJohn Whitmore1-19/+0
A number of structures have been commented out of code. Obviously they are not used and as a result have been removed from the code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Rename tspec_body members - StyleJohn Whitmore1-15/+15
The member variables of the tspec_body have been renamed to clear the checkpatch issue with CamelCase naming. As these member variables are never used in the code the changes are combined into this single patch. These changes are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Rename TSInfo - StyleJohn Whitmore3-6/+6
Rename TSInfo, the memeber variable of struct tspec_body to ts_info. This change clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Refactor union TSPEC_BODY - StyleJohn Whitmore4-36/+33
The union TSPEC_BODY is never used as a union. The union comprises an array of bytes and a bitfield structure, both of which are 55 bytes in length, but the byte array is never used. As a result the union has been truncated to the bitfield struct, which is actually used. Additionally the typedef has been removed from the structure to clear the checkpatch issue with defining new types. Additionally the name has been changed to lowercase to comply with coding style. These changes are all coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Rename members of struct qos_tsinfo - StyleJohn Whitmore3-22/+22
The member variables of struct qos_tsinfo all cause checkpatch issues with CamelCase naming. As the variables are used in so few places the changes are combined into this single patch. Additionally the member variable usReserved is never used in code so has been removed. These are all coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Remove union from qos_tsinfo - StyleJohn Whitmore3-35/+33
The union is never used as a union but only as a bitfield struct. One side of the union (u8 charData[3];) Only seems to be present to ensure that the structures size is 3 bytes in length. That length, of the structure is dictated by the largest element of the union, so the byte array only dictates size if it's the largest element of the union. The byte array and union add nothing. The union has therefore been removed and the structure and access to the structure simplified. Additionally since one of the bitfield variables (ucAccessPolicy) spans a byte boundary the base type of the bitfield has been changed from u8 to u16. Compilers have probably moved on from having an issue with this, call it OCD. The changes are coding style in nature and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Remove union from aci_aifsn - StyleJohn Whitmore2-15/+12
The union aci_aifsn is not used as a union, but only as a struct. The union seems to have been used to ensure that the size of the structure was only a single byte. That size is set by the bitfield structure, adding a union with an unused byte adds nothing. The union has been removed. This is a coding style change and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging:rtl8192u: Clean cmpk_counttxstatistic() comments - StyleJohn Whitmore1-18/+0
The only useful piece of information in the header comment of this static function was the name of the function and parameters. That is not useful information, given that they are in the C Source of the function declaration, a few lines below the comment. The block comment has been removed. This is a coding style change, there should be no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - StyleJohn Whitmore1-7/+6
The enumerated type DM_CCK_Rx_Path_Method is used as a container for constant definitions, rather then an enumerated type enabling compiler type checking. To correct this, the variable which uses the constants, defined by the enumeration, has had its type changed from a u8 to the enumeration. Additionally the type has been moved above the structure where the type is used, to avoid compiler error. The typedef has been removed from the enumerated type to clear the checkpatch issue with defining new types. The name of the type has been changed to cck_rx_path_method to clear the checkpatch issue with CamelCase naming. And the enumerated constant CCK_Rx_Version_MAX has been removed, since it is never used in code. The changes are all coding style in nature and so should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - StyleJohn Whitmore1-7/+7
The enumerated type dm_dig_cs_ratio_e is never actually used as a type, but only as a collection of related constants. This is because the variables, which use the defined constant values, are defined as being of type u8 rather then tne enumerated type. This omission negates the possibility of taking advantage of compiler type checking. To enable the use of compiler type checking of the enumeration the two variables, (curcs_ratio_state & precs_ratio_state), which use the type's constants have their types changed from u8 to enum dig_cck_cs_ratio_state. Additionally the types declaration has been moved above the dig structure, where the type is used. The 'typedef' keyword has been removed from the type to clear the checkpatch issue with defining new types. And the constant DIG_CS_MAX has been removed since this is never used in the code. These changes are purely coding style changes and should not impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor enum dm_dig_pd_th_e - StyleJohn Whitmore1-9/+8
The enumerated type dm_dig_pd_th_e is never actually used as the type for the two variables which use the constants, which the enumeration defines. This omission removes the possibility of taking advantage of compiler type checking. To correct this the two member variables, (curpd_thstate & prepd_thstate) have been changed to use the type enum dig_pkt_detection_threshold rather then u8. Additionally the enum's declaration has been moved above the dig structure, where the type is used, the 'typedef' has been removed to clear the checkpatch issue with defining new types, and the value 'DIG_PD_MAX' has been removed from the enumeration, since it is never used in code. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor dm_dig_connect_e - StyleJohn Whitmore1-8/+7
The enumerated type dm_dig_connect_e is only used to group constant values, as the actual type is never used as the type for the variables which use the defined constants (cur_connect_state and pre_connect_state). These two member variables have had there defined types changed to properly reflect there usage and to permit compiler type checks to be performed. In addition the definition of the enumerated type has been moved above the structure which uses the type. The typedef of the enumerated type has been removed to clear the checkpatch issue with defining new types and the enumerated value DIG_CONNECT_MAX has been removed since it is never used in code. The resulting changes are all coding style in nature and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Remove unused enum dm_dig_dbg_e - StyleJohn Whitmore1-6/+0
The enumerated type dm_dig_dbg_e is never used in code so has simply been removed from the source code. this is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor enum dm_dig_alg_e - StyleJohn Whitmore1-7/+6
The enumerated type dm_dig_alg_e is only used by one variable in the code, 'dig_algorithm', a member variable of the structure dig. That member variable was defined to be of type 'u8' thus negating any advantage of the use of an enumerated type, (compiler type-checking). The type of the variable 'dig_algorithm' has been change to reflect its use of the enumeration and the enumerated type moved in the file so that it appears before it is used in the file. Additionally the 'typedef' has been removed to clear the checkpatch issue with defining new types, and the type renamed to enum dig_algorithm. The enumerated constant DIG_ALGO_MAX has been removed from the type since it is never used in the code. These changes are all coding style in nature and as such should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Remove enum dm_dig_op_e - StyleJohn Whitmore2-111/+0
Remove the enumerated type dm_dig_op_e. The type is only used as a parameter to the function dm_change_dynamic_initgain_thresh(), but that function is never referenced in the code at all. I would consider this to be a coding style change as the function is never referenced and as a result the enumeration is never used. In any case there should be no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor enum dm_ratr_sta_e usage - StyleJohn Whitmore2-9/+9
The enumerated type dm_ratr_sta_e was defined in the file drivers/staging/rtl8192u/r8192U_dm.h but never actually used in that file. The only variable which uses this enumerated type is 'ratr_state', a member variable of the _rate_adaptive structure defined in the file drivers/staging/rtl8192u/r8192U.h. To clarify and place the enumerated type close to where it is used the type was moved to the drivers/staging/rtl8192u/r8192U.h file. In addition the member variable 'ratr_state' which uses the enumerated constants was declared as being of type 'u8'. This negates any advantage of the enumerated type, compiler type-checking, so that member variable's type has been changed to being of the enumerated type. The typedef from the enumerated type has been removed to clear the checkpatch issue with defining new types. Additionally the name of the type has been left as enum dynamic_ratr_state This is a coding style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30staging:rtl8192u: Refactor use of enum dm_dig_sta_e - StyleJohn Whitmore1-9/+9
Refactor the use of the enumerated type dm_dig_sta_e, which is not actually used for type checking by the compiler. The typedef of dm_dig_sta_e is removed to clear the checkpatch issue with defining new types, and the enumerated type is left with the name enum dynamic_init_gain_state The enumerated type defines values for the enumeration, which are used by both dig_state and dig_highpwr_state, (members of the struct dig). Both of those variables were defined as being of type u8. This negates any usefulness of the use of the enumeration, (compiler type checking). To make use of the compiler's type-checking the two member variables, dig_state and dig_highpwr_state have been changed to being of type enum dynamic_init_gain_state. The enumerated type has been moved above the struct dig definition so that the enumeration is already defined when the compiler reaches the two types using the enumerated type. These changes, whilst convoluted, are purely coding style in nature and should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>