drivers/net/wireless/intel/iwlwifi/mld/sta.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/sta.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlwifi/mld/sta.h
Extension
.h
Size
9916 bytes
Lines
304
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 iwl_mld_rxq_dup_data {
	__le16 last_seq[IWL_MAX_TID_COUNT + 1];
	u8 last_sub_frame_idx[IWL_MAX_TID_COUNT + 1];
} ____cacheline_aligned_in_smp;

/**
 * struct iwl_mld_link_sta - link-level station
 *
 * This represents the link-level sta - the driver level equivalent to the
 * ieee80211_link_sta
 *
 * @rx_igtk: FW can only have one IGTK for RX at a time, whereas mac80211 will
 *	have two. This tracks the one IGTK that currently exists in FW, to
 *	remove it there when a new one is installed.
 * @last_rate_n_flags: rate_n_flags from the last &iwl_tlc_update_notif
 * @signal_avg: the signal average coming from the firmware
 * @in_fw: whether the link STA is uploaded to the FW (false during restart)
 * @rcu_head: RCU head for freeing this object
 * @fw_id: the FW id of this link sta.
 */
struct iwl_mld_link_sta {
	/* Add here fields that need clean up on restart */
	struct_group(zeroed_on_hw_restart,
		struct ieee80211_key_conf *rx_igtk;
		u32 last_rate_n_flags;
		bool in_fw;
		s8 signal_avg;
	);
	/* And here fields that survive a fw restart */
	struct rcu_head rcu_head;
	u32 fw_id;
};

#define iwl_mld_link_sta_dereference_check(mld_sta, link_id)		\
	rcu_dereference_check((mld_sta)->link[link_id],			\
			      lockdep_is_held(&mld_sta->mld->wiphy->mtx))

#define for_each_mld_link_sta(mld_sta, link_sta, link_id)		\
	for (link_id = 0; link_id < ARRAY_SIZE((mld_sta)->link);	\
	     link_id++)							\
		if ((link_sta =						\
			iwl_mld_link_sta_dereference_check(mld_sta, link_id)))

#define IWL_NUM_DEFAULT_KEYS 4

/* struct iwl_mld_ptk_pn - Holds Packet Number (PN) per TID.
 * @rcu_head: RCU head for freeing this data.
 * @pn: Array storing PN for each TID.
 */
struct iwl_mld_ptk_pn {
	struct rcu_head rcu_head;
	struct {
		u8 pn[IWL_MAX_TID_COUNT][IEEE80211_CCMP_PN_LEN];
	} ____cacheline_aligned_in_smp q[];
};

/**
 * struct iwl_mld_per_link_mpdu_counter - per-link TX/RX MPDU counters
 *
 * @tx: Number of TX MPDUs.
 * @rx: Number of RX MPDUs.
 */
struct iwl_mld_per_link_mpdu_counter {
	u32 tx;
	u32 rx;
};

/**
 * struct iwl_mld_per_q_mpdu_counter - per-queue MPDU counter
 *
 * @lock: Needed to protect the counters when modified from statistics.
 * @per_link: per-link counters.
 * @window_start_time: timestamp of the counting-window start
 */
struct iwl_mld_per_q_mpdu_counter {
	spinlock_t lock;
	struct iwl_mld_per_link_mpdu_counter per_link[IWL_FW_MAX_LINKS];
	unsigned long window_start_time;
} ____cacheline_aligned_in_smp;

/**
 * struct iwl_mld_sta - representation of a station in the driver.
 *
 * This represent the MLD-level sta, and will not be added to the FW.
 * Embedded in ieee80211_sta.
 *
 * @vif: pointer the vif object.
 * @sta_state: station state according to enum %ieee80211_sta_state
 * @sta_type: type of this station. See &enum iwl_fw_sta_type
 * @mld: a pointer to the iwl_mld object

Annotation

Implementation Notes