#include "core.h"
#include "hif.h"
#include "debug.h"
#include "hif-ops.h"
#include "trace.h"
#include <asm/unaligned.h>
#define CALC_TXRX_PADDED_LEN(dev, len) …
static void ath6kl_htc_mbox_cleanup(struct htc_target *target);
static void ath6kl_htc_mbox_stop(struct htc_target *target);
static int ath6kl_htc_mbox_add_rxbuf_multiple(struct htc_target *target,
struct list_head *pkt_queue);
static void ath6kl_htc_set_credit_dist(struct htc_target *target,
struct ath6kl_htc_credit_info *cred_info,
u16 svc_pri_order[], int len);
#define TX_RESUME_BUNDLE_THRESHOLD …
static void ath6kl_credit_deposit(struct ath6kl_htc_credit_info *cred_info,
struct htc_endpoint_credit_dist *ep_dist,
int credits)
{ … }
static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
struct list_head *ep_list,
int tot_credits)
{ … }
static int ath6kl_htc_mbox_credit_setup(struct htc_target *htc_target,
struct ath6kl_htc_credit_info *cred_info)
{ … }
static void ath6kl_credit_reduce(struct ath6kl_htc_credit_info *cred_info,
struct htc_endpoint_credit_dist *ep_dist,
int limit)
{ … }
static void ath6kl_credit_update(struct ath6kl_htc_credit_info *cred_info,
struct list_head *epdist_list)
{ … }
static void ath6kl_credit_seek(struct ath6kl_htc_credit_info *cred_info,
struct htc_endpoint_credit_dist *ep_dist)
{ … }
static void ath6kl_credit_redistribute(struct ath6kl_htc_credit_info *info,
struct list_head *ep_dist_list)
{ … }
static void ath6kl_credit_distribute(struct ath6kl_htc_credit_info *cred_info,
struct list_head *ep_dist_list,
enum htc_credit_dist_reason reason)
{ … }
static void ath6kl_htc_tx_buf_align(u8 **buf, unsigned long len)
{ … }
static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags,
int ctrl0, int ctrl1)
{ … }
static void htc_reclaim_txctrl_buf(struct htc_target *target,
struct htc_packet *pkt)
{ … }
static struct htc_packet *htc_get_control_buf(struct htc_target *target,
bool tx)
{ … }
static void htc_tx_comp_update(struct htc_target *target,
struct htc_endpoint *endpoint,
struct htc_packet *packet)
{ … }
static void htc_tx_complete(struct htc_endpoint *endpoint,
struct list_head *txq)
{ … }
static void htc_tx_comp_handler(struct htc_target *target,
struct htc_packet *packet)
{ … }
static void htc_async_tx_scat_complete(struct htc_target *target,
struct hif_scatter_req *scat_req)
{ … }
static int ath6kl_htc_tx_issue(struct htc_target *target,
struct htc_packet *packet)
{ … }
static int htc_check_credits(struct htc_target *target,
struct htc_endpoint *ep, u8 *flags,
enum htc_endpoint_id eid, unsigned int len,
int *req_cred)
{ … }
static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
struct htc_endpoint *endpoint,
struct list_head *queue)
{ … }
static int htc_get_credit_padding(unsigned int cred_sz, int *len,
struct htc_endpoint *ep)
{ … }
static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,
struct htc_endpoint *endpoint,
struct hif_scatter_req *scat_req,
int n_scat,
struct list_head *queue)
{ … }
static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
struct list_head *queue,
int *sent_bundle, int *n_bundle_pkts)
{ … }
static void ath6kl_htc_tx_from_queue(struct htc_target *target,
struct htc_endpoint *endpoint)
{ … }
static bool ath6kl_htc_tx_try(struct htc_target *target,
struct htc_endpoint *endpoint,
struct htc_packet *tx_pkt)
{ … }
static void htc_chk_ep_txq(struct htc_target *target)
{ … }
static int htc_setup_tx_complete(struct htc_target *target)
{ … }
static void ath6kl_htc_set_credit_dist(struct htc_target *target,
struct ath6kl_htc_credit_info *credit_info,
u16 srvc_pri_order[], int list_len)
{ … }
static int ath6kl_htc_mbox_tx(struct htc_target *target,
struct htc_packet *packet)
{ … }
static void ath6kl_htc_mbox_flush_txep(struct htc_target *target,
enum htc_endpoint_id eid, u16 tag)
{ … }
static void ath6kl_htc_flush_txep_all(struct htc_target *target)
{ … }
static void ath6kl_htc_mbox_activity_changed(struct htc_target *target,
enum htc_endpoint_id eid,
bool active)
{ … }
static inline void ath6kl_htc_rx_update_stats(struct htc_endpoint *endpoint,
int n_look_ahds)
{ … }
static inline bool htc_valid_rx_frame_len(struct htc_target *target,
enum htc_endpoint_id eid, int len)
{ … }
static int htc_add_rxbuf(struct htc_target *target, struct htc_packet *packet)
{ … }
static void htc_reclaim_rxbuf(struct htc_target *target,
struct htc_packet *packet,
struct htc_endpoint *ep)
{ … }
static void reclaim_rx_ctrl_buf(struct htc_target *target,
struct htc_packet *packet)
{ … }
static int ath6kl_htc_rx_packet(struct htc_target *target,
struct htc_packet *packet,
u32 rx_len)
{ … }
static void ath6kl_htc_rx_set_indicate(u32 lk_ahd,
struct htc_endpoint *endpoint,
struct htc_packet *packet)
{ … }
static void ath6kl_htc_rx_chk_water_mark(struct htc_endpoint *endpoint)
{ … }
static int ath6kl_htc_rx_setup(struct htc_target *target,
struct htc_endpoint *ep,
u32 *lk_ahds, struct list_head *queue, int n_msg)
{ … }
static int ath6kl_htc_rx_alloc(struct htc_target *target,
u32 lk_ahds[], int msg,
struct htc_endpoint *endpoint,
struct list_head *queue)
{ … }
static void htc_ctrl_rx(struct htc_target *context, struct htc_packet *packets)
{ … }
static void htc_proc_cred_rpt(struct htc_target *target,
struct htc_credit_report *rpt,
int n_entries,
enum htc_endpoint_id from_ep)
{ … }
static int htc_parse_trailer(struct htc_target *target,
struct htc_record_hdr *record,
u8 *record_buf, u32 *next_lk_ahds,
enum htc_endpoint_id endpoint,
int *n_lk_ahds)
{ … }
static int htc_proc_trailer(struct htc_target *target,
u8 *buf, int len, u32 *next_lk_ahds,
int *n_lk_ahds, enum htc_endpoint_id endpoint)
{ … }
static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
struct htc_packet *packet,
u32 *next_lkahds, int *n_lkahds)
{ … }
static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint,
struct htc_packet *packet)
{ … }
static int ath6kl_htc_rx_bundle(struct htc_target *target,
struct list_head *rxq,
struct list_head *sync_compq,
int *n_pkt_fetched, bool part_bundle)
{ … }
static int ath6kl_htc_rx_process_packets(struct htc_target *target,
struct list_head *comp_pktq,
u32 lk_ahds[],
int *n_lk_ahd)
{ … }
static int ath6kl_htc_rx_fetch(struct htc_target *target,
struct list_head *rx_pktq,
struct list_head *comp_pktq)
{ … }
int ath6kl_htc_rxmsg_pending_handler(struct htc_target *target,
u32 msg_look_ahead, int *num_pkts)
{ … }
static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
{ … }
static int ath6kl_htc_mbox_add_rxbuf_multiple(struct htc_target *target,
struct list_head *pkt_queue)
{ … }
static void ath6kl_htc_mbox_flush_rx_buf(struct htc_target *target)
{ … }
static int ath6kl_htc_mbox_conn_service(struct htc_target *target,
struct htc_service_connect_req *conn_req,
struct htc_service_connect_resp *conn_resp)
{ … }
static void reset_ep_state(struct htc_target *target)
{ … }
static int ath6kl_htc_mbox_get_rxbuf_num(struct htc_target *target,
enum htc_endpoint_id endpoint)
{ … }
static void htc_setup_msg_bndl(struct htc_target *target)
{ … }
static int ath6kl_htc_mbox_wait_target(struct htc_target *target)
{ … }
static int ath6kl_htc_mbox_start(struct htc_target *target)
{ … }
static int ath6kl_htc_reset(struct htc_target *target)
{ … }
static void ath6kl_htc_mbox_stop(struct htc_target *target)
{ … }
static void *ath6kl_htc_mbox_create(struct ath6kl *ar)
{ … }
static void ath6kl_htc_mbox_cleanup(struct htc_target *target)
{ … }
static const struct ath6kl_htc_ops ath6kl_htc_mbox_ops = …;
void ath6kl_htc_mbox_attach(struct ath6kl *ar)
{ … }