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_WLAN_CFG_H
8 #define WILC_WLAN_CFG_H
9 
10 struct wilc_cfg_byte {
11 	u16 id;
12 	u8 val;
13 };
14 
15 struct wilc_cfg_hword {
16 	u16 id;
17 	u16 val;
18 };
19 
20 struct wilc_cfg_word {
21 	u16 id;
22 	u32 val;
23 };
24 
25 struct wilc_cfg_str {
26 	u16 id;
27 	u8 *str;
28 };
29 
30 struct wilc_cfg_str_vals {
31 	u8 mac_address[7];
32 	u8 firmware_version[129];
33 	u8 assoc_rsp[256];
34 };
35 
36 struct wilc_cfg {
37 	struct wilc_cfg_byte *b;
38 	struct wilc_cfg_hword *hw;
39 	struct wilc_cfg_word *w;
40 	struct wilc_cfg_str *s;
41 	struct wilc_cfg_str_vals *str_vals;
42 };
43 
44 struct wilc;
45 int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size);
46 int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id);
47 int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer,
48 			  u32 buffer_size);
49 void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
50 			       struct wilc_cfg_rsp *rsp);
51 int wilc_wlan_cfg_init(struct wilc *wl);
52 void wilc_wlan_cfg_deinit(struct wilc *wl);
53 
54 #endif
55