LinuxKPI: 802.11: crypto pn lengths

Define the last missing PN length and for consistency use them
in struct ieee80211_key_seq (even though a 6 is a 6 is a 6).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2025-03-15 00:01:11 +00:00
parent 7513a0afe5
commit c8a6676eb6
2 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2020-2024 The FreeBSD Foundation
* Copyright (c) 2020-2025 The FreeBSD Foundation
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@ -64,6 +64,7 @@ struct ieee80211_mmie_16 {
#define IEEE80211_GCMP_MIC_LEN 16
#define IEEE80211_GCMP_PN_LEN 6
#define IEEE80211_GMAC_PN_LEN 6
#define IEEE80211_CMAC_PN_LEN 6
#define IEEE80211_MAX_PN_LEN 16

View file

@ -581,10 +581,13 @@ struct ieee80211_key_seq {
uint8_t pn[IEEE80211_CCMP_PN_LEN];
} ccmp;
struct {
uint8_t pn[IEEE80211_CCMP_PN_LEN];
uint8_t pn[IEEE80211_GCMP_PN_LEN];
} gcmp;
struct {
uint8_t pn[IEEE80211_CMAC_PN_LEN];
} aes_cmac;
struct {
uint8_t pn[IEEE80211_CCMP_PN_LEN];
uint8_t pn[IEEE80211_GMAC_PN_LEN];
} aes_gmac;
struct {
uint32_t iv32;