]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/net/wireless/realtek/rtw88/sec.h
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2018-2019 Realtek Corporation
8 #define RTW_SEC_CMD_REG 0x670
9 #define RTW_SEC_WRITE_REG 0x674
10 #define RTW_SEC_READ_REG 0x678
11 #define RTW_SEC_CONFIG 0x680
13 #define RTW_SEC_CAM_ENTRY_SHIFT 3
14 #define RTW_SEC_DEFAULT_KEY_NUM 4
15 #define RTW_SEC_CMD_WRITE_ENABLE BIT(16)
16 #define RTW_SEC_CMD_CLEAR BIT(30)
17 #define RTW_SEC_CMD_POLLING BIT(31)
19 #define RTW_SEC_TX_UNI_USE_DK BIT(0)
20 #define RTW_SEC_RX_UNI_USE_DK BIT(1)
21 #define RTW_SEC_TX_DEC_EN BIT(2)
22 #define RTW_SEC_RX_DEC_EN BIT(3)
23 #define RTW_SEC_TX_BC_USE_DK BIT(6)
24 #define RTW_SEC_RX_BC_USE_DK BIT(7)
26 #define RTW_SEC_ENGINE_EN BIT(9)
28 int rtw_sec_get_free_cam(struct rtw_sec_desc
*sec
);
29 void rtw_sec_write_cam(struct rtw_dev
*rtwdev
,
30 struct rtw_sec_desc
*sec
,
31 struct ieee80211_sta
*sta
,
32 struct ieee80211_key_conf
*key
,
33 u8 hw_key_type
, u8 hw_key_idx
);
34 void rtw_sec_clear_cam(struct rtw_dev
*rtwdev
,
35 struct rtw_sec_desc
*sec
,
37 void rtw_sec_enable_sec_engine(struct rtw_dev
*rtwdev
);