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.

Dependency Surface

Detected Declarations

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

Implementation Notes