2014-06-20 16:56:56

by Nicholas Krause

[permalink] [raw]
Subject: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

Rewrites the wireless check for legacy checking in function
halbtc_legacy to check for both Mode A and B.

Signed-off-by: Nicholas Krause <[email protected]>
---
drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c
index 01f5a74..2d4fad3 100644
--- a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c
+++ b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c
@@ -144,7 +144,7 @@ static bool halbtc_legacy(struct rtl_priv *adapter)

bool is_legacy = false;

- if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_B))
+ if ((mac->mode == WIRELESS_MODE_A) || (mac->mode == WIRELESS_MODE_B))
is_legacy = true;

return is_legacy;
--
1.9.1


2014-06-20 19:59:33

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

On Fri, Jun 20, 2014 at 12:56:50PM -0400, Nicholas Krause wrote:
> Rewrites the wireless check for legacy checking in function
> halbtc_legacy to check for both Mode A and B.

You're just guessing that A and B were intended but it could have been
something B and G...

Don't do this. Just leave the static checker warning there so someone
can fix it properly instead of introducing a second new bug and hiding
the warning so it's impossible to find.

regards,
dan carpenter

2014-06-20 20:08:06

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

On Fri, 2014-06-20 at 22:59 +0300, Dan Carpenter wrote:
> On Fri, Jun 20, 2014 at 12:56:50PM -0400, Nicholas Krause wrote:
> > Rewrites the wireless check for legacy checking in function
> > halbtc_legacy to check for both Mode A and B.
>
> You're just guessing that A and B were intended but it could have been
> something B and G...
>
> Don't do this. Just leave the static checker warning there so someone
> can fix it properly instead of introducing a second new bug and hiding
> the warning so it's impossible to find.
>

It's most likely G anyway:

drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.c: if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_G))
drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c: if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_B))

Larry probably has a better idea.

2014-06-21 02:26:55

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

Thanks for the feedback I will resend the patch fixed.
Otherwise please use Larry's idea.
Cheers Nick

On Fri, Jun 20, 2014 at 4:08 PM, Joe Perches <[email protected]> wrote:
> On Fri, 2014-06-20 at 22:59 +0300, Dan Carpenter wrote:
>> On Fri, Jun 20, 2014 at 12:56:50PM -0400, Nicholas Krause wrote:
>> > Rewrites the wireless check for legacy checking in function
>> > halbtc_legacy to check for both Mode A and B.
>>
>> You're just guessing that A and B were intended but it could have been
>> something B and G...
>>
>> Don't do this. Just leave the static checker warning there so someone
>> can fix it properly instead of introducing a second new bug and hiding
>> the warning so it's impossible to find.
>>
>
> It's most likely G anyway:
>
> drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.c: if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_G))
> drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c: if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_B))
>
> Larry probably has a better idea.
>

2014-06-21 02:34:42

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

On Fri, 2014-06-20 at 22:26 -0400, Nick Krause wrote:
> Thanks for the feedback I will resend the patch fixed.

Please do not.

> Otherwise please use Larry's idea.

It's not Larry's idea. Larry is the primary
contributor for Realtek drivers in staging.

2014-06-21 02:52:04

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

Is this patch being merged or is this not an issue. I am confused
did I make a mistake in my patch or is there being a different
patch being merged.
Thank Nick

On Fri, Jun 20, 2014 at 10:34 PM, Joe Perches <[email protected]> wrote:
> On Fri, 2014-06-20 at 22:26 -0400, Nick Krause wrote:
>> Thanks for the feedback I will resend the patch fixed.
>
> Please do not.
>
>> Otherwise please use Larry's idea.
>
> It's not Larry's idea. Larry is the primary
> contributor for Realtek drivers in staging.
>
>

2014-06-21 13:06:26

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

On 06/20/2014 09:52 PM, Nick Krause wrote:
> Is this patch being merged or is this not an issue. I am confused
> did I make a mistake in my patch or is there being a different
> patch being merged.
> Thank Nick
>
> On Fri, Jun 20, 2014 at 10:34 PM, Joe Perches <[email protected]> wrote:
>> On Fri, 2014-06-20 at 22:26 -0400, Nick Krause wrote:
>>> Thanks for the feedback I will resend the patch fixed.
>>
>> Please do not.
>>
>>> Otherwise please use Larry's idea.
>>
>> It's not Larry's idea. Larry is the primary
>> contributor for Realtek drivers in staging.

I have just returned from back-to-back trips and a recovery from the failure of
my primary laptop. Once I get a little time, I will research this issue and let
you know. In the meantime, this patch should not be merged as it is not likely
correct.

Larry

2014-06-21 20:15:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging:rtl8821ae: rewrite legacy wifi check in halbcoutsrc

On Sat, Jun 21, 2014 at 12:46:33PM -0400, Nick Krause wrote:
> Hope you enjoyed your trips , Larry.
> It would be great if you researched
> this issue in order for me to send in
> a correct patch to fix this bug.

That is not how kernel development is done, you need to do the work, not
ask others to do it for you.

best of luck,

greg k-h