Bluetooth: btrtl: Ask 8821C to drop old firmware
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Mon, 26 Oct 2020 08:28:38 +0000 (16:28 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 9 Nov 2020 12:38:36 +0000 (13:38 +0100)
commit1996d9cad6ad4882a79464e9fb941a68c693f8fc
treeb92805a94c3e8d3db793e1564095bd28a3d65599
parent6f9ff24645f55ffae12ef717b4f221c3e7dfe115
Bluetooth: btrtl: Ask 8821C to drop old firmware

Some platforms keep USB power even when they are powered off and in S5,
this makes Realtek 8821C keep its firmware even after a cold boot, and
make 8821C never load new firmware.

So use vendor specific HCI command to ask 8821C drop its firmware after
system shutdown.

Newer firmware doesn't have this issue so we only use this trick for old
8821C firmware version.

Suggested-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btrtl.c