#ifndef __CMD_H__
#define __CMD_H__
#include "wlcore.h"
struct acx_header;
int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
size_t res_len);
int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type,
u8 *role_id);
int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id);
int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif,
enum nl80211_band band, int channel);
int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer);
int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf,
size_t cmd_len, size_t res_len);
int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len);
int wlcore_cmd_configure_failsafe(struct wl1271 *wl, u16 id, void *buf,
size_t len, unsigned long valid_rets);
int wl1271_cmd_data_path(struct wl1271 *wl, bool enable);
int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 ps_mode, u16 auto_ps_timeout);
int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
size_t len);
int wl1271_cmd_template_set(struct wl1271 *wl, u8 role_id,
u16 template_id, void *buf, size_t buf_len,
int index, u32 rates);
int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_cmd_build_ps_poll(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u16 aid);
int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 role_id, u8 band,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len, const u8 *common_ie,
size_t common_ie_len, bool sched_scan);
struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
struct sk_buff *skb);
int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif);
int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
struct wl12xx_vif *wlvif);
int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid);
int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u16 action, u8 id, u8 key_type,
u8 key_size, const u8 *key, const u8 *addr,
u32 tx_seq_32, u16 tx_seq_16);
int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u16 action, u8 id, u8 key_type,
u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32,
u16 tx_seq_16, bool is_pairwise);
int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 hlid);
int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id,
enum nl80211_band band, u8 channel);
int wl12xx_croc(struct wl1271 *wl, u8 role_id);
int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
struct ieee80211_sta *sta, u8 hlid);
int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 hlid);
void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel,
enum nl80211_band band);
int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl);
int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 feature, u8 enable, u8 value);
int wl12xx_cmd_config_fwlog(struct wl1271 *wl);
int wl12xx_cmd_start_fwlog(struct wl1271 *wl);
int wl12xx_cmd_stop_fwlog(struct wl1271 *wl);
int wl12xx_cmd_channel_switch(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
struct ieee80211_channel_switch *ch_switch);
int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl,
struct wl12xx_vif *wlvif);
int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 *hlid);
void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid);
int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
u32 mask, bool *timeout);
u8 wlcore_get_native_channel_type(u8 nl_channel_type);
enum wl1271_commands { … };
#define MAX_CMD_PARAMS …
enum cmd_templ { … };
#define WL1271_COMMAND_TIMEOUT …
#define WL1271_CMD_TEMPL_DFLT_SIZE …
#define WL1271_CMD_TEMPL_MAX_SIZE …
#define WL1271_EVENT_TIMEOUT …
struct wl1271_cmd_header { … } __packed;
#define WL1271_CMD_MAX_PARAMS …
struct wl1271_command { … } __packed;
enum { … };
#define CMDMBOX_HEADER_LEN …
#define CMDMBOX_INFO_ELEM_HEADER_LEN …
enum { … };
#define WL1271_JOIN_CMD_CTRL_TX_FLUSH …
#define WL1271_JOIN_CMD_TX_SESSION_OFFSET …
#define WL1271_JOIN_CMD_BSS_TYPE_5GHZ …
struct wl12xx_cmd_role_enable { … } __packed;
struct wl12xx_cmd_role_disable { … } __packed;
enum wlcore_band { … };
enum wlcore_channel_type { … };
struct wl12xx_cmd_role_start { … } __packed;
struct wl12xx_cmd_role_stop { … } __packed;
struct cmd_enabledisable_path { … } __packed;
#define WL1271_RATE_AUTOMATIC …
struct wl1271_cmd_template_set { … } __packed;
#define TIM_ELE_ID …
#define PARTIAL_VBM_MAX …
struct wl1271_tim { … } __packed;
enum wl1271_cmd_ps_mode { … };
struct wl1271_cmd_ps_params { … } __packed;
#define NUM_ACCESS_CATEGORIES_COPY …
enum wl1271_cmd_key_action { … };
enum wl1271_cmd_lid_key_type { … };
enum wl1271_cmd_key_type { … };
struct wl1271_cmd_set_keys { … } __packed;
struct wl1271_cmd_test_header { … } __packed;
enum wl1271_channel_tune_bands { … };
#define WL1271_PD_REFERENCE_POINT_BAND_B_G …
enum wl1271_disconnect_type { … };
#define WL1271_CMD_STA_STATE_CONNECTED …
struct wl12xx_cmd_set_peer_state { … } __packed;
struct wl12xx_cmd_roc { … };
struct wl12xx_cmd_croc { … };
enum wl12xx_ssid_type { … };
enum wl1271_psd_type { … };
struct wl12xx_cmd_add_peer { … } __packed;
struct wl12xx_cmd_remove_peer { … } __packed;
enum wl12xx_fwlogger_log_mode { … };
enum wl12xx_fwlogger_timestamp { … };
enum wl12xx_fwlogger_output { … };
struct wl12xx_cmd_regdomain_dfs_config { … } __packed;
enum wlcore_generic_cfg_feature { … };
struct wlcore_cmd_generic_cfg { … } __packed;
struct wl12xx_cmd_config_fwlog { … } __packed;
struct wl12xx_cmd_start_fwlog { … } __packed;
struct wl12xx_cmd_stop_fwlog { … } __packed;
struct wl12xx_cmd_stop_channel_switch { … } __packed;
#define MAX_TLV_LENGTH …
#define TEST_CMD_P2G_CAL …
struct wl1271_cmd_cal_p2g { … } __packed;
#endif