162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries.
462306a36Sopenharmony_ci * All rights reserved.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef WILC_WLAN_CFG_H
862306a36Sopenharmony_ci#define WILC_WLAN_CFG_H
962306a36Sopenharmony_ci
1062306a36Sopenharmony_cistruct wilc_cfg_byte {
1162306a36Sopenharmony_ci	u16 id;
1262306a36Sopenharmony_ci	u8 val;
1362306a36Sopenharmony_ci};
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistruct wilc_cfg_hword {
1662306a36Sopenharmony_ci	u16 id;
1762306a36Sopenharmony_ci	u16 val;
1862306a36Sopenharmony_ci};
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_cistruct wilc_cfg_word {
2162306a36Sopenharmony_ci	u16 id;
2262306a36Sopenharmony_ci	u32 val;
2362306a36Sopenharmony_ci};
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_cistruct wilc_cfg_str {
2662306a36Sopenharmony_ci	u16 id;
2762306a36Sopenharmony_ci	u8 *str;
2862306a36Sopenharmony_ci};
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_cistruct wilc_cfg_str_vals {
3162306a36Sopenharmony_ci	u8 mac_address[7];
3262306a36Sopenharmony_ci	u8 firmware_version[129];
3362306a36Sopenharmony_ci	u8 assoc_rsp[WILC_MAX_ASSOC_RESP_FRAME_SIZE];
3462306a36Sopenharmony_ci};
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_cistruct wilc_cfg {
3762306a36Sopenharmony_ci	struct wilc_cfg_byte *b;
3862306a36Sopenharmony_ci	struct wilc_cfg_hword *hw;
3962306a36Sopenharmony_ci	struct wilc_cfg_word *w;
4062306a36Sopenharmony_ci	struct wilc_cfg_str *s;
4162306a36Sopenharmony_ci	struct wilc_cfg_str_vals *str_vals;
4262306a36Sopenharmony_ci};
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_cistruct wilc;
4562306a36Sopenharmony_ciint wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size);
4662306a36Sopenharmony_ciint wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id);
4762306a36Sopenharmony_ciint wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer,
4862306a36Sopenharmony_ci			  u32 buffer_size);
4962306a36Sopenharmony_civoid wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
5062306a36Sopenharmony_ci			       struct wilc_cfg_rsp *rsp);
5162306a36Sopenharmony_ciint wilc_wlan_cfg_init(struct wilc *wl);
5262306a36Sopenharmony_civoid wilc_wlan_cfg_deinit(struct wilc *wl);
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#endif
55