1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries. 4 * All rights reserved. 5 */ 6 7 #ifndef WILC_FW_H 8 #define WILC_FW_H 9 10 #include <linux/ieee80211.h> 11 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 17 struct wilc_assoc_resp { 18 __le16 capab_info; 19 __le16 status_code; 20 __le16 aid; 21 } __packed; 22 23 struct wilc_pmkid { 24 u8 bssid[ETH_ALEN]; 25 u8 pmkid[WLAN_PMKID_LEN]; 26 } __packed; 27 28 struct wilc_pmkid_attr { 29 u8 numpmkid; 30 struct wilc_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; 31 } __packed; 32 33 struct wilc_reg_frame { 34 u8 reg; 35 u8 reg_id; 36 __le16 frame_type; 37 } __packed; 38 39 struct wilc_drv_handler { 40 __le32 handler; 41 u8 mode; 42 } __packed; 43 44 struct wilc_wep_key { 45 u8 index; 46 u8 key_len; 47 u8 key[]; 48 } __packed; 49 50 struct wilc_sta_wpa_ptk { 51 u8 mac_addr[ETH_ALEN]; 52 u8 key_len; 53 u8 key[]; 54 } __packed; 55 56 struct wilc_ap_wpa_ptk { 57 u8 mac_addr[ETH_ALEN]; 58 u8 index; 59 u8 key_len; 60 u8 key[]; 61 } __packed; 62 63 struct wilc_gtk_key { 64 u8 mac_addr[ETH_ALEN]; 65 u8 rsc[8]; 66 u8 index; 67 u8 key_len; 68 u8 key[]; 69 } __packed; 70 71 struct wilc_op_mode { 72 __le32 mode; 73 } __packed; 74 75 struct wilc_noa_opp_enable { 76 u8 ct_window; 77 u8 cnt; 78 __le32 duration; 79 __le32 interval; 80 __le32 start_time; 81 } __packed; 82 83 struct wilc_noa_opp_disable { 84 u8 cnt; 85 __le32 duration; 86 __le32 interval; 87 __le32 start_time; 88 } __packed; 89 90 struct wilc_join_bss_param { 91 char ssid[IEEE80211_MAX_SSID_LEN]; 92 u8 ssid_terminator; 93 u8 bss_type; 94 u8 ch; 95 __le16 cap_info; 96 u8 sa[ETH_ALEN]; 97 u8 bssid[ETH_ALEN]; 98 __le16 beacon_period; 99 u8 dtim_period; 100 u8 supp_rates[WILC_MAX_RATES_SUPPORTED + 1]; 101 u8 wmm_cap; 102 u8 uapsd_cap; 103 u8 ht_capable; 104 u8 rsn_found; 105 u8 rsn_grp_policy; 106 u8 mode_802_11i; 107 u8 p_suites[3]; 108 u8 akm_suites[3]; 109 u8 rsn_cap[2]; 110 u8 noa_enabled; 111 __le32 tsf_lo; 112 u8 idx; 113 u8 opp_enabled; 114 union { 115 struct wilc_noa_opp_disable opp_dis; 116 struct wilc_noa_opp_enable opp_en; 117 }; 118 } __packed; 119 #endif 120