/******************************************************************************
 *
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * GPL LICENSE SUMMARY
 *
 * Copyright(c) 2007 - 2011 Intel Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * 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; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
 * USA
 *
 * The full GNU General Public License is included in this distribution
 * in the file called LICENSE.GPL.
 *
 * Contact Information:
 *  Intel Linux Wireless <ilw@linux.intel.com>
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 *
 * BSD LICENSE
 *
 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name Intel Corporation nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/
#ifndef __iwl_trans_h__
#define __iwl_trans_h__

#include <linux/debugfs.h>
#include <linux/skbuff.h>

#include "iwl-shared.h"
#include "iwl-commands.h"

 /*This file includes the declaration that are exported from the transport
 * layer */

struct iwl_priv;
struct iwl_rxon_context;
struct iwl_host_cmd;
struct iwl_shared;
struct iwl_device_cmd;

/**
 * struct iwl_trans_ops - transport specific operations
 * @alloc: allocates the meta data (not the queues themselves)
 * @request_irq: requests IRQ - will be called before the FW load in probe flow
 * @start_device: allocates and inits all the resources for the transport
 *                layer.
 * @prepare_card_hw: claim the ownership on the HW. Will be called during
 *                   probe.
 * @tx_start: starts and configures all the Tx fifo - usually done once the fw
 *           is alive.
 * @wake_any_queue: wake all the queues of a specfic context IWL_RXON_CTX_*
 * @stop_device:stops the whole device (embedded CPU put to reset)
 * @send_cmd:send a host command
 * @send_cmd_pdu:send a host command: flags can be CMD_*
 * @tx: send an skb
 * @reclaim: free packet until ssn. Returns a list of freed packets.
 * @txq_agg_setup: setup a tx queue for AMPDU - will be called once the HW is
 *                 ready and a successful ADDBA response has been received.
 * @txq_agg_disable: de-configure a Tx queue to send AMPDUs
 * @kick_nic: remove the RESET from the embedded CPU and let it run
 * @free: release all the ressource for the transport layer itself such as
 *        irq, tasklet etc...
 * @dbgfs_register: add the dbgfs files under this directory. Files will be
 *	automatically deleted.
 * @suspend: stop the device unless WoWLAN is configured
 * @resume: resume activity of the device
 */
struct iwl_trans_ops {

	struct iwl_trans *(*alloc)(struct iwl_shared *shrd);
	int (*request_irq)(struct iwl_trans *iwl_trans);
	int (*start_device)(struct iwl_trans *trans);
	int (*prepare_card_hw)(struct iwl_trans *trans);
	void (*stop_device)(struct iwl_trans *trans);
	void (*tx_start)(struct iwl_trans *trans);

	void (*wake_any_queue)(struct iwl_trans *trans, u8 ctx);

	int (*send_cmd)(struct iwl_trans *trans, struct iwl_host_cmd *cmd);

	int (*send_cmd_pdu)(struct iwl_trans *trans, u8 id, u32 flags, u16 len,
		     const void *data);
	int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
		struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id);
	void (*reclaim)(struct iwl_trans *trans, int txq_id, int ssn,
			u32 status, struct sk_buff_head *skbs);

	int (*txq_agg_disable)(struct iwl_priv *priv, u16 txq_id);
	void (*txq_agg_setup)(struct iwl_priv *priv,
			      enum iwl_rxon_context_id ctx, int sta_id,
			      int tid, int frame_limit);

	void (*kick_nic)(struct iwl_trans *trans);

	void (*free)(struct iwl_trans *trans);

	int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir);
	int (*suspend)(struct iwl_trans *trans);
	int (*resume)(struct iwl_trans *trans);
};

/**
 * struct iwl_trans - transport common data
 * @ops - pointer to iwl_trans_ops
 * @shrd - pointer to iwl_shared which holds shared data from the upper layer
 * @hcmd_lock: protects HCMD
 */
struct iwl_trans {
	const struct iwl_trans_ops *ops;
	struct iwl_shared *shrd;
	spinlock_t hcmd_lock;

	/* pointer to trans specific struct */
	/*Ensure that this pointer will always be aligned to sizeof pointer */
	char trans_specific[0] __attribute__((__aligned__(sizeof(void *))));
};

static inline int iwl_trans_request_irq(struct iwl_trans *trans)
{
	return trans->ops->request_irq(trans);
}

static inline int iwl_trans_start_device(struct iwl_trans *trans)
{
	return trans->ops->start_device(trans);
}

static inline int iwl_trans_prepare_card_hw(struct iwl_trans *trans)
{
	return trans->ops->prepare_card_hw(trans);
}

static inline void iwl_trans_stop_device(struct iwl_trans *trans)
{
	trans->ops->stop_device(trans);
}

static inline void iwl_trans_tx_start(struct iwl_trans *trans)
{
	trans->ops->tx_start(trans);
}

static inline void iwl_trans_wake_any_queue(struct iwl_trans *trans, u8 ctx)
{
	trans->ops->wake_any_queue(trans, ctx);
}


static inline int iwl_trans_send_cmd(struct iwl_trans *trans,
				struct iwl_host_cmd *cmd)
{
	return trans->ops->send_cmd(trans, cmd);
}

static inline int iwl_trans_send_cmd_pdu(struct iwl_trans *trans, u8 id,
					u32 flags, u16 len, const void *data)
{
	return trans->ops->send_cmd_pdu(trans, id, flags, len, data);
}

static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
		struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id)
{
	return trans->ops->tx(trans, skb, dev_cmd, ctx, sta_id);
}

static inline void iwl_trans_reclaim(struct iwl_trans *trans, int txq_id,
				 int ssn, u32 status,
				 struct sk_buff_head *skbs)
{
	trans->ops->reclaim(trans, txq_id, ssn, status, skbs);
}

static inline int iwl_trans_txq_agg_disable(struct iwl_trans *trans, u16 txq_id)
{
	return trans->ops->txq_agg_disable(priv(trans), txq_id);
}

static inline void iwl_trans_txq_agg_setup(struct iwl_trans *trans,
					   enum iwl_rxon_context_id ctx,
					   int sta_id, int tid,
					   int frame_limit)
{
	trans->ops->txq_agg_setup(priv(trans), ctx, sta_id, tid, frame_limit);
}

static inline void iwl_trans_kick_nic(struct iwl_trans *trans)
{
	trans->ops->kick_nic(trans);
}

static inline void iwl_trans_free(struct iwl_trans *trans)
{
	trans->ops->free(trans);
}

static inline int iwl_trans_dbgfs_register(struct iwl_trans *trans,
					    struct dentry *dir)
{
	return trans->ops->dbgfs_register(trans, dir);
}

static inline int iwl_trans_suspend(struct iwl_trans *trans)
{
	return trans->ops->suspend(trans);
}

static inline int iwl_trans_resume(struct iwl_trans *trans)
{
	return trans->ops->resume(trans);
}

/*****************************************************
* Transport layers implementations
******************************************************/
extern const struct iwl_trans_ops trans_ops_pcie;

#endif /* __iwl_trans_h__ */
