rtw89: some fixes related to hw_scan
Ping-Ke Shih
maintainercover rtw89: some fixes related to hw_scan
After applying hw_scan, it can't play STA and monitor mode simultaneously, because power is off after hw_scan unconditionally. The new firmware, which supports hw_scan, adds an new C2H message to notify driver, but this message is debug purpose, so just add a dummy function to avoid the unsupported message.
Po Hao Huang (2):
rtw89: change idle mode condition during hw_scan
rtw89: packet offload handler to avoid warning
drivers/net/wireless/realtek/rtw89/core.c | 8 ++++---- drivers/net/wireless/realtek/rtw89/mac.c | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/2 rtw89: change idle mode condition during hw_scan
From: Po Hao Huang <[email protected]>
Previously we only consider single interface's status, idle mode behavior could be unexpected when multiple interfaces is active. Change to enter/leave idle mode by mac80211's configuration state.
--- drivers/net/wireless/realtek/rtw89/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtw89/core.c +4 -4
@@ -1797,9 +1797,9 @@ static void rtw89_ips_work(struct work_struct *work) { struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev, ips_work); -mutex_lock (&rtwdev->mutex); -rtw89_enter_ips (rtwdev); +if (rtwdev->hw->conf.flags &IEEE80211_CONF_IDLE ) +rtw89_enter_ips (rtwdev);mutex_unlock (&rtwdev->mutex); }
@@ -2702,7 +2702,7 @@ void rtw89_core_scan_start(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif, rtwdev->scanning = true;rtw89_leave_lps (rtwdev); -if (hw_scan && rtwvif->net_type ==RTW89_NET_TYPE_NO_LINK ) +if (hw_scan && (rtwdev->hw->conf.flags &IEEE80211_CONF_IDLE ))rtw89_leave_ips (rtwdev);ether_addr_copy (rtwvif->mac_addr, mac_addr);
@@ -2726,7 +2726,7 @@ void rtw89_core_scan_complete(struct rtw89_dev *rtwdev, rtwdev->scanning = false; rtwdev->dig.bypass_dig = true; -if (hw_scan && rtwvif->net_type ==RTW89_NET_TYPE_NO_LINK ) +if (hw_scan && (rtwdev->hw->conf.flags &IEEE80211_CONF_IDLE ))ieee80211_queue_work (rtwdev->hw, &rtwdev->ips_work); }
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 2/2 rtw89: packet offload handler to avoid warning
In reply to Ping-Ke ShihFrom: Po Hao Huang <[email protected]>
Add a dummy function for packet offload to eliminate warning message "c2h class 1 func 2 not support". This c2h is for debug purpose and its presence itself can do the work, so further parsing won't be required for now.
--- drivers/net/wireless/realtek/rtw89/mac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/mac.c +7 -1
@@ -3451,12 +3451,18 @@ rtw89_mac_c2h_bcn_cnt(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len) { } +static void +rtw89_mac_c2h_pkt_ofld_rsp (struct rtw89_dev *rtwdev,struct sk_buff *c2h, +u32 len) +{ +} +static void (*const rtw89_mac_c2h_ofld_handler[])(struct rtw89_dev *rtwdev,struct sk_buff *c2h,u32 len) = { [RTW89_MAC_C2H_FUNC_EFUSE_DUMP ] =NULL , [RTW89_MAC_C2H_FUNC_READ_RSP ] =NULL , - [RTW89_MAC_C2H_FUNC_PKT_OFLD_RSP ] =NULL , + [RTW89_MAC_C2H_FUNC_PKT_OFLD_RSP ] = rtw89_mac_c2h_pkt_ofld_rsp, [RTW89_MAC_C2H_FUNC_BCN_RESEND ] =NULL , [RTW89_MAC_C2H_FUNC_MACID_PAUSE ] = rtw89_mac_c2h_macid_pause, [RTW89_MAC_C2H_FUNC_SCANOFLD_RSP ] = rtw89_mac_c2h_scanofld_rsp,
Signature · 1 line
2.25.1