drivers/net/wireless/ath/ath12k/mac.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/mac.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/mac.h- Extension
.h- Size
- 13333 bytes
- Lines
- 349
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/mac80211.hnet/cfg80211.hwmi.h
Detected Declarations
struct ath12kstruct ath12k_basestruct ath12k_hwstruct ath12k_hw_groupstruct ath12k_pdev_mapstruct ath12k_generic_iterstruct ath12k_mac_get_any_chanctx_conf_argstruct ath12k_chan_power_infostruct ath12k_reg_tpc_power_infoenum ath12k_supported_bwenum ath12k_gienum ath12k_ltf
Annotated Snippet
struct ath12k_generic_iter {
struct ath12k *ar;
int ret;
};
/* number of failed packets (20 packets with 16 sw reties each) */
#define ATH12K_KICKOUT_THRESHOLD (20 * 16)
/* Use insanely high numbers to make sure that the firmware implementation
* won't start, we have the same functionality already in hostapd. Unit
* is seconds.
*/
#define ATH12K_KEEPALIVE_MIN_IDLE 3747
#define ATH12K_KEEPALIVE_MAX_IDLE 3895
#define ATH12K_KEEPALIVE_MAX_UNRESPONSIVE 3900
#define ATH12K_PDEV_TX_POWER_INVALID ((u32)-1)
#define ATH12K_PDEV_TX_POWER_REFRESH_TIME_MSECS 5000 /* msecs */
/* FIXME: should these be in ieee80211.h? */
#define IEEE80211_VHT_MCS_SUPPORT_0_11_MASK GENMASK(23, 16)
#define IEEE80211_DISABLE_VHT_MCS_SUPPORT_0_11 BIT(24)
#define ATH12K_CHAN_WIDTH_NUM 14
#define ATH12K_BW_NSS_MAP_ENABLE BIT(31)
#define ATH12K_PEER_RX_NSS_160MHZ GENMASK(2, 0)
#define ATH12K_TX_POWER_MAX_VAL 70
#define ATH12K_TX_POWER_MIN_VAL 0
#define ATH12K_DEFAULT_LINK_ID 0
#define ATH12K_INVALID_LINK_ID 255
/* Default link after the IEEE802.11 defined Max link id limit
* for driver usage purpose.
*/
#define ATH12K_FIRST_SCAN_LINK IEEE80211_MLD_MAX_NUM_LINKS
#define ATH12K_SCAN_LINKS_MASK GENMASK(ATH12K_NUM_MAX_LINKS, IEEE80211_MLD_MAX_NUM_LINKS)
#define ATH12K_NUM_MAX_ACTIVE_LINKS_PER_DEVICE 2
#define HECAP_PHY_SUBFMR_GET(hecap_phy) \
u8_get_bits(hecap_phy[3], IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER)
#define HECAP_PHY_SUBFME_GET(hecap_phy) \
u8_get_bits(hecap_phy[4], IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE)
#define HECAP_PHY_MUBFMR_GET(hecap_phy) \
u8_get_bits(hecap_phy[4], IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER)
#define HECAP_PHY_ULMUMIMO_GET(hecap_phy) \
u8_get_bits(hecap_phy[2], IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO)
#define HECAP_PHY_ULOFDMA_GET(hecap_phy) \
u8_get_bits(hecap_phy[2], IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO)
enum ath12k_supported_bw {
ATH12K_BW_20 = 0,
ATH12K_BW_40 = 1,
ATH12K_BW_80 = 2,
ATH12K_BW_160 = 3,
ATH12K_BW_320 = 4,
};
enum ath12k_gi {
ATH12K_RATE_INFO_GI_0_8,
ATH12K_RATE_INFO_GI_1_6,
ATH12K_RATE_INFO_GI_3_2,
};
enum ath12k_ltf {
ATH12K_RATE_INFO_1XLTF,
ATH12K_RATE_INFO_2XLTF,
ATH12K_RATE_INFO_4XLTF,
};
struct ath12k_mac_get_any_chanctx_conf_arg {
struct ath12k *ar;
struct ieee80211_chanctx_conf *chanctx_conf;
};
/**
* struct ath12k_chan_power_info - TPE containing power info per channel chunk
* @chan_cfreq: channel center freq (MHz)
* e.g.
* channel 37/20 MHz, it is 6135
* channel 37/40 MHz, it is 6125
* channel 37/80 MHz, it is 6145
* channel 37/160 MHz, it is 6185
* @tx_power: transmit power (dBm)
Annotation
- Immediate include surface: `net/mac80211.h`, `net/cfg80211.h`, `wmi.h`.
- Detected declarations: `struct ath12k`, `struct ath12k_base`, `struct ath12k_hw`, `struct ath12k_hw_group`, `struct ath12k_pdev_map`, `struct ath12k_generic_iter`, `struct ath12k_mac_get_any_chanctx_conf_arg`, `struct ath12k_chan_power_info`, `struct ath12k_reg_tpc_power_info`, `enum ath12k_supported_bw`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.