Skip to content

Commit a940b3a

Browse files
author
Kalle Valo
committed
Merge tag 'ath-current-20241016' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath
ath.git patches for v6.12-rc4 Fix two instances of memory leaks, one in ath10k and one in ath11k.
2 parents a95d28a + befd716 commit a940b3a

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

drivers/net/wireless/ath/ath10k/wmi-tlv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3043,9 +3043,14 @@ ath10k_wmi_tlv_op_cleanup_mgmt_tx_send(struct ath10k *ar,
30433043
struct sk_buff *msdu)
30443044
{
30453045
struct ath10k_skb_cb *cb = ATH10K_SKB_CB(msdu);
3046+
struct ath10k_mgmt_tx_pkt_addr *pkt_addr;
30463047
struct ath10k_wmi *wmi = &ar->wmi;
30473048

3048-
idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id);
3049+
spin_lock_bh(&ar->data_lock);
3050+
pkt_addr = idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id);
3051+
spin_unlock_bh(&ar->data_lock);
3052+
3053+
kfree(pkt_addr);
30493054

30503055
return 0;
30513056
}

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,7 @@ wmi_process_mgmt_tx_comp(struct ath10k *ar, struct mgmt_tx_compl_params *param)
24412441
dma_unmap_single(ar->dev, pkt_addr->paddr,
24422442
msdu->len, DMA_TO_DEVICE);
24432443
info = IEEE80211_SKB_CB(msdu);
2444+
kfree(pkt_addr);
24442445

24452446
if (param->status) {
24462447
info->flags &= ~IEEE80211_TX_STAT_ACK;
@@ -9612,6 +9613,7 @@ static int ath10k_wmi_mgmt_tx_clean_up_pending(int msdu_id, void *ptr,
96129613
dma_unmap_single(ar->dev, pkt_addr->paddr,
96139614
msdu->len, DMA_TO_DEVICE);
96149615
ieee80211_free_txskb(ar->hw, msdu);
9616+
kfree(pkt_addr);
96159617

96169618
return 0;
96179619
}

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5291,8 +5291,11 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
52915291
hal_status == HAL_TLV_STATUS_PPDU_DONE) {
52925292
rx_mon_stats->status_ppdu_done++;
52935293
pmon->mon_ppdu_status = DP_PPDU_STATUS_DONE;
5294-
ath11k_dp_rx_mon_dest_process(ar, mac_id, budget, napi);
5295-
pmon->mon_ppdu_status = DP_PPDU_STATUS_START;
5294+
if (!ab->hw_params.full_monitor_mode) {
5295+
ath11k_dp_rx_mon_dest_process(ar, mac_id,
5296+
budget, napi);
5297+
pmon->mon_ppdu_status = DP_PPDU_STATUS_START;
5298+
}
52965299
}
52975300

52985301
if (ppdu_info->peer_id == HAL_INVALID_PEERID ||

0 commit comments

Comments
 (0)