* [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
@ 2012-04-02 14:25 Forest Bond
2012-04-02 15:46 ` Larry Finger
2012-04-02 17:54 ` Larry Finger
0 siblings, 2 replies; 6+ messages in thread
From: Forest Bond @ 2012-04-02 14:25 UTC (permalink / raw)
To: linux-wireless; +Cc: Larry Finger, Chaoming Li
[-- Attachment #1: Type: text/plain, Size: 2416 bytes --]
From: Forest Bond <forest.bond@rapidrollout.com>
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: Forest Bond <forest.bond@rapidrollout.com>
---
drivers/net/wireless/rtlwifi/rtl8192de/def.h | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/def.h b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
index eafdf76..260ac7e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/def.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
@@ -151,9 +151,6 @@ enum version_8192d {
/* for 92D */
#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 */
#define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
@@ -173,7 +170,11 @@ enum version_8192d {
#define RF_TYPE_1T2R BIT(4)
#define RF_TYPE_2T2R BIT(5)
#define CHIP_VENDOR_UMC BIT(7)
-#define B_CUT_VERSION BIT(12)
+#define CHIP_92D_A_CUT (0<<12)
+#define CHIP_92D_B_CUT (1<<12)
+#define CHIP_92D_C_CUT (2<<12)
+#define CHIP_92D_D_CUT (3<<12)
+#define CHIP_92D_E_CUT (4<<12)
/* MASK */
#define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2))
@@ -205,15 +206,13 @@ enum version_8192d {
CHIP_92D) ? true : false)
#define IS_92D_C_CUT(version) ((IS_92D(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)) ? \
((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)) ? \
((GET_CVID_CUT_VERSION(version) == \
- 0x4000) ? true : false) : false)
-#define CHIP_92D_C_CUT BIT(10)
-#define CHIP_92D_D_CUT BIT(11)
+ CHIP_92D_E_CUT) ? true : false) : false)
enum rf_optype {
RF_OP_BY_SW_3WIRE = 0,
--
1.7.0.4
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
2012-04-02 14:25 [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros Forest Bond
@ 2012-04-02 15:46 ` Larry Finger
2012-04-02 17:54 ` Larry Finger
1 sibling, 0 replies; 6+ messages in thread
From: Larry Finger @ 2012-04-02 15:46 UTC (permalink / raw)
To: Forest Bond; +Cc: linux-wireless, Chaoming Li, Jingjun Wu
On 04/02/2012 09:25 AM, Forest Bond wrote:
> From: Forest Bond<forest.bond@rapidrollout.com>
>
> 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: Forest Bond<forest.bond@rapidrollout.com>
Thanks for working on this driver. As there has been no traffic regarding its
usage, I have not done much with it. I am in possession of two models,
RTL8192DE-VC and RTL8192DE-VS. My recollection is that the VS did not work, but
I need to test again. Perhaps your changes are what was needed.
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/def.h | 17 ++++++++---------
> 1 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/def.h b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> index eafdf76..260ac7e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> @@ -151,9 +151,6 @@ enum version_8192d {
>
> /* for 92D */
> #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 */
> #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
> @@ -173,7 +170,11 @@ enum version_8192d {
> #define RF_TYPE_1T2R BIT(4)
> #define RF_TYPE_2T2R BIT(5)
> #define CHIP_VENDOR_UMC BIT(7)
> -#define B_CUT_VERSION BIT(12)
> +#define CHIP_92D_A_CUT (0<<12)
> +#define CHIP_92D_B_CUT (1<<12)
> +#define CHIP_92D_C_CUT (2<<12)
> +#define CHIP_92D_D_CUT (3<<12)
> +#define CHIP_92D_E_CUT (4<<12)
Please keep the BIT(X) notation here to make it consistent.
>
> /* MASK */
> #define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2))
> @@ -205,15 +206,13 @@ enum version_8192d {
> CHIP_92D) ? true : false)
> #define IS_92D_C_CUT(version) ((IS_92D(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)) ? \
> ((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)) ? \
> ((GET_CVID_CUT_VERSION(version) == \
> - 0x4000) ? true : false) : false)
> -#define CHIP_92D_C_CUT BIT(10)
> -#define CHIP_92D_D_CUT BIT(11)
> + CHIP_92D_E_CUT) ? true : false) : false)
>
> enum rf_optype {
> RF_OP_BY_SW_3WIRE = 0,
These IS_92D_X_CUT macros are ugly, but I don't see any way to improve them. I
guess we are stuck with them.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
2012-04-02 14:25 [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros Forest Bond
2012-04-02 15:46 ` Larry Finger
@ 2012-04-02 17:54 ` Larry Finger
2012-04-02 17:57 ` Forest Bond
1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2012-04-02 17:54 UTC (permalink / raw)
To: Forest Bond; +Cc: linux-wireless, Chaoming Li
On 04/02/2012 09:25 AM, Forest Bond wrote:
> From: Forest Bond<forest.bond@rapidrollout.com>
>
> 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: Forest Bond<forest.bond@rapidrollout.com>
This patch does not apply to the wireless-testing tree. That is the one you are
supposed to use.
Patch #2 also fails to apply. In addition, your mailer mangled a line.
Larry
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/def.h | 17 ++++++++---------
> 1 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/def.h b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> index eafdf76..260ac7e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/def.h
> @@ -151,9 +151,6 @@ enum version_8192d {
>
> /* for 92D */
> #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 */
> #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
> @@ -173,7 +170,11 @@ enum version_8192d {
> #define RF_TYPE_1T2R BIT(4)
> #define RF_TYPE_2T2R BIT(5)
> #define CHIP_VENDOR_UMC BIT(7)
> -#define B_CUT_VERSION BIT(12)
> +#define CHIP_92D_A_CUT (0<<12)
> +#define CHIP_92D_B_CUT (1<<12)
> +#define CHIP_92D_C_CUT (2<<12)
> +#define CHIP_92D_D_CUT (3<<12)
> +#define CHIP_92D_E_CUT (4<<12)
>
> /* MASK */
> #define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2))
> @@ -205,15 +206,13 @@ enum version_8192d {
> CHIP_92D) ? true : false)
> #define IS_92D_C_CUT(version) ((IS_92D(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)) ? \
> ((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)) ? \
> ((GET_CVID_CUT_VERSION(version) == \
> - 0x4000) ? true : false) : false)
> -#define CHIP_92D_C_CUT BIT(10)
> -#define CHIP_92D_D_CUT BIT(11)
> + CHIP_92D_E_CUT) ? true : false) : false)
>
> enum rf_optype {
> RF_OP_BY_SW_3WIRE = 0,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
2012-04-02 17:54 ` Larry Finger
@ 2012-04-02 17:57 ` Forest Bond
2012-04-02 18:04 ` Larry Finger
0 siblings, 1 reply; 6+ messages in thread
From: Forest Bond @ 2012-04-02 17:57 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, Chaoming Li
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
Hi Larry,
On Mon, Apr 02, 2012 at 12:54:01PM -0500, Larry Finger wrote:
> On 04/02/2012 09:25 AM, Forest Bond wrote:
> >From: Forest Bond<forest.bond@rapidrollout.com>
> >
> >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: Forest Bond<forest.bond@rapidrollout.com>
>
> This patch does not apply to the wireless-testing tree. That is the
> one you are supposed to use.
>
> Patch #2 also fails to apply. In addition, your mailer mangled a line.
Sorry for the trouble. I'll resend a little later this afternoon.
Thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
2012-04-02 17:57 ` Forest Bond
@ 2012-04-02 18:04 ` Larry Finger
2012-04-05 18:06 ` Forest Bond
0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2012-04-02 18:04 UTC (permalink / raw)
To: Forest Bond; +Cc: linux-wireless, Chaoming Li
On 04/02/2012 12:57 PM, Forest Bond wrote:
> Hi Larry,
>
> On Mon, Apr 02, 2012 at 12:54:01PM -0500, Larry Finger wrote:
>> On 04/02/2012 09:25 AM, Forest Bond wrote:
>>> From: Forest Bond<forest.bond@rapidrollout.com>
>>>
>>> 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: Forest Bond<forest.bond@rapidrollout.com>
>>
>> This patch does not apply to the wireless-testing tree. That is the
>> one you are supposed to use.
>>
>> Patch #2 also fails to apply. In addition, your mailer mangled a line.
>
> Sorry for the trouble. I'll resend a little later this afternoon.
No problem for me. I was able to fix everything but the mangling with wiggle.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros.
2012-04-02 18:04 ` Larry Finger
@ 2012-04-05 18:06 ` Forest Bond
0 siblings, 0 replies; 6+ messages in thread
From: Forest Bond @ 2012-04-05 18:06 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, Chaoming Li
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
Hi Larry,
On Mon, Apr 02, 2012 at 01:04:08PM -0500, Larry Finger wrote:
> On 04/02/2012 12:57 PM, Forest Bond wrote:
> >On Mon, Apr 02, 2012 at 12:54:01PM -0500, Larry Finger wrote:
> >>On 04/02/2012 09:25 AM, Forest Bond wrote:
> >>>From: Forest Bond<forest.bond@rapidrollout.com>
> >>>
> >>>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: Forest Bond<forest.bond@rapidrollout.com>
> >>
> >>This patch does not apply to the wireless-testing tree. That is the
> >>one you are supposed to use.
> >>
> >>Patch #2 also fails to apply. In addition, your mailer mangled a line.
> >
> >Sorry for the trouble. I'll resend a little later this afternoon.
>
> No problem for me. I was able to fix everything but the mangling with wiggle.
I just resent both patches, including the changes you requested to the first
one. Turns out GPG was causing all of the issues above, so I didn't sign the
resent patches.
Thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-05 18:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 14:25 [PATCH 1/2] rtl8192de: Clean up and fix 92D cut version constants and macros Forest Bond
2012-04-02 15:46 ` Larry Finger
2012-04-02 17:54 ` Larry Finger
2012-04-02 17:57 ` Forest Bond
2012-04-02 18:04 ` Larry Finger
2012-04-05 18:06 ` Forest Bond
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.