drivers/net/wireless/ath/ath12k/dp_tx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/dp_tx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/dp_tx.c- Extension
.c- Size
- 5705 bytes
- Lines
- 214
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core.hdp_tx.hdebug.hdebugfs.hhw.hpeer.hmac.h
Detected Declarations
function Copyrightfunction ath12k_dp_tx_encap_nwififunction ath12k_dp_tx_get_tidfunction ath12k_dp_tx_get_encrypt_typefunction ath12k_dp_tx_release_txbuffunction ath12k_dp_tx_move_payloadfunction ath12k_dp_tx_align_payloadfunction ath12k_dp_tx_free_txbufexport ath12k_dp_tx_get_encap_typeexport ath12k_dp_tx_encap_nwifiexport ath12k_dp_tx_get_tidexport ath12k_dp_tx_get_encrypt_typeexport ath12k_dp_tx_release_txbufexport ath12k_dp_tx_assign_bufferexport ath12k_dp_metadata_align_skbexport ath12k_dp_tx_align_payloadexport ath12k_dp_tx_free_txbuf
Annotated Snippet
if (!skb2) {
ret = -ENOMEM;
goto out;
}
dev_kfree_skb_any(skb);
offset = (unsigned long)skb2->data & iova_mask;
if (offset)
ath12k_dp_tx_move_payload(skb2, offset, true);
*pskb = skb2;
}
out:
return ret;
}
EXPORT_SYMBOL(ath12k_dp_tx_align_payload);
void ath12k_dp_tx_free_txbuf(struct ath12k_dp *dp,
struct dp_tx_ring *tx_ring,
struct ath12k_tx_desc_params *desc_params)
{
struct ath12k_pdev_dp *dp_pdev;
struct sk_buff *msdu = desc_params->skb;
struct ath12k_skb_cb *skb_cb;
u8 pdev_idx = ath12k_hw_mac_id_to_pdev_id(dp->hw_params, desc_params->mac_id);
skb_cb = ATH12K_SKB_CB(msdu);
dma_unmap_single(dp->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
if (skb_cb->paddr_ext_desc) {
dma_unmap_single(dp->dev, skb_cb->paddr_ext_desc,
desc_params->skb_ext_desc->len, DMA_TO_DEVICE);
dev_kfree_skb_any(desc_params->skb_ext_desc);
}
guard(rcu)();
dp_pdev = ath12k_dp_to_pdev_dp(dp, pdev_idx);
ieee80211_free_txskb(ath12k_pdev_dp_to_hw(dp_pdev), msdu);
if (atomic_dec_and_test(&dp_pdev->num_tx_pending))
wake_up(&dp_pdev->tx_empty_waitq);
}
EXPORT_SYMBOL(ath12k_dp_tx_free_txbuf);
Annotation
- Immediate include surface: `core.h`, `dp_tx.h`, `debug.h`, `debugfs.h`, `hw.h`, `peer.h`, `mac.h`.
- Detected declarations: `function Copyright`, `function ath12k_dp_tx_encap_nwifi`, `function ath12k_dp_tx_get_tid`, `function ath12k_dp_tx_get_encrypt_type`, `function ath12k_dp_tx_release_txbuf`, `function ath12k_dp_tx_move_payload`, `function ath12k_dp_tx_align_payload`, `function ath12k_dp_tx_free_txbuf`, `export ath12k_dp_tx_get_encap_type`, `export ath12k_dp_tx_encap_nwifi`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.