linux/drivers/net/wireless/ath/carl9170/fwcmd.h

/*
 * Shared Atheros AR9170 Header
 *
 * Firmware command interface definitions
 *
 * Copyright 2008, Johannes Berg <[email protected]>
 * Copyright 2009-2011 Christian Lamparter <[email protected]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file COPYING.  If not, see
 * http://www.gnu.org/licenses/.
 *
 * This file incorporates work covered by the following copyright and
 * permission notice:
 *    Copyright (c) 2007-2008 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 __CARL9170_SHARED_FWCMD_H
#define __CARL9170_SHARED_FWCMD_H

#define CARL9170_MAX_CMD_LEN
#define CARL9170_MAX_CMD_PAYLOAD_LEN

#define CARL9170FW_API_MIN_VER
#define CARL9170FW_API_MAX_VER

enum carl9170_cmd_oids {};

struct carl9170_set_key_cmd {} __packed __aligned();
#define CARL9170_SET_KEY_CMD_SIZE

struct carl9170_disable_key_cmd {} __packed __aligned();
#define CARL9170_DISABLE_KEY_CMD_SIZE

struct carl9170_u32_list {} __packed;

struct carl9170_reg_list {} __packed;

struct carl9170_write_reg {} __packed;

struct carl9170_write_reg_byte {} __packed;

#define CARL9170FW_PHY_HT_ENABLE
#define CARL9170FW_PHY_HT_DYN2040
#define CARL9170FW_PHY_HT_EXT_CHAN_OFF
#define CARL9170FW_PHY_HT_EXT_CHAN_OFF_S

struct carl9170_rf_init {} __packed;
#define CARL9170_RF_INIT_SIZE

struct carl9170_rf_init_result {} __packed;
#define CARL9170_RF_INIT_RESULT_SIZE

#define CARL9170_PSM_SLEEP
#define CARL9170_PSM_SOFTWARE
#define CARL9170_PSM_WAKE
#define CARL9170_PSM_COUNTER
#define CARL9170_PSM_COUNTER_S

struct carl9170_psm {} __packed;
#define CARL9170_PSM_SIZE

/*
 * Note: If a bit in rx_filter is set, then it
 * means that the particular frames which matches
 * the condition are FILTERED/REMOVED/DISCARDED!
 * (This is can be a bit confusing, especially
 * because someone people think it's the exact
 * opposite way, so watch out!)
 */
struct carl9170_rx_filter_cmd {} __packed;
#define CARL9170_RX_FILTER_CMD_SIZE

#define CARL9170_RX_FILTER_BAD
#define CARL9170_RX_FILTER_OTHER_RA
#define CARL9170_RX_FILTER_DECRY_FAIL
#define CARL9170_RX_FILTER_CTL_OTHER
#define CARL9170_RX_FILTER_CTL_PSPOLL
#define CARL9170_RX_FILTER_CTL_BACKR
#define CARL9170_RX_FILTER_MGMT
#define CARL9170_RX_FILTER_DATA
#define CARL9170_RX_FILTER_EVERYTHING

struct carl9170_bcn_ctrl_cmd {} __packed;
#define CARL9170_BCN_CTRL_CMD_SIZE

#define CARL9170_BCN_CTRL_DRAIN
#define CARL9170_BCN_CTRL_CAB_TRIGGER

struct carl9170_wol_cmd {} __packed;

#define CARL9170_WOL_CMD_SIZE

#define CARL9170_WOL_DISCONNECT
#define CARL9170_WOL_MAGIC_PKT

struct carl9170_cmd_head {} __packed;

struct carl9170_cmd {} __packed __aligned();

#define CARL9170_TX_STATUS_QUEUE
#define CARL9170_TX_STATUS_QUEUE_S
#define CARL9170_TX_STATUS_RIX_S
#define CARL9170_TX_STATUS_RIX
#define CARL9170_TX_STATUS_TRIES_S
#define CARL9170_TX_STATUS_TRIES
#define CARL9170_TX_STATUS_SUCCESS

#ifdef __CARL9170FW__
/*
 * NOTE:
 * Both structs [carl9170_tx_status and _carl9170_tx_status]
 * need to be "bit for bit" in sync.
 */
struct carl9170_tx_status {
	/*
	 * Beware of compiler bugs in all gcc pre 4.4!
	 */

	u8 cookie;
	u8 queue:2;
	u8 rix:2;
	u8 tries:3;
	u8 success:1;
} __packed;
#endif /* __CARL9170FW__ */

struct _carl9170_tx_status {} __packed;
#define CARL9170_TX_STATUS_SIZE

#define CARL9170_RSP_TX_STATUS_NUM

#define CARL9170_TX_MAX_RATE_TRIES

#define CARL9170_TX_MAX_RATES
#define CARL9170_TX_MAX_RETRY_RATES
#define CARL9170_ERR_MAGIC
#define CARL9170_BUG_MAGIC

struct carl9170_gpio {} __packed;
#define CARL9170_GPIO_SIZE

struct carl9170_tsf_rsp {} __packed;
#define CARL9170_TSF_RSP_SIZE

struct carl9170_tally_rsp {} __packed;

struct carl9170_rsp {} __packed __aligned();

#endif /* __CARL9170_SHARED_FWCMD_H */