drivers/net/wireless/broadcom/b43legacy/xmit.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43legacy/xmit.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/broadcom/b43legacy/xmit.h
Extension
.h
Size
8784 bytes
Lines
263
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 b43legacy_txhdr_fw3 {
	__le32 mac_ctl;				/* MAC TX control */
	__le16 mac_frame_ctl;			/* Copy of the FrameControl */
	__le16 tx_fes_time_norm;		/* TX FES Time Normal */
	__le16 phy_ctl;				/* PHY TX control */
	__u8 iv[16];				/* Encryption IV */
	__u8 tx_receiver[6];			/* TX Frame Receiver address */
	__le16 tx_fes_time_fb;			/* TX FES Time Fallback */
	struct b43legacy_plcp_hdr4 rts_plcp_fb;	/* RTS fallback PLCP */
	__le16 rts_dur_fb;			/* RTS fallback duration */
	struct b43legacy_plcp_hdr4 plcp_fb;	/* Fallback PLCP */
	__le16 dur_fb;				/* Fallback duration */
	PAD_BYTES(2);
	__le16 cookie;
	__le16 unknown_scb_stuff;
	struct b43legacy_plcp_hdr6 rts_plcp;	/* RTS PLCP */
	__u8 rts_frame[18];			/* The RTS frame (if used) */
	struct b43legacy_plcp_hdr6 plcp;
} __packed;

/* MAC TX control */
#define B43legacy_TX4_MAC_KEYIDX	0x0FF00000 /* Security key index */
#define B43legacy_TX4_MAC_KEYIDX_SHIFT	20
#define B43legacy_TX4_MAC_KEYALG	0x00070000 /* Security key algorithm */
#define B43legacy_TX4_MAC_KEYALG_SHIFT	16
#define B43legacy_TX4_MAC_LIFETIME	0x00001000
#define B43legacy_TX4_MAC_FRAMEBURST	0x00000800
#define B43legacy_TX4_MAC_SENDCTS	0x00000400
#define B43legacy_TX4_MAC_AMPDU		0x00000300
#define B43legacy_TX4_MAC_AMPDU_SHIFT	8
#define B43legacy_TX4_MAC_CTSFALLBACKOFDM	0x00000200
#define B43legacy_TX4_MAC_FALLBACKOFDM	0x00000100
#define B43legacy_TX4_MAC_5GHZ		0x00000080
#define B43legacy_TX4_MAC_IGNPMQ	0x00000020
#define B43legacy_TX4_MAC_HWSEQ		0x00000010 /* Use Hardware Seq No */
#define B43legacy_TX4_MAC_STMSDU	0x00000008 /* Start MSDU */
#define B43legacy_TX4_MAC_SENDRTS	0x00000004
#define B43legacy_TX4_MAC_LONGFRAME	0x00000002
#define B43legacy_TX4_MAC_ACK		0x00000001

/* Extra Frame Types */
#define B43legacy_TX4_EFT_FBOFDM	0x0001 /* Data frame fb rate type */
#define B43legacy_TX4_EFT_RTSOFDM	0x0004 /* RTS/CTS rate type */
#define B43legacy_TX4_EFT_RTSFBOFDM	0x0010 /* RTS/CTS fallback rate type */

/* PHY TX control word */
#define B43legacy_TX4_PHY_ENC		0x0003 /* Data frame encoding */
#define B43legacy_TX4_PHY_ENC_CCK	0x0000 /* CCK */
#define B43legacy_TX4_PHY_ENC_OFDM	0x0001 /* Data frame rate type */
#define B43legacy_TX4_PHY_SHORTPRMBL	0x0010 /* Use short preamble */
#define B43legacy_TX4_PHY_ANT		0x03C0 /* Antenna selection */
#define  B43legacy_TX4_PHY_ANT0		0x0000 /* Use antenna 0 */
#define  B43legacy_TX4_PHY_ANT1		0x0100 /* Use antenna 1 */
#define  B43legacy_TX4_PHY_ANTLAST	0x0300 /* Use last used antenna */



int b43legacy_generate_txhdr(struct b43legacy_wldev *dev,
			      u8 *txhdr,
			      const unsigned char *fragment_data,
			      unsigned int fragment_len,
			      struct ieee80211_tx_info *info,
			      u16 cookie);


/* Transmit Status */
struct b43legacy_txstatus {
	u16 cookie;	/* The cookie from the txhdr */
	u16 seq;	/* Sequence number */
	u8 phy_stat;	/* PHY TX status */
	u8 frame_count;	/* Frame transmit count */
	u8 rts_count;	/* RTS transmit count */
	u8 supp_reason;	/* Suppression reason */
	/* flags */
	u8 pm_indicated;/* PM mode indicated to AP */
	u8 intermediate;/* Intermediate status notification */
	u8 for_ampdu;	/* Status is for an AMPDU (afterburner) */
	u8 acked;	/* Wireless ACK received */
};

/* txstatus supp_reason values */
enum {
	B43legacy_TXST_SUPP_NONE,	/* Not suppressed */
	B43legacy_TXST_SUPP_PMQ,	/* Suppressed due to PMQ entry */
	B43legacy_TXST_SUPP_FLUSH,	/* Suppressed due to flush request */
	B43legacy_TXST_SUPP_PREV,	/* Previous fragment failed */
	B43legacy_TXST_SUPP_CHAN,	/* Channel mismatch */
	B43legacy_TXST_SUPP_LIFE,	/* Lifetime expired */
	B43legacy_TXST_SUPP_UNDER,	/* Buffer underflow */
	B43legacy_TXST_SUPP_ABNACK,	/* Afterburner NACK */

Annotation

Implementation Notes