diff mbox series

[02/15] rtw88: configure firmware after HCI started

Message ID 1568617425-28062-3-git-send-email-yhchuang@realtek.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series rtw88: Add support for deep PS mode | expand

Commit Message

Tony Chuang Sept. 16, 2019, 7:03 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

After firmware has been downloaded, driver should send
some information to it through H2C commands. Those H2C
commands are transmitted through TX path.

But before HCI has been started, the TX path is not
working completely. Such as PCI interfaces, the interrupts
are not enabled, hence TX interrupts will not be issued
after H2C skb has been DMAed to the device. And the H2C
skbs will not be released until the device is powered off.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/mac.c  | 3 ---
 drivers/net/wireless/realtek/rtw88/main.c | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Kalle Valo Sept. 21, 2019, 5:51 a.m. UTC | #1
<yhchuang@realtek.com> wrote:

> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> After firmware has been downloaded, driver should send
> some information to it through H2C commands. Those H2C
> commands are transmitted through TX path.
> 
> But before HCI has been started, the TX path is not
> working completely. Such as PCI interfaces, the interrupts
> are not enabled, hence TX interrupts will not be issued
> after H2C skb has been DMAed to the device. And the H2C
> skbs will not be released until the device is powered off.
> 
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>

This didn't apply. Please rebase on top of wireless-drivers, mark this
as "[PATCH 5.4 v2]" and resend.

fatal: sha1 information is lacking or useless (drivers/net/wireless/realtek/rtw88/mac.c).
error: could not build fake ancestor
Applying: rtw88: configure firmware after HCI started
Patch failed at 0001 rtw88: configure firmware after HCI started
The copy of the patch that failed is found in: .git/rebase-apply/patch

Patch set to Changes Requested.
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c
index f438376..d8c5da3 100644
--- a/drivers/net/wireless/realtek/rtw88/mac.c
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
@@ -707,9 +707,6 @@  int rtw_download_firmware(struct rtw_dev *rtwdev, struct rtw_fw_state *fw)
 	rtwdev->h2c.last_box_num = 0;
 	rtwdev->h2c.seq = 0;
 
-	rtw_fw_send_general_info(rtwdev);
-	rtw_fw_send_phydm_info(rtwdev);
-
 	set_bit(RTW_FLAG_FW_RUNNING, rtwdev->flags);
 
 	return 0;
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 0068d4d..36ba221 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -704,6 +704,10 @@  static int rtw_power_on(struct rtw_dev *rtwdev)
 		goto err_off;
 	}
 
+	/* send H2C after HCI has started */
+	rtw_fw_send_general_info(rtwdev);
+	rtw_fw_send_phydm_info(rtwdev);
+
 	wifi_only = !rtwdev->efuse.btcoex;
 	rtw_coex_power_on_setting(rtwdev);
 	rtw_coex_init_hw_config(rtwdev, wifi_only);