On 11/28/2024 8:34 PM, Kalle Valo wrote: > Baochen Qiang <quic_bqiang@xxxxxxxxxxx> writes: > >> On 11/27/2024 1:11 AM, Kalle Valo wrote: >>> From: Sriram R <quic_srirrama@xxxxxxxxxxx> >>> >>> @@ -4317,14 +4327,14 @@ static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw, >>> struct ieee80211_vif *vif) >>> { >>> struct ath12k_vif *ahvif = ath12k_vif_to_ahvif(vif); >>> + u16 link_id = ahvif->last_scan_link; >>> struct ath12k_link_vif *arvif; >>> struct ath12k *ar; >>> >>> lockdep_assert_wiphy(hw->wiphy); >>> >>> - arvif = &ahvif->deflink; >>> - >>> - if (!arvif->is_created) >>> + arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]); >>> + if (!arvif || arvif->is_created) >> >> s/arvif->is_created/!arvif->is_created/ ? > > Another good catch! Fixed now. > >>> @@ -7990,6 +8011,19 @@ static struct ath12k *ath12k_mac_assign_vif_to_vdev(struct ieee80211_hw *hw, >>> if (!ar) >>> return NULL; >>> >>> + /* cleanup the scan vdev if we are done scan on that ar >>> + * and now we want to create for actual usage. >>> + */ >>> + if (vif->valid_links) { >> >> better to use ieee80211_vif_is_mld()? > > Yup, fixed in the pending branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=54504518cb26fef3dbaf16457cde91a9fd7e9c3d LGTM > > Thanks for the detailed review, very much appreciated. >