Trial change to rtl8192ce used as AP
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
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +1 -1
@@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(strrtl_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 );
Quoted 16 lines · 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
===================================================================
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c static int _rtl92ce_set_media_status(str · line 1103
Quoted 8 lines
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +1
-1@@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(strrtl_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?
Quoted 18 lines · Ivan Ivanich
Quoted 17 lines · 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
===================================================================drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +0
-0@@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(str
Quoted 11 lines
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c static int _rtl92ce_set_media_status(str · line 1103
Quoted 7 lines
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +1
-1rtl_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
Quoted 36 lines · On Четверг, 05-июл-2012 15:29:45 Larry Finger wrote:
Quoted 27 lines · Ivan Ivanich
Quoted 26 lines · 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
===================================================================drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +1
-1@@ -1097,7 +1097,7 @@ static int _rtl92ce_set_media_status(strrtl_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 );Quoted 7 lines
Quoted 3 lines
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?
Quoted 6 lines
Does it affect operation in AP mode? Before this change, the code always wrote
0x66to 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.
Quoted 1 line · Ivan Ivanich
At the first look all works as before, I will test a few days and then report.
Thanks,
Larry