Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
htc_hst.h File Reference

Go to the source code of this file.

Data Structures

struct  ath9k_htc_hif
 
struct  htc_frame_hdr
 
struct  htc_ready_msg
 
struct  htc_config_pipe_msg
 
struct  htc_ep_callbacks
 
struct  htc_endpoint
 
struct  htc_target
 
struct  htc_service_connreq
 
struct  htc_conn_svc_msg
 
struct  htc_conn_svc_rspmsg
 
struct  htc_comp_msg
 

Macros

#define HTC_FLAGS_RECV_TRAILER   (1 << 1)
 
#define HTC_MAX_CONTROL_MESSAGE_LENGTH   255
 
#define HTC_CONTROL_BUFFER_SIZE   (HTC_MAX_CONTROL_MESSAGE_LENGTH + sizeof(struct htc_frame_hdr))
 
#define HTC_OP_START_WAIT   BIT(0)
 
#define HTC_OP_CONFIG_PIPE_CREDITS   BIT(1)
 
#define MAKE_SERVICE_ID(group, index)   (int)(((int)group << 8) | (int)(index))
 
#define HTC_CTRL_RSVD_SVC   MAKE_SERVICE_ID(RSVD_SERVICE_GROUP, 1)
 
#define HTC_LOOPBACK_RSVD_SVC   MAKE_SERVICE_ID(RSVD_SERVICE_GROUP, 2)
 
#define WMI_CONTROL_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 0)
 
#define WMI_BEACON_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 1)
 
#define WMI_CAB_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 2)
 
#define WMI_UAPSD_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 3)
 
#define WMI_MGMT_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 4)
 
#define WMI_DATA_VO_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 5)
 
#define WMI_DATA_VI_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 6)
 
#define WMI_DATA_BE_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 7)
 
#define WMI_DATA_BK_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 8)
 
#define HTC_SERVICE_SUCCESS   0
 
#define HTC_SERVICE_NOT_FOUND   1
 
#define HTC_SERVICE_FAILED   2
 
#define HTC_SERVICE_NO_RESOURCES   3
 
#define HTC_SERVICE_NO_MORE_EP   4
 

Enumerations

enum  ath9k_hif_transports { ATH9K_HIF_USB }
 
enum  htc_endpoint_id {
  ENDPOINT_UNUSED = -1, ENDPOINT_0 = 0, ENDPOINT_1 = 1, ENDPOINT_2 = 2,
  ENDPOINT_3, ENDPOINT_4, ENDPOINT_5, ENDPOINT_6,
  ENDPOINT_7, ENDPOINT_8, ENDPOINT_MAX, ENDPOINT_UNUSED = -1,
  ENDPOINT0 = 0, ENDPOINT1 = 1, ENDPOINT2 = 2, ENDPOINT3 = 3,
  ENDPOINT4 = 4, ENDPOINT5 = 5, ENDPOINT6 = 6, ENDPOINT7 = 7,
  ENDPOINT8 = 8, ENDPOINT_MAX = 22
}
 
enum  htc_msg_id {
  HTC_MSG_READY_ID = 1, HTC_MSG_CONNECT_SERVICE_ID, HTC_MSG_CONNECT_SERVICE_RESPONSE_ID, HTC_MSG_SETUP_COMPLETE_ID,
  HTC_MSG_CONFIG_PIPE_ID, HTC_MSG_CONFIG_PIPE_RESPONSE_ID
}
 
enum  htc_service_group_ids { RSVD_SERVICE_GROUP = 0, WMI_SERVICE_GROUP = 1, HTC_SERVICE_GROUP_LAST = 255 }
 

Functions

int htc_init (struct htc_target *target)
 
int htc_connect_service (struct htc_target *target, struct htc_service_connreq *service_connreq, enum htc_endpoint_id *conn_rsp_eid)
 
int htc_send (struct htc_target *target, struct sk_buff *skb)
 
int htc_send_epid (struct htc_target *target, struct sk_buff *skb, enum htc_endpoint_id epid)
 
void htc_stop (struct htc_target *target)
 
void htc_start (struct htc_target *target)
 
void htc_sta_drain (struct htc_target *target, u8 idx)
 
void ath9k_htc_rx_msg (struct htc_target *htc_handle, struct sk_buff *skb, u32 len, u8 pipe_id)
 
void ath9k_htc_txcompletion_cb (struct htc_target *htc_handle, struct sk_buff *skb, bool txok)
 
struct htc_targetath9k_htc_hw_alloc (void *hif_handle, struct ath9k_htc_hif *hif, struct device *dev)
 
void ath9k_htc_hw_free (struct htc_target *htc)
 
int ath9k_htc_hw_init (struct htc_target *target, struct device *dev, u16 devid, char *product, u32 drv_info)
 
void ath9k_htc_hw_deinit (struct htc_target *target, bool hot_unplug)
 

Variables

struct htc_frame_hdr __packed
 

Macro Definition Documentation

#define HTC_CONTROL_BUFFER_SIZE   (HTC_MAX_CONTROL_MESSAGE_LENGTH + sizeof(struct htc_frame_hdr))

Definition at line 98 of file htc_hst.h.

#define HTC_CTRL_RSVD_SVC   MAKE_SERVICE_ID(RSVD_SERVICE_GROUP, 1)

Definition at line 149 of file htc_hst.h.

#define HTC_FLAGS_RECV_TRAILER   (1 << 1)

Definition at line 57 of file htc_hst.h.

#define HTC_LOOPBACK_RSVD_SVC   MAKE_SERVICE_ID(RSVD_SERVICE_GROUP, 2)

Definition at line 150 of file htc_hst.h.

#define HTC_MAX_CONTROL_MESSAGE_LENGTH   255

Definition at line 97 of file htc_hst.h.

#define HTC_OP_CONFIG_PIPE_CREDITS   BIT(1)

Definition at line 102 of file htc_hst.h.

#define HTC_OP_START_WAIT   BIT(0)

Definition at line 101 of file htc_hst.h.

#define HTC_SERVICE_FAILED   2

Definition at line 175 of file htc_hst.h.

#define HTC_SERVICE_NO_MORE_EP   4

Definition at line 177 of file htc_hst.h.

#define HTC_SERVICE_NO_RESOURCES   3

Definition at line 176 of file htc_hst.h.

#define HTC_SERVICE_NOT_FOUND   1

Definition at line 174 of file htc_hst.h.

#define HTC_SERVICE_SUCCESS   0

Definition at line 173 of file htc_hst.h.

#define MAKE_SERVICE_ID (   group,
  index 
)    (int)(((int)group << 8) | (int)(index))

Definition at line 145 of file htc_hst.h.

#define WMI_BEACON_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 1)

Definition at line 153 of file htc_hst.h.

#define WMI_CAB_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 2)

Definition at line 154 of file htc_hst.h.

#define WMI_CONTROL_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 0)

Definition at line 152 of file htc_hst.h.

#define WMI_DATA_BE_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 7)

Definition at line 159 of file htc_hst.h.

#define WMI_DATA_BK_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 8)

Definition at line 160 of file htc_hst.h.

#define WMI_DATA_VI_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 6)

Definition at line 158 of file htc_hst.h.

#define WMI_DATA_VO_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 5)

Definition at line 157 of file htc_hst.h.

#define WMI_MGMT_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 4)

Definition at line 156 of file htc_hst.h.

#define WMI_UAPSD_SVC   MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 3)

Definition at line 155 of file htc_hst.h.

Enumeration Type Documentation

Enumerator:
ATH9K_HIF_USB 

Definition at line 24 of file htc_hst.h.

Enumerator:
ENDPOINT_UNUSED 
ENDPOINT_0 
ENDPOINT_1 
ENDPOINT_2 
ENDPOINT_3 
ENDPOINT_4 
ENDPOINT_5 
ENDPOINT_6 
ENDPOINT_7 
ENDPOINT_8 
ENDPOINT_MAX 
ENDPOINT_UNUSED 
ENDPOINT0 
ENDPOINT1 
ENDPOINT2 
ENDPOINT3 
ENDPOINT4 
ENDPOINT5 
ENDPOINT6 
ENDPOINT7 
ENDPOINT8 
ENDPOINT_MAX 

Definition at line 42 of file htc_hst.h.

enum htc_msg_id
Enumerator:
HTC_MSG_READY_ID 
HTC_MSG_CONNECT_SERVICE_ID 
HTC_MSG_CONNECT_SERVICE_RESPONSE_ID 
HTC_MSG_SETUP_COMPLETE_ID 
HTC_MSG_CONFIG_PIPE_ID 
HTC_MSG_CONFIG_PIPE_RESPONSE_ID 

Definition at line 120 of file htc_hst.h.

Enumerator:
RSVD_SERVICE_GROUP 
WMI_SERVICE_GROUP 
HTC_SERVICE_GROUP_LAST 

Definition at line 138 of file htc_hst.h.

Function Documentation

struct htc_target* ath9k_htc_hw_alloc ( void hif_handle,
struct ath9k_htc_hif hif,
struct device dev 
)
read

Definition at line 428 of file htc_hst.c.

void ath9k_htc_hw_deinit ( struct htc_target target,
bool  hot_unplug 
)

Definition at line 473 of file htc_hst.c.

void ath9k_htc_hw_free ( struct htc_target htc)

Definition at line 456 of file htc_hst.c.

int ath9k_htc_hw_init ( struct htc_target target,
struct device dev,
u16  devid,
char product,
u32  drv_info 
)

Definition at line 461 of file htc_hst.c.

void ath9k_htc_rx_msg ( struct htc_target htc_handle,
struct sk_buff skb,
u32  len,
u8  pipe_id 
)

Definition at line 366 of file htc_hst.c.

void ath9k_htc_txcompletion_cb ( struct htc_target htc_handle,
struct sk_buff skb,
bool  txok 
)

Definition at line 320 of file htc_hst.c.

int htc_connect_service ( struct htc_target target,
struct htc_service_connreq service_connreq,
enum htc_endpoint_id conn_rsp_eid 
)

Definition at line 232 of file htc_hst.c.

int htc_init ( struct htc_target target)

Definition at line 221 of file htc_hst.c.

int htc_send ( struct htc_target target,
struct sk_buff skb 
)

Definition at line 291 of file htc_hst.c.

int htc_send_epid ( struct htc_target target,
struct sk_buff skb,
enum htc_endpoint_id  epid 
)

Definition at line 299 of file htc_hst.c.

void htc_sta_drain ( struct htc_target target,
u8  idx 
)

Definition at line 315 of file htc_hst.c.

void htc_start ( struct htc_target target)

Definition at line 310 of file htc_hst.c.

void htc_stop ( struct htc_target target)

Definition at line 305 of file htc_hst.c.

Variable Documentation