Commit 7d486fde authored by Forest Bond's avatar Forest Bond Committed by John W. Linville

rtl8192de: Clean up and fix 92D cut version constants and macros.

The previous definitions included both {B,C,D,E}_CUT_VERSION and
CHIP_92D_{C,D}_CUT with conflicting values for the C and D cut versions,
and literal hex values were used in the IS_92D_{C,D,E}_CUT macros.  So
we clean all this up and in doing so enable cut-specific code paths for
cuts C and D, which would not have been executed because the
CHIP_92D_{C,D}_CUT constants were wrong and the cut version was thus
recorded incorrectly.
Signed-off-by: default avatarForest Bond <forest.bond@rapidrollout.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 711d8dea
...@@ -151,9 +151,6 @@ enum version_8192d { ...@@ -151,9 +151,6 @@ enum version_8192d {
/* for 92D */ /* for 92D */
#define CHIP_92D_SINGLEPHY BIT(9) #define CHIP_92D_SINGLEPHY BIT(9)
#define C_CUT_VERSION BIT(13)
#define D_CUT_VERSION ((BIT(12)|BIT(13)))
#define E_CUT_VERSION BIT(14)
/* Chip specific */ /* Chip specific */
#define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3) #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
...@@ -173,7 +170,10 @@ enum version_8192d { ...@@ -173,7 +170,10 @@ enum version_8192d {
#define RF_TYPE_1T2R BIT(4) #define RF_TYPE_1T2R BIT(4)
#define RF_TYPE_2T2R BIT(5) #define RF_TYPE_2T2R BIT(5)
#define CHIP_VENDOR_UMC BIT(7) #define CHIP_VENDOR_UMC BIT(7)
#define B_CUT_VERSION BIT(12) #define CHIP_92D_B_CUT BIT(12)
#define CHIP_92D_C_CUT BIT(13)
#define CHIP_92D_D_CUT (BIT(13)|BIT(12))
#define CHIP_92D_E_CUT BIT(14)
/* MASK */ /* MASK */
#define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2)) #define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2))
...@@ -205,15 +205,13 @@ enum version_8192d { ...@@ -205,15 +205,13 @@ enum version_8192d {
CHIP_92D) ? true : false) CHIP_92D) ? true : false)
#define IS_92D_C_CUT(version) ((IS_92D(version)) ? \ #define IS_92D_C_CUT(version) ((IS_92D(version)) ? \
((GET_CVID_CUT_VERSION(version) == \ ((GET_CVID_CUT_VERSION(version) == \
0x2000) ? true : false) : false) CHIP_92D_C_CUT) ? true : false) : false)
#define IS_92D_D_CUT(version) ((IS_92D(version)) ? \ #define IS_92D_D_CUT(version) ((IS_92D(version)) ? \
((GET_CVID_CUT_VERSION(version) == \ ((GET_CVID_CUT_VERSION(version) == \
0x3000) ? true : false) : false) CHIP_92D_D_CUT) ? true : false) : false)
#define IS_92D_E_CUT(version) ((IS_92D(version)) ? \ #define IS_92D_E_CUT(version) ((IS_92D(version)) ? \
((GET_CVID_CUT_VERSION(version) == \ ((GET_CVID_CUT_VERSION(version) == \
0x4000) ? true : false) : false) CHIP_92D_E_CUT) ? true : false) : false)
#define CHIP_92D_C_CUT BIT(10)
#define CHIP_92D_D_CUT BIT(11)
enum rf_optype { enum rf_optype {
RF_OP_BY_SW_3WIRE = 0, RF_OP_BY_SW_3WIRE = 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment