* [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements
@ 2026-09-30 6:45 Ping-Ke Shih
2026-09-30 6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw)
To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang
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
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 2026-10-07 3:47 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 2/6] wifi: rtw89: pci: fix typo of "deliver" Ping-Ke Shih ` (4 subsequent siblings) 5 siblings, 1 reply; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Chih-Kang Chang <gary.chang@realtek.com> 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 <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- 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(-) diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h index 9b616ec9323b..b879bdd94b88 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.h +++ b/drivers/net/wireless/realtek/rtw89/fw.h @@ -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(). */ diff --git a/drivers/net/wireless/realtek/rtw89/ps.c b/drivers/net/wireless/realtek/rtw89/ps.c index 23a9c7a0704a..3639292eba7a 100644 --- a/drivers/net/wireless/realtek/rtw89/ps.c +++ b/drivers/net/wireless/realtek/rtw89/ps.c @@ -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); diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 7a2d6904951f..b9892ab84225 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -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) -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS 2026-09-30 6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih @ 2026-10-07 3:47 ` Ping-Ke Shih 0 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-10-07 3:47 UTC (permalink / raw) To: Ping-Ke Shih, linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang Ping-Ke Shih <pkshih@realtek.com> wrote: > From: Chih-Kang Chang <gary.chang@realtek.com> > > 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 <gary.chang@realtek.com> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> 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 --- https://github.com/pkshih/rtw.git ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH rtw-next 2/6] wifi: rtw89: pci: fix typo of "deliver" 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 3/6] wifi: rtw89: rx: refine skb/desc naming to improve readability Ping-Ke Shih ` (3 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Zong-Zhe Yang <kevin_yang@realtek.com> The "diliver" should be "deliver", so fix them. (No logic is changed.) Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/pci.c | 18 +++++++++--------- drivers/net/wireless/realtek/rtw89/pci.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c index 941fb5ca15b6..ddb27c7782a9 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.c +++ b/drivers/net/wireless/realtek/rtw89/pci.c @@ -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++) { diff --git a/drivers/net/wireless/realtek/rtw89/pci.h b/drivers/net/wireless/realtek/rtw89/pci.h index cba52584ea68..0f9ea4bf54ea 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.h +++ b/drivers/net/wireless/realtek/rtw89/pci.h @@ -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; }; -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 3/6] wifi: rtw89: rx: refine skb/desc naming to improve readability 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 2/6] wifi: rtw89: pci: fix typo of "deliver" Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 4/6] wifi: rtw89: rx: no need to cancel 6 GHz probe per vif Ping-Ke Shih ` (2 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Zong-Zhe Yang <kevin_yang@realtek.com> 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.) Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/core.c | 90 +++++++++++------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 2a1f54e9664a..0ae5aff8a122 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -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; -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 4/6] wifi: rtw89: rx: no need to cancel 6 GHz probe per vif 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih ` (2 preceding siblings ...) 2026-09-30 6:45 ` [PATCH rtw-next 3/6] wifi: rtw89: rx: refine skb/desc naming to improve readability Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 5/6] wifi: rtw89: phy: write full data for BB gain table type 15 Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 6/6] wifi: rtw89: pack I/O during RF nctl init to reduce execution time Ping-Ke Shih 5 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Zong-Zhe Yang <kevin_yang@realtek.com> 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. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 0ae5aff8a122..8b9f9a4574f7 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -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; -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 5/6] wifi: rtw89: phy: write full data for BB gain table type 15 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih ` (3 preceding siblings ...) 2026-09-30 6:45 ` [PATCH rtw-next 4/6] wifi: rtw89: rx: no need to cancel 6 GHz probe per vif Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 6/6] wifi: rtw89: pack I/O during RF nctl init to reduce execution time Ping-Ke Shih 5 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Eric Huang <echuang@realtek.com> Type 15 gain-table records now encode the FEM index in bits 31:16 and the gain-table version in bits 15:0. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/phy_be.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/phy_be.c b/drivers/net/wireless/realtek/rtw89/phy_be.c index b94754d38673..73c98ae358ad 100644 --- a/drivers/net/wireless/realtek/rtw89/phy_be.c +++ b/drivers/net/wireless/realtek/rtw89/phy_be.c @@ -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: -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 6/6] wifi: rtw89: pack I/O during RF nctl init to reduce execution time 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih ` (4 preceding siblings ...) 2026-09-30 6:45 ` [PATCH rtw-next 5/6] wifi: rtw89: phy: write full data for BB gain table type 15 Ping-Ke Shih @ 2026-09-30 6:45 ` Ping-Ke Shih 5 siblings, 0 replies; 8+ messages in thread From: Ping-Ke Shih @ 2026-09-30 6:45 UTC (permalink / raw) To: linux-wireless; +Cc: gary.chang, echuang, wenjie.tsai, kevin_yang From: Johnson Tsai <wenjie.tsai@realtek.com> 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 Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/phy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c index 074865665b16..795920b899d9 100644 --- a/drivers/net/wireless/realtek/rtw89/phy.c +++ b/drivers/net/wireless/realtek/rtw89/phy.c @@ -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); -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-07 3:47 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-30 6:45 [PATCH rtw-next 0/6] wifi: rtw89: some cleanups and improvements Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 1/6] wifi: rtw89: ps: send H2C command related to MLO info when FWIPS Ping-Ke Shih 2026-10-07 3:47 ` Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 2/6] wifi: rtw89: pci: fix typo of "deliver" Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 3/6] wifi: rtw89: rx: refine skb/desc naming to improve readability Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 4/6] wifi: rtw89: rx: no need to cancel 6 GHz probe per vif Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 5/6] wifi: rtw89: phy: write full data for BB gain table type 15 Ping-Ke Shih 2026-09-30 6:45 ` [PATCH rtw-next 6/6] wifi: rtw89: pack I/O during RF nctl init to reduce execution time Ping-Ke Shih
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox