drivers/net/wireless/intel/iwlegacy/3945.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlegacy/3945.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlegacy/3945.h
Extension
.h
Size
19344 bytes
Lines
579
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 il3945_rate_scale_data {
	u64 data;
	s32 success_counter;
	s32 success_ratio;
	s32 counter;
	s32 average_tpt;
	unsigned long stamp;
};

struct il3945_rs_sta {
	spinlock_t lock;
	struct il_priv *il;
	s32 *expected_tpt;
	unsigned long last_partial_flush;
	unsigned long last_flush;
	u32 flush_time;
	u32 last_tx_packets;
	u32 tx_packets;
	u8 tgg;
	u8 flush_pending;
	u8 start_rate;
	struct timer_list rate_scale_flush;
	struct il3945_rate_scale_data win[RATE_COUNT_3945];

	/* used to be in sta_info */
	int last_txrate_idx;
};

/*
 * The common struct MUST be first because it is shared between
 * 3945 and 4965!
 */
struct il3945_sta_priv {
	struct il_station_priv_common common;
	struct il3945_rs_sta rs_sta;
};

enum il3945_antenna {
	IL_ANTENNA_DIVERSITY,
	IL_ANTENNA_MAIN,
	IL_ANTENNA_AUX
};

/*
 * RTS threshold here is total size [2347] minus 4 FCS bytes
 * Per spec:
 *   a value of 0 means RTS on all data/management packets
 *   a value > max MSDU size means no RTS
 * else RTS for data/management frames where MPDU is larger
 *   than RTS value.
 */
#define DEFAULT_RTS_THRESHOLD     2347U
#define MIN_RTS_THRESHOLD         0U
#define MAX_RTS_THRESHOLD         2347U
#define MAX_MSDU_SIZE		  2304U
#define MAX_MPDU_SIZE		  2346U
#define DEFAULT_BEACON_INTERVAL   100U
#define	DEFAULT_SHORT_RETRY_LIMIT 7U
#define	DEFAULT_LONG_RETRY_LIMIT  4U

#define IL_TX_FIFO_AC0	0
#define IL_TX_FIFO_AC1	1
#define IL_TX_FIFO_AC2	2
#define IL_TX_FIFO_AC3	3
#define IL_TX_FIFO_HCCA_1	5
#define IL_TX_FIFO_HCCA_2	6
#define IL_TX_FIFO_NONE	7

#define IEEE80211_DATA_LEN              2304
#define IEEE80211_4ADDR_LEN             30
#define IEEE80211_HLEN                  (IEEE80211_4ADDR_LEN)
#define IEEE80211_FRAME_LEN             (IEEE80211_DATA_LEN + IEEE80211_HLEN)

struct il3945_frame {
	struct list_head list;

	/* Must be last as it ends in a flexible-array member. */
	union {
		struct ieee80211_hdr frame;
		struct il3945_tx_beacon_cmd beacon;
		u8 raw[IEEE80211_FRAME_LEN];
		u8 cmd[360];
	} u;
};

#define SUP_RATE_11A_MAX_NUM_CHANNELS  8
#define SUP_RATE_11B_MAX_NUM_CHANNELS  4
#define SUP_RATE_11G_MAX_NUM_CHANNELS  12

#define IL_SUPPORTED_RATES_IE_LEN         8

Annotation

Implementation Notes