xref: /linux/drivers/net/wireless/microchip/wilc1000/fw.h (revision 0e703de3ef41692f765e80884caa36fed9da05df)
15625f965SAjay Singh /* SPDX-License-Identifier: GPL-2.0 */
25625f965SAjay Singh /*
35625f965SAjay Singh  * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries.
45625f965SAjay Singh  * All rights reserved.
55625f965SAjay Singh  */
65625f965SAjay Singh 
75625f965SAjay Singh #ifndef WILC_FW_H
85625f965SAjay Singh #define WILC_FW_H
95625f965SAjay Singh 
105625f965SAjay Singh #include <linux/ieee80211.h>
115625f965SAjay Singh 
125625f965SAjay Singh #define WILC_MAX_NUM_STA			9
135625f965SAjay Singh #define WILC_MAX_RATES_SUPPORTED		12
145625f965SAjay Singh #define WILC_MAX_NUM_PMKIDS			16
155625f965SAjay Singh #define WILC_MAX_NUM_SCANNED_CH			14
165625f965SAjay Singh 
175625f965SAjay Singh struct wilc_assoc_resp {
185625f965SAjay Singh 	__le16 capab_info;
195625f965SAjay Singh 	__le16 status_code;
205625f965SAjay Singh 	__le16 aid;
215625f965SAjay Singh } __packed;
225625f965SAjay Singh 
235625f965SAjay Singh struct wilc_pmkid {
245625f965SAjay Singh 	u8 bssid[ETH_ALEN];
255625f965SAjay Singh 	u8 pmkid[WLAN_PMKID_LEN];
265625f965SAjay Singh } __packed;
275625f965SAjay Singh 
285625f965SAjay Singh struct wilc_pmkid_attr {
295625f965SAjay Singh 	u8 numpmkid;
305625f965SAjay Singh 	struct wilc_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
315625f965SAjay Singh } __packed;
325625f965SAjay Singh 
335625f965SAjay Singh struct wilc_reg_frame {
345625f965SAjay Singh 	u8 reg;
355625f965SAjay Singh 	u8 reg_id;
365625f965SAjay Singh 	__le16 frame_type;
375625f965SAjay Singh } __packed;
385625f965SAjay Singh 
395625f965SAjay Singh struct wilc_drv_handler {
405625f965SAjay Singh 	__le32 handler;
415625f965SAjay Singh 	u8 mode;
425625f965SAjay Singh } __packed;
435625f965SAjay Singh 
445625f965SAjay Singh struct wilc_sta_wpa_ptk {
455625f965SAjay Singh 	u8 mac_addr[ETH_ALEN];
465625f965SAjay Singh 	u8 key_len;
47098238e8STian Tao 	u8 key[];
485625f965SAjay Singh } __packed;
495625f965SAjay Singh 
505625f965SAjay Singh struct wilc_ap_wpa_ptk {
515625f965SAjay Singh 	u8 mac_addr[ETH_ALEN];
525625f965SAjay Singh 	u8 index;
535625f965SAjay Singh 	u8 key_len;
54098238e8STian Tao 	u8 key[];
555625f965SAjay Singh } __packed;
565625f965SAjay Singh 
57*0e703de3SAjay Singh struct wilc_wpa_igtk {
58*0e703de3SAjay Singh 	u8 index;
59*0e703de3SAjay Singh 	u8 pn_len;
60*0e703de3SAjay Singh 	u8 pn[6];
61*0e703de3SAjay Singh 	u8 key_len;
62*0e703de3SAjay Singh 	u8 key[];
63*0e703de3SAjay Singh } __packed;
64*0e703de3SAjay Singh 
655625f965SAjay Singh struct wilc_gtk_key {
665625f965SAjay Singh 	u8 mac_addr[ETH_ALEN];
675625f965SAjay Singh 	u8 rsc[8];
685625f965SAjay Singh 	u8 index;
695625f965SAjay Singh 	u8 key_len;
70098238e8STian Tao 	u8 key[];
715625f965SAjay Singh } __packed;
725625f965SAjay Singh 
735625f965SAjay Singh struct wilc_op_mode {
745625f965SAjay Singh 	__le32 mode;
755625f965SAjay Singh } __packed;
765625f965SAjay Singh 
775625f965SAjay Singh struct wilc_noa_opp_enable {
785625f965SAjay Singh 	u8 ct_window;
795625f965SAjay Singh 	u8 cnt;
805625f965SAjay Singh 	__le32 duration;
815625f965SAjay Singh 	__le32 interval;
825625f965SAjay Singh 	__le32 start_time;
835625f965SAjay Singh } __packed;
845625f965SAjay Singh 
855625f965SAjay Singh struct wilc_noa_opp_disable {
865625f965SAjay Singh 	u8 cnt;
875625f965SAjay Singh 	__le32 duration;
885625f965SAjay Singh 	__le32 interval;
895625f965SAjay Singh 	__le32 start_time;
905625f965SAjay Singh } __packed;
915625f965SAjay Singh 
925625f965SAjay Singh struct wilc_join_bss_param {
935625f965SAjay Singh 	char ssid[IEEE80211_MAX_SSID_LEN];
945625f965SAjay Singh 	u8 ssid_terminator;
955625f965SAjay Singh 	u8 bss_type;
965625f965SAjay Singh 	u8 ch;
975625f965SAjay Singh 	__le16 cap_info;
985625f965SAjay Singh 	u8 sa[ETH_ALEN];
995625f965SAjay Singh 	u8 bssid[ETH_ALEN];
1005625f965SAjay Singh 	__le16 beacon_period;
1015625f965SAjay Singh 	u8 dtim_period;
1025625f965SAjay Singh 	u8 supp_rates[WILC_MAX_RATES_SUPPORTED + 1];
1035625f965SAjay Singh 	u8 wmm_cap;
1045625f965SAjay Singh 	u8 uapsd_cap;
1055625f965SAjay Singh 	u8 ht_capable;
1065625f965SAjay Singh 	u8 rsn_found;
1075625f965SAjay Singh 	u8 rsn_grp_policy;
1085625f965SAjay Singh 	u8 mode_802_11i;
1095625f965SAjay Singh 	u8 p_suites[3];
1105625f965SAjay Singh 	u8 akm_suites[3];
1115625f965SAjay Singh 	u8 rsn_cap[2];
1125625f965SAjay Singh 	u8 noa_enabled;
1135625f965SAjay Singh 	__le32 tsf_lo;
1145625f965SAjay Singh 	u8 idx;
1155625f965SAjay Singh 	u8 opp_enabled;
1165625f965SAjay Singh 	union {
1175625f965SAjay Singh 		struct wilc_noa_opp_disable opp_dis;
1185625f965SAjay Singh 		struct wilc_noa_opp_enable opp_en;
1195625f965SAjay Singh 	};
1205625f965SAjay Singh } __packed;
121c5b331d4SAjay Singh 
122c5b331d4SAjay Singh struct wilc_external_auth_param {
123c5b331d4SAjay Singh 	u8 action;
124c5b331d4SAjay Singh 	u8 bssid[ETH_ALEN];
125c5b331d4SAjay Singh 	u8 ssid[IEEE80211_MAX_SSID_LEN];
126c5b331d4SAjay Singh 	u8 ssid_len;
127c5b331d4SAjay Singh 	__le32 key_mgmt_suites;
128c5b331d4SAjay Singh 	__le16 status;
129c5b331d4SAjay Singh } __packed;
1305625f965SAjay Singh #endif
131