1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries.
10 #include <linux/ieee80211.h>
12 #define WILC_MAX_NUM_STA 9
13 #define WILC_MAX_RATES_SUPPORTED 12
14 #define WILC_MAX_NUM_PMKIDS 16
15 #define WILC_MAX_NUM_SCANNED_CH 14
16 #define WILC_NVMEM_MAX_NUM_BANK 6
17 #define WILC_NVMEM_BANK_BASE 0x30000000
18 #define WILC_NVMEM_LOW_BANK_OFFSET 0x102c
19 #define WILC_NVMEM_HIGH_BANK_OFFSET 0x1380
20 #define WILC_NVMEM_IS_BANK_USED BIT(31)
21 #define WILC_NVMEM_IS_BANK_INVALID BIT(30)
23 struct wilc_assoc_resp
{
31 u8 pmkid
[WLAN_PMKID_LEN
];
34 struct wilc_pmkid_attr
{
36 struct wilc_pmkid pmkidlist
[WILC_MAX_NUM_PMKIDS
];
39 struct wilc_reg_frame
{
45 struct wilc_drv_handler
{
50 struct wilc_sta_wpa_ptk
{
51 u8 mac_addr
[ETH_ALEN
];
56 struct wilc_ap_wpa_ptk
{
57 u8 mac_addr
[ETH_ALEN
];
63 struct wilc_wpa_igtk
{
72 u8 mac_addr
[ETH_ALEN
];
83 struct wilc_noa_opp_enable
{
91 struct wilc_noa_opp_disable
{
98 struct wilc_join_bss_param
{
99 char ssid
[IEEE80211_MAX_SSID_LEN
];
106 __le16 beacon_period
;
108 u8 supp_rates
[WILC_MAX_RATES_SUPPORTED
+ 1];
123 struct wilc_noa_opp_disable opp_dis
;
124 struct wilc_noa_opp_enable opp_en
;
128 struct wilc_external_auth_param
{
131 u8 ssid
[IEEE80211_MAX_SSID_LEN
];
133 __le32 key_mgmt_suites
;
137 static inline u32
get_bank_offset_from_bank_index(unsigned int i
)
139 return (((i
) < 2) ? WILC_NVMEM_LOW_BANK_OFFSET
+ ((i
) * 32) :
140 WILC_NVMEM_HIGH_BANK_OFFSET
+ ((i
) - 2) * 16);