* Trial change to rtl8192ce used as AP
@ 2012-07-05 20:16 Larry Finger
2012-07-05 20:24 ` Ivan Ivanich
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2012-07-05 20:16 UTC (permalink / raw)
To: Ivan Ivanich; +Cc: wireless
Ivan,
The following patch is suggested by the code-analysis tool cppcheck as the test
is always false. As it will not affect STA usage, I have no way to test the
change. Could you please do so?
Thanks,
Larry
Index: wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(str
rtl_write_byte(rtlpriv, (MSR), bt_msr);
rtlpriv->cfg->ops->led_control(hw, ledaction);
- if ((bt_msr & 0xfc) == MSR_AP)
+ if ((bt_msr & 0x03) == MSR_AP)
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
else
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trial change to rtl8192ce used as AP
2012-07-05 20:16 Trial change to rtl8192ce used as AP Larry Finger
@ 2012-07-05 20:24 ` Ivan Ivanich
2012-07-05 20:29 ` Larry Finger
0 siblings, 1 reply; 5+ messages in thread
From: Ivan Ivanich @ 2012-07-05 20:24 UTC (permalink / raw)
To: Larry Finger; +Cc: wireless
On Четверг, 05-июл-2012 15:16:00 Larry Finger wrote:
> Ivan,
>
> The following patch is suggested by the code-analysis tool cppcheck as the
> test is always false. As it will not affect STA usage, I have no way to
> test the change. Could you please do so?
>
> Thanks,
>
> Larry
>
>
> Index: wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> +++ wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> @@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(str
>
> rtl_write_byte(rtlpriv, (MSR), bt_msr);
> rtlpriv->cfg->ops->led_control(hw, ledaction);
> - if ((bt_msr & 0xfc) == MSR_AP)
> + if ((bt_msr & 0x03) == MSR_AP)
> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
> else
> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
Yes, compiling now, for some reason it doesn't apply cleanyl so I manualy
changed this line.
And what exactly I should test?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trial change to rtl8192ce used as AP
2012-07-05 20:24 ` Ivan Ivanich
@ 2012-07-05 20:29 ` Larry Finger
2012-07-05 20:48 ` Ivan Ivanich
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2012-07-05 20:29 UTC (permalink / raw)
To: Ivan Ivanich; +Cc: wireless
On 07/05/2012 03:24 PM, Ivan Ivanich wrote:
> On Четверг, 05-июл-2012 15:16:00 Larry Finger wrote:
>> Ivan,
>>
>> The following patch is suggested by the code-analysis tool cppcheck as the
>> test is always false. As it will not affect STA usage, I have no way to
>> test the change. Could you please do so?
>>
>> Thanks,
>>
>> Larry
>>
>>
>> Index: wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
>> ===================================================================
>> --- wireless-testing.orig/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
>> +++ wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
>> @@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(str
>>
>> rtl_write_byte(rtlpriv, (MSR), bt_msr);
>> rtlpriv->cfg->ops->led_control(hw, ledaction);
>> - if ((bt_msr & 0xfc) == MSR_AP)
>> + if ((bt_msr & 0x03) == MSR_AP)
>> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
>> else
>> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
>
> Yes, compiling now, for some reason it doesn't apply cleanyl so I manualy
> changed this line.
> And what exactly I should test?
Does it affect operation in AP mode? Before this change, the code always wrote
0x66 to the register. Now it seems that it will write 0 if in AP mode. As I have
no idea what that register does, I do not know what effect the change will have.
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trial change to rtl8192ce used as AP
2012-07-05 20:29 ` Larry Finger
@ 2012-07-05 20:48 ` Ivan Ivanich
2012-07-05 21:10 ` Larry Finger
0 siblings, 1 reply; 5+ messages in thread
From: Ivan Ivanich @ 2012-07-05 20:48 UTC (permalink / raw)
To: Larry Finger; +Cc: wireless
On Четверг, 05-июл-2012 15:29:45 Larry Finger wrote:
> On 07/05/2012 03:24 PM, Ivan Ivanich wrote:
> > On Четверг, 05-июл-2012 15:16:00 Larry Finger wrote:
> >> Ivan,
> >>
> >> The following patch is suggested by the code-analysis tool cppcheck as
> >> the
> >> test is always false. As it will not affect STA usage, I have no way to
> >> test the change. Could you please do so?
> >>
> >> Thanks,
> >>
> >> Larry
> >>
> >>
> >> Index: wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> >> ===================================================================
> >> --- wireless-testing.orig/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> >> +++ wireless-testing/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> >> @@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(str
> >>
> >> rtl_write_byte(rtlpriv, (MSR), bt_msr);
> >> rtlpriv->cfg->ops->led_control(hw, ledaction);
> >>
> >> - if ((bt_msr & 0xfc) == MSR_AP)
> >> + if ((bt_msr & 0x03) == MSR_AP)
> >>
> >> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
> >>
> >> else
> >>
> >> rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
> >
> > Yes, compiling now, for some reason it doesn't apply cleanyl so I manualy
> > changed this line.
> > And what exactly I should test?
>
> Does it affect operation in AP mode? Before this change, the code always
> wrote 0x66 to the register. Now it seems that it will write 0 if in AP
> mode. As I have no idea what that register does, I do not know what effect
> the change will have.
>
> Larry
At the first look all works as before, I will test a few days and then report.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-05 21:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-05 20:16 Trial change to rtl8192ce used as AP Larry Finger
2012-07-05 20:24 ` Ivan Ivanich
2012-07-05 20:29 ` Larry Finger
2012-07-05 20:48 ` Ivan Ivanich
2012-07-05 21:10 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).