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_sta_wpa_ptk { 45 u8 mac_addr[ETH_ALEN]; 46 u8 key_len; 47 u8 key[]; 48 } __packed; 49 50 struct wilc_ap_wpa_ptk { 51 u8 mac_addr[ETH_ALEN]; 52 u8 index; 53 u8 key_len; 54 u8 key[]; 55 } __packed; 56 57 struct wilc_wpa_igtk { 58 u8 index; 59 u8 pn_len; 60 u8 pn[6]; 61 u8 key_len; 62 u8 key[]; 63 } __packed; 64 65 struct wilc_gtk_key { 66 u8 mac_addr[ETH_ALEN]; 67 u8 rsc[8]; 68 u8 index; 69 u8 key_len; 70 u8 key[]; 71 } __packed; 72 73 struct wilc_op_mode { 74 __le32 mode; 75 } __packed; 76 77 struct wilc_noa_opp_enable { 78 u8 ct_window; 79 u8 cnt; 80 __le32 duration; 81 __le32 interval; 82 __le32 start_time; 83 } __packed; 84 85 struct wilc_noa_opp_disable { 86 u8 cnt; 87 __le32 duration; 88 __le32 interval; 89 __le32 start_time; 90 } __packed; 91 92 struct wilc_join_bss_param { 93 char ssid[IEEE80211_MAX_SSID_LEN]; 94 u8 ssid_terminator; 95 u8 bss_type; 96 u8 ch; 97 __le16 cap_info; 98 u8 sa[ETH_ALEN]; 99 u8 bssid[ETH_ALEN]; 100 __le16 beacon_period; 101 u8 dtim_period; 102 u8 supp_rates[WILC_MAX_RATES_SUPPORTED + 1]; 103 u8 wmm_cap; 104 u8 uapsd_cap; 105 u8 ht_capable; 106 u8 rsn_found; 107 u8 rsn_grp_policy; 108 u8 mode_802_11i; 109 u8 p_suites[3]; 110 u8 akm_suites[3]; 111 u8 rsn_cap[2]; 112 u8 noa_enabled; 113 __le32 tsf_lo; 114 u8 idx; 115 u8 opp_enabled; 116 union { 117 struct wilc_noa_opp_disable opp_dis; 118 struct wilc_noa_opp_enable opp_en; 119 }; 120 } __packed; 121 122 struct wilc_external_auth_param { 123 u8 action; 124 u8 bssid[ETH_ALEN]; 125 u8 ssid[IEEE80211_MAX_SSID_LEN]; 126 u8 ssid_len; 127 __le32 key_mgmt_suites; 128 __le16 status; 129 } __packed; 130 #endif 131