linux/drivers/net/wireless/ath/ath9k/wmi.h

/*
 * Copyright (c) 2010-2011 Atheros Communications Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef WMI_H
#define WMI_H

struct wmi_event_txrate {} __packed;

struct wmi_cmd_hdr {} __packed;

struct wmi_fw_version {} __packed;

struct wmi_event_swba {} __packed;

/*
 * 64 - HTC header - WMI header - 1 / txstatus
 * And some other hdr. space is also accounted for.
 * 12 seems to be the magic number.
 */
#define HTC_MAX_TX_STATUS

#define ATH9K_HTC_TXSTAT_ACK
#define ATH9K_HTC_TXSTAT_FILT
#define ATH9K_HTC_TXSTAT_RTC_CTS
#define ATH9K_HTC_TXSTAT_MCS
#define ATH9K_HTC_TXSTAT_CW40
#define ATH9K_HTC_TXSTAT_SGI

/*
 * Legacy rates are indicated as indices.
 * HT rates are indicated as dot11 numbers.
 * This allows us to resrict the rate field
 * to 4 bits.
 */
#define ATH9K_HTC_TXSTAT_RATE
#define ATH9K_HTC_TXSTAT_RATE_S

#define ATH9K_HTC_TXSTAT_EPID
#define ATH9K_HTC_TXSTAT_EPID_S

struct __wmi_event_txstatus {};

struct wmi_event_txstatus {} __packed;

enum wmi_cmd_id {};

enum wmi_event_id {};

#define MAX_CMD_NUMBER
#define MAX_RMW_CMD_NUMBER

struct register_write {};

struct register_rmw {} __packed;

struct ath9k_htc_tx_event {};

struct wmi {};

struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv);
int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,
		      enum htc_endpoint_id *wmi_ctrl_epid);
int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
		  u8 *cmd_buf, u32 cmd_len,
		  u8 *rsp_buf, u32 rsp_len,
		  u32 timeout);
void ath9k_wmi_event_tasklet(struct tasklet_struct *t);
void ath9k_fatal_work(struct work_struct *work);
void ath9k_wmi_event_drain(struct ath9k_htc_priv *priv);
void ath9k_stop_wmi(struct ath9k_htc_priv *priv);
void ath9k_destroy_wmi(struct ath9k_htc_priv *priv);

#define WMI_CMD(_wmi_cmd)

#define WMI_CMD_BUF(_wmi_cmd, _buf)

#endif /* WMI_H */