drivers/net/wireless/ath/ath6kl/txrx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath6kl/txrx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath6kl/txrx.c- Extension
.c- Size
- 45535 bytes
- Lines
- 1871
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core.hdebug.hhtc-ops.htrace.h
Detected Declarations
function Copyrightfunction ath6kl_get_aidfunction ath6kl_ibss_map_epidfunction ath6kl_process_uapsdqfunction ath6kl_process_psqfunction ath6kl_powersave_apfunction ath6kl_control_txfunction ath6kl_data_txfunction ath6kl_indicate_tx_activityfunction ath6kl_tx_queue_fullfunction ath6kl_tx_clear_node_mapfunction ath6kl_tx_completefunction ath6kl_tx_data_cleanupfunction ath6kl_deliver_frames_to_nw_stackfunction ath6kl_alloc_netbufsfunction ath6kl_rx_refillfunction ath6kl_refill_amsdu_rxbufsfunction aggr_slice_amsdufunction aggr_deque_frmsfunction aggr_process_recv_frmfunction ath6kl_uapsd_trigger_frame_rxfunction ath6kl_rxfunction aggr_timeoutfunction aggr_delete_tid_statefunction aggr_recv_addba_req_evtfunction aggr_conn_initfunction aggr_recv_delba_req_evtfunction aggr_reset_statefunction ath6kl_cleanup_amsdu_rxbufsfunction list_for_each_entry_safefunction aggr_module_destroy
Annotated Snippet
if (!ar->tx_pending[i]) {
ar->node_map[ep_map].ep_id = i;
break;
}
/*
* No free endpoint is available, start redistribution on
* the inuse endpoints.
*/
if (i == ENDPOINT_5) {
ar->node_map[ep_map].ep_id = ar->next_ep_id;
ar->next_ep_id++;
if (ar->next_ep_id > ENDPOINT_5)
ar->next_ep_id = ENDPOINT_2;
}
}
*map_no = ep_map + 1;
ar->node_map[ep_map].tx_pend++;
return ar->node_map[ep_map].ep_id;
}
static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
struct ath6kl_vif *vif,
struct sk_buff *skb,
u32 *flags)
{
struct ath6kl *ar = vif->ar;
bool is_apsdq_empty = false;
struct ethhdr *datap = (struct ethhdr *) skb->data;
u8 up = 0, traffic_class, *ip_hdr;
u16 ether_type;
struct ath6kl_llc_snap_hdr *llc_hdr;
if (conn->sta_flags & STA_PS_APSD_TRIGGER) {
/*
* This tx is because of a uAPSD trigger, determine
* more and EOSP bit. Set EOSP if queue is empty
* or sufficient frames are delivered for this trigger.
*/
spin_lock_bh(&conn->psq_lock);
if (!skb_queue_empty(&conn->apsdq))
*flags |= WMI_DATA_HDR_FLAGS_MORE;
else if (conn->sta_flags & STA_PS_APSD_EOSP)
*flags |= WMI_DATA_HDR_FLAGS_EOSP;
*flags |= WMI_DATA_HDR_FLAGS_UAPSD;
spin_unlock_bh(&conn->psq_lock);
return false;
} else if (!conn->apsd_info) {
return false;
}
if (test_bit(WMM_ENABLED, &vif->flags)) {
ether_type = be16_to_cpu(datap->h_proto);
if (is_ethertype(ether_type)) {
/* packet is in DIX format */
ip_hdr = (u8 *)(datap + 1);
} else {
/* packet is in 802.3 format */
llc_hdr = (struct ath6kl_llc_snap_hdr *)
(datap + 1);
ether_type = be16_to_cpu(llc_hdr->eth_type);
ip_hdr = (u8 *)(llc_hdr + 1);
}
if (ether_type == IP_ETHERTYPE)
up = ath6kl_wmi_determine_user_priority(
ip_hdr, 0);
}
traffic_class = ath6kl_wmi_get_traffic_class(up);
if ((conn->apsd_info & (1 << traffic_class)) == 0)
return false;
/* Queue the frames if the STA is sleeping */
spin_lock_bh(&conn->psq_lock);
is_apsdq_empty = skb_queue_empty(&conn->apsdq);
skb_queue_tail(&conn->apsdq, skb);
spin_unlock_bh(&conn->psq_lock);
/*
* If this is the first pkt getting queued
* for this STA, update the PVB for this STA
*/
if (is_apsdq_empty) {
ath6kl_wmi_set_apsd_bfrd_traf(ar->wmi,
vif->fw_vif_idx,
conn->aid, 1, 0);
Annotation
- Immediate include surface: `core.h`, `debug.h`, `htc-ops.h`, `trace.h`.
- Detected declarations: `function Copyright`, `function ath6kl_get_aid`, `function ath6kl_ibss_map_epid`, `function ath6kl_process_uapsdq`, `function ath6kl_process_psq`, `function ath6kl_powersave_ap`, `function ath6kl_control_tx`, `function ath6kl_data_tx`, `function ath6kl_indicate_tx_activity`, `function ath6kl_tx_queue_full`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.