rtlwifi-new:kernel_version

Last commit made on 2018-06-27
Get this branch:
git clone -b kernel_version https://git.launchpad.net/rtlwifi-new

Branch merges

Branch information

Name:
kernel_version
Repository:
lp:rtlwifi-new

Recent commits

cc1b51d... by Larry Finger

rtlwifi_new: Prevent overwrite of firmware size

This bug results in "firmware not ready to run" errors.

Signed-off-by: Larry Finger <email address hidden>

d080433... by Ping-Ke Shih

rtlwifi: Fix kernel Oops "Fw download fail!!"

When connecting to AP, mac80211 asks driver to enter and leave PS quickly,
but driver deinit doesn't wait for delayed work complete when entering PS,
then driver reinit procedure and delay work are running simultaneously.
This will cause unpredictable kernel oops or crash like

rtl8723be: error H2C cmd because of Fw download fail!!!
WARNING: CPU: 3 PID: 159 at drivers/net/wireless/realtek/rtlwifi/
  rtl8723be/fw.c:227 rtl8723be_fill_h2c_cmd+0x182/0x510 [rtl8723be]
CPU: 3 PID: 159 Comm: kworker/3:2 Tainted: G O 4.16.13-2-ARCH #1
Hardware name: ASUSTeK COMPUTER INC. X556UF/X556UF, BIOS X556UF.406
        10/21/2016
Workqueue: rtl8723be_pci rtl_c2hcmd_wq_callback [rtlwifi]
RIP: 0010:rtl8723be_fill_h2c_cmd+0x182/0x510 [rtl8723be]
RSP: 0018:ffffa6ab01e1bd70 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffa26069071520 RCX: 0000000000000001
RDX: 0000000080000001 RSI: ffffffff8be70e9c RDI: 00000000ffffffff
RBP: 0000000000000000 R08: 0000000000000048 R09: 0000000000000348
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: ffffa26069071520 R14: 0000000000000000 R15: ffffa2607d205f70
FS: 0000000000000000(0000) GS:ffffa26081d80000(0000) knlGS:000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000443b39d3000 CR3: 000000037700a005 CR4: 00000000003606e0
Call Trace:
 ? halbtc_send_bt_mp_operation.constprop.17+0xd5/0xe0 [btcoexist]
 ? ex_btc8723b1ant_bt_info_notify+0x3b8/0x820 [btcoexist]
 ? rtl_c2hcmd_launcher+0xab/0x110 [rtlwifi]
 ? process_one_work+0x1d1/0x3b0
 ? worker_thread+0x2b/0x3d0
 ? process_one_work+0x3b0/0x3b0
 ? kthread+0x112/0x130
 ? kthread_create_on_node+0x60/0x60
 ? ret_from_fork+0x35/0x40
Code: 00 76 b4 e9 e2 fe ff ff 4c 89 ee 4c 89 e7 e8 56 22 86 ca e9 5e ...

This patch ensures all delayed works done before entering PS to satisfy
our expectation, so use cancel_delayed_work_sync() instead. An exception
is delayed work ips_nic_off_wq because running task may be itself, so add
a parameter ips_wq to deinit function to handle this case.

This issue is reported and fixed in below threads:
https://github.com/lwfinger/rtlwifi_new/issues/367
https://github.com/lwfinger/rtlwifi_new/issues/366

Tested-by: Evgeny Kapun <email address hidden> # 8723DE
Tested-by: Shivam Kakkar <email address hidden> # 8723BE on 4.18-rc1
Signed-off-by: Ping-Ke Shih <email address hidden>
Fixes: cceb0a597320 ("rtlwifi: Add work queue for c2h cmd.")
Cc: Stable <email address hidden> # 4.11+
Reviewed-by: Larry Finger <email address hidden>
Signed-off-by: Ping-Ke Shih <email address hidden>

8599299... by Larry Finger

rtlwifi_new: Log errant action value leading to AMPDU_ERR

Signed-off-by: Larry Finger <email address hidden>

2eec4ad... by Larry Finger

rtlwifi_new: rtl8821ae: Fix connection loss correctly

There has been a coding error in rtl8821ae since it was first introduced,
namely that an 8-bit register was read using a 16-bit read in
_rtl8821ae_dbi_read(). This error was fixed with commit 40b368af4b75
("rtlwifi: Fix alignment issues"); however, this change led to
instability in the connection. To restore stability, this change
was reverted in commit b8b8b16352cd ("rtlwifi: rtl8821ae: Fix connection
lost problem").

Unfortunately, the unaligned access caueses machine checks in ARM
architecture, and we were forced to evaluate the actual cause of the
problem on x86 platforms. Following a suggestion from Pkshih
<email address hidden>, it was found that by increasing the ASPM L1
latency from 0 to 7 fixed the stability. This parameter was varied to
see if a smaller value would work; however, it appears that 7 is the
safest value. A new symbol is defined for this quantity, thus it can be
easily changed if necessary.

Fixes: b8b8b16352cd ("rtlwifi: rtl8821ae: Fix connection lost problem")
Cc: Stable <email address hidden> # 4.14+
Fix-suggested-by: Pkshih <email address hidden>
Signed-off-by: Larry Finger <email address hidden>

b092741... by Larry Finger

rtlwifi_new: rtl8821ae: Fix problem with unaligned read

Using a patch supplied by Realtek, the L1 latency for 0x70f is increased.
With this change, the byte read on x86_64 now works, and there will be
no unaligned access on AARCH64.

Signed-off-by: Larry Finger <email address hidden>

e24ab76... by Larry Finger

Revert "Fix alignment fault on AARCH64 (Marvell Armada)"

This reverts commit c336b74ac48b41ab83023bdaf683b687180e0560.

Doing a byte read on this location breaks the driver for x86 users.

Signed-off-by: Larry Finger <email address hidden>

e495f0f... by Larry Finger

Merge pull request #315 from zerotier/kernel_version

Fix alignment fault on AARCH64 (Marvell Armada)

c336b74... by Adam Ierymenko <email address hidden>

Fix alignment fault on AARCH64 (Marvell Armada)

This fixes an alignment fault kernel panic on AARCH64 platforms, specifically the Marvell Armada chip in the espressobin network-oriented SBC but also probably other AARCH64 chips that don't like unaligned access.

5187b21... by Larry Finger

rtlwifi_new: Fix lack of build for rtl8723com

Signed-off-by: Larry Finger <email address hidden>

372beaa... by Larry Finger

rtlwifi_new: Fix build errors for kernel 4.15

Signed-off-by: Larry Finger <email address hidden>