wifi: rtw89: some cleanups and improvements
Ping-Ke Shih
maintainercover wifi: rtw89: some cleanups and improvements
First patch is to provide MLO info to assist firmware to configure hardware when it goes into WoWLAN mode.
Patches 2-4 are cleanups. No change logic at all.
Patch 5 is to write a version from 16 to 32 bits as helper for debug.
Patch 6 improve IO time for USB devices.
Chih-Kang Chang (1):
wifi: rtw89: ps: send H2C command related to MLO info when FWIPS
Eric Huang (1):
wifi: rtw89: phy: write full data for BB gain table type 15
Johnson Tsai (1):
wifi: rtw89: pack I/O during RF nctl init to reduce execution time
Zong-Zhe Yang (3):
wifi: rtw89: pci: fix typo of "deliver"
wifi: rtw89: rx: refine skb/desc naming to improve readability
wifi: rtw89: rx: no need to cancel 6 GHz probe per vif
drivers/net/wireless/realtek/rtw89/core.c | 101 ++++++++++---------- drivers/net/wireless/realtek/rtw89/fw.h | 11 +++ drivers/net/wireless/realtek/rtw89/pci.c | 18 ++-- drivers/net/wireless/realtek/rtw89/pci.h | 4 +- drivers/net/wireless/realtek/rtw89/phy.c | 3 + drivers/net/wireless/realtek/rtw89/phy_be.c | 2 +- drivers/net/wireless/realtek/rtw89/ps.c | 7 +- drivers/net/wireless/realtek/rtw89/wow.c | 6 +- 8 files changed, 82 insertions(+), 70 deletions(-)
base-commit: 7cde94dab0e74434ccc0a387d7ad373fb3becda0
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/6 wifi: rtw89: ps: send H2C command related to MLO info when FWIPS
From: Chih-Kang Chang <[email protected]>
When entering FWIPS, also send the H2C command related to MLO info, the same as in LPS. Otherwise, the firmware cannot get enough information.
--- drivers/net/wireless/realtek/rtw89/fw.h | 11 +++++++++++ drivers/net/wireless/realtek/rtw89/ps.c | 7 +------ drivers/net/wireless/realtek/rtw89/wow.c | 6 ++++-- 3 files changed, 16 insertions(+), 8 deletions(-)
drivers/net/wireless/realtek/rtw89/fw.h +11 -0
@@ -5871,6 +5871,17 @@ int rtw89_chip_h2c_wow_cam_update(struct rtw89_dev *rtwdev,return chip->ops->h2c_wow_cam_update (rtwdev, cam_info); } +static inline void rtw89_fw_h2c_lps_ch_ml_info_routing (struct rtw89_dev *rtwdev, +struct rtw89_vif *rtwvif) +{ +if (RTW89_CHK_FW_FEATURE (LPS_CH_INFO , &rtwdev->fw)) +rtw89_fw_h2c_lps_ch_info (rtwdev, rtwvif); +else if (RTW89_CHK_FW_FEATURE (LPS_ML_INFO_V1 , &rtwdev->fw)) +rtw89_fw_h2c_lps_ml_cmn_info_v1 (rtwdev, rtwvif); +else +rtw89_fw_h2c_lps_ml_cmn_info (rtwdev, rtwvif); +} +/* Must consider compatibility; don't insert new in the mid. * Fill each field's default value in rtw89_regd_entcpy(). */
drivers/net/wireless/realtek/rtw89/ps.c +1 -6
@@ -187,12 +187,7 @@ void rtw89_enter_lps(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,rtw89_fw_h2c_rf_ps_info (rtwdev, rtwvif); -if (RTW89_CHK_FW_FEATURE (LPS_CH_INFO , &rtwdev->fw)) -rtw89_fw_h2c_lps_ch_info (rtwdev, rtwvif); -else if (RTW89_CHK_FW_FEATURE (LPS_ML_INFO_V1 , &rtwdev->fw)) -rtw89_fw_h2c_lps_ml_cmn_info_v1 (rtwdev, rtwvif); -else -rtw89_fw_h2c_lps_ml_cmn_info (rtwdev, rtwvif); +rtw89_fw_h2c_lps_ch_ml_info_routing (rtwdev, rtwvif);if (ps_mode && can_ps_mode)__rtw89_enter_ps_mode (rtwdev);
drivers/net/wireless/realtek/rtw89/wow.c +4 -2
@@ -749,10 +749,12 @@ static void rtw89_wow_enter_ps(struct rtw89_dev *rtwdev) {struct rtw89_vif_link *rtwvif_link = rtwdev->wow.rtwvif_link; -if (rtw89_wow_mgd_linked (rtwdev)) +if (rtw89_wow_mgd_linked (rtwdev)) {rtw89_enter_lps (rtwdev, rtwvif_link->rtwvif, false); -else if (rtw89_wow_no_link (rtwdev)) + }else if (rtw89_wow_no_link (rtwdev)) {rtw89_fw_h2c_fwips (rtwdev, rtwvif_link, true); +rtw89_fw_h2c_lps_ch_ml_info_routing (rtwdev, rtwvif_link->rtwvif); + } }static void rtw89_wow_leave_ps (struct rtw89_dev *rtwdev,bool enable_wow)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 2/6 wifi: rtw89: pci: fix typo of "deliver"
In reply to Ping-Ke ShihFrom: Zong-Zhe Yang <[email protected]>
The "diliver" should be "deliver", so fix them.
(No logic is changed.)
--- drivers/net/wireless/realtek/rtw89/pci.c | 18 +++++++++--------- drivers/net/wireless/realtek/rtw89/pci.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/net/wireless/realtek/rtw89/pci.c +9 -9
@@ -321,10 +321,10 @@ static u32 rtw89_pci_get_rx_skb_idx(struct rtw89_dev *rtwdev,static u32 rtw89_pci_rxbd_deliver_skbs (struct rtw89_dev *rtwdev,struct rtw89_pci_rx_ring *rx_ring) { -struct rtw89_rx_desc_info *desc_info = &rx_ring->diliver_desc; +struct rtw89_rx_desc_info *desc_info = &rx_ring->deliver_desc;struct rtw89_pci_dma_ring *bd_ring = &rx_ring->bd_ring;const struct rtw89_pci_info *info = rtwdev->pci_info; -struct sk_buff *new = rx_ring->diliver_skb; +struct sk_buff *new = rx_ring->deliver_skb;struct rtw89_pci_rx_info *rx_info;struct sk_buff *skb;u32 rxinfo_size =sizeof (struct rtw89_pci_rxbd_info );
@@ -370,7 +370,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev,if (!new) goto err_sync_device; - rx_ring->diliver_skb = new; + rx_ring->deliver_skb = new;/* first segment has RX desc */ offset = desc_info->offset + desc_info->rxd_len;
@@ -392,7 +392,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev, }if (ls) {rtw89_core_rx (rtwdev, desc_info, new); - rx_ring->diliver_skb =NULL ; + rx_ring->deliver_skb =NULL ; desc_info->ready = false; }
@@ -404,7 +404,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev, err_free_resource:if (new)dev_kfree_skb_any (new); - rx_ring->diliver_skb =NULL ; + rx_ring->deliver_skb =NULL ; desc_info->ready = false;return cnt;
@@ -1840,8 +1840,8 @@ static void rtw89_pci_reset_trx_rings(struct rtw89_dev *rtwdev)else bd_ring->wp =0 ; bd_ring->rp =0 ; - rx_ring->diliver_skb =NULL ; - rx_ring->diliver_desc.ready = false; + rx_ring->deliver_skb =NULL ; + rx_ring->deliver_desc.ready = false; rx_ring->target_rx_tag =0 ;if (info->group_bd_addr) {
@@ -3719,8 +3719,8 @@ static int rtw89_pci_alloc_rx_ring(struct rtw89_dev *rtwdev, rx_ring->bd_ring.wp =0 ; rx_ring->bd_ring.rp =0 ; rx_ring->buf_sz = buf_sz; - rx_ring->diliver_skb =NULL ; - rx_ring->diliver_desc.ready = false; + rx_ring->deliver_skb =NULL ; + rx_ring->deliver_desc.ready = false; rx_ring->target_rx_tag =0 ;for (i =0 ; i < len; i++) {
drivers/net/wireless/realtek/rtw89/pci.h +2 -2
@@ -1608,8 +1608,8 @@ struct rtw89_pci_rx_ring {struct rtw89_pci_dma_ring bd_ring;struct sk_buff *buf[RTW89_PCI_RXBD_NUM_MAX ];u32 buf_sz; -struct sk_buff *diliver_skb; -struct rtw89_rx_desc_info diliver_desc; +struct sk_buff *deliver_skb; +struct rtw89_rx_desc_info deliver_desc; u32 target_rx_tag:13; };
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 3/6 wifi: rtw89: rx: refine skb/desc naming to improve readability
In reply to Ping-Ke ShihFrom: Zong-Zhe Yang <[email protected]>
In rx path, there are skb of Wi-Fi and skb of PPDU. However, skb_ppdu was used in some places for Wi-Fi skb. It was a bit confused. So, refine the naming as follow-up. Call skb for skb of Wi-Fi, and call skb_ppdu for skb of PPDU. Besides, call desc_ppdu for rx_desc_info of PPDU.
(No logic is changed.)
--- drivers/net/wireless/realtek/rtw89/core.c | 90 +++++++++++------------ 1 file changed, 45 insertions(+), 45 deletions(-)
drivers/net/wireless/realtek/rtw89/core.c +45 -45
@@ -1945,11 +1945,11 @@ void rtw89_core_fill_txdesc_fwcmd_v2(struct rtw89_dev *rtwdev,EXPORT_SYMBOL (rtw89_core_fill_txdesc_fwcmd_v2);static int rtw89_core_rx_process_mac_ppdu (struct rtw89_dev *rtwdev, -struct sk_buff *skb, +struct sk_buff *skb_ppdu,struct rtw89_rx_phy_ppdu *phy_ppdu) {const struct rtw89_chip_info *chip = rtwdev->chip; -const struct rtw89_rxinfo *rxinfo = (const struct rtw89_rxinfo *)skb->data; +const struct rtw89_rxinfo *rxinfo = (const struct rtw89_rxinfo *)skb_ppdu->data;const struct rtw89_rxinfo_user *user;enum rtw89_chip_gen chip_gen = rtwdev->chip->chip_gen;int rx_cnt_size =RTW89_PPDU_MAC_RX_CNT_SIZE ;
@@ -2003,7 +2003,7 @@ static int rtw89_core_rx_process_mac_ppdu(struct rtw89_dev *rtwdev,break ; } - phy_sts = skb->data +RTW89_PPDU_MAC_INFO_SIZE ; + phy_sts = skb_ppdu->data +RTW89_PPDU_MAC_INFO_SIZE ; phy_sts += usr_num *RTW89_PPDU_MAC_INFO_USR_SIZE ;/* 8-byte alignment */ if (usr_num &BIT (0 ))
@@ -2012,11 +2012,11 @@ static int rtw89_core_rx_process_mac_ppdu(struct rtw89_dev *rtwdev, phy_sts += rx_cnt_size; phy_sts += plcp_size; -if (phy_sts > skb->data + skb->len) +if (phy_sts > skb_ppdu->data + skb_ppdu->len)return -EINVAL ; phy_ppdu->buf = phy_sts; - phy_ppdu->len = skb->data + skb->len - phy_sts; + phy_ppdu->len = skb_ppdu->data + skb_ppdu->len - phy_sts;return 0 ; }
@@ -2443,16 +2443,16 @@ bool rtw89_check_rx_statu_gi_match(struct ieee80211_rx_status *status, u8 gi_ltf }static bool rtw89_core_rx_ppdu_match (struct rtw89_dev *rtwdev, -struct rtw89_rx_desc_info *desc_info, +struct rtw89_rx_desc_info *desc_ppdu,struct ieee80211_rx_status *status) { -u8 band = desc_info->bb_sel ?RTW89_PHY_1 :RTW89_PHY_0 ; +u8 band = desc_ppdu->bb_sel ?RTW89_PHY_1 :RTW89_PHY_0 ;u8 data_rate_mode, bw, rate_idx =MASKBYTE0 , gi_ltf;bool eht = false;u16 data_rate;bool ret; - data_rate = desc_info->data_rate; + data_rate = desc_ppdu->data_rate; data_rate_mode =rtw89_get_data_rate_mode (rtwdev, data_rate);if (data_rate_mode ==DATA_RATE_MODE_NON_HT ) { rate_idx =rtw89_get_data_not_ht_idx (rtwdev, data_rate);
@@ -2468,9 +2468,9 @@ static bool rtw89_core_rx_ppdu_match(struct rtw89_dev *rtwdev, } eht = data_rate_mode ==DATA_RATE_MODE_EHT ; - bw =rtw89_hw_to_rate_info_bw (desc_info->bw); - gi_ltf =rtw89_rxdesc_to_nl_he_eht_gi (rtwdev, desc_info->gi_ltf, false, eht); - ret = rtwdev->ppdu_sts.curr_rx_ppdu_cnt[band] == desc_info->ppdu_cnt && + bw =rtw89_hw_to_rate_info_bw (desc_ppdu->bw); + gi_ltf =rtw89_rxdesc_to_nl_he_eht_gi (rtwdev, desc_ppdu->gi_ltf, false, eht); + ret = rtwdev->ppdu_sts.curr_rx_ppdu_cnt[band] == desc_ppdu->ppdu_cnt && status->rate_idx == rate_idx &&rtw89_check_rx_statu_gi_match (status, gi_ltf, eht) && status->bw == bw;
@@ -4005,7 +4005,7 @@ static bool rtw89_core_skb_pn_valid(struct rtw89_dev *rtwdev,static void rtw89_core_rx_to_mac80211 (struct rtw89_dev *rtwdev,struct rtw89_rx_phy_ppdu *phy_ppdu,struct rtw89_rx_desc_info *desc_info, -struct sk_buff *skb_ppdu, +struct sk_buff *skb,struct ieee80211_rx_status *rx_status) {struct napi_struct *napi = &rtwdev->napi;
@@ -4015,57 +4015,57 @@ static void rtw89_core_rx_to_mac80211(struct rtw89_dev *rtwdev, napi =NULL ;rtw89_core_hw_to_sband_rate (rx_status); -rtw89_core_rx_stats (rtwdev, phy_ppdu, desc_info, skb_ppdu); +rtw89_core_rx_stats (rtwdev, phy_ppdu, desc_info, skb);rtw89_core_update_rx_status_by_ppdu (rtwdev, rx_status, phy_ppdu); -rtw89_core_update_radiotap (rtwdev, desc_info, skb_ppdu, rx_status, phy_ppdu); +rtw89_core_update_radiotap (rtwdev, desc_info, skb, rx_status, phy_ppdu);rtw89_core_validate_rx_signal (rx_status); -rtw89_core_update_rx_freq_from_ie (rtwdev, skb_ppdu, rx_status); +rtw89_core_update_rx_freq_from_ie (rtwdev, skb, rx_status);rtw89_core_correct_mcc_chan (rtwdev, desc_info, rx_status, phy_ppdu);/* In low power mode, it does RX in thread context. */ local_bh_disable (); -ieee80211_rx_napi (rtwdev->hw,NULL , skb_ppdu, napi); +ieee80211_rx_napi (rtwdev->hw,NULL , skb, napi);local_bh_enable (); rtwdev->napi_budget_countdown--; }static void rtw89_core_rx_pending_skb (struct rtw89_dev *rtwdev,struct rtw89_rx_phy_ppdu *phy_ppdu, -struct rtw89_rx_desc_info *desc_info, -struct sk_buff *skb) +struct rtw89_rx_desc_info *desc_ppdu, +struct sk_buff *skb_ppdu) { -u8 band = desc_info->bb_sel ?RTW89_PHY_1 :RTW89_PHY_0 ; +u8 band = desc_ppdu->bb_sel ?RTW89_PHY_1 :RTW89_PHY_0 ;int curr = rtwdev->ppdu_sts.curr_rx_ppdu_cnt[band]; -struct sk_buff *skb_ppdu =NULL , *tmp; +struct sk_buff *skb =NULL , *tmp;struct ieee80211_rx_status *rx_status;if (curr >RTW89_MAX_PPDU_CNT )return ; - skb_queue_walk_safe(&rtwdev->ppdu_sts.rx_queue[band], skb_ppdu, tmp) { -skb_unlink (skb_ppdu, &rtwdev->ppdu_sts.rx_queue[band]); - rx_status =IEEE80211_SKB_RXCB (skb_ppdu); -if (rtw89_core_rx_ppdu_match (rtwdev, desc_info, rx_status)) + skb_queue_walk_safe(&rtwdev->ppdu_sts.rx_queue[band], skb, tmp) { +skb_unlink (skb, &rtwdev->ppdu_sts.rx_queue[band]); + rx_status =IEEE80211_SKB_RXCB (skb); +if (rtw89_core_rx_ppdu_match (rtwdev, desc_ppdu, rx_status))rtw89_chip_query_ppdu (rtwdev, phy_ppdu, rx_status);rtw89_correct_cck_chan (rtwdev, rx_status); -rtw89_core_rx_to_mac80211 (rtwdev, phy_ppdu, desc_info, skb_ppdu, rx_status); +rtw89_core_rx_to_mac80211 (rtwdev, phy_ppdu, desc_ppdu, skb, rx_status); } }static void rtw89_core_rx_process_ppdu_sts (struct rtw89_dev *rtwdev, -struct rtw89_rx_desc_info *desc_info, -struct sk_buff *skb) -{ -struct rtw89_rx_phy_ppdu phy_ppdu = {.buf = skb->data, .valid = false, - .len = skb->len, - .to_self = desc_info->addr1_match, - .rate = desc_info->data_rate, - .mac_id = desc_info->mac_id, - .phy_idx = desc_info->bb_sel}; +struct rtw89_rx_desc_info *desc_ppdu, +struct sk_buff *skb_ppdu) +{ +struct rtw89_rx_phy_ppdu phy_ppdu = {.buf = skb_ppdu->data, .valid = false, + .len = skb_ppdu->len, + .to_self = desc_ppdu->addr1_match, + .rate = desc_ppdu->data_rate, + .mac_id = desc_ppdu->mac_id, + .phy_idx = desc_ppdu->bb_sel};int ret; -if (desc_info->mac_info_valid) { - ret =rtw89_core_rx_process_mac_ppdu (rtwdev, skb, &phy_ppdu); +if (desc_ppdu->mac_info_valid) { + ret =rtw89_core_rx_process_mac_ppdu (rtwdev, skb_ppdu, &phy_ppdu);if (ret) goto out; }
@@ -4077,8 +4077,8 @@ static void rtw89_core_rx_process_ppdu_sts(struct rtw89_dev *rtwdev,rtw89_core_rx_process_phy_sts (rtwdev, &phy_ppdu); out: -rtw89_core_rx_pending_skb (rtwdev, &phy_ppdu, desc_info, skb); -dev_kfree_skb_any (skb); +rtw89_core_rx_pending_skb (rtwdev, &phy_ppdu, desc_ppdu, skb_ppdu); +dev_kfree_skb_any (skb_ppdu); } static void rtw89_core_rx_process_report(struct rtw89_dev *rtwdev,
@@ -4476,24 +4476,24 @@ static void rtw89_core_flush_ppdu_rx_queue(struct rtw89_dev *rtwdev,struct rtw89_ppdu_sts_info *ppdu_sts = &rtwdev->ppdu_sts;u8 band = desc_info->bb_sel ?RTW89_PHY_1 :RTW89_PHY_0 ;struct ieee80211_rx_status *rx_status; -struct sk_buff *skb_ppdu, *tmp; +struct sk_buff *skb, *tmp; - skb_queue_walk_safe(&ppdu_sts->rx_queue[band], skb_ppdu, tmp) { -skb_unlink (skb_ppdu, &ppdu_sts->rx_queue[band]); - rx_status =IEEE80211_SKB_RXCB (skb_ppdu); -rtw89_core_rx_to_mac80211 (rtwdev,NULL , desc_info, skb_ppdu, rx_status); + skb_queue_walk_safe(&ppdu_sts->rx_queue[band], skb, tmp) { +skb_unlink (skb, &ppdu_sts->rx_queue[band]); + rx_status =IEEE80211_SKB_RXCB (skb); +rtw89_core_rx_to_mac80211 (rtwdev,NULL , desc_info, skb, rx_status); } }static void rtw89_core_rx_pkt_hdl (struct rtw89_dev *rtwdev,const struct sk_buff *skb, -const struct rtw89_rx_desc_info *desc) +const struct rtw89_rx_desc_info *desc_info) {struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;struct rtw89_sta_link *rtwsta_link;struct ieee80211_sta *sta;struct rtw89_sta *rtwsta; -u8 macid = desc->mac_id; +u8 macid = desc_info->mac_id;if (!refcount_read (&rtwdev->refcount_ap_info))return ;
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 4/6 wifi: rtw89: rx: no need to cancel 6 GHz probe per vif
In reply to Ping-Ke ShihFrom: Zong-Zhe Yang <[email protected]>
To cancel some 6 GHz probe cases, it just depends on if a skb matches some corresponding conditions. Because the decision has nothing to do with vif, it's redundant to do the cancellation per vif, i.e., single case will be cancelled multiple times. So, move it out of iteration.
--- drivers/net/wireless/realtek/rtw89/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/wireless/realtek/rtw89/core.c +6 -5
@@ -3080,11 +3080,6 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,struct rtw89_bb_ctx *bb;const u8 *target_bssid; -if (rtwdev->scanning && - (ieee80211_is_beacon (hdr->frame_control) || -ieee80211_is_probe_resp (hdr->frame_control))) -rtw89_core_cancel_6ghz_probe_tx (rtwdev, skb); -rcu_read_lock (); rtwvif_link =rtw89_vif_get_link_inst (rtwvif, desc_info->bb_sel);
@@ -3168,8 +3163,14 @@ static void rtw89_core_rx_stats(struct rtw89_dev *rtwdev,struct rtw89_rx_desc_info *desc_info, struct sk_buff *skb) { + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;struct rtw89_vif_rx_stats_iter_data iter_data; +if (rtwdev->scanning && + (ieee80211_is_beacon (hdr->frame_control) || +ieee80211_is_probe_resp (hdr->frame_control))) +rtw89_core_cancel_6ghz_probe_tx (rtwdev, skb); +rtw89_traffic_stats_accu (rtwdev,NULL , skb, true, false); iter_data.rtwdev = rtwdev;
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 5/6 wifi: rtw89: phy: write full data for BB gain table type 15
In reply to Ping-Ke ShihFrom: Eric Huang <[email protected]>
Type 15 gain-table records now encode the FEM index in bits 31:16 and the gain-table version in bits 15:0.
--- drivers/net/wireless/realtek/rtw89/phy_be.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/phy_be.c +1 -1
@@ -434,7 +434,7 @@ static void rtw89_phy_config_bb_gain_be(struct rtw89_dev *rtwdev,rtw89_phy_cfg_bb_gain_op1db_be (rtwdev, arg, reg->data);break ;case 15 : -rtw89_phy_write32_idx (rtwdev, reg->addr &0xFFFFF ,MASKHWORD , +rtw89_phy_write32_idx (rtwdev, reg->addr &0xFFFFF ,MASKDWORD , reg->data,RTW89_PHY_0 );break ;case 4 :
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 6/6 wifi: rtw89: pack I/O during RF nctl init to reduce execution time
In reply to Ping-Ke ShihFrom: Johnson Tsai <[email protected]>
Wrap the register writes of rtw89_phy_init_rf_nctl() with rtw89_io_pack/unpack so they are batched into single bus transactions, reducing API execution time.
8852C USB2.0 AMD B450 initialization time:
rtw89_phy_init_rf_nctl 5355 ms -> 10 ms
--- drivers/net/wireless/realtek/rtw89/phy.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/realtek/rtw89/phy.c +3 -0
@@ -2071,7 +2071,10 @@ static void rtw89_phy_init_rf_nctl(struct rtw89_dev *rtwdev)rtw89_phy_preinit_rf_nctl (rtwdev); nctl_table = elm_info->rf_nctl ? elm_info->rf_nctl : chip->nctl_table; + +rtw89_io_pack (rtwdev);rtw89_phy_init_reg (rtwdev, nctl_table, false, rtw89_phy_config_bb_reg,NULL ); +rtw89_io_unpack (rtwdev);if (chip->nctl_post_table)rtw89_rfk_parser (rtwdev, chip->nctl_post_table);
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerRe: [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS
In reply to Ping-Ke ShihQuoted 7 lines · Ping-Ke Shih
From: Chih-Kang Chang <[email protected]>
When entering FWIPS, also send the H2C command related to MLO info, the same as in LPS. Otherwise, the firmware cannot get enough information.
Signed-off-by Chih-Kang Chang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
6 patch(es) applied to rtw-next branch of rtw.git, thanks.
64331a0ce58e wifi: rtw89: ps: send H2C command related to MLO info when FWIPS 0fd2ed6a5074 wifi: rtw89: pci: fix typo of "deliver"7a3638503335 wifi: rtw89: rx: refine skb/desc naming to improve readability 2995f5234ab2 wifi: rtw89: rx: no need to cancel 6 GHz probe per vif a4d288b5200a wifi: rtw89: phy: write full data for BB gain table type 15 11a7351f30b9 wifi: rtw89: pack I/O during RF nctl init to reduce execution time