rtw89: update partition size of firmware header on skb->data
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 19 Nov 2021 05:45:10 +0000 (13:45 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 22 Nov 2021 18:42:15 +0000 (20:42 +0200)
commit5737b4515deea0829c138ab5201160345ec67d49
tree80d7b65d500cdfeb19c4c79cf7a57d44b252fbdd
parenta571bc28326d9f3e13f5f2d9cda2883e0631b0ce
rtw89: update partition size of firmware header on skb->data

The partition size is used to tell hardware the size of piece we are going
to send a firmware. The old code updates the size in constant buffer of
firmware, and leads system crash.

To fix this, update the size on skb->data after we copy the firmware data
into skb.

Buglink: https://bugzilla.opensuse.org/show_bug.cgi?id=1188303
Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211119054512.10620-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h