drivers/staging/rtl8723bs/include/rtw_security.h

Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/include/rtw_security.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/rtl8723bs/include/rtw_security.h
Extension
.h
Size
7364 bytes
Lines
273
Domain
Driver Families
Bucket
drivers/staging
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 rt_pmkid_list {
	u8				bUsed;
	u8				Bssid[6];
	u8				PMKID[16];
	u8				SsidBuf[33];
	u8 *ssid_octet;
	u16					ssid_length;
};


struct security_priv {
	u32   dot11AuthAlgrthm;		/*  802.11 auth, could be open, shared, 8021x and authswitch */
	u32   dot11PrivacyAlgrthm;	/*  This specify the privacy for shared auth. algorithm. */

	/* WEP */
	u32   dot11PrivacyKeyIndex;	/*  this is only valid for legendary wep, 0~3 for key id. (tx key index) */
	union Keytype dot11DefKey[4];	/*  this is only valid for def. key */
	u32 dot11DefKeylen[4];
	u8 key_mask; /* use to restore wep key after hal_init */

	u32 dot118021XGrpPrivacy;	/*  This specify the privacy algthm. used for Grp key */
	u32 dot118021XGrpKeyid;		/*  key id used for Grp Key (tx key index) */
	union Keytype	dot118021XGrpKey[BIP_MAX_KEYID + 1];	/*  802.1x Group Key, for inx0 and inx1 */
	union Keytype	dot118021XGrptxmickey[BIP_MAX_KEYID + 1];
	union Keytype	dot118021XGrprxmickey[BIP_MAX_KEYID + 1];
	union pn48		dot11Grptxpn;			/*  PN48 used for Grp Key xmit. */
	union pn48		dot11Grprxpn;			/*  PN48 used for Grp Key recv. */
	u32 dot11wBIPKeyid;						/*  key id used for BIP Key (tx key index) */
	union Keytype	dot11wBIPKey[BIP_MAX_KEYID + 1];	/*  BIP Key, for index4 and index5 */
	union pn48		dot11wBIPtxpn;			/*  PN48 used for Grp Key xmit. */
	union pn48		dot11wBIPrxpn;			/*  PN48 used for Grp Key recv. */

	/* extend security capabilities for AP_MODE */
	unsigned int dot8021xalg;/* 0:disable, 1:psk, 2:802.1x */
	unsigned int wpa_psk;/* 0:disable, bit(0): WPA, bit(1):WPA2 */
	unsigned int wpa_group_cipher;
	unsigned int wpa2_group_cipher;
	unsigned int wpa_pairwise_cipher;
	unsigned int wpa2_pairwise_cipher;

	u8 wps_ie[MAX_WPS_IE_LEN];/* added in assoc req */
	int wps_ie_len;

	struct arc4_ctx xmit_arc4_ctx;
	struct arc4_ctx recv_arc4_ctx;

	u8 binstallGrpkey;
	u8 binstallBIPkey;
	u8 busetkipkey;
	/* _timer tkip_timer; */
	u8 bcheck_grpkey;
	u8 bgrpkey_handshake;

	s32	sw_encrypt;/* from registry_priv */
	s32	sw_decrypt;/* from registry_priv */

	s32	hw_decrypted;/* if the rx packets is hw_decrypted ==false, it means the hw has not been ready. */


	/* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */
	u32 ndisauthtype;	/*  enum ndis_802_11_authentication_mode */
	u32 ndisencryptstatus;	/*  NDIS_802_11_ENCRYPTION_STATUS */

	struct wlan_bssid_ex sec_bss;  /* for joinbss (h2c buffer) usage */

	struct ndis_802_11_wep ndiswep;

	u8 assoc_info[600];
	u8 szofcapability[256]; /* for wpa2 usage */
	u8 oidassociation[512]; /* for wpa/wpa2 usage */
	u8 authenticator_ie[256];  /* store ap security information element */
	u8 supplicant_ie[256];  /* store sta security information element */


	/* for tkip countermeasure */
	unsigned long last_mic_err_time;
	u8 btkip_countermeasure;
	u8 btkip_wait_report;
	u32 btkip_countermeasure_time;

	/*  For WPA2 Pre-Authentication. */
	struct rt_pmkid_list		PMKIDList[NUM_PMKID_CACHE];	/*  Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
	u8		PMKIDIndex;

	u8 bWepDefaultKeyIdxSet;

};

#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
do {\

Annotation

Implementation Notes