Commit 111118af authored by John Whitmore's avatar John Whitmore Committed by Greg Kroah-Hartman
Browse files

staging:rtl8192u: Refactor BaseBand_Config_Type - Style



Rename the type to baseband_config_type to clear the checkpatch issue
with CamelCase naming. Remove the 'typedef' directive to clear the
issue with defining new types.

As it is only used in the file r819xU_phy.c the type has been moved
to the r819xU_phy.h file.

The enumerated type is only used as a parameter to the function
rtl8192_phyConfigBB. Previously that parameter used type 'u8' so no
compiler typechecking was being performed. The parameter type has been
corrected.

These changes are coding style changes and as such should have no
impact on runtime code execution.

Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a4c1b7c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -20,10 +20,6 @@
#ifndef R8192_HW
#define R8192_HW

typedef enum _BaseBand_Config_Type {
	BaseBand_Config_PHY_REG = 0,			//Radio Path A
	BaseBand_Config_AGC_TAB = 1,			//Radio Path B
} BaseBand_Config_Type, *PBaseBand_Config_Type;
#define	RTL8187_REQT_READ	0xc0
#define	RTL8187_REQT_WRITE	0x40
#define	RTL8187_REQ_GET_REGS	0x05
+6 −5
Original line number Diff line number Diff line
@@ -511,7 +511,8 @@ void rtl8192_phy_configmac(struct net_device *dev)
 * notice:    BB parameters may change all the time, so please make
 *            sure it has been synced with the newest.
 *****************************************************************************/
static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
static void rtl8192_phyConfigBB(struct net_device *dev,
				enum baseband_config_type ConfigType)
{
	u32 i;

@@ -525,7 +526,7 @@ static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
		Rtl8190AGCTAB_Array_Table = Rtl819XAGCTAB_ArrayDTM;
	}
#endif
	if (ConfigType == BaseBand_Config_PHY_REG) {
	if (ConfigType == BASEBAND_CONFIG_PHY_REG) {
		for (i = 0; i < PHY_REG_1T2RArrayLength; i += 2) {
			rtl8192_setBBreg(dev, Rtl8192UsbPHY_REG_1T2RArray[i],
					 bMaskDWord,
@@ -535,7 +536,7 @@ static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
				 i, Rtl8192UsbPHY_REG_1T2RArray[i],
				 Rtl8192UsbPHY_REG_1T2RArray[i+1]);
		}
	} else if (ConfigType == BaseBand_Config_AGC_TAB) {
	} else if (ConfigType == BASEBAND_CONFIG_AGC_TAB) {
		for (i = 0; i < AGCTAB_ArrayLength; i += 2) {
			rtl8192_setBBreg(dev, Rtl8192UsbAGCTAB_Array[i],
					 bMaskDWord, Rtl8192UsbAGCTAB_Array[i+1]);
@@ -802,7 +803,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
	rtl8192_setBBreg(dev, rFPGA0_RFMOD, bCCKEn|bOFDMEn, 0x0);
	/* ----BB Register Initilazation---- */
	/* ==m==>Set PHY REG From Header<==m== */
	rtl8192_phyConfigBB(dev, BaseBand_Config_PHY_REG);
	rtl8192_phyConfigBB(dev, BASEBAND_CONFIG_PHY_REG);

	/* ----Set BB reset de-Active---- */
	read_nic_dword(dev, CPU_GEN, &reg_u32);
@@ -810,7 +811,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)

	/* ----BB AGC table Initialization---- */
	/* ==m==>Set PHY REG From Header<==m== */
	rtl8192_phyConfigBB(dev, BaseBand_Config_AGC_TAB);
	rtl8192_phyConfigBB(dev, BASEBAND_CONFIG_AGC_TAB);

	/* ----Enable XSTAL ---- */
	write_nic_byte_E(dev, 0x5e, 0x00);
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@
#define MAX_RFDEPENDCMD_CNT 16
#define MAX_POSTCMD_CNT 16

enum baseband_config_type {
	BASEBAND_CONFIG_PHY_REG = 0,			//Radio Path A
	BASEBAND_CONFIG_AGC_TAB = 1,			//Radio Path B
};

enum switch_chan_cmd_id {
	CMD_ID_END,
	CMD_ID_SET_TX_PWR_LEVEL,