Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions drivers/net/wireless/ath/ath12k/ce.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
dma_free_coherent(ab->dev,
pipe->src_ring->nentries * desc_sz +
CE_DESC_RING_ALIGN,
pipe->src_ring->base_addr_owner_space,
pipe->src_ring->base_addr_ce_space);
pipe->src_ring->base_addr_owner_space_unaligned,
pipe->src_ring->base_addr_ce_space_unaligned);
kfree(pipe->src_ring);
pipe->src_ring = NULL;
}
Expand All @@ -995,8 +995,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
dma_free_coherent(ab->dev,
pipe->dest_ring->nentries * desc_sz +
CE_DESC_RING_ALIGN,
pipe->dest_ring->base_addr_owner_space,
pipe->dest_ring->base_addr_ce_space);
pipe->dest_ring->base_addr_owner_space_unaligned,
pipe->dest_ring->base_addr_ce_space_unaligned);
kfree(pipe->dest_ring);
pipe->dest_ring = NULL;
}
Expand All @@ -1007,8 +1007,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
dma_free_coherent(ab->dev,
pipe->status_ring->nentries * desc_sz +
CE_DESC_RING_ALIGN,
pipe->status_ring->base_addr_owner_space,
pipe->status_ring->base_addr_ce_space);
pipe->status_ring->base_addr_owner_space_unaligned,
pipe->status_ring->base_addr_ce_space_unaligned);
kfree(pipe->status_ring);
pipe->status_ring = NULL;
}
Expand Down
16 changes: 10 additions & 6 deletions drivers/net/wireless/ath/ath12k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5495,7 +5495,8 @@ static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw,

for_each_set_bit(link_id, &links_map, ATH12K_NUM_MAX_LINKS) {
arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]);
if (!arvif || arvif->is_started)
if (!arvif || !arvif->is_created ||
arvif->ar->scan.arvif != arvif)
continue;

ar = arvif->ar;
Expand Down Expand Up @@ -9176,7 +9177,10 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
return;
}
} else {
link_id = 0;
if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
link_id = ATH12K_FIRST_SCAN_LINK;
else
link_id = 0;
}

arvif = rcu_dereference(ahvif->link[link_id]);
Expand Down Expand Up @@ -12146,16 +12150,16 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v
if (drop)
return;

for_each_ar(ah, ar, i)
wiphy_work_flush(hw->wiphy, &ar->wmi_mgmt_tx_work);

/* vif can be NULL when flush() is considered for hw */
if (!vif) {
for_each_ar(ah, ar, i)
ath12k_mac_flush(ar);
return;
}

for_each_ar(ah, ar, i)
wiphy_work_flush(hw->wiphy, &ar->wmi_mgmt_tx_work);

ahvif = ath12k_vif_to_ahvif(vif);
links = ahvif->links_map;
for_each_set_bit(link_id, &links, IEEE80211_MLD_MAX_NUM_LINKS) {
Expand Down Expand Up @@ -13347,7 +13351,7 @@ static int ath12k_mac_op_cancel_remain_on_channel(struct ieee80211_hw *hw,
ath12k_scan_abort(ar);

cancel_delayed_work_sync(&ar->scan.timeout);
wiphy_work_cancel(hw->wiphy, &ar->scan.vdev_clean_wk);
wiphy_work_flush(hw->wiphy, &ar->scan.vdev_clean_wk);

return 0;
}
Expand Down
9 changes: 1 addition & 8 deletions drivers/net/wireless/ath/ath12k/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6575,16 +6575,9 @@ static int freq_to_idx(struct ath12k *ar, int freq)
if (!sband)
continue;

for (ch = 0; ch < sband->n_channels; ch++, idx++) {
if (sband->channels[ch].center_freq <
KHZ_TO_MHZ(ar->freq_range.start_freq) ||
sband->channels[ch].center_freq >
KHZ_TO_MHZ(ar->freq_range.end_freq))
continue;

for (ch = 0; ch < sband->n_channels; ch++, idx++)
if (sband->channels[ch].center_freq == freq)
goto exit;
}
}

exit:
Expand Down