rtwvif->scan_ies = &scan_req->ies;
        rtwvif->scan_req = req;
        ieee80211_stop_queues(rtwdev->hw);
+       rtw89_mac_port_cfg_rx_sync(rtwdev, rtwvif, false);
 
        if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR)
                get_random_mask_addr(mac_addr, req->mac_addr,
 {
        const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
        struct rtw89_hw_scan_info *scan_info = &rtwdev->scan_info;
+       struct rtw89_vif *rtwvif = vif_to_rtwvif_safe(vif);
        struct cfg80211_scan_info info = {
                .aborted = aborted,
        };
-       struct rtw89_vif *rtwvif;
 
        if (!vif)
                return;
        rtw89_core_scan_complete(rtwdev, vif, true);
        ieee80211_scan_completed(rtwdev->hw, &info);
        ieee80211_wake_queues(rtwdev->hw);
+       rtw89_mac_port_cfg_rx_sync(rtwdev, rtwvif, true);
        rtw89_mac_enable_beacon_for_ap_vifs(rtwdev, true);
 
        rtw89_release_pkt_list(rtwdev);
-       rtwvif = (struct rtw89_vif *)vif->drv_priv;
        rtwvif->scan_req = NULL;
        rtwvif->scan_ies = NULL;
        scan_info->last_chan_idx = 0;
 
                rtw89_write32_port_clr(rtwdev, rtwvif, p->port_cfg, bit);
 }
 
-static void rtw89_mac_port_cfg_rx_sync(struct rtw89_dev *rtwdev,
-                                      struct rtw89_vif *rtwvif)
+void rtw89_mac_port_cfg_rx_sync(struct rtw89_dev *rtwdev,
+                               struct rtw89_vif *rtwvif, bool en)
 {
        const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
        const struct rtw89_port_reg *p = mac->port_base;
-       bool en = rtwvif->net_type == RTW89_NET_TYPE_INFRA ||
-                 rtwvif->net_type == RTW89_NET_TYPE_AD_HOC;
 
        if (en)
                rtw89_write32_port_set(rtwdev, rtwvif, p->port_cfg, B_AX_TSF_UDT_EN);
                rtw89_write32_port_clr(rtwdev, rtwvif, p->port_cfg, B_AX_TSF_UDT_EN);
 }
 
+static void rtw89_mac_port_cfg_rx_sync_by_nettype(struct rtw89_dev *rtwdev,
+                                                 struct rtw89_vif *rtwvif)
+{
+       bool en = rtwvif->net_type == RTW89_NET_TYPE_INFRA ||
+                 rtwvif->net_type == RTW89_NET_TYPE_AD_HOC;
+
+       rtw89_mac_port_cfg_rx_sync(rtwdev, rtwvif, en);
+}
+
 static void rtw89_mac_port_cfg_tx_sw(struct rtw89_dev *rtwdev,
                                     struct rtw89_vif *rtwvif, bool en)
 {
        rtw89_mac_port_cfg_net_type(rtwdev, rtwvif);
        rtw89_mac_port_cfg_bcn_prct(rtwdev, rtwvif);
        rtw89_mac_port_cfg_rx_sw(rtwdev, rtwvif);
-       rtw89_mac_port_cfg_rx_sync(rtwdev, rtwvif);
+       rtw89_mac_port_cfg_rx_sync_by_nettype(rtwdev, rtwvif);
        rtw89_mac_port_cfg_tx_sw_by_nettype(rtwdev, rtwvif);
        rtw89_mac_port_cfg_bcn_intv(rtwdev, rtwvif);
        rtw89_mac_port_cfg_hiq_win(rtwdev, rtwvif);
 
                             u16 offset_tu);
 int rtw89_mac_port_get_tsf(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
                           u64 *tsf);
+void rtw89_mac_port_cfg_rx_sync(struct rtw89_dev *rtwdev,
+                               struct rtw89_vif *rtwvif, bool en);
 void rtw89_mac_set_he_obss_narrow_bw_ru(struct rtw89_dev *rtwdev,
                                        struct ieee80211_vif *vif);
 void rtw89_mac_stop_ap(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif);