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_WLAN_CFG_H 85625f965SAjay Singh #define WILC_WLAN_CFG_H 95625f965SAjay Singh 105625f965SAjay Singh struct wilc_cfg_byte { 115625f965SAjay Singh u16 id; 125625f965SAjay Singh u8 val; 135625f965SAjay Singh }; 145625f965SAjay Singh 155625f965SAjay Singh struct wilc_cfg_hword { 165625f965SAjay Singh u16 id; 175625f965SAjay Singh u16 val; 185625f965SAjay Singh }; 195625f965SAjay Singh 205625f965SAjay Singh struct wilc_cfg_word { 215625f965SAjay Singh u16 id; 225625f965SAjay Singh u32 val; 235625f965SAjay Singh }; 245625f965SAjay Singh 255625f965SAjay Singh struct wilc_cfg_str { 265625f965SAjay Singh u16 id; 275625f965SAjay Singh u8 *str; 285625f965SAjay Singh }; 295625f965SAjay Singh 305625f965SAjay Singh struct wilc_cfg_str_vals { 315625f965SAjay Singh u8 mac_address[7]; 325625f965SAjay Singh u8 firmware_version[129]; 33*7acd6950SAmisha Patel u8 assoc_rsp[WILC_MAX_ASSOC_RESP_FRAME_SIZE]; 345625f965SAjay Singh }; 355625f965SAjay Singh 365625f965SAjay Singh struct wilc_cfg { 375625f965SAjay Singh struct wilc_cfg_byte *b; 385625f965SAjay Singh struct wilc_cfg_hword *hw; 395625f965SAjay Singh struct wilc_cfg_word *w; 405625f965SAjay Singh struct wilc_cfg_str *s; 415625f965SAjay Singh struct wilc_cfg_str_vals *str_vals; 425625f965SAjay Singh }; 435625f965SAjay Singh 445625f965SAjay Singh struct wilc; 455625f965SAjay Singh int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size); 465625f965SAjay Singh int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id); 475625f965SAjay Singh int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer, 485625f965SAjay Singh u32 buffer_size); 495625f965SAjay Singh void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size, 505625f965SAjay Singh struct wilc_cfg_rsp *rsp); 515625f965SAjay Singh int wilc_wlan_cfg_init(struct wilc *wl); 525625f965SAjay Singh void wilc_wlan_cfg_deinit(struct wilc *wl); 535625f965SAjay Singh 545625f965SAjay Singh #endif 55