drivers/net/wireless/ath/carl9170/carl9170.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/carl9170/carl9170.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/carl9170/carl9170.h- Extension
.h- Size
- 18254 bytes
- Lines
- 670
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/firmware.hlinux/completion.hlinux/spinlock.hlinux/hw_random.hnet/cfg80211.hnet/mac80211.hlinux/usb.hlinux/leds.hlinux/input.heeprom.hwlan.hhw.hfwdesc.hfwcmd.h../regd.hdebug.h
Detected Declarations
struct carl9170_sta_tidstruct carl9170_tx_queue_statsstruct carl9170_vifstruct carl9170_vif_infostruct ar9170struct carl9170_ledstruct ar9170struct carl9170_bar_list_entrystruct carl9170_ba_statsstruct carl9170_sta_infostruct carl9170_tx_infoenum carl9170_device_stateenum carl9170_tid_stateenum carl9170_device_featuresenum carl9170_restart_reasonsenum carl9170_erp_modesenum carl9170_ps_off_override_reasonsfunction Copyrightfunction __carl9170_set_statefunction carl9170_set_statefunction carl9170_set_state_whenfunction get_seq_hfunction carl9170_get_seqfunction carl9170_get_tidfunction carl9170_get_viffunction list_for_each_entry_rcufunction is_main_vif
Annotated Snippet
struct carl9170_sta_tid {
/* must be the first entry! */
struct list_head list;
/* temporary list for RCU unlink procedure */
struct list_head tmp_list;
/* lock for the following data structures */
spinlock_t lock;
unsigned int counter;
enum carl9170_tid_state state;
u8 tid; /* TID number ( 0 - 15 ) */
u16 max; /* max. AMPDU size */
u16 snx; /* awaiting _next_ frame */
u16 hsn; /* highest _queued_ sequence */
u16 bsn; /* base of the tx/agg bitmap */
unsigned long bitmap[CARL9170_BAW_SIZE];
/* Preaggregation reorder queue */
struct sk_buff_head queue;
struct ieee80211_sta *sta;
struct ieee80211_vif *vif;
};
#define CARL9170_QUEUE_TIMEOUT 256
#define CARL9170_BUMP_QUEUE 1000
#define CARL9170_TX_TIMEOUT 2500
#define CARL9170_JANITOR_DELAY 128
#define CARL9170_QUEUE_STUCK_TIMEOUT 5500
#define CARL9170_STAT_WORK 30000
#define CARL9170_NUM_TX_AGG_MAX 30
/*
* Tradeoff between stability/latency and speed.
*
* AR9170_TXQ_DEPTH is devised by dividing the amount of available
* tx buffers with the size of a full ethernet frame + overhead.
*
* Naturally: The higher the limit, the faster the device CAN send.
* However, even a slight over-commitment at the wrong time and the
* hardware is doomed to send all already-queued frames at suboptimal
* rates. This in turn leads to an enormous amount of unsuccessful
* retries => Latency goes up, whereas the throughput goes down. CRASH!
*/
#define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2)
#define CARL9170_NUM_TX_LIMIT_SOFT (AR9170_TXQ_DEPTH)
struct carl9170_tx_queue_stats {
unsigned int count;
unsigned int limit;
unsigned int len;
};
struct carl9170_vif {
unsigned int id;
struct ieee80211_vif __rcu *vif;
};
struct carl9170_vif_info {
struct list_head list;
bool active;
unsigned int id;
struct sk_buff *beacon;
bool enable_beacon;
};
#define AR9170_NUM_RX_URBS 16
#define AR9170_NUM_RX_URBS_MUL 2
#define AR9170_NUM_TX_URBS 8
#define AR9170_NUM_RX_URBS_POOL (AR9170_NUM_RX_URBS_MUL * AR9170_NUM_RX_URBS)
enum carl9170_device_features {
CARL9170_WPS_BUTTON = BIT(0),
CARL9170_ONE_LED = BIT(1),
};
#ifdef CONFIG_CARL9170_LEDS
struct ar9170;
struct carl9170_led {
struct ar9170 *ar;
struct led_classdev l;
char name[32];
unsigned int toggled;
bool last_state;
bool registered;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/firmware.h`, `linux/completion.h`, `linux/spinlock.h`, `linux/hw_random.h`, `net/cfg80211.h`, `net/mac80211.h`, `linux/usb.h`.
- Detected declarations: `struct carl9170_sta_tid`, `struct carl9170_tx_queue_stats`, `struct carl9170_vif`, `struct carl9170_vif_info`, `struct ar9170`, `struct carl9170_led`, `struct ar9170`, `struct carl9170_bar_list_entry`, `struct carl9170_ba_stats`, `struct carl9170_sta_info`.
- 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.