staging:rtl8192u: Proxy Structures?
cover staging:rtl8192u: Proxy Structures?
This series of patches contains coding style changes.
There is one type of change, proxy structures, which whilst not flagged by checkpatch, as an issue, I have changed. I can't see the purpose of defining a structure, in this case arrays, and then using a #define to name the structure something else.
This may well be a pattern which I'm not familiar with, in which case the patches can be rejected, and I'll have learned something, but I thought I'd better explicitly mention it, as I'm assuming that there is not actual point to the practice.
Apart from that all the rest are simple coding style changes.
John Whitmore (16):
staging:rtl8192u: Rename SwChnlCmd - Style staging:rtl8192u: Rename CmdID - Style
staging:rtl8192u: Rename Para1 > para_1 - Style staging:rtl8192u: Rename Para2 to para_2 - style staging:rtl8192u: Rename msDelay to ms_delay - Style staging:rtl8192u: Remove proxy struct rtl819XMACPHY_Array_PG - Style staging:rtl8192u: Remove proxy struct rtl819XPHY_REG_1T2RArray - Style staging:rtl8192u: Remove proxy array rtl819XAGCTAB_Array - Style staging:rtl8192u: Remove proxy rtl819XRadioA_Array - Style staging:rtl8192u: Remove proxy rtl819XRadioB_Array - Style staging:rtl8192u: Remove proxy rtl819XRadioC_Array - Style staging:rtl8192u: Remove proxy rtl819XRadioD_Array - Style staging:rtl8192u: Rename HW90_BLOCK_E - Style staging:rtl8192u: Rename RF90_RADIO_PATH_E - Style staging:rtl8192u: Remove repeated definitions - Style staging:rtl8192u: Rename eRFPath - Style
drivers/staging/rtl8192u/r8190_rtl8256.c | 42 ++--- drivers/staging/rtl8192u/r8192U_core.c | 4 +- drivers/staging/rtl8192u/r819xU_phy.c | 230 +++++++++++------------ drivers/staging/rtl8192u/r819xU_phy.h | 42 ++--- 4 files changed, 147 insertions(+), 171 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/16 staging:rtl8192u: Rename SwChnlCmd - Style
Rename the structure SwChnlCmd to sw_chnl_cmd. This change clears the checkpatch issue with CamelCase naming. The change is purely a coding style change and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 16 ++++++++-------- drivers/staging/rtl8192u/r819xU_phy.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +8 -8
@@ -1215,8 +1215,8 @@ bool rtl8192_SetRFPowerState(struct net_device *dev, }/****************************************************************************** -* function: This function sets command table variable (struct SwChnlCmd). -* input: SwChnlCmd *CmdTable //table to be set +* function: This function sets command table variable (struct sw_chnl_cmd). +* input: sw_chnl_cmd *CmdTable //table to be set * u32 CmdTableIdx //variable index in table to be set * u32 CmdTableSz //table size * switch_chan_cmd_id CmdID //command ID to set
@@ -1227,11 +1227,11 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,* return: true if finished, false otherwise * notice: ******************************************************************************/ -static u8 rtl8192_phy_SetSwChnlCmdArray (struct SwChnlCmd *CmdTable,u32 CmdTableIdx, +static u8 rtl8192_phy_SetSwChnlCmdArray (struct sw_chnl_cmd *CmdTable,u32 CmdTableIdx,u32 CmdTableSz,enum switch_chan_cmd_id CmdID,u32 Para1,u32 Para2,u32 msDelay) { -struct SwChnlCmd *pCmd; +struct sw_chnl_cmd *pCmd;if (CmdTable ==NULL ) {RT_TRACE (COMP_ERR ,"%s(): CmdTable cannot be NULL\n" , __func__);
@@ -1268,13 +1268,13 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage, u8 *step, u32 *delay) {struct r8192_priv *priv =ieee80211_priv (dev); -struct SwChnlCmd PreCommonCmd[MAX_PRECMD_CNT ]; +struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT ];u32 PreCommonCmdCnt; -struct SwChnlCmd PostCommonCmd[MAX_POSTCMD_CNT ]; +struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT ];u32 PostCommonCmdCnt; -struct SwChnlCmd RfDependCmd[MAX_RFDEPENDCMD_CNT ]; +struct sw_chnl_cmd RfDependCmd[MAX_RFDEPENDCMD_CNT ];u32 RfDependCmdCnt; -struct SwChnlCmd *CurrentCmd =NULL ; +struct sw_chnl_cmd *CurrentCmd =NULL ;u8 eRFPath; RT_TRACE(COMP_CH, "%s() stage: %d, step: %d, channel: %d\n",
drivers/staging/rtl8192u/r819xU_phy.h +1 -1
@@ -18,7 +18,7 @@ enum switch_chan_cmd_id {/* -----------------------Define structure---------------------- */ /* 1. Switch channel related */ -struct SwChnlCmd { +struct sw_chnl_cmd {enum switch_chan_cmd_id CmdID;u32 Para1;u32 Para2;
Signature · 1 line
2.18.0
PATCH 2/16 staging:rtl8192u: Rename CmdID - Style
In reply to John WhitmoreRename the member variable CmdId to cmd_id. This change clears the checkpatch issue with CamelCase naming. The change is purely a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 6 +++--- drivers/staging/rtl8192u/r819xU_phy.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -3
@@ -1244,7 +1244,7 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(struct sw_chnl_cmd *CmdTable, u32 CmdTab } pCmd = CmdTable + CmdTableIdx; - pCmd->CmdID = CmdID; + pCmd->cmd_id = CmdID; pCmd->Para1 = Para1; pCmd->Para2 = Para2; pCmd->msDelay = msDelay;
@@ -1363,7 +1363,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,break ; } -if (CurrentCmd->CmdID ==CMD_ID_END ) { +if (CurrentCmd->cmd_id ==CMD_ID_END ) {if ((*stage) ==2 ) { (*delay) = CurrentCmd->msDelay;return true;
@@ -1373,7 +1373,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,continue ; } -switch (CurrentCmd->CmdID) { +switch (CurrentCmd->cmd_id) {case CMD_ID_SET_TX_PWR_LEVEL :if (priv->card_8192_version == (u8 )VERSION_819xU_A)/* consider it later! */
drivers/staging/rtl8192u/r819xU_phy.h +1 -1
@@ -19,7 +19,7 @@ enum switch_chan_cmd_id {/* -----------------------Define structure---------------------- */ /* 1. Switch channel related */ struct sw_chnl_cmd { -enum switch_chan_cmd_id CmdID; +enum switch_chan_cmd_id cmd_id;u32 Para1;u32 Para2;u32 msDelay;
Signature · 1 line
2.18.0
PATCH 3/16 staging:rtl8192u: Rename Para1 > para_1 - Style
In reply to John WhitmoreRename the member variable Para1 to para_1. This change clears the checkpatch issue with CamelCase naming. The change is purely a coding style change and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 10 +++++----- drivers/staging/rtl8192u/r819xU_phy.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +5 -5
@@ -1245,7 +1245,7 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(struct sw_chnl_cmd *CmdTable, u32 CmdTab pCmd = CmdTable + CmdTableIdx; pCmd->cmd_id = CmdID; - pCmd->Para1 = Para1; + pCmd->para_1 = Para1; pCmd->Para2 = Para2; pCmd->msDelay = msDelay;
@@ -1380,22 +1380,22 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,rtl8192_SetTxPowerLevel (dev, channel);break ;case CMD_ID_WRITE_PORT_ULONG : -write_nic_dword (dev, CurrentCmd->Para1, +write_nic_dword (dev, CurrentCmd->para_1, CurrentCmd->Para2);break ;case CMD_ID_WRITE_PORT_USHORT : -write_nic_word (dev, CurrentCmd->Para1, +write_nic_word (dev, CurrentCmd->para_1, (u16 )CurrentCmd->Para2);break ;case CMD_ID_WRITE_PORT_UCHAR : -write_nic_byte (dev, CurrentCmd->Para1, +write_nic_byte (dev, CurrentCmd->para_1, (u8 )CurrentCmd->Para2);break ;case CMD_ID_RF_WRITE_REG :for (eRFPath =0 ; eRFPath <RF90_PATH_MAX ; eRFPath++) {rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath, - CurrentCmd->Para1, + CurrentCmd->para_1, bZebra1_ChannelNum, CurrentCmd->Para2); }
drivers/staging/rtl8192u/r819xU_phy.h +1 -1
@@ -20,7 +20,7 @@ enum switch_chan_cmd_id {/* 1. Switch channel related */ struct sw_chnl_cmd {enum switch_chan_cmd_id cmd_id; -u32 Para1; +u32 para_1;u32 Para2;u32 msDelay; } __packed;
Signature · 1 line
2.18.0
PATCH 4/16 staging:rtl8192u: Rename Para2 to para_2 - style
In reply to John WhitmoreRename member variable Para2 to para_2. This change clears the checkpatch issue with CamelCase naming. The change is purely a coding style change and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 10 +++++----- drivers/staging/rtl8192u/r819xU_phy.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +5 -5
@@ -1246,7 +1246,7 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(struct sw_chnl_cmd *CmdTable, u32 CmdTab pCmd = CmdTable + CmdTableIdx; pCmd->cmd_id = CmdID; pCmd->para_1 = Para1; - pCmd->Para2 = Para2; + pCmd->para_2 = Para2; pCmd->msDelay = msDelay;return true;
@@ -1381,15 +1381,15 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,break ;case CMD_ID_WRITE_PORT_ULONG :write_nic_dword (dev, CurrentCmd->para_1, - CurrentCmd->Para2); + CurrentCmd->para_2);break ;case CMD_ID_WRITE_PORT_USHORT :write_nic_word (dev, CurrentCmd->para_1, - (u16 )CurrentCmd->Para2); + (u16 )CurrentCmd->para_2);break ;case CMD_ID_WRITE_PORT_UCHAR :write_nic_byte (dev, CurrentCmd->para_1, - (u8 )CurrentCmd->Para2); + (u8 )CurrentCmd->para_2);break ;case CMD_ID_RF_WRITE_REG :for (eRFPath =0 ; eRFPath <RF90_PATH_MAX ; eRFPath++) {
@@ -1397,7 +1397,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, (enum RF90_RADIO_PATH_E )eRFPath, CurrentCmd->para_1, bZebra1_ChannelNum, - CurrentCmd->Para2); + CurrentCmd->para_2); }break ;default :
drivers/staging/rtl8192u/r819xU_phy.h +1 -1
@@ -21,7 +21,7 @@ enum switch_chan_cmd_id {struct sw_chnl_cmd {enum switch_chan_cmd_id cmd_id;u32 para_1; -u32 Para2; +u32 para_2;u32 msDelay; } __packed;
Signature · 1 line
2.18.0
PATCH 5/16 staging:rtl8192u: Rename msDelay to ms_delay - Style
In reply to John WhitmoreRename the member variable msDelay to ms_delay. This change clears the checkpatch issue with CamelCase naming. The change is purely a coding style change which should not impact runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 6 +++--- drivers/staging/rtl8192u/r819xU_phy.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -3
@@ -1247,7 +1247,7 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(struct sw_chnl_cmd *CmdTable, u32 CmdTab pCmd->cmd_id = CmdID; pCmd->para_1 = Para1; pCmd->para_2 = Para2; - pCmd->msDelay = msDelay; + pCmd->ms_delay = msDelay;return true; }
@@ -1365,7 +1365,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,if (CurrentCmd->cmd_id ==CMD_ID_END ) {if ((*stage) ==2 ) { - (*delay) = CurrentCmd->msDelay; + (*delay) = CurrentCmd->ms_delay;return true; } (*stage)++;
@@ -1407,7 +1407,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,break ; }while (true); - (*delay) = CurrentCmd->msDelay; + (*delay) = CurrentCmd->ms_delay; (*step)++;return false; }
drivers/staging/rtl8192u/r819xU_phy.h +1 -1
@@ -22,7 +22,7 @@ struct sw_chnl_cmd {enum switch_chan_cmd_id cmd_id;u32 para_1;u32 para_2; -u32 msDelay; +u32 ms_delay; } __packed;extern u32 rtl819XMACPHY_Array_PG[];
Signature · 1 line
2.18.0
PATCH 6/16 staging:rtl8192u: Remove proxy struct rtl819XMACPHY_Array_PG - Style
In reply to John WhitmoreRemove the struct rtl819XMACPHY_Array_PG which is simply a proxy for the struct Rtl8192UsbMACPHY_Array_PG. There appears to be no purpose served by this implementation, other then to obscure the Rtl8192UsbMACPHY_Array_PG structure.
--- drivers/staging/rtl8192u/r819xU_phy.c | 3 +-- drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +1 -2
@@ -30,7 +30,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {#define rtl819XPHY_REG_1T2RArray Rtl8192UsbPHY_REG_1T2RArray -#define rtl819XMACPHY_Array_PG Rtl8192UsbMACPHY_Array_PG#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array#define rtl819XRadioA_Array Rtl8192UsbRadioA_Array#define rtl819XRadioB_Array Rtl8192UsbRadioB_Array
@@ -491,7 +490,7 @@ void rtl8192_phy_configmac(struct net_device *dev)if (priv->btxpowerdata_readfromEEPORM) {RT_TRACE (COMP_PHY ,"Rtl819XMACPHY_Array_PG\n" ); dwArrayLen = MACPHY_Array_PGLength; - pdwArray = rtl819XMACPHY_Array_PG; + pdwArray = Rtl8192UsbMACPHY_Array_PG; }else {RT_TRACE (COMP_PHY ,"Rtl819XMACPHY_Array\n" );
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XMACPHY_Array_PG[];extern u32 rtl819XPHY_REG_1T2RArray[];extern u32 rtl819XAGCTAB_Array[];extern u32 rtl819XRadioA_Array[];
Signature · 1 line
2.18.0
PATCH 7/16 staging:rtl8192u: Remove proxy struct rtl819XPHY_REG_1T2RArray - Style
In reply to John WhitmoreRemove the struct rtl819XPHY_REG_1T2RArray which is simply a proxy for the struct Rtl8192UsbPHY_REG_1T2RArray. There appears to be no purpose served by this implementation, other then to obscure the Rtl8192UsbPHY_REG_1T2RArray structure.
--- drivers/staging/rtl8192u/r819xU_phy.c | 10 ++++------ drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +4 -6
@@ -28,8 +28,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { 0x0f72, /* 2484 */ }; - -#define rtl819XPHY_REG_1T2RArray Rtl8192UsbPHY_REG_1T2RArray#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array#define rtl819XRadioA_Array Rtl8192UsbRadioA_Array#define rtl819XRadioB_Array Rtl8192UsbRadioB_Array
@@ -534,13 +532,13 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)#endif if (ConfigType == BaseBand_Config_PHY_REG) {for (i =0 ; i < PHY_REG_1T2RArrayLength; i +=2 ) { -rtl8192_setBBreg (dev, rtl819XPHY_REG_1T2RArray[i], +rtl8192_setBBreg (dev, Rtl8192UsbPHY_REG_1T2RArray[i], bMaskDWord, - rtl819XPHY_REG_1T2RArray[i+1 ]); + Rtl8192UsbPHY_REG_1T2RArray[i+1 ]);RT_TRACE (COMP_DBG ,"i: %x, Rtl819xUsbPHY_REGArray[0]=%x Rtl819xUsbPHY_REGArray[1]=%x\n" , - i, rtl819XPHY_REG_1T2RArray[i], - rtl819XPHY_REG_1T2RArray[i+1 ]); + i, Rtl8192UsbPHY_REG_1T2RArray[i], + Rtl8192UsbPHY_REG_1T2RArray[i+1 ]); } }else if (ConfigType == BaseBand_Config_AGC_TAB) {for (i =0 ; i < AGCTAB_ArrayLength; i +=2 ) {
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XPHY_REG_1T2RArray[];extern u32 rtl819XAGCTAB_Array[];extern u32 rtl819XRadioA_Array[];extern u32 rtl819XRadioB_Array[];
Signature · 1 line
2.18.0
PATCH 8/16 staging:rtl8192u: Remove proxy array rtl819XAGCTAB_Array - Style
In reply to John WhitmoreRemove the array rtl819XAGCTAB_Array which is only a proxy to the array Rtl8192UsbAGCTAB_Array. There appears to be no purpose served by this implementation, other then to obscure the Rtl8192UsbAGCTAB_Array structure, which is actually written to and read from.
--- drivers/staging/rtl8192u/r819xU_phy.c | 11 +++++------ drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 5 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +5 -6
@@ -33,7 +33,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {#define rtl819XRadioB_Array Rtl8192UsbRadioB_Array#define rtl819XRadioC_Array Rtl8192UsbRadioC_Array#define rtl819XRadioD_Array Rtl8192UsbRadioD_Array -#define rtl819XAGCTAB_Array Rtl8192UsbAGCTAB_Array/****************************************************************************** * function: This function checks different RF type to execute legal judgement.
@@ -542,12 +541,12 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) } }else if (ConfigType == BaseBand_Config_AGC_TAB) {for (i =0 ; i < AGCTAB_ArrayLength; i +=2 ) { -rtl8192_setBBreg (dev, rtl819XAGCTAB_Array[i], - bMaskDWord, rtl819XAGCTAB_Array[i+1 ]); +rtl8192_setBBreg (dev, Rtl8192UsbAGCTAB_Array[i], + bMaskDWord, Rtl8192UsbAGCTAB_Array[i+1 ]);RT_TRACE (COMP_DBG , -"i: %x, rtl819XAGCTAB_Array[0]=%x rtl819XAGCTAB_Array[1]=%x\n" , - i, rtl819XAGCTAB_Array[i], - rtl819XAGCTAB_Array[i+1 ]); +"i: %x, Rtl8192UsbAGCTAB_Array[0]=%x Rtl8192UsbAGCTAB_Array[1]=%x\n" , + i, Rtl8192UsbAGCTAB_Array[i], + Rtl8192UsbAGCTAB_Array[i+1 ]); } } }
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XAGCTAB_Array[];extern u32 rtl819XRadioA_Array[];extern u32 rtl819XRadioB_Array[];extern u32 rtl819XRadioC_Array[];
Signature · 1 line
2.18.0
PATCH 9/16 staging:rtl8192u: Remove proxy rtl819XRadioA_Array - Style
In reply to John WhitmoreThe array rtl819XRadioA_Array serves as a proxy array for the actual array Rtl8192UsbRadioA_Array. This implementation seems to serve no other purpose then to obscure the actually array Rtl8192UsbRadioA_Array.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 7 +++---- drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -4
@@ -29,7 +29,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { };#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array -#define rtl819XRadioA_Array Rtl8192UsbRadioA_Array#define rtl819XRadioB_Array Rtl8192UsbRadioB_Array#define rtl819XRadioC_Array Rtl8192UsbRadioC_Array#define rtl819XRadioD_Array Rtl8192UsbRadioD_Array
@@ -981,14 +980,14 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,case RF90_PATH_A :for (i =0 ; i < RadioA_ArrayLength; i = i+2 ) { -if (rtl819XRadioA_Array[i] ==0xfe ) { +if (Rtl8192UsbRadioA_Array[i] ==0xfe ) {mdelay (100 );continue ; }rtl8192_phy_SetRFReg (dev, eRFPath, - rtl819XRadioA_Array[i], + Rtl8192UsbRadioA_Array[i], bMask12Bits, - rtl819XRadioA_Array[i+1 ]); + Rtl8192UsbRadioA_Array[i+1 ]);mdelay (1 ); }
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XRadioA_Array[];extern u32 rtl819XRadioB_Array[];extern u32 rtl819XRadioC_Array[];extern u32 rtl819XRadioD_Array[];
Signature · 1 line
2.18.0
PATCH 10/16 staging:rtl8192u: Remove proxy rtl819XRadioB_Array - Style
In reply to John WhitmoreRemove the array rtl819XRadioB_Array Rtl8192UsbRadioB_Array which acts as a proxy the actual array Rtl8192UsbRadioB_Array. The only purpose, I can see for this implementation is to obscure the actual array being used Rtl8192UsbRadioB_Array.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 7 +++---- drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -4
@@ -29,7 +29,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { };#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array -#define rtl819XRadioB_Array Rtl8192UsbRadioB_Array#define rtl819XRadioC_Array Rtl8192UsbRadioC_Array#define rtl819XRadioD_Array Rtl8192UsbRadioD_Array
@@ -995,14 +994,14 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,case RF90_PATH_B :for (i =0 ; i < RadioB_ArrayLength; i = i+2 ) { -if (rtl819XRadioB_Array[i] ==0xfe ) { +if (Rtl8192UsbRadioB_Array[i] ==0xfe ) {mdelay (100 );continue ; }rtl8192_phy_SetRFReg (dev, eRFPath, - rtl819XRadioB_Array[i], + Rtl8192UsbRadioB_Array[i], bMask12Bits, - rtl819XRadioB_Array[i+1 ]); + Rtl8192UsbRadioB_Array[i+1 ]);mdelay (1 ); }
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XRadioB_Array[];extern u32 rtl819XRadioC_Array[];extern u32 rtl819XRadioD_Array[];
Signature · 1 line
2.18.0
PATCH 11/16 staging:rtl8192u: Remove proxy rtl819XRadioC_Array - Style
In reply to John WhitmoreRemove the array rtl819XRadioC_Array which is only serving as a proxy for the real array Rtl8192UsbRadioC_Array. This is a coding style change and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 7 +++---- drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -4
@@ -29,7 +29,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { };#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array -#define rtl819XRadioC_Array Rtl8192UsbRadioC_Array#define rtl819XRadioD_Array Rtl8192UsbRadioD_Array/******************************************************************************
@@ -1009,14 +1008,14 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,case RF90_PATH_C :for (i =0 ; i < RadioC_ArrayLength; i = i+2 ) { -if (rtl819XRadioC_Array[i] ==0xfe ) { +if (Rtl8192UsbRadioC_Array[i] ==0xfe ) {mdelay (100 );continue ; }rtl8192_phy_SetRFReg (dev, eRFPath, - rtl819XRadioC_Array[i], + Rtl8192UsbRadioC_Array[i], bMask12Bits, - rtl819XRadioC_Array[i+1 ]); + Rtl8192UsbRadioC_Array[i+1 ]);mdelay (1 ); }
drivers/staging/rtl8192u/r819xU_phy.h +0 -1
@@ -25,7 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XRadioC_Array[];extern u32 rtl819XRadioD_Array[];enum HW90_BLOCK_E {
Signature · 1 line
2.18.0
PATCH 12/16 staging:rtl8192u: Remove proxy rtl819XRadioD_Array - Style
In reply to John WhitmoreRemove the array rtl819XRadioD_Array which is only acting as a proxy to the real array Rtl8192UsbRadioD_Array.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 7 +++---- drivers/staging/rtl8192u/r819xU_phy.h | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +3 -4
@@ -29,7 +29,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { };#define rtl819XMACPHY_Array Rtl8192UsbMACPHY_Array -#define rtl819XRadioD_Array Rtl8192UsbRadioD_Array/****************************************************************************** * function: This function checks different RF type to execute legal judgement.
@@ -1023,14 +1022,14 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,case RF90_PATH_D :for (i =0 ; i < RadioD_ArrayLength; i = i+2 ) { -if (rtl819XRadioD_Array[i] ==0xfe ) { +if (Rtl8192UsbRadioD_Array[i] ==0xfe ) {mdelay (100 );continue ; }rtl8192_phy_SetRFReg (dev, eRFPath, - rtl819XRadioD_Array[i], + Rtl8192UsbRadioD_Array[i], bMask12Bits, - rtl819XRadioD_Array[i+1 ]); + Rtl8192UsbRadioD_Array[i+1 ]);mdelay (1 ); }
drivers/staging/rtl8192u/r819xU_phy.h +0 -2
@@ -25,8 +25,6 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -extern u32 rtl819XRadioD_Array[]; -enum HW90_BLOCK_E {HW90_BLOCK_MAC =0 ,HW90_BLOCK_PHY0 =1 ,
Signature · 1 line
2.18.0
PATCH 13/16 staging:rtl8192u: Rename HW90_BLOCK_E - Style
In reply to John WhitmoreRename the enumerated type HW90_BLOCK_E to hw90_block_e. Whilst this is not flagged by checkpatch types are meant to be in lowercase.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 8 ++++---- drivers/staging/rtl8192u/r819xU_phy.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +4 -4
@@ -687,14 +687,14 @@ static void rtl8192_InitBBRFRegDef(struct net_device *dev)* function: This function is to write register and then readback to make * sure whether BB and RF is OK * input: net_device *dev -* HW90_BLOCK_E CheckBlock +* hw90_block_e CheckBlock * RF90_RADIO_PATH_E eRFPath //only used when checkblock is * //HW90_BLOCK_RF * output: none * return: return whether BB and RF is ok (0:OK, 1:Fail) * notice: This function may be removed in the ASIC ******************************************************************************/ -u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum HW90_BLOCK_E CheckBlock, +u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block_e CheckBlock,enum RF90_RADIO_PATH_E eRFPath) {u8 ret =0 ;
@@ -786,10 +786,10 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)/* ----Ckeck FPGAPHY0 and PHY1 board is OK---- */ /* TODO: this function should be removed on ASIC */ -for (eCheckItem = (enum HW90_BLOCK_E )HW90_BLOCK_PHY0 ; +for (eCheckItem = (enum hw90_block_e )HW90_BLOCK_PHY0 ; eCheckItem <=HW90_BLOCK_PHY1 ; eCheckItem++) {/* don't care RF path */ - status =rtl8192_phy_checkBBAndRF (dev, (enum HW90_BLOCK_E )eCheckItem, + status =rtl8192_phy_checkBBAndRF (dev, (enum hw90_block_e )eCheckItem, (enum RF90_RADIO_PATH_E )0 );if (status !=0 ) { RT_TRACE((COMP_ERR | COMP_PHY),
drivers/staging/rtl8192u/r819xU_phy.h +2 -2
@@ -25,7 +25,7 @@ struct sw_chnl_cmd {u32 ms_delay; } __packed; -enum HW90_BLOCK_E { +enum hw90_block_e {HW90_BLOCK_MAC =0 ,HW90_BLOCK_PHY0 =1 ,HW90_BLOCK_PHY1 =2 ,
@@ -62,7 +62,7 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev,void rtl8192_phy_configmac (struct net_device *dev);void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType);u8 rtl8192_phy_checkBBAndRF (struct net_device *dev, -enum HW90_BLOCK_E CheckBlock, +enum hw90_block_e CheckBlock,enum RF90_RADIO_PATH_E eRFPath);void rtl8192_BBConfig (struct net_device *dev);void rtl8192_phy_getTxPower (struct net_device *dev);
Signature · 1 line
2.18.0
PATCH 14/16 staging:rtl8192u: Rename RF90_RADIO_PATH_E - Style
In reply to John WhitmoreRename the enumerated type RF90_RADIO_PATH_E to rf90_radio_path_e. Whilst it is not flagged as an issue by checkpatch, types are meant to be named in lowercase.
This change is purely a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 42 ++++++++++++------------ drivers/staging/rtl8192u/r8192U_core.c | 4 +-- drivers/staging/rtl8192u/r819xU_phy.c | 38 ++++++++++----------- drivers/staging/rtl8192u/r819xU_phy.h | 10 +++--- 4 files changed, 47 insertions(+), 47 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +21 -21
@@ -41,16 +41,16 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */rtl8192_phy_SetRFReg (dev, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x0b , bMask12Bits,0x100 );/* phy para:1ba */ rtl8192_phy_SetRFReg (dev, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x2c , bMask12Bits,0x3d7 );rtl8192_phy_SetRFReg (dev, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x0e , bMask12Bits,0x021 );rtl8192_phy_SetRFReg (dev, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x14 , bMask12Bits,0x5ab ); } else {RT_TRACE (COMP_ERR ,"PHY_SetRF8256Bandwidth(): unknown hardware version\n" );
@@ -58,15 +58,15 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwibreak ;case HT_CHANNEL_WIDTH_20_40 :if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) {/* 8256 D-cut, E-cut, xiong: consider it later! */ -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath,0x0b , bMask12Bits,0x300 );/* phy para:3ba */ -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath,0x2c , bMask12Bits,0x3df ); -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath,0x0e , bMask12Bits,0x0a1 ); +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x0b , bMask12Bits,0x300 );/* phy para:3ba */ +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x2c , bMask12Bits,0x3df ); +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x0e , bMask12Bits,0x0a1 );if (priv->chan ==3 || priv->chan ==9 )/* I need to set priv->chan whenever current channel changes */ -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath,0x14 , bMask12Bits,0x59b ); +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x14 , bMask12Bits,0x59b );else -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath,0x14 , bMask12Bits,0x5ab ); +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x14 , bMask12Bits,0x5ab ); }else {RT_TRACE (COMP_ERR ,"PHY_SetRF8256Bandwidth(): unknown hardware version\n" ); }
@@ -115,14 +115,14 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)u8 ConstRetryTimes =5 , RetryTimes =5 ;u8 ret =0 ;/* Initialize RF */ -for (eRFPath = (enum RF90_RADIO_PATH_E )RF90_PATH_A ; eRFPath < priv->NumTotalRFPath; eRFPath++) { +for (eRFPath = (enum rf90_radio_path_e )RF90_PATH_A ; eRFPath < priv->NumTotalRFPath; eRFPath++) {if (!rtl8192_phy_CheckIsLegalRFPath (dev, eRFPath))continue ; pPhyReg = &priv->PHYRegDef[eRFPath];/* Joseph test for shorten RF config -* pHalData->RfReg0Value[eRFPath] = rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, rGlobalCtrl, bMaskDWord); +* pHalData->RfReg0Value[eRFPath] = rtl8192_phy_QueryRFReg(dev, (enum rf90_radio_path_e)eRFPath, rGlobalCtrl, bMaskDWord); * ----Store original RFENV control type */ switch (eRFPath) {
@@ -146,12 +146,12 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)rtl8192_setBBreg (dev, pPhyReg->rfHSSIPara2, b3WireAddressLength,0x0 );/* Set 0 to 4 bits for Z-serial and set 1 to 6 bits for 8258 */ rtl8192_setBBreg (dev, pPhyReg->rfHSSIPara2, b3WireDataLength,0x0 );/* Set 0 to 12 bits for Z-serial and 8258, and set 1 to 14 bits for ??? */ -rtl8192_phy_SetRFReg (dev, (enum RF90_RADIO_PATH_E ) eRFPath,0x0 , bMask12Bits,0xbf ); +rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e ) eRFPath,0x0 , bMask12Bits,0xbf );/* Check RF block (for FPGA platform only)---- * TODO: this function should be removed on ASIC , Emily 2007.2.2 */ -if (rtl8192_phy_checkBBAndRF (dev,HW90_BLOCK_RF , (enum RF90_RADIO_PATH_E )eRFPath)) { +if (rtl8192_phy_checkBBAndRF (dev,HW90_BLOCK_RF , (enum rf90_radio_path_e )eRFPath)) {RT_TRACE (COMP_ERR ,"PHY_RF8256_Config():Check Radio[%d] Fail!!\n" , eRFPath); goto phy_RF8256_Config_ParaFile_Fail; }
@@ -162,32 +162,32 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)switch (eRFPath) {case RF90_PATH_A :while (RF3_Final_Value != RegValueToBeCheck && RetryTimes !=0 ) { - ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum RF90_RADIO_PATH_E )eRFPath); - RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath, RegOffSetToBeCheck, bMask12Bits); + ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum rf90_radio_path_e )eRFPath); + RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum rf90_radio_path_e )eRFPath, RegOffSetToBeCheck, bMask12Bits);RT_TRACE (COMP_RF ,"RF %d %d register final value: %x\n" , eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; }break ;case RF90_PATH_B :while (RF3_Final_Value != RegValueToBeCheck && RetryTimes !=0 ) { - ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum RF90_RADIO_PATH_E )eRFPath); - RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath, RegOffSetToBeCheck, bMask12Bits); + ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum rf90_radio_path_e )eRFPath); + RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum rf90_radio_path_e )eRFPath, RegOffSetToBeCheck, bMask12Bits);RT_TRACE (COMP_RF ,"RF %d %d register final value: %x\n" , eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; }break ;case RF90_PATH_C :while (RF3_Final_Value != RegValueToBeCheck && RetryTimes !=0 ) { - ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum RF90_RADIO_PATH_E )eRFPath); - RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath, RegOffSetToBeCheck, bMask12Bits); + ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum rf90_radio_path_e )eRFPath); + RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum rf90_radio_path_e )eRFPath, RegOffSetToBeCheck, bMask12Bits);RT_TRACE (COMP_RF ,"RF %d %d register final value: %x\n" , eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; }break ;case RF90_PATH_D :while (RF3_Final_Value != RegValueToBeCheck && RetryTimes !=0 ) { - ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum RF90_RADIO_PATH_E )eRFPath); - RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum RF90_RADIO_PATH_E )eRFPath, RegOffSetToBeCheck, bMask12Bits); + ret =rtl8192_phy_ConfigRFWithHeaderFile (dev, (enum rf90_radio_path_e )eRFPath); + RF3_Final_Value =rtl8192_phy_QueryRFReg (dev, (enum rf90_radio_path_e )eRFPath, RegOffSetToBeCheck, bMask12Bits);RT_TRACE (COMP_RF ,"RF %d %d register final value: %x\n" , eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; }
drivers/staging/rtl8192u/r8192U_core.c +2 -2
@@ -2897,7 +2897,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)*/ for (eRFPath =0 ; eRFPath < pHalData->NumTotalRFPath; eRFPath++)PHY_SetRFReg (Adapter, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x4 ,0xC00 ,0x0 ); }else if (pMgntInfo->RfOffReason >RF_CHANGE_BY_PS ) {/* H/W or S/W RF OFF before sleep. */
@@ -2923,7 +2923,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)*/ for (eRFPath =0 ; eRFPath < pHalData->NumTotalRFPath; eRFPath++)PHY_SetRFReg (Adapter, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath,0x4 ,0xC00 ,0x0 ); } }
drivers/staging/rtl8192u/r819xU_phy.c +19 -19
@@ -101,18 +101,18 @@ u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask) }static u32 phy_FwRFSerialRead (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 offset);static void phy_FwRFSerialWrite (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 offset,u32 data);/****************************************************************************** * function: This function reads register from RF chip * input: net_device *dev -* RF90_RADIO_PATH_E eRFPath //radio path of A/B/C/D +* rf90_radio_path_e eRFPath //radio path of A/B/C/D * u32 offset //target address to be read * output: none * return: u32 readback value
@@ -124,7 +124,7 @@ static void phy_FwRFSerialWrite(struct net_device *dev,* ---need more spec for this information. ******************************************************************************/ static u32 rtl8192_phy_RFSerialRead (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath,u32 offset) +enum rf90_radio_path_e eRFPath,u32 offset) {struct r8192_priv *priv =ieee80211_priv (dev);u32 ret =0 ;
@@ -191,7 +191,7 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,/****************************************************************************** * function: This function writes data to RF register * input: net_device *dev -* RF90_RADIO_PATH_E eRFPath //radio path of A/B/C/D +* rf90_radio_path_e eRFPath //radio path of A/B/C/D * u32 offset //target address to be written * u32 data //the new register data to be written * output: none
@@ -209,7 +209,7 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,* --------------------------------------------------------------------------- *****************************************************************************/ static void rtl8192_phy_RFSerialWrite (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 offset,u32 data) {
@@ -266,7 +266,7 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,/****************************************************************************** * function: This function set specific bits to RF register * input: net_device dev -* RF90_RADIO_PATH_E eRFPath //radio path of A/B/C/D +* rf90_radio_path_e eRFPath //radio path of A/B/C/D * u32 reg_addr //target addr to be modified * u32 bitmask //taget bit pos to be modified * u32 data //value to be written
@@ -275,7 +275,7 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,* notice: *****************************************************************************/ void rtl8192_phy_SetRFReg (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 reg_addr,u32 bitmask,u32 data) {struct r8192_priv *priv =ieee80211_priv (dev);
@@ -324,7 +324,7 @@ void rtl8192_phy_SetRFReg(struct net_device *dev,* notice: *****************************************************************************/ u32 rtl8192_phy_QueryRFReg (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 reg_addr,u32 bitmask) {u32 reg, bitshift;
@@ -348,14 +348,14 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev,/****************************************************************************** * function: We support firmware to execute RF-R/W. * input: net_device *dev -* RF90_RADIO_PATH_E eRFPath +* rf90_radio_path_e eRFPath * u32 offset * output: none * return: u32 * notice: ****************************************************************************/ static u32 phy_FwRFSerialRead (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 offset) {u32 reg =0 ;
@@ -412,7 +412,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,/****************************************************************************** * function: We support firmware to execute RF-R/W. * input: net_device *dev -* RF90_RADIO_PATH_E eRFPath +* rf90_radio_path_e eRFPath * u32 offset * u32 data * output: none
@@ -420,7 +420,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,* notice: ****************************************************************************/ static void phy_FwRFSerialWrite (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 offset,u32 data) {u8 time =0 ;
@@ -688,14 +688,14 @@ static void rtl8192_InitBBRFRegDef(struct net_device *dev)* sure whether BB and RF is OK * input: net_device *dev * hw90_block_e CheckBlock -* RF90_RADIO_PATH_E eRFPath //only used when checkblock is +* rf90_radio_path_e eRFPath //only used when checkblock is * //HW90_BLOCK_RF * output: none * return: return whether BB and RF is ok (0:OK, 1:Fail) * notice: This function may be removed in the ASIC ******************************************************************************/ u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block_e CheckBlock, -enum RF90_RADIO_PATH_E eRFPath) +enum rf90_radio_path_e eRFPath) {u8 ret =0 ;u32 i, CheckTimes =4 , reg =0 ;
@@ -790,7 +790,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) eCheckItem <= HW90_BLOCK_PHY1; eCheckItem++) {/* don't care RF path */ status =rtl8192_phy_checkBBAndRF (dev, (enum hw90_block_e )eCheckItem, - (enum RF90_RADIO_PATH_E )0 ); + (enum rf90_radio_path_e )0 );if (status !=0 ) { RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config(): Check PHY%d Fail!!\n",
@@ -962,13 +962,13 @@ void rtl8192_phy_updateInitGain(struct net_device *dev)* function: This function read RF parameters from general head file, * and do RF 3-wire * input: net_device *dev -* RF90_RADIO_PATH_E eRFPath +* rf90_radio_path_e eRFPath * output: none * return: return code show if RF configuration is successful(0:pass, 1:fail) * notice: Delay may be required for RF configuration *****************************************************************************/ u8 rtl8192_phy_ConfigRFWithHeaderFile (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath) +enum rf90_radio_path_e eRFPath) {int i;
@@ -1386,7 +1386,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,case CMD_ID_RF_WRITE_REG :for (eRFPath =0 ; eRFPath <RF90_PATH_MAX ; eRFPath++) {rtl8192_phy_SetRFReg (dev, - (enum RF90_RADIO_PATH_E )eRFPath, + (enum rf90_radio_path_e )eRFPath, CurrentCmd->para_1, bZebra1_ChannelNum, CurrentCmd->para_2);
drivers/staging/rtl8192u/r819xU_phy.h +5 -5
@@ -33,7 +33,7 @@ enum hw90_block_e { HW90_BLOCK_MAXIMUM = 4, /* Never use this */ }; -enum RF90_RADIO_PATH_E { +enum rf90_radio_path_e {RF90_PATH_A =0 ,/* Radio Path A */ RF90_PATH_B =1 ,/* Radio Path B */ RF90_PATH_C =2 ,/* Radio Path C */
@@ -54,23 +54,23 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask, u32 data);u32 rtl8192_QueryBBReg (struct net_device *dev,u32 reg_addr,u32 bitmask);void rtl8192_phy_SetRFReg (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 reg_addr,u32 bitmask,u32 data);u32 rtl8192_phy_QueryRFReg (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath, +enum rf90_radio_path_e eRFPath,u32 reg_addr,u32 bitmask);void rtl8192_phy_configmac (struct net_device *dev);void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType);u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block_e CheckBlock, -enum RF90_RADIO_PATH_E eRFPath); +enum rf90_radio_path_e eRFPath);void rtl8192_BBConfig (struct net_device *dev);void rtl8192_phy_getTxPower (struct net_device *dev);void rtl8192_phy_setTxPower (struct net_device *dev,u8 channel);void rtl8192_phy_RFConfig (struct net_device *dev);void rtl8192_phy_updateInitGain (struct net_device *dev);u8 rtl8192_phy_ConfigRFWithHeaderFile (struct net_device *dev, -enum RF90_RADIO_PATH_E eRFPath); +enum rf90_radio_path_e eRFPath);u8 rtl8192_phy_SwChnl (struct net_device *dev,u8 channel); void rtl8192_SetBWMode(struct net_device *dev,
Signature · 1 line
2.18.0
PATCH 15/16 staging:rtl8192u: Remove repeated definitions - Style
In reply to John WhitmoreRemove bit field masks which are defined in two files: r819xU_phy.h and r819xU_phyreg.h. Or in the case of bMaskByte3 defined but never used.
The definitions have been removed from the file r819xU_phy.h.
This is a coding style change, which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.h | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.h +0 -8
@@ -41,14 +41,6 @@ enum rf90_radio_path_e { RF90_PATH_MAX /* Max RF number 92 support */ }; -#define bMaskByte0 0xff -#define bMaskByte1 0xff00 -#define bMaskByte2 0xff0000 -#define bMaskByte3 0xff000000 -#define bMaskHWord 0xffff0000 -#define bMaskLWord 0x0000ffff -#define bMaskDWord 0xffffffff -u8 rtl8192_phy_CheckIsLegalRFPath (struct net_device *dev,u32 eRFPath);void rtl8192_setBBreg (struct net_device *dev,u32 reg_addr,u32 bitmask,u32 data);
Signature · 1 line
2.18.0
PATCH 16/16 staging:rtl8192u: Rename eRFPath - Style
In reply to John WhitmoreRename the variable eRFPath to e_rfpath. This change resolves a checkpatch issue with CamelCase naming. The variable name is used both as a parameter name in function definitions, function prototypes and as a local variable.
This change is purely a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_phy.c | 120 +++++++++++++------------- drivers/staging/rtl8192u/r819xU_phy.h | 10 +-- 2 files changed, 65 insertions(+), 65 deletions(-)
drivers/staging/rtl8192u/r819xU_phy.c +60 -60
@@ -34,11 +34,11 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {* function: This function checks different RF type to execute legal judgement. * If RF Path is illegal, we will return false. * input: net_device *dev -* u32 eRFPath +* u32 e_rfpath * output: none * return: 0(illegal, false), 1(legal, true) *****************************************************************************/ -u8 rtl8192_phy_CheckIsLegalRFPath (struct net_device *dev,u32 eRFPath) +u8 rtl8192_phy_CheckIsLegalRFPath (struct net_device *dev,u32 e_rfpath) {u8 ret =1 ;struct r8192_priv *priv =ieee80211_priv (dev);
@@ -46,9 +46,9 @@ u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device *dev, u32 eRFPath)if (priv->rf_type ==RF_2T4R ) { ret =0 ; }else if (priv->rf_type ==RF_1T2R ) { -if (eRFPath ==RF90_PATH_A || eRFPath ==RF90_PATH_B ) +if (e_rfpath ==RF90_PATH_A || e_rfpath ==RF90_PATH_B ) ret =1 ; -else if (eRFPath ==RF90_PATH_C || eRFPath ==RF90_PATH_D ) +else if (e_rfpath ==RF90_PATH_C || e_rfpath ==RF90_PATH_D ) ret =0 ; }return ret;
@@ -101,18 +101,18 @@ u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask) }static u32 phy_FwRFSerialRead (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 offset);static void phy_FwRFSerialWrite (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 offset,u32 data);/****************************************************************************** * function: This function reads register from RF chip * input: net_device *dev -* rf90_radio_path_e eRFPath //radio path of A/B/C/D +* rf90_radio_path_e e_rfpath //radio path of A/B/C/D * u32 offset //target address to be read * output: none * return: u32 readback value
@@ -124,12 +124,12 @@ static void phy_FwRFSerialWrite(struct net_device *dev,* ---need more spec for this information. ******************************************************************************/ static u32 rtl8192_phy_RFSerialRead (struct net_device *dev, -enum rf90_radio_path_e eRFPath,u32 offset) +enum rf90_radio_path_e e_rfpath,u32 offset) {struct r8192_priv *priv =ieee80211_priv (dev);u32 ret =0 ;u32 new_offset =0 ; -BB_REGISTER_DEFINITION_T *pPhyReg = &priv->PHYRegDef[eRFPath]; +BB_REGISTER_DEFINITION_T *pPhyReg = &priv->PHYRegDef[e_rfpath];rtl8192_setBBreg (dev, pPhyReg->rfLSSIReadBack, bLSSIReadBackData,0 );/* Make sure RF register offset is correct */
@@ -138,20 +138,20 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,/* Switch page for 8256 RF IC */ if (priv->rf_chip ==RF_8256 ) {if (offset >=31 ) { - priv->RfReg0Value[eRFPath] |=0x140 ; + priv->RfReg0Value[e_rfpath] |=0x140 ;/* Switch to Reg_Mode2 for Reg 31-45 */ rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath]<<16 ); + priv->RfReg0Value[e_rfpath]<<16 );/* Modify offset */ new_offset = offset -30 ; }else if (offset >=16 ) { - priv->RfReg0Value[eRFPath] |=0x100 ; - priv->RfReg0Value[eRFPath] &= (~0x40 ); + priv->RfReg0Value[e_rfpath] |=0x100 ; + priv->RfReg0Value[e_rfpath] &= (~0x40 );/* Switch to Reg_Mode1 for Reg16-30 */ rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath]<<16 ); + priv->RfReg0Value[e_rfpath]<<16 ); new_offset = offset -15 ; }else {
@@ -179,10 +179,10 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,/* Switch back to Reg_Mode0 */ if (priv->rf_chip ==RF_8256 ) { - priv->RfReg0Value[eRFPath] &=0xebf ; + priv->RfReg0Value[e_rfpath] &=0xebf ;rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath] <<16 ); + priv->RfReg0Value[e_rfpath] <<16 ); }return ret;
@@ -191,7 +191,7 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,/****************************************************************************** * function: This function writes data to RF register * input: net_device *dev -* rf90_radio_path_e eRFPath //radio path of A/B/C/D +* rf90_radio_path_e e_rfpath //radio path of A/B/C/D * u32 offset //target address to be written * u32 data //the new register data to be written * output: none
@@ -209,29 +209,29 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,* --------------------------------------------------------------------------- *****************************************************************************/ static void rtl8192_phy_RFSerialWrite (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 offset,u32 data) {struct r8192_priv *priv =ieee80211_priv (dev);u32 DataAndAddr =0 , new_offset =0 ; -BB_REGISTER_DEFINITION_T *pPhyReg = &priv->PHYRegDef[eRFPath]; +BB_REGISTER_DEFINITION_T *pPhyReg = &priv->PHYRegDef[e_rfpath]; offset &=0x3f ;if (priv->rf_chip ==RF_8256 ) {if (offset >=31 ) { - priv->RfReg0Value[eRFPath] |=0x140 ; + priv->RfReg0Value[e_rfpath] |=0x140 ;rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath] <<16 ); + priv->RfReg0Value[e_rfpath] <<16 ); new_offset = offset -30 ; }else if (offset >=16 ) { - priv->RfReg0Value[eRFPath] |=0x100 ; - priv->RfReg0Value[eRFPath] &= (~0x40 ); + priv->RfReg0Value[e_rfpath] |=0x100 ; + priv->RfReg0Value[e_rfpath] &= (~0x40 );rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath]<<16 ); + priv->RfReg0Value[e_rfpath]<<16 ); new_offset = offset -15 ; }else { new_offset = offset;
@@ -250,15 +250,15 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,if (offset ==0x0 ) - priv->RfReg0Value[eRFPath] = data; + priv->RfReg0Value[e_rfpath] = data;/* Switch back to Reg_Mode0 */ if (priv->rf_chip ==RF_8256 ) {if (offset !=0 ) { - priv->RfReg0Value[eRFPath] &=0xebf ; + priv->RfReg0Value[e_rfpath] &=0xebf ;rtl8192_setBBreg (dev, pPhyReg->rf3wireOffset, bMaskDWord, - priv->RfReg0Value[eRFPath] <<16 ); + priv->RfReg0Value[e_rfpath] <<16 ); } } }
@@ -266,7 +266,7 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,/****************************************************************************** * function: This function set specific bits to RF register * input: net_device dev -* rf90_radio_path_e eRFPath //radio path of A/B/C/D +* rf90_radio_path_e e_rfpath //radio path of A/B/C/D * u32 reg_addr //target addr to be modified * u32 bitmask //taget bit pos to be modified * u32 data //value to be written
@@ -275,26 +275,26 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,* notice: *****************************************************************************/ void rtl8192_phy_SetRFReg (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 reg_addr,u32 bitmask,u32 data) {struct r8192_priv *priv =ieee80211_priv (dev);u32 reg, bitshift; -if (!rtl8192_phy_CheckIsLegalRFPath (dev, eRFPath)) +if (!rtl8192_phy_CheckIsLegalRFPath (dev, e_rfpath))return ;if (priv->Rf_Mode == RF_OP_By_FW) {if (bitmask != bMask12Bits) {/* RF data is 12 bits only */ - reg =phy_FwRFSerialRead (dev, eRFPath, reg_addr); + reg =phy_FwRFSerialRead (dev, e_rfpath, reg_addr); bitshift =ffs (bitmask) -1 ; reg &= ~bitmask; reg |= data << bitshift; -phy_FwRFSerialWrite (dev, eRFPath, reg_addr, reg); +phy_FwRFSerialWrite (dev, e_rfpath, reg_addr, reg); }else { -phy_FwRFSerialWrite (dev, eRFPath, reg_addr, data); +phy_FwRFSerialWrite (dev, e_rfpath, reg_addr, data); }udelay (200 );
@@ -302,14 +302,14 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, }else {if (bitmask != bMask12Bits) {/* RF data is 12 bits only */ - reg =rtl8192_phy_RFSerialRead (dev, eRFPath, reg_addr); + reg =rtl8192_phy_RFSerialRead (dev, e_rfpath, reg_addr); bitshift =ffs (bitmask) -1 ; reg &= ~bitmask; reg |= data << bitshift; -rtl8192_phy_RFSerialWrite (dev, eRFPath, reg_addr, reg); +rtl8192_phy_RFSerialWrite (dev, e_rfpath, reg_addr, reg); }else { -rtl8192_phy_RFSerialWrite (dev, eRFPath, reg_addr, data); +rtl8192_phy_RFSerialWrite (dev, e_rfpath, reg_addr, data); } } }
@@ -324,20 +324,20 @@ void rtl8192_phy_SetRFReg(struct net_device *dev,* notice: *****************************************************************************/ u32 rtl8192_phy_QueryRFReg (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 reg_addr,u32 bitmask) {u32 reg, bitshift;struct r8192_priv *priv =ieee80211_priv (dev); -if (!rtl8192_phy_CheckIsLegalRFPath (dev, eRFPath)) +if (!rtl8192_phy_CheckIsLegalRFPath (dev, e_rfpath))return 0 ;if (priv->Rf_Mode == RF_OP_By_FW) { - reg =phy_FwRFSerialRead (dev, eRFPath, reg_addr); + reg =phy_FwRFSerialRead (dev, e_rfpath, reg_addr);udelay (200 ); }else { - reg =rtl8192_phy_RFSerialRead (dev, eRFPath, reg_addr); + reg =rtl8192_phy_RFSerialRead (dev, e_rfpath, reg_addr); } bitshift =ffs (bitmask) -1 ; reg = (reg & bitmask) >> bitshift;
@@ -348,14 +348,14 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev,/****************************************************************************** * function: We support firmware to execute RF-R/W. * input: net_device *dev -* rf90_radio_path_e eRFPath +* rf90_radio_path_e e_rfpath * u32 offset * output: none * return: u32 * notice: ****************************************************************************/ static u32 phy_FwRFSerialRead (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 offset) {u32 reg =0 ;
@@ -372,7 +372,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,/* 2. Write RF register address. bit 12-19 */ data |= ((offset&0xFF )<<12 );/* 3. Write RF path. bit 20-21 */ - data |= ((eRFPath&0x3 )<<20 ); + data |= ((e_rfpath&0x3 )<<20 );/* 4. Set RF read indicator. bit 22=0 */ /* 5. Trigger Fw to operate the command. bit 31 */ data |=0x80000000 ;
@@ -412,7 +412,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,/****************************************************************************** * function: We support firmware to execute RF-R/W. * input: net_device *dev -* rf90_radio_path_e eRFPath +* rf90_radio_path_e e_rfpath * u32 offset * u32 data * output: none
@@ -420,7 +420,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,* notice: ****************************************************************************/ static void phy_FwRFSerialWrite (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 offset,u32 data) {u8 time =0 ;
@@ -436,7 +436,7 @@ static void phy_FwRFSerialWrite(struct net_device *dev,/* 2. Write RF register address. bit 12-19 */ data |= ((offset&0xFF )<<12 );/* 3. Write RF path. bit 20-21 */ - data |= ((eRFPath&0x3 )<<20 ); + data |= ((e_rfpath&0x3 )<<20 );/* 4. Set RF write indicator. bit 22=1 */ data |=0x400000 ;/* 5. Trigger Fw to operate the command. bit 31=1 */
@@ -688,14 +688,14 @@ static void rtl8192_InitBBRFRegDef(struct net_device *dev)* sure whether BB and RF is OK * input: net_device *dev * hw90_block_e CheckBlock -* rf90_radio_path_e eRFPath //only used when checkblock is +* rf90_radio_path_e e_rfpath //only used when checkblock is * //HW90_BLOCK_RF * output: none * return: return whether BB and RF is ok (0:OK, 1:Fail) * notice: This function may be removed in the ASIC ******************************************************************************/ u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block_e CheckBlock, -enum rf90_radio_path_e eRFPath) +enum rf90_radio_path_e e_rfpath) {u8 ret =0 ;u32 i, CheckTimes =4 , reg =0 ;
@@ -726,14 +726,14 @@ u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, enum hw90_block_e CheckBlockcase HW90_BLOCK_RF : WriteData[i] &=0xfff ; -rtl8192_phy_SetRFReg (dev, eRFPath, +rtl8192_phy_SetRFReg (dev, e_rfpath, WriteAddr[HW90_BLOCK_RF ], bMask12Bits, WriteData[i]);/* TODO: we should not delay for such a long time. * Ask SD3 */ usleep_range (1000 ,1000 ); - reg =rtl8192_phy_QueryRFReg (dev, eRFPath, + reg =rtl8192_phy_QueryRFReg (dev, e_rfpath, WriteAddr[HW90_BLOCK_RF ], bMask12Bits);usleep_range (1000 ,1000 );
@@ -962,18 +962,18 @@ void rtl8192_phy_updateInitGain(struct net_device *dev)* function: This function read RF parameters from general head file, * and do RF 3-wire * input: net_device *dev -* rf90_radio_path_e eRFPath +* rf90_radio_path_e e_rfpath * output: none * return: return code show if RF configuration is successful(0:pass, 1:fail) * notice: Delay may be required for RF configuration *****************************************************************************/ u8 rtl8192_phy_ConfigRFWithHeaderFile (struct net_device *dev, -enum rf90_radio_path_e eRFPath) +enum rf90_radio_path_e e_rfpath) {int i; -switch (eRFPath) { +switch (e_rfpath) {case RF90_PATH_A :for (i =0 ; i < RadioA_ArrayLength; i = i+2 ) {
@@ -981,7 +981,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,mdelay (100 );continue ; } -rtl8192_phy_SetRFReg (dev, eRFPath, +rtl8192_phy_SetRFReg (dev, e_rfpath, Rtl8192UsbRadioA_Array[i], bMask12Bits, Rtl8192UsbRadioA_Array[i+1 ]);
@@ -996,7 +996,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,mdelay (100 );continue ; } -rtl8192_phy_SetRFReg (dev, eRFPath, +rtl8192_phy_SetRFReg (dev, e_rfpath, Rtl8192UsbRadioB_Array[i], bMask12Bits, Rtl8192UsbRadioB_Array[i+1 ]);
@@ -1011,7 +1011,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,mdelay (100 );continue ; } -rtl8192_phy_SetRFReg (dev, eRFPath, +rtl8192_phy_SetRFReg (dev, e_rfpath, Rtl8192UsbRadioC_Array[i], bMask12Bits, Rtl8192UsbRadioC_Array[i+1 ]);
@@ -1026,7 +1026,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,mdelay (100 );continue ; } -rtl8192_phy_SetRFReg (dev, eRFPath, +rtl8192_phy_SetRFReg (dev, e_rfpath, Rtl8192UsbRadioD_Array[i], bMask12Bits, Rtl8192UsbRadioD_Array[i+1 ]);
@@ -1267,7 +1267,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,struct sw_chnl_cmd RfDependCmd[MAX_RFDEPENDCMD_CNT ];u32 RfDependCmdCnt;struct sw_chnl_cmd *CurrentCmd =NULL ; -u8 eRFPath; +u8 e_rfpath;RT_TRACE (COMP_CH ,"%s() stage: %d, step: %d, channel: %d\n" , __func__, *stage, *step, channel);
@@ -1384,9 +1384,9 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, (u8)CurrentCmd->para_2);break ;case CMD_ID_RF_WRITE_REG : -for (eRFPath =0 ; eRFPath <RF90_PATH_MAX ; eRFPath++) { +for (e_rfpath =0 ; e_rfpath <RF90_PATH_MAX ; e_rfpath++) {rtl8192_phy_SetRFReg (dev, - (enum rf90_radio_path_e )eRFPath, + (enum rf90_radio_path_e )e_rfpath, CurrentCmd->para_1, bZebra1_ChannelNum, CurrentCmd->para_2);
drivers/staging/rtl8192u/r819xU_phy.h +5 -5
@@ -41,28 +41,28 @@ enum rf90_radio_path_e {RF90_PATH_MAX /* Max RF number 92 support */ }; -u8 rtl8192_phy_CheckIsLegalRFPath (struct net_device *dev,u32 eRFPath); +u8 rtl8192_phy_CheckIsLegalRFPath (struct net_device *dev,u32 e_rfpath);void rtl8192_setBBreg (struct net_device *dev,u32 reg_addr,u32 bitmask,u32 data);u32 rtl8192_QueryBBReg (struct net_device *dev,u32 reg_addr,u32 bitmask);void rtl8192_phy_SetRFReg (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 reg_addr,u32 bitmask,u32 data);u32 rtl8192_phy_QueryRFReg (struct net_device *dev, -enum rf90_radio_path_e eRFPath, +enum rf90_radio_path_e e_rfpath,u32 reg_addr,u32 bitmask);void rtl8192_phy_configmac (struct net_device *dev);void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType);u8 rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block_e CheckBlock, -enum rf90_radio_path_e eRFPath); +enum rf90_radio_path_e e_rfpath);void rtl8192_BBConfig (struct net_device *dev);void rtl8192_phy_getTxPower (struct net_device *dev);void rtl8192_phy_setTxPower (struct net_device *dev,u8 channel);void rtl8192_phy_RFConfig (struct net_device *dev);void rtl8192_phy_updateInitGain (struct net_device *dev);u8 rtl8192_phy_ConfigRFWithHeaderFile (struct net_device *dev, -enum rf90_radio_path_e eRFPath); +enum rf90_radio_path_e e_rfpath);u8 rtl8192_phy_SwChnl (struct net_device *dev,u8 channel); void rtl8192_SetBWMode(struct net_device *dev,
Signature · 1 line
2.18.0