Skip to content

Commit 00c047e

Browse files
committed
Secure domain support
Secure domain support to work with security modes. Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
1 parent d6f84f4 commit 00c047e

File tree

4 files changed

+400
-2
lines changed

4 files changed

+400
-2
lines changed

fw_if/umac_if/inc/common/fmac_util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#define NRF_WIFI_FMAC_CIPHER_SUITE_TKIP 0x000FAC02
3535
#define NRF_WIFI_FMAC_CIPHER_SUITE_CCMP 0x000FAC04
3636
#define NRF_WIFI_FMAC_CIPHER_SUITE_CCMP_256 0x000FAC0A
37+
#define NRF_WIFI_FMAC_CIPHER_SUITE_GCMP_256 0x000FAC09
3738
#define NRF_WIFI_FMAC_CIPHER_SUITE_OPEN 0x0
3839
#define NRF_WIFI_FMAC_CIPHER_SUITE_SMS4 0x00147201
3940

fw_if/umac_if/inc/fw/host_rpu_umac_if.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,9 @@ struct nrf_wifi_umac_cmd_key {
15301530
struct nrf_wifi_umac_key_info key_info;
15311531
/** MAC address associated with the key */
15321532
unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN];
1533+
#ifdef WIFI_NRF71
1534+
unsigned char peerDBIndex;
1535+
#endif /* WIFI_NRF71 */
15331536
} __NRF_WIFI_PKD;
15341537

15351538
/**

fw_if/umac_if/inc/system/fmac_structs.h

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,73 @@ struct raw_tx_stats {
449449
};
450450
#endif /* NRF70_RAW_DATA_TX */
451451

452+
#ifdef WIFI_NRF71
453+
#define MAX_NUM_SESSIONS 8
454+
#define WLAN_OPER_INVALID 10
455+
#define MAX_ENC_KEY_LEN 32
456+
#define MAX_MIC_KEY_LEN 16
457+
#define MICHAEL_LEN 8
458+
enum VIF_STATE {
459+
VIF_INVALID,
460+
VIF_VALID
461+
};
462+
463+
enum keyState {
464+
KEY_INVALID,
465+
KEY_VALID
466+
};
467+
468+
enum VIF_CONNECTED_STATE {
469+
VIF_DISCONNECTED,
470+
VIF_CONNECTED
471+
};
472+
473+
enum VIF_IF_MODE {
474+
VIF_BSS_STA,
475+
VIF_IBSS,
476+
VIF_AP
477+
};
478+
479+
#define VIF_MIC_KEY_LEN_PER_VIF 0x40
480+
#define VIF_KEY_LEN_PER_VIF 0x80
481+
#define VIF_MIC_KEY_LEN_PER_KEYID 0x10
482+
#define VIF_KEY_LEN_PER_KEYID 0x20
483+
#define VIF_KEY_DB_OFFSET 0x1000
484+
#define PEER_MIC_KEY_LEN_8 0x08
485+
#define PEER_MIC_KEY_LEN_16 0x10
486+
#define PEER_UNICAST_KEY_LEN 0x20
487+
#define PEER_BCST_KEY_LEN 0x20
488+
#define PEER_ENC_KEY_LEN_16 0x10
489+
#define PEER_ENC_KEY_LEN_32 0x20
490+
#define PEER_KEY_TOTAL_LEN 0xf0
491+
492+
struct peerKeydataBase {
493+
unsigned int keyValid;
494+
unsigned int keyType;
495+
unsigned int ucstCipherType;
496+
unsigned int bcstCipherType;
497+
unsigned int bcstKeyId;
498+
unsigned char peerMacAddr[NRF_WIFI_ETH_ADDR_LEN];
499+
unsigned char vifMacAddr[NRF_WIFI_ETH_ADDR_LEN];
500+
unsigned char ucstKey[MAX_ENC_KEY_LEN];
501+
union {
502+
struct {
503+
unsigned char TxMicKey[MICHAEL_LEN];
504+
unsigned char RxMicKey[MICHAEL_LEN];
505+
} ucst;
506+
unsigned char ucstWapiMicKey[MAX_MIC_KEY_LEN];
507+
};
508+
unsigned char bcstKey[MAX_ENC_KEY_LEN];
509+
union {
510+
struct {
511+
unsigned char TxMicKey[MICHAEL_LEN];
512+
unsigned char RxMicKey[MICHAEL_LEN];
513+
} bcst;
514+
unsigned char bcstWapiMicKey[MAX_MIC_KEY_LEN];
515+
};
516+
};
517+
#endif /* WIFI_NRF71 */
518+
452519
/**
453520
* @brief Structure to hold per device context information for the UMAC IF layer.
454521
*
@@ -490,6 +557,10 @@ struct nrf_wifi_sys_fmac_dev_ctx {
490557
struct raw_tx_pkt_header raw_tx_config;
491558
struct raw_tx_stats raw_pkt_stats;
492559
#endif /* NRF70_RAW_DATA_TX */
560+
#ifdef WIFI_NRF71
561+
/* Peer key info */
562+
struct peerKeydataBase peerKeyDB[MAX_NUM_SESSIONS];
563+
#endif /* WIFI_NRF71 */
493564
};
494565

495566
/**
@@ -553,7 +624,6 @@ struct rpu_sys_op_stats {
553624
/** Firmware statistics. */
554625
struct rpu_sys_fw_stats fw;
555626
};
556-
557627
/**
558628
* @}
559629
*/

0 commit comments

Comments
 (0)