diff mbox series

[v3,1/4] rtl8723ae: Take the FW LPS mode handling out

Message ID DB7PR07MB535316A20C8447096DBC822DE4880@DB7PR07MB5353.eurprd07.prod.outlook.com
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series rtlwifi: Fix issues with rtl8723ae | expand

Commit Message

Bernd Edlinger Jan. 6, 2019, 12:02 a.m. UTC
This appears to trigger a firmware bug and causes severe
problems with rtl8723ae PCI devices.

When the power save mode is activated for longer periods
of time the firmware stops to receive any packets.

This problem was exposed by commit 873ffe154ae0 ("rtlwifi:
Fix logic error in enter/exit power-save mode").

Previously the power save mode was only active rarely and
only for a short time so that the problem was not noticeable.

Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
---
v2: Adjust the defaults of swlps and fwlps module
parameters to match the firmware capabilities instead of removing
the whole code, so it can be easily re-activated once a firmware
update is available.

v3: Make the title fit in one line.
---
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Kalle Valo Jan. 8, 2019, 5:27 p.m. UTC | #1
Bernd Edlinger <bernd.edlinger@hotmail.de> writes:

> This appears to trigger a firmware bug and causes severe
> problems with rtl8723ae PCI devices.
>
> When the power save mode is activated for longer periods
> of time the firmware stops to receive any packets.
>
> This problem was exposed by commit 873ffe154ae0 ("rtlwifi:
> Fix logic error in enter/exit power-save mode").
>
> Previously the power save mode was only active rarely and
> only for a short time so that the problem was not noticeable.
>
> Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
> ---
> v2: Adjust the defaults of swlps and fwlps module
> parameters to match the firmware capabilities instead of removing
> the whole code, so it can be easily re-activated once a firmware
> update is available.
>
> v3: Make the title fit in one line.

hotmail.de made me suspicious and indeed my Spidey sense was right:

Applying: rtl8723ae: Take the FW LPS mode handling out
Using index info to reconstruct a base tree...
.git/rebase-apply/patch:22: trailing whitespace.
        .swctrl_lps = true,
.git/rebase-apply/patch:23: trailing whitespace.
        .fwctrl_lps = false,
.git/rebase-apply/patch:33: trailing whitespace.
MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 1)\n");
.git/rebase-apply/patch:34: trailing whitespace.
MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 0)\n");
error: patch failed: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c:266
error: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Patch failed at 0001 rtl8723ae: Take the FW LPS mode handling out

Did you use Outlook to send this patch or what? Anyway, it's strongly
suggested to use git to submit the patches (and not use Outlook servers
either as they are notorious in breaking our patches):

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#format_issues
Bernd Edlinger Jan. 8, 2019, 10:20 p.m. UTC | #2
On 1/8/19 6:27 PM, Kalle Valo wrote:
> Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
> 
>> This appears to trigger a firmware bug and causes severe
>> problems with rtl8723ae PCI devices.
>>
>> When the power save mode is activated for longer periods
>> of time the firmware stops to receive any packets.
>>
>> This problem was exposed by commit 873ffe154ae0 ("rtlwifi:
>> Fix logic error in enter/exit power-save mode").
>>
>> Previously the power save mode was only active rarely and
>> only for a short time so that the problem was not noticeable.
>>
>> Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
>> ---
>> v2: Adjust the defaults of swlps and fwlps module
>> parameters to match the firmware capabilities instead of removing
>> the whole code, so it can be easily re-activated once a firmware
>> update is available.
>>
>> v3: Make the title fit in one line.
> 
> hotmail.de made me suspicious and indeed my Spidey sense was right:
> 
> Applying: rtl8723ae: Take the FW LPS mode handling out
> Using index info to reconstruct a base tree...
> .git/rebase-apply/patch:22: trailing whitespace.
>         .swctrl_lps = true,
> .git/rebase-apply/patch:23: trailing whitespace.
>         .fwctrl_lps = false,
> .git/rebase-apply/patch:33: trailing whitespace.
> MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 1)\n");
> .git/rebase-apply/patch:34: trailing whitespace.
> MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 0)\n");
> error: patch failed: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c:266
> error: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c: patch does not apply
> error: Did you hand edit your patch?
> It does not apply to blobs recorded in its index.
> Patch failed at 0001 rtl8723ae: Take the FW LPS mode handling out
> 
> Did you use Outlook to send this patch or what? Anyway, it's strongly
> suggested to use git to submit the patches (and not use Outlook servers
> either as they are notorious in breaking our patches):
> 

No, I did use firefox with the settings which I found at
https://www.kernel.org/doc/html/latest/process/email-clients.html#email-clients

I think all that is wrong with the message body is it is base64 encoded, and all the
lines end with CRLF, and it seems the CR is the trailing whitespace.

I think the Character Encoding/UTF-8 does not work right with
Exchange Servers.

What Character Encoding would git send-email use?  UTF-8?

So I will try to send the patches again, with 7-bit encoded message bodies.
Actually it will be quoted-printable, but I do not use any umlauts.


So for the records, I did open about:config in the firefox preferences,
and change:

mailnews.send_default_charset from UTF-8 to ISO-8859-1

that I have already done before, but it was not sufficient:

mailnews.send_plaintext_flowed from true to false
mailnews.wraplength from 72 to 0


Thanks
Bernd.
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
index 07b82700d1..3103151 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
@@ -266,8 +266,8 @@  static bool is_fw_header(struct rtlwifi_firmware_header *hdr)
 static struct rtl_mod_params rtl8723e_mod_params = {
 	.sw_crypto = false,
 	.inactiveps = true,
-	.swctrl_lps = false,
-	.fwctrl_lps = true,
+	.swctrl_lps = true,
+	.fwctrl_lps = false,
 	.aspm_support = 1,
 	.debug_level = 0,
 	.debug_mask = 0,
@@ -395,8 +395,8 @@  static bool is_fw_header(struct rtlwifi_firmware_header *hdr)
 		   bool, 0444);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
-MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
+MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 1)\n");
+MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 0)\n");
 MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");
 MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
 MODULE_PARM_DESC(debug_level, "Set debug level (0-5) (default 0)");