1: 632463064df6 = 1: 9be09f472643 wifi: rtw88: download the beacon the reserved page was built with 2: 0814ec6146e7 ! 2: c2737d79f34f wifi: rtw88: support channel switch in AP mode @@ Commit message interface, both under the driver mutex. The countdown is cancelled when the AP stops, when the interface goes away, on WoWLAN suspend and in rtw_core_stop(); the BSS_CHANGED_BEACON replay after a hardware restart - resumes it. The other page downloads during a countdown, the TIM update, - the PG backup and the one on association, are skipped until the beacon - after the switch, since every beacon fetch advances the countdown; the - next download carries their changes. A scan is refused: it would take - the AP off the channel its stations count down to. + resumes it, and so does the driver after a WoWLAN resume, which mac80211 + follows with no replay. The other page downloads during a countdown, the + TIM update, the PG backup and the one on association, are skipped until + the beacon after the switch, since every beacon fetch advances the + countdown; the next download carries their changes. A scan is refused: + it would take the AP off the channel its stations count down to.  Signed-off-by: Mehmet Fide  - Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/fw.c ##  @@ drivers/net/wireless/realtek/rtw88/fw.c: int rtw_fw_download_rsvd_page(struct rtw_dev *rtwdev) @@ drivers/net/wireless/realtek/rtw88/mac80211.c: static int rtw_ops_suspend(struct ret = rtw_wow_suspend(rtwdev, wowlan); if (ret) rtw_err(rtwdev, "failed to suspend for wow %d\n", ret); +@@ drivers/net/wireless/realtek/rtw88/mac80211.c: static int rtw_ops_suspend(struct ieee80211_hw *hw, + return ret ? 1 : 0; + } +  ++static void rtw_ops_csa_resume_iter(void *data, struct ieee80211_vif *vif) ++{ ++ struct rtw_dev *rtwdev = data; ++ ++ if ((vif->type == NL80211_IFTYPE_AP || ++ vif->type == NL80211_IFTYPE_ADHOC) && vif->bss_conf.csa_active) ++ rtw_fw_csa_start(rtwdev, vif); ++} ++ + static int rtw_ops_resume(struct ieee80211_hw *hw) + { + struct rtw_dev *rtwdev = hw->priv; +@@ drivers/net/wireless/realtek/rtw88/mac80211.c: static int rtw_ops_resume(struct ieee80211_hw *hw) + ret = rtw_wow_resume(rtwdev); + if (ret) + rtw_err(rtwdev, "failed to resume for wow %d\n", ret); ++ else ++ rtw_iterate_vifs(rtwdev, rtw_ops_csa_resume_iter, rtwdev); + mutex_unlock(&rtwdev->mutex); +  + return ret ? 1 : 0;  @@ drivers/net/wireless/realtek/rtw88/mac80211.c: static int rtw_ops_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct rtw_dev *rtwdev = hw->priv; int ret; 3: afb1d169efec ! 3: efb8335e4df9 wifi: rtw88: time the countdown downloads from the TBTT @@ Commit message an AP there, an IBSS runs alone.  Signed-off-by: Mehmet Fide  + Acked-by: Ping-Ke Shih  + Reviewed-by: Luka Gejak   ## drivers/net/wireless/realtek/rtw88/fw.c ##  @@