#define HIF_DEFAULT_IO_BLOCK_SIZE 128
/* set extended MBOX window information for SDIO interconnects */
-static INLINE void SetExtendedMboxWindowInfo(A_UINT16 Manfid, HIF_DEVICE_MBOX_INFO *pInfo)
+static INLINE void SetExtendedMboxWindowInfo(u16 Manfid, HIF_DEVICE_MBOX_INFO *pInfo)
{
switch (Manfid & MANUFACTURER_ID_AR6K_BASE_MASK) {
case MANUFACTURER_ID_AR6002_BASE :
do {
if (!device->is_suspend) {
A_UINT32 resp;
- A_UINT16 rca;
+ u16 rca;
A_UINT32 i;
int bit = fls(host->ocr_avail) - 1;
/* emulate the mmc_power_up(...) */
}
if (configLen >= sizeof(HIF_DEVICE_MBOX_INFO)) {
- SetExtendedMboxWindowInfo((A_UINT16)device->func->device,
+ SetExtendedMboxWindowInfo((u16)device->func->device,
(HIF_DEVICE_MBOX_INFO *)config);
}
#define FILL_COUNTING false
static void InitBuffers(bool Zero)
{
- A_UINT16 *pBuffer16 = (A_UINT16 *)g_Buffer;
+ u16 *pBuffer16 = (u16 *)g_Buffer;
int i;
/* fill buffer with 16 bit counting pattern or zeros */
for (i = 0; i < (TOTAL_BYTES / 2) ; i++) {
if (!Zero) {
- pBuffer16[i] = (A_UINT16)i;
+ pBuffer16[i] = (u16)i;
} else {
pBuffer16[i] = 0;
}
}
-static bool CheckOneBuffer(A_UINT16 *pBuffer16, int Length)
+static bool CheckOneBuffer(u16 *pBuffer16, int Length)
{
int i;
- A_UINT16 startCount;
+ u16 startCount;
bool success = true;
/* get the starting count */
/* scan the buffer and verify */
for (i = 0; i < (Length / 2) ; i++,startCount++) {
/* target will invert all the data */
- if ((A_UINT16)pBuffer16[i] != (A_UINT16)~startCount) {
+ if ((u16)pBuffer16[i] != (u16)~startCount) {
success = false;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Invalid Data Got:0x%X, Expecting:0x%X (offset:%d, total:%d) \n",
- pBuffer16[i], ((A_UINT16)~startCount), i, Length));
+ pBuffer16[i], ((u16)~startCount), i, Length));
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("0x%X 0x%X 0x%X 0x%X \n",
pBuffer16[i], pBuffer16[i + 1], pBuffer16[i + 2],pBuffer16[i+3]));
break;
/* scan the buffers and verify */
for (i = 0; i < BUFFER_PROC_LIST_DEPTH ; i++) {
- success = CheckOneBuffer((A_UINT16 *)checkList[i].pBuffer, checkList[i].length);
+ success = CheckOneBuffer((u16 *)checkList[i].pBuffer, checkList[i].length);
if (!success) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Buffer : 0x%X, Length:%d failed verify \n",
(A_UINT32)checkList[i].pBuffer, checkList[i].length));
}
/* find the end marker for the last buffer we will be sending */
-static A_UINT16 GetEndMarker(void)
+static u16 GetEndMarker(void)
{
u8 *pBuffer;
BUFFER_PROC_LIST checkList[BUFFER_PROC_LIST_DEPTH];
pBuffer = &(checkList[BUFFER_PROC_LIST_DEPTH - 1].pBuffer[(checkList[BUFFER_PROC_LIST_DEPTH - 1].length) - 2]);
/* the last count in the last buffer is the marker */
- return (A_UINT16)pBuffer[0] | ((A_UINT16)pBuffer[1] << 8);
+ return (u16)pBuffer[0] | ((u16)pBuffer[1] << 8);
}
#define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR
u8 params[4];
int numBufs;
int bufferSize;
- A_UINT16 temp;
+ u16 temp;
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest START - \n"));
}
numBufs = params[0];
- bufferSize = (int)(((A_UINT16)params[2] << 8) | (A_UINT16)params[1]);
+ bufferSize = (int)(((u16)params[2] << 8) | (u16)params[1]);
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE,
("Target parameters: bufs per mailbox:%d, buffer size:%d bytes (total space: %d, minimum required space (w/padding): %d) \n",
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, ("End Marker: 0x%X \n",temp));
- temp = (A_UINT16)g_BlockSizes[1];
+ temp = (u16)g_BlockSizes[1];
/* convert to a mask */
temp = temp - 1;
status = HIFReadWrite(pDev->HIFDevice,
#ifdef ATH_DEBUG_MODULE
void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist);
void DumpCreditDistStates(HTC_TARGET *target);
-void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription);
+void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription);
#endif
static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
u8 *pHdrBuf; \
(pP)->pBuffer -= HTC_HDR_LENGTH; \
pHdrBuf = (pP)->pBuffer; \
- A_SET_UINT16_FIELD(pHdrBuf,HTC_FRAME_HDR,PayloadLen,(A_UINT16)(pP)->ActualLength); \
+ A_SET_UINT16_FIELD(pHdrBuf,HTC_FRAME_HDR,PayloadLen,(u16)(pP)->ActualLength); \
A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,Flags,(sendflags)); \
A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,EndpointID, (u8)(pP)->Endpoint); \
A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[0], (u8)(ctrl0)); \
u8 temp;
u8 *pBuf;
int status = A_OK;
- A_UINT16 payloadLen;
+ u16 payloadLen;
A_UINT32 lookAhead;
pBuf = pPacket->pBuffer;
/* macro to make a module-specific masks */
#define ATH_DEBUG_MAKE_MODULE_MASK(index) (1 << (ATH_DEBUG_MODULE_MASK_SHIFT + (index)))
-void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription);
+void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription);
/* Debug support on a per-module basis
*
typedef void (* RX_CALLBACK)(void * dev, void *osbuf);
-typedef void (* ALLOC_NETBUFS)(A_NETBUF_QUEUE_T *q, A_UINT16 num);
+typedef void (* ALLOC_NETBUFS)(A_NETBUF_QUEUE_T *q, u16 num);
/*
* aggr_init:
* up to the indicated sequence number.
*/
void
-aggr_process_bar(void *cntxt, u8 tid, A_UINT16 seq_no);
+aggr_process_bar(void *cntxt, u8 tid, u16 seq_no);
/*
* in hold_q to OS.
*/
void
-aggr_recv_addba_req_evt(void * cntxt, u8 tid, A_UINT16 seq_no, u8 win_sz);
+aggr_recv_addba_req_evt(void * cntxt, u8 tid, u16 seq_no, u8 win_sz);
/*
* callback may be called to deliver frames in order.
*/
void
-aggr_process_recv_frm(void *cntxt, u8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf);
+aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osbuf);
/*
HIF_DEVICE *pHIFDevice; /* HIF layer device */
A_UINT32 AR3KBaudRate; /* AR3K operational baud rate */
- A_UINT16 AR6KScale; /* AR6K UART scale value */
- A_UINT16 AR6KStep; /* AR6K UART step value */
+ u16 AR6KScale; /* AR6K UART scale value */
+ u16 AR6KStep; /* AR6K UART step value */
struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */
A_UINT32 PwrMgmtEnabled; /* TLPM enabled? */
- A_UINT16 IdleTimeout; /* TLPM idle timeout */
- A_UINT16 WakeupTimeout; /* TLPM wakeup timeout */
+ u16 IdleTimeout; /* TLPM idle timeout */
+ u16 WakeupTimeout; /* TLPM wakeup timeout */
u8 bdaddr[6]; /* Bluetooth device address */
} AR3K_CONFIG_INFO;
/* Command pkt */
typedef struct hci_cmd_pkt_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 params[255];
} POSTPACK HCI_CMD_PKT;
#define ACL_DATA_HDR_SIZE 4 /* hdl_and flags + data_len */
/* Data pkt */
typedef struct hci_acl_data_pkt_t {
- A_UINT16 hdl_and_flags;
- A_UINT16 data_len;
+ u16 hdl_and_flags;
+ u16 data_len;
u8 data[Max80211_PAL_PDU_Size];
} POSTPACK HCI_ACL_DATA_PKT;
/*============== HCI Command definitions ======================= */
typedef struct hci_cmd_phy_link_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
u8 link_key_len;
} POSTPACK HCI_CMD_PHY_LINK;
typedef struct hci_cmd_write_rem_amp_assoc_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
- A_UINT16 len_so_far;
- A_UINT16 amp_assoc_remaining_len;
+ u16 len_so_far;
+ u16 amp_assoc_remaining_len;
u8 amp_assoc_frag[AMP_ASSOC_MAX_FRAG_SZ];
} POSTPACK HCI_CMD_WRITE_REM_AMP_ASSOC;
typedef struct hci_cmd_opcode_hdl_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 hdl;
+ u16 hdl;
} POSTPACK HCI_CMD_READ_LINK_QUAL,
HCI_CMD_FLUSH,
HCI_CMD_READ_LINK_SUPERVISION_TIMEOUT;
typedef struct hci_cmd_read_local_amp_assoc_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
- A_UINT16 len_so_far;
- A_UINT16 max_rem_amp_assoc_len;
+ u16 len_so_far;
+ u16 max_rem_amp_assoc_len;
} POSTPACK HCI_CMD_READ_LOCAL_AMP_ASSOC;
typedef struct hci_cmd_set_event_mask_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
A_UINT64 mask;
}POSTPACK HCI_CMD_SET_EVT_MASK, HCI_CMD_SET_EVT_MASK_PG_2;
typedef struct hci_cmd_enhanced_flush_t{
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 hdl;
+ u16 hdl;
u8 type;
} POSTPACK HCI_CMD_ENHANCED_FLUSH;
typedef struct hci_cmd_write_timeout_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 timeout;
+ u16 timeout;
} POSTPACK HCI_CMD_WRITE_TIMEOUT;
typedef struct hci_cmd_write_link_supervision_timeout_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 hdl;
- A_UINT16 timeout;
+ u16 hdl;
+ u16 timeout;
} POSTPACK HCI_CMD_WRITE_LINK_SUPERVISION_TIMEOUT;
typedef struct hci_cmd_write_flow_control_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 mode;
} POSTPACK HCI_CMD_WRITE_FLOW_CONTROL;
} POSTPACK LOCATION_DATA_CFG;
typedef struct hci_cmd_write_location_data_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
LOCATION_DATA_CFG cfg;
} POSTPACK HCI_CMD_WRITE_LOCATION_DATA;
typedef struct flow_spec_t {
u8 id;
u8 service_type;
- A_UINT16 max_sdu;
+ u16 max_sdu;
A_UINT32 sdu_inter_arrival_time;
A_UINT32 access_latency;
A_UINT32 flush_timeout;
typedef struct hci_cmd_create_logical_link_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
FLOW_SPEC tx_flow_spec;
} POSTPACK HCI_CMD_CREATE_LOGICAL_LINK;
typedef struct hci_cmd_flow_spec_modify_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 hdl;
+ u16 hdl;
FLOW_SPEC tx_flow_spec;
FLOW_SPEC rx_flow_spec;
} POSTPACK HCI_CMD_FLOW_SPEC_MODIFY;
typedef struct hci_cmd_logical_link_cancel_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
u8 tx_flow_spec_id;
} POSTPACK HCI_CMD_LOGICAL_LINK_CANCEL;
typedef struct hci_cmd_disconnect_logical_link_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
- A_UINT16 logical_link_hdl;
+ u16 logical_link_hdl;
} POSTPACK HCI_CMD_DISCONNECT_LOGICAL_LINK;
typedef struct hci_cmd_disconnect_phy_link_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
} POSTPACK HCI_CMD_DISCONNECT_PHY_LINK;
typedef struct hci_cmd_srm_t {
- A_UINT16 opcode;
+ u16 opcode;
u8 param_length;
u8 phy_link_hdl;
u8 mode;
u8 event_code;
u8 param_len;
u8 num_hci_cmd_pkts;
- A_UINT16 opcode;
+ u16 opcode;
u8 params[255];
} POSTPACK HCI_EVENT_CMD_COMPLETE;
u8 param_len;
u8 status;
u8 num_hci_cmd_pkts;
- A_UINT16 opcode;
+ u16 opcode;
} POSTPACK HCI_EVENT_CMD_STATUS;
/* Hardware Error event */
typedef struct hci_event_handle_t {
u8 event_code;
u8 param_len;
- A_UINT16 handle;
+ u16 handle;
} POSTPACK HCI_EVENT_FLUSH_OCCRD,
HCI_EVENT_QOS_VIOLATION;
typedef struct hci_enhanced_flush_complt_t{
u8 event_code;
u8 param_len;
- A_UINT16 hdl;
+ u16 hdl;
} POSTPACK HCI_EVENT_ENHANCED_FLUSH_COMPLT;
/* Channel select event */
u8 event_code;
u8 param_len;
u8 status;
- A_UINT16 logical_link_hdl;
+ u16 logical_link_hdl;
u8 phy_hdl;
u8 tx_flow_id;
} POSTPACK HCI_EVENT_LOGICAL_LINK_COMPLETE_EVENT;
u8 event_code;
u8 param_len;
u8 status;
- A_UINT16 logical_link_hdl;
+ u16 logical_link_hdl;
u8 reason;
} POSTPACK HCI_EVENT_DISCONNECT_LOGICAL_LINK_EVENT;
u8 event_code;
u8 param_len;
u8 status;
- A_UINT16 handle;
+ u16 handle;
} POSTPACK HCI_EVENT_FLOW_SPEC_MODIFY,
HCI_EVENT_FLUSH;
typedef struct hci_event_num_of_compl_data_blks_t {
u8 event_code;
u8 param_len;
- A_UINT16 num_data_blks;
+ u16 num_data_blks;
u8 num_handles;
u8 params[255];
} POSTPACK HCI_EVENT_NUM_COMPL_DATA_BLKS;
A_UINT32 min_latency;
A_UINT32 max_pdu_size;
u8 amp_type;
- A_UINT16 pal_capabilities;
- A_UINT16 amp_assoc_len;
+ u16 pal_capabilities;
+ u16 amp_assoc_len;
A_UINT32 max_flush_timeout; /* in ms */
A_UINT32 be_flush_timeout; /* in ms */
} POSTPACK LOCAL_AMP_INFO;
typedef struct amp_assoc_cmd_resp_t{
u8 status;
u8 phy_hdl;
- A_UINT16 amp_assoc_len;
+ u16 amp_assoc_len;
u8 amp_assoc_frag[AMP_ASSOC_MAX_FRAG_SZ];
}POSTPACK AMP_ASSOC_CMD_RESP;
*/
typedef struct timeout_read_t {
u8 status;
- A_UINT16 timeout;
+ u16 timeout;
}POSTPACK TIMEOUT_INFO;
typedef struct link_supervision_timeout_read_t {
u8 status;
- A_UINT16 hdl;
- A_UINT16 timeout;
+ u16 hdl;
+ u16 timeout;
}POSTPACK LINK_SUPERVISION_TIMEOUT_INFO;
typedef struct status_hdl_t {
u8 status;
- A_UINT16 hdl;
+ u16 hdl;
}POSTPACK INFO_STATUS_HDL;
typedef struct write_remote_amp_assoc_t{
typedef struct read_data_blk_size_t {
u8 status;
- A_UINT16 max_acl_data_pkt_len;
- A_UINT16 data_block_len;
- A_UINT16 total_num_data_blks;
+ u16 max_acl_data_pkt_len;
+ u16 data_block_len;
+ u16 total_num_data_blks;
}POSTPACK READ_DATA_BLK_SIZE_INFO;
/* Read Link quality info */
typedef struct link_qual_t {
u8 status;
- A_UINT16 hdl;
+ u16 hdl;
u8 link_qual;
} POSTPACK READ_LINK_QUAL_INFO,
READ_RSSI_INFO;
typedef struct read_local_ver_info_t {
u8 status;
u8 hci_version;
- A_UINT16 hci_revision;
+ u16 hci_revision;
u8 pal_version;
- A_UINT16 manf_name;
- A_UINT16 pal_sub_ver;
+ u16 manf_name;
+ u16 pal_sub_ver;
} POSTPACK READ_LOCAL_VER_INFO;
typedef PREPACK struct dset_descriptor_s {
struct dset_descriptor_s *next; /* List link. NULL only at the last
descriptor */
- A_UINT16 id; /* Dset ID */
- A_UINT16 size; /* Dset size. */
+ u16 id; /* Dset ID */
+ u16 size; /* Dset size. */
void *DataPtr; /* Pointer to raw data for standard
DataSet or pointer to original
dset_descriptor for patched
u8 TimeStamp[8]; /* timestamp of packet (host or target) */
A_UINT32 HostContext_h; /* 4 byte host context, target echos this back */
A_UINT32 SeqNo; /* sequence number (set by host or target) */
- A_UINT16 Cmd_h; /* ping command (filled by host) */
- A_UINT16 CmdFlags_h; /* optional flags */
+ u16 Cmd_h; /* ping command (filled by host) */
+ u16 CmdFlags_h; /* optional flags */
u8 CmdBuffer_h[8]; /* buffer for command (host -> target) */
u8 CmdBuffer_t[8]; /* buffer for command (target -> host) */
- A_UINT16 DataLength; /* length of data */
- A_UINT16 DataCRC; /* 16 bit CRC of data */
- A_UINT16 HeaderCRC; /* header CRC (fields : StreamNo_h to end, minus HeaderCRC) */
+ u16 DataLength; /* length of data */
+ u16 DataCRC; /* 16 bit CRC of data */
+ u16 HeaderCRC; /* header CRC (fields : StreamNo_h to end, minus HeaderCRC) */
} POSTPACK EPPING_HEADER;
#define EPPING_PING_MAGIC_0 0xAA
/* test command parameters may be no more than 8 bytes */
typedef PREPACK struct {
- A_UINT16 BurstCnt; /* number of packets to burst together (for HTC 2.1 testing) */
- A_UINT16 PacketLength; /* length of packet to generate including header */
- A_UINT16 Flags; /* flags */
+ u16 BurstCnt; /* number of packets to burst together (for HTC 2.1 testing) */
+ u16 PacketLength; /* length of packet to generate including header */
+ u16 Flags; /* flags */
#define EPPING_CONT_RX_DATA_CRC (1 << 0) /* Add CRC to all data */
#define EPPING_CONT_RX_RANDOM_DATA (1 << 1) /* randomize the data pattern */
} POSTPACK EPPING_CONT_RX_PARAMS;
#define EPPING_HDR_CRC_OFFSET A_OFFSETOF(EPPING_HEADER,StreamNo_h)
-#define EPPING_HDR_BYTES_CRC (sizeof(EPPING_HEADER) - EPPING_HDR_CRC_OFFSET - (sizeof(A_UINT16)))
+#define EPPING_HDR_BYTES_CRC (sizeof(EPPING_HEADER) - EPPING_HDR_CRC_OFFSET - (sizeof(u16)))
#define HCI_TRANSPORT_STREAM_NUM 16 /* this number is higher than the define WMM AC classes so we
can use this to distinguish packets */
/* definitions for BT HCI packets */
typedef PREPACK struct {
- A_UINT16 Flags_ConnHandle;
- A_UINT16 Length;
+ u16 Flags_ConnHandle;
+ u16 Length;
} POSTPACK BT_HCI_ACL_HEADER;
typedef PREPACK struct {
- A_UINT16 Flags_ConnHandle;
+ u16 Flags_ConnHandle;
u8 Length;
} POSTPACK BT_HCI_SCO_HEADER;
typedef PREPACK struct {
- A_UINT16 OpCode;
+ u16 OpCode;
u8 ParamLength;
} POSTPACK BT_HCI_COMMAND_HEADER;
#define A_OFFSETOF(type,field) (unsigned long)(&(((type *)NULL)->field))
#define ASSEMBLE_UNALIGNED_UINT16(p,highbyte,lowbyte) \
- (((A_UINT16)(((u8 *)(p))[(highbyte)])) << 8 | (A_UINT16)(((u8 *)(p))[(lowbyte)]))
+ (((u16)(((u8 *)(p))[(highbyte)])) << 8 | (u16)(((u8 *)(p))[(lowbyte)]))
/* alignment independent macros (little-endian) to fetch UINT16s or UINT8s from a
* structure using only the type and field name.
* to take advantage of 4-byte lookaheads in some hardware implementations */
u8 EndpointID;
u8 Flags;
- A_UINT16 PayloadLen; /* length of data (including trailer) that follows the header */
+ u16 PayloadLen; /* length of data (including trailer) that follows the header */
/***** end of 4-byte lookahead ****/
/* base message ID header */
typedef PREPACK struct {
- A_UINT16 MessageID;
+ u16 MessageID;
} POSTPACK HTC_UNKNOWN_MSG;
/* HTC ready message
* direction : target-to-host */
typedef PREPACK struct {
- A_UINT16 MessageID; /* ID */
- A_UINT16 CreditCount; /* number of credits the target can offer */
- A_UINT16 CreditSize; /* size of each credit */
+ u16 MessageID; /* ID */
+ u16 CreditCount; /* number of credits the target can offer */
+ u16 CreditSize; /* size of each credit */
u8 MaxEndpoints; /* maximum number of endpoints the target has resources for */
u8 _Pad1;
} POSTPACK HTC_READY_MSG;
/* connect service
* direction : host-to-target */
typedef PREPACK struct {
- A_UINT16 MessageID;
- A_UINT16 ServiceID; /* service ID of the service to connect to */
- A_UINT16 ConnectionFlags; /* connection flags */
+ u16 MessageID;
+ u16 ServiceID; /* service ID of the service to connect to */
+ u16 ConnectionFlags; /* connection flags */
#define HTC_CONNECT_FLAGS_REDUCE_CREDIT_DRIBBLE (1 << 2) /* reduce credit dribbling when
the host needs credits */
/* connect response
* direction : target-to-host */
typedef PREPACK struct {
- A_UINT16 MessageID;
- A_UINT16 ServiceID; /* service ID that the connection request was made */
+ u16 MessageID;
+ u16 ServiceID; /* service ID that the connection request was made */
u8 Status; /* service connection status */
u8 EndpointID; /* assigned endpoint ID */
- A_UINT16 MaxMsgSize; /* maximum expected message size on this endpoint */
+ u16 MaxMsgSize; /* maximum expected message size on this endpoint */
u8 ServiceMetaLength; /* length of meta data that follows */
u8 _Pad1;
} POSTPACK HTC_CONNECT_SERVICE_RESPONSE_MSG;
typedef PREPACK struct {
- A_UINT16 MessageID;
+ u16 MessageID;
/* currently, no other fields */
} POSTPACK HTC_SETUP_COMPLETE_MSG;
/* extended setup completion message */
typedef PREPACK struct {
- A_UINT16 MessageID;
+ u16 MessageID;
A_UINT32 SetupFlags;
u8 MaxMsgsPerBundledRecv;
u8 Rsvd[3];
} WHAL_INI_DATA_ID;
typedef PREPACK struct {
- A_UINT16 freqIndex; // 1 - A mode 2 - B or G mode 0 - common
- A_UINT16 offset;
+ u16 freqIndex; // 1 - A mode 2 - B or G mode 0 - common
+ u16 offset;
A_UINT32 newValue;
} POSTPACK INI_DSET_REG_OVERRIDE;
/* Pkt log info */
typedef PREPACK struct pkt_log_t {
struct info_t {
- A_UINT16 st;
- A_UINT16 end;
- A_UINT16 cur;
+ u16 st;
+ u16 end;
+ u16 cur;
}info[4096];
- A_UINT16 last_idx;
+ u16 last_idx;
}POSTPACK PACKET_LOG;
char entrySize; /* Entry size per table row */
char searchType; /* Index based access or key based */
char reserved[3]; /* for alignment */
- A_UINT16 tableSize; /* Size of this table */
+ u16 tableSize; /* Size of this table */
char *dataPtr; /* Ptr to the actual Table */
} POSTPACK dbMasterTable; /* Master table - table of tables */
*/
typedef PREPACK struct reg_dmn_pair_mapping {
- A_UINT16 regDmnEnum; /* 16 bit reg domain pair */
- A_UINT16 regDmn5GHz; /* 5GHz reg domain */
- A_UINT16 regDmn2GHz; /* 2GHz reg domain */
+ u16 regDmnEnum; /* 16 bit reg domain pair */
+ u16 regDmn5GHz; /* 5GHz reg domain */
+ u16 regDmn2GHz; /* 2GHz reg domain */
u8 flags5GHz; /* Requirements flags (AdHoc disallow etc) */
u8 flags2GHz; /* Requirements flags (AdHoc disallow etc) */
A_UINT32 pscanMask; /* Passive Scan flags which can override unitary domain passive scan
#define MCS_HT40_G_NO (0 << 3)
typedef PREPACK struct {
- A_UINT16 countryCode;
- A_UINT16 regDmnEnum;
+ u16 countryCode;
+ u16 regDmnEnum;
char isoName[3];
char allowMode; /* what mode is allowed - bit 0: OFDM; bit 1: MCS_HT20; bit 2: MCS_HT40_A; bit 3: MCS_HT40_G */
} POSTPACK COUNTRY_CODE_TO_ENUM_RD;
#define FREQ_QUARTER_RATE 0x20000
typedef PREPACK struct RegDmnFreqBand {
- A_UINT16 lowChannel; /* Low channel center in MHz */
- A_UINT16 highChannel; /* High Channel center in MHz */
+ u16 lowChannel; /* Low channel center in MHz */
+ u16 highChannel; /* High Channel center in MHz */
u8 power; /* Max power (dBm) for channel range */
u8 channelSep; /* Channel separation within the band */
u8 useDfs; /* Use DFS in the RegDomain if corresponding bit is set */
typedef PREPACK struct regDomain {
- A_UINT16 regDmnEnum; /* value from EnumRd table */
+ u16 regDmnEnum; /* value from EnumRd table */
u8 rdCTL;
u8 maxAntGain;
u8 dfsMask; /* DFS bitmask for 5Ghz tables */
u8 flags; /* Requirement flags (AdHoc disallow etc) */
- A_UINT16 reserved; /* for alignment */
+ u16 reserved; /* for alignment */
A_UINT32 pscan; /* Bitmask for passive scan */
A_UINT32 chan11a[BMLEN]; /* 64 bit bitmask for channel/band selection */
A_UINT32 chan11bg[BMLEN];/* 64 bit bitmask for channel/band selection */
A_UINT32 enANI;
A_UINT32 scramblerOff;
A_UINT32 aifsn;
- A_UINT16 pktSz;
- A_UINT16 txPattern;
+ u16 pktSz;
+ u16 txPattern;
A_UINT32 shortGuard;
A_UINT32 numPackets;
A_UINT32 wlanMode;
A_INT32 rssiInDBm;
A_UINT32 crcErrPkt;
A_UINT32 secErrPkt;
- A_UINT16 rateCnt[TCMD_MAX_RATES];
- A_UINT16 rateCntShortGuard[TCMD_MAX_RATES];
+ u16 rateCnt[TCMD_MAX_RATES];
+ u16 rateCntShortGuard[TCMD_MAX_RATES];
} POSTPACK report;
struct PREPACK TCMD_CONT_RX_MAC {
A_UCHAR addr[ATH_MAC_LEN];
u8 valid_dset;
u8 gpio_enable;
- A_UINT16 gpio_pin;
+ u16 gpio_pin;
} POSTPACK WOW_CONFIG_DSET;
#endif
typedef PREPACK struct {
u8 dstMac[ATH_MAC_LEN];
u8 srcMac[ATH_MAC_LEN];
- A_UINT16 typeOrLen;
+ u16 typeOrLen;
} POSTPACK ATH_MAC_HDR;
typedef PREPACK struct {
u8 ssap;
u8 cntl;
u8 orgCode[3];
- A_UINT16 etherType;
+ u16 etherType;
} POSTPACK ATH_LLC_SNAP_HDR;
typedef enum {
* ACL data(2)
*/
- A_UINT16 info2; /* usage of 'info2' field(16-bit):
+ u16 info2; /* usage of 'info2' field(16-bit):
* b11:b0 - seq_no
* b12 - A-MSDU?
* b15:b13 - META_DATA_VERSION 0 - 7
*/
- A_UINT16 reserved;
+ u16 reserved;
} POSTPACK WMI_DATA_HDR;
/*
u8 rix; /* rate index mapped to rate at which this packet was received. */
u8 rssi; /* rssi of packet */
u8 channel;/* rf channel during packet reception */
- A_UINT16 flags; /* a combination of WMI_RX_FLAGS_... */
+ u16 flags; /* a combination of WMI_RX_FLAGS_... */
} POSTPACK WMI_RX_META_V1;
#define RX_CSUM_VALID_FLAG (0x1)
typedef PREPACK struct {
- A_UINT16 csum;
+ u16 csum;
u8 csumFlags;/* bit 0 set -partial csum valid
bit 1 set -test mode */
} POSTPACK WMI_RX_META_V2;
* Control Path
*/
typedef PREPACK struct {
- A_UINT16 commandId;
+ u16 commandId;
/*
* info1 - 16 bits
* b03:b00 - id
* b15:b04 - unused
*/
- A_UINT16 info1;
+ u16 info1;
- A_UINT16 reserved; /* For alignment */
+ u16 reserved; /* For alignment */
} POSTPACK WMI_CMD_HDR; /* used for commands and events */
/*
u8 groupCryptoLen;
u8 ssidLength;
A_UCHAR ssid[WMI_MAX_SSID_LEN];
- A_UINT16 channel;
+ u16 channel;
u8 bssid[ATH_MAC_LEN];
A_UINT32 ctrl_flags;
} POSTPACK WMI_CONNECT_CMD;
* WMI_RECONNECT_CMDID
*/
typedef PREPACK struct {
- A_UINT16 channel; /* hint */
+ u16 channel; /* hint */
u8 bssid[ATH_MAC_LEN]; /* mandatory if set */
} POSTPACK WMI_RECONNECT_CMD;
A_UINT32 forceScanInterval; /* Time interval between scans (milliseconds)*/
u8 scanType; /* WMI_SCAN_TYPE */
u8 numChannels; /* how many channels follow */
- A_UINT16 channelList[1]; /* channels in Mhz */
+ u16 channelList[1]; /* channels in Mhz */
} POSTPACK WMI_START_SCAN_CMD;
/*
typedef PREPACK struct {
- A_UINT16 fg_start_period; /* seconds */
- A_UINT16 fg_end_period; /* seconds */
- A_UINT16 bg_period; /* seconds */
- A_UINT16 maxact_chdwell_time; /* msec */
- A_UINT16 pas_chdwell_time; /* msec */
+ u16 fg_start_period; /* seconds */
+ u16 fg_end_period; /* seconds */
+ u16 bg_period; /* seconds */
+ u16 maxact_chdwell_time; /* msec */
+ u16 pas_chdwell_time; /* msec */
u8 shortScanRatio; /* how many shorts scan for one long */
u8 scanCtrlFlags;
- A_UINT16 minact_chdwell_time; /* msec */
- A_UINT16 maxact_scan_per_ssid; /* max active scans per ssid */
+ u16 minact_chdwell_time; /* msec */
+ u16 maxact_scan_per_ssid; /* max active scans per ssid */
A_UINT32 max_dfsch_act_time; /* msecs */
} POSTPACK WMI_SCAN_PARAMS_CMD;
typedef PREPACK struct {
u8 bssFilter; /* see WMI_BSS_FILTER */
u8 reserved1; /* For alignment */
- A_UINT16 reserved2; /* For alignment */
+ u16 reserved2; /* For alignment */
A_UINT32 ieMask;
} POSTPACK WMI_BSS_FILTER_CMD;
#define MAX_LISTEN_BEACONS 50
typedef PREPACK struct {
- A_UINT16 listenInterval;
- A_UINT16 numBeacons;
+ u16 listenInterval;
+ u16 numBeacons;
} POSTPACK WMI_LISTEN_INT_CMD;
/*
* WMI_SET_BEACON_INT_CMDID
*/
typedef PREPACK struct {
- A_UINT16 beaconInterval;
+ u16 beaconInterval;
} POSTPACK WMI_BEACON_INT_CMD;
/*
#define MAX_BMISS_BEACONS 50
typedef PREPACK struct {
- A_UINT16 bmissTime;
- A_UINT16 numBeacons;
+ u16 bmissTime;
+ u16 numBeacons;
} POSTPACK WMI_BMISS_TIME_CMD;
/*
} POWER_SAVE_FAIL_EVENT_POLICY;
typedef PREPACK struct {
- A_UINT16 idle_period; /* msec */
- A_UINT16 pspoll_number;
- A_UINT16 dtim_policy;
- A_UINT16 tx_wakeup_policy;
- A_UINT16 num_tx_to_wakeup;
- A_UINT16 ps_fail_event_policy;
+ u16 idle_period; /* msec */
+ u16 pspoll_number;
+ u16 dtim_policy;
+ u16 tx_wakeup_policy;
+ u16 num_tx_to_wakeup;
+ u16 ps_fail_event_policy;
} POSTPACK WMI_POWER_PARAMS_CMD;
/* Adhoc power save types */
typedef PREPACK struct {
u8 power_saving;
u8 ttl; /* number of beacon periods */
- A_UINT16 atim_windows; /* msec */
- A_UINT16 timeout_value; /* msec */
+ u16 atim_windows; /* msec */
+ u16 timeout_value; /* msec */
} POSTPACK WMI_IBSS_PM_CAPS_CMD;
/* AP power save types */
} APSD_TIM_POLICY;
typedef PREPACK struct {
- A_UINT16 psPollTimeout; /* msec */
- A_UINT16 triggerTimeout; /* msec */
+ u16 psPollTimeout; /* msec */
+ u16 triggerTimeout; /* msec */
A_UINT32 apsdTimPolicy; /* TIM behavior with ques APSD enabled. Default is IGNORE_TIM_ALL_QUEUES_APSD */
A_UINT32 simulatedAPSDTimPolicy; /* TIM behavior with simulated APSD enabled. Default is PROCESS_TIM_SIMULATED_APSD */
} POSTPACK WMI_POWERSAVE_TIMERS_POLICY_CMD;
* WMI_SET_VOICE_PKT_SIZE_CMDID
*/
typedef PREPACK struct {
- A_UINT16 voicePktSize;
+ u16 voicePktSize;
} POSTPACK WMI_SET_VOICE_PKT_SIZE_CMD;
/*
A_UINT32 minPhyRate; /* in bps */
A_UINT32 sba;
A_UINT32 mediumTime;
- A_UINT16 nominalMSDU; /* in octects */
- A_UINT16 maxMSDU; /* in octects */
+ u16 nominalMSDU; /* in octects */
+ u16 maxMSDU; /* in octects */
u8 trafficClass;
u8 trafficDirection; /* DIR_TYPE */
u8 rxQueueNum;
u8 scanParam; /* set if enable scan */
u8 phyMode; /* see WMI_PHY_MODE */
u8 numChannels; /* how many channels follow */
- A_UINT16 channelList[1]; /* channels in Mhz */
+ u16 channelList[1]; /* channels in Mhz */
} POSTPACK WMI_CHANNEL_PARAMS_CMD;
}POSTPACK WMI_SET_LPREAMBLE_CMD;
typedef PREPACK struct {
- A_UINT16 threshold;
+ u16 threshold;
}POSTPACK WMI_SET_RTS_CMD;
/*
#define WMI_DEFAULT_AIFSN_ACPARAM 2
#define WMI_MAX_AIFSN_ACPARAM 15
typedef PREPACK struct {
- A_UINT16 txop; /* in units of 32 usec */
+ u16 txop; /* in units of 32 usec */
u8 eCWmin;
u8 eCWmax;
u8 aifsn;
} POSTPACK WMI_BSS_BIAS_INFO;
typedef PREPACK struct WMI_LOWRSSI_SCAN_PARAMS {
- A_UINT16 lowrssi_scan_period;
+ u16 lowrssi_scan_period;
A_INT16 lowrssi_scan_threshold;
A_INT16 lowrssi_roam_threshold;
u8 roam_rssi_floor;
typedef PREPACK struct {
- A_UINT16 cmd_buf_sz; /* HCI cmd buffer size */
+ u16 cmd_buf_sz; /* HCI cmd buffer size */
u8 buf[1]; /* Absolute HCI cmd */
} POSTPACK WMI_HCI_CMD;
typedef PREPACK struct {
u8 reserved1;
u8 numChannels; /* number of channels in reply */
- A_UINT16 channelList[1]; /* channel in Mhz */
+ u16 channelList[1]; /* channel in Mhz */
} POSTPACK WMI_CHANNEL_LIST_REPLY;
typedef enum {
* Connect Event
*/
typedef PREPACK struct {
- A_UINT16 channel;
+ u16 channel;
u8 bssid[ATH_MAC_LEN];
- A_UINT16 listenInterval;
- A_UINT16 beaconInterval;
+ u16 listenInterval;
+ u16 beaconInterval;
A_UINT32 networkType;
u8 beaconIeLen;
u8 assocReqLen;
} WMI_DISCONNECT_REASON;
typedef PREPACK struct {
- A_UINT16 protocolReasonStatus; /* reason code, see 802.11 spec. */
+ u16 protocolReasonStatus; /* reason code, see 802.11 spec. */
u8 bssid[ATH_MAC_LEN]; /* set if known */
u8 disconnectReason ; /* see WMI_DISCONNECT_REASON */
u8 assocRespLen;
};
typedef PREPACK struct {
- A_UINT16 channel;
+ u16 channel;
u8 frameType; /* see WMI_BI_FTYPE */
u8 snr;
A_INT16 rssi;
* - Remove rssi and compute it on the host. rssi = snr - 95
*/
typedef PREPACK struct {
- A_UINT16 channel;
+ u16 channel;
u8 frameType; /* see WMI_BI_FTYPE */
u8 snr;
u8 bssid[ATH_MAC_LEN];
- A_UINT16 ieMask;
+ u16 ieMask;
} POSTPACK WMI_BSS_INFO_HDR2;
/*
} WMI_ERROR_CODE;
typedef PREPACK struct {
- A_UINT16 commandId;
+ u16 commandId;
u8 errorCode;
} POSTPACK WMI_CMD_ERROR_EVENT;
} WMI_OPT_FTYPE;
typedef PREPACK struct {
- A_UINT16 optIEDataLen;
+ u16 optIEDataLen;
u8 frmType;
u8 dstAddr[ATH_MAC_LEN];
u8 bssid[ATH_MAC_LEN];
* The 802.11 header is not included.
*/
typedef PREPACK struct {
- A_UINT16 channel;
+ u16 channel;
u8 frameType; /* see WMI_OPT_FTYPE */
A_INT8 snr;
u8 srcAddr[ATH_MAC_LEN];
typedef PREPACK struct {
A_UINT32 power_save_failure_cnt;
- A_UINT16 stop_tx_failure_cnt;
- A_UINT16 atim_tx_failure_cnt;
- A_UINT16 atim_rx_failure_cnt;
- A_UINT16 bcn_rx_failure_cnt;
+ u16 stop_tx_failure_cnt;
+ u16 atim_tx_failure_cnt;
+ u16 atim_rx_failure_cnt;
+ u16 bcn_rx_failure_cnt;
}POSTPACK pm_stats_t;
typedef PREPACK struct {
A_UINT32 cs_bmiss_cnt;
A_UINT32 cs_lowRssi_cnt;
- A_UINT16 cs_connect_cnt;
- A_UINT16 cs_disconnect_cnt;
+ u16 cs_connect_cnt;
+ u16 cs_disconnect_cnt;
A_INT16 cs_aveBeacon_rssi;
- A_UINT16 cs_roam_count;
+ u16 cs_roam_count;
A_INT16 cs_rssi;
u8 cs_snr;
u8 cs_aveBeacon_snr;
typedef PREPACK struct {
A_UINT32 wow_num_pkts_dropped;
- A_UINT16 wow_num_events_discarded;
+ u16 wow_num_events_discarded;
u8 wow_num_host_pkt_wakeups;
u8 wow_num_host_event_wakeups;
} POSTPACK wlan_wow_stats_t;
typedef PREPACK struct {
- A_UINT16 roamMode;
- A_UINT16 numEntries;
+ u16 roamMode;
+ u16 numEntries;
WMI_BSS_ROAM_INFO bssRoamInfo[1];
} POSTPACK WMI_TARGET_ROAM_TBL;
* WMI_HCI_EVENT_EVENTID
*/
typedef PREPACK struct {
- A_UINT16 evt_buf_sz; /* HCI event buffer size */
+ u16 evt_buf_sz; /* HCI event buffer size */
u8 buf[1]; /* HCI event */
} POSTPACK WMI_HCI_EVENT;
typedef PREPACK struct {
u8 bssid[ATH_MAC_LEN];
- A_UINT16 channel;
+ u16 channel;
} POSTPACK WMI_AP_INFO_V1;
typedef PREPACK union {
typedef PREPACK struct {
u32 enable_wow;
WMI_WOW_FILTER filter;
- A_UINT16 hostReqDelay;
+ u16 hostReqDelay;
} POSTPACK WMI_SET_WOW_MODE_CMD;
typedef PREPACK struct {
} POSTPACK WMI_ADD_WOW_PATTERN_CMD;
typedef PREPACK struct {
- A_UINT16 filter_list_id;
- A_UINT16 filter_id;
+ u16 filter_list_id;
+ u16 filter_id;
} POSTPACK WMI_DEL_WOW_PATTERN_CMD;
typedef PREPACK struct {
} POSTPACK WMI_PMKID_LIST_REPLY;
typedef PREPACK struct {
- A_UINT16 oldChannel;
+ u16 oldChannel;
A_UINT32 newChannel;
} POSTPACK WMI_CHANNEL_CHANGE_EVENT;
typedef PREPACK struct {
u8 tid;
u8 win_sz;
- A_UINT16 st_seq_no;
+ u16 st_seq_no;
u8 status; /* f/w response for ADDBA Req; OK(0) or failure(!=0) */
} POSTPACK WMI_ADDBA_REQ_EVENT;
typedef PREPACK struct {
u8 tid;
u8 status; /* OK(0), failure (!=0) */
- A_UINT16 amsdu_sz; /* Three values: Not supported(0), 3839, 8k */
+ u16 amsdu_sz; /* Three values: Not supported(0), 3839, 8k */
} POSTPACK WMI_ADDBA_RESP_EVENT;
/* WMI_DELBA_EVENTID
typedef PREPACK struct {
u8 tid;
u8 is_peer_initiator;
- A_UINT16 reason_code;
+ u16 reason_code;
} POSTPACK WMI_DELBA_EVENT;
* on each tid, in each direction
*/
typedef PREPACK struct {
- A_UINT16 tx_allow_aggr; /* 16-bit mask to allow uplink ADDBA negotiation - bit position indicates tid*/
- A_UINT16 rx_allow_aggr; /* 16-bit mask to allow donwlink ADDBA negotiation - bit position indicates tid*/
+ u16 tx_allow_aggr; /* 16-bit mask to allow uplink ADDBA negotiation - bit position indicates tid*/
+ u16 rx_allow_aggr; /* 16-bit mask to allow donwlink ADDBA negotiation - bit position indicates tid*/
} POSTPACK WMI_ALLOW_AGGR_CMD;
/* WMI_ADDBA_REQ_CMDID
} POSTPACK WMI_AP_ACL_MAC_CMD;
typedef PREPACK struct {
- A_UINT16 index;
+ u16 index;
u8 acl_mac[AP_ACL_SIZE][ATH_MAC_LEN];
u8 wildcard[AP_ACL_SIZE];
u8 policy;
*/
typedef PREPACK struct {
u8 mac[ATH_MAC_LEN];
- A_UINT16 reason; /* 802.11 reason code */
+ u16 reason; /* 802.11 reason code */
u8 cmd; /* operation to perform */
#define WMI_AP_MLME_ASSOC 1 /* associate station */
#define WMI_AP_DISASSOC 2 /* disassociate station */
typedef PREPACK struct {
u32 flag;
- A_UINT16 aid;
+ u16 aid;
} POSTPACK WMI_AP_SET_PVB_CMD;
#define WMI_DISABLE_REGULATORY_CODE "FF"
/* AP mode events */
/* WMI_PS_POLL_EVENT */
typedef PREPACK struct {
- A_UINT16 aid;
+ u16 aid;
} POSTPACK WMI_PSPOLL_EVENT;
typedef PREPACK struct {
typedef PREPACK struct {
u8 version; /* the versioned type of messages to use or 0 to disable */
u8 countThreshold; /* msg count threshold triggering a tx complete message */
- A_UINT16 timeThreshold; /* timeout interval in MSEC triggering a tx complete message */
+ u16 timeThreshold; /* timeout interval in MSEC triggering a tx complete message */
} POSTPACK WMI_THIN_CONFIG_TXCOMPLETE;
/* WMI_THIN_CONFIG_DECRYPT_ERR -- Used to configure behavior for received frames
#define WMI_THIN_CFG_MAC_RULES 0x00000004
#define WMI_THIN_CFG_FILTER_RULES 0x00000008
A_UINT32 cfgField; /* combination of WMI_THIN_CFG_... describes contents of config command */
- A_UINT16 length; /* length in bytes of appended sub-commands */
+ u16 length; /* length in bytes of appended sub-commands */
u8 reserved[2]; /* align padding */
} POSTPACK WMI_THIN_CONFIG_CMD;
} POSTPACK WMI_THIN_MIB_SLOT_TIME;
typedef PREPACK struct {
- A_UINT16 length; //units == bytes
+ u16 length; //units == bytes
} POSTPACK WMI_THIN_MIB_RTS_THRESHOLD;
typedef PREPACK struct {
u8 type; // type of frame
u8 rate; // tx rate to be used (one of WMI_BIT_RATE)
- A_UINT16 length; // num bytes following this structure as the template data
+ u16 length; // num bytes following this structure as the template data
} POSTPACK WMI_THIN_MIB_TEMPLATE_FRAME;
typedef PREPACK struct {
u8 treatment;
u8 oui[3];
u8 type;
- A_UINT16 version;
+ u16 version;
} POSTPACK WMI_THIN_MIB_BEACON_FILTER_TABLE_OUI;
typedef PREPACK struct {
- A_UINT16 numElements;
+ u16 numElements;
u8 entrySize; // sizeof(WMI_THIN_MIB_BEACON_FILTER_TABLE) on host cpu may be 2 may be 4
u8 reserved;
} POSTPACK WMI_THIN_MIB_BEACON_FILTER_TABLE_HEADER;
} POSTPACK WMI_THIN_MIB_PREAMBLE;
typedef PREPACK struct {
- A_UINT16 length; /* the length in bytes of the appended MIB data */
+ u16 length; /* the length in bytes of the appended MIB data */
u8 mibID; /* the ID of the MIB element being set */
u8 reserved; /* align padding */
} POSTPACK WMI_THIN_SET_MIB_CMD;
typedef PREPACK struct {
A_UINT32 basicRateMask; /* bit mask of basic rates */
A_UINT32 beaconIntval; /* TUs */
- A_UINT16 atimWindow; /* TUs */
- A_UINT16 channel; /* frequency in Mhz */
+ u16 atimWindow; /* TUs */
+ u16 channel; /* frequency in Mhz */
u8 networkType; /* INFRA_NETWORK | ADHOC_NETWORK */
u8 ssidLength; /* 0 - 32 */
u8 probe; /* != 0 : issue probe req at start */
} POSTPACK WMI_THIN_JOIN_CMD;
typedef PREPACK struct {
- A_UINT16 dtim; /* dtim interval in num beacons */
- A_UINT16 aid; /* 80211 AID from Assoc resp */
+ u16 dtim; /* dtim interval in num beacons */
+ u16 aid; /* 80211 AID from Assoc resp */
} POSTPACK WMI_THIN_POST_ASSOC_CMD;
typedef enum {
typedef void *HTC_HANDLE;
-typedef A_UINT16 HTC_SERVICE_ID;
+typedef u16 HTC_SERVICE_ID;
typedef struct _HTC_INIT_INFO {
void *pContext; /* context for target failure notification */
/* service connection information */
typedef struct _HTC_SERVICE_CONNECT_REQ {
HTC_SERVICE_ID ServiceID; /* service ID to connect to */
- A_UINT16 ConnectionFlags; /* connection flags, see htc protocol definition */
+ u16 ConnectionFlags; /* connection flags, see htc protocol definition */
u8 *pMetaData; /* ptr to optional service-specific meta-data */
u8 MetaDataLength; /* optional meta data length */
HTC_EP_CALLBACKS EpCallbacks; /* endpoint callbacks */
typedef void (* HTC_PACKET_COMPLETION)(void *,struct _HTC_PACKET *);
-typedef A_UINT16 HTC_TX_TAG;
+typedef u16 HTC_TX_TAG;
typedef struct _HTC_TX_PACKET_INFO {
HTC_TX_TAG Tag; /* tag used to selective flush packets */
struct ieee80211_frame;
struct ieee80211_common_ie {
- A_UINT16 ie_chan;
+ u16 ie_chan;
u8 *ie_tstamp;
u8 *ie_ssid;
u8 *ie_rates;
u8 *ie_rsn;
u8 *ie_wmm;
u8 *ie_ath;
- A_UINT16 ie_capInfo;
- A_UINT16 ie_beaconInt;
+ u16 ie_capInfo;
+ u16 ie_beaconInt;
u8 *ie_tim;
u8 *ie_chswitch;
u8 ie_erp;
struct bss *ni_hash_prev;
struct ieee80211_common_ie ni_cie;
u8 *ni_buf;
- A_UINT16 ni_framelen;
+ u16 ni_framelen;
struct ieee80211_node_table *ni_table;
A_UINT32 ni_refcnt;
int ni_scangen;
int wlan_parse_beacon(u8 *buf, int framelen,
struct ieee80211_common_ie *cie);
-A_UINT16 wlan_ieee2freq(int chan);
-A_UINT32 wlan_freq2ieee(A_UINT16 freq);
+u16 wlan_ieee2freq(int chan);
+A_UINT32 wlan_freq2ieee(u16 freq);
void wlan_set_nodeage(struct ieee80211_node_table *nt, A_UINT32 nodeAge);
void wmi_shutdown(struct wmi_t *wmip);
HTC_ENDPOINT_ID wmi_get_control_ep(struct wmi_t * wmip);
void wmi_set_control_ep(struct wmi_t * wmip, HTC_ENDPOINT_ID eid);
-A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, u8 );
+u16 wmi_get_mapped_qos_queue(struct wmi_t *, u8 );
int wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,u8 metaVersion, void *pTxMetaS);
int wmi_dot3_2_dix(void *osbuf);
int ssidLength,
A_UCHAR *ssid,
u8 *bssid,
- A_UINT16 channel,
+ u16 channel,
A_UINT32 ctrl_flags);
int wmi_reconnect_cmd(struct wmi_t *wmip,
u8 *bssid,
- A_UINT16 channel);
+ u16 channel);
int wmi_disconnect_cmd(struct wmi_t *wmip);
int wmi_getrev_cmd(struct wmi_t *wmip);
int wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
u32 forceFgScan, u32 isLegacy,
A_UINT32 homeDwellTime, A_UINT32 forceScanInterval,
- A_INT8 numChan, A_UINT16 *channelList);
-int wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
- A_UINT16 fg_end_sec, A_UINT16 bg_sec,
- A_UINT16 minact_chdw_msec,
- A_UINT16 maxact_chdw_msec, A_UINT16 pas_chdw_msec,
+ A_INT8 numChan, u16 *channelList);
+int wmi_scanparams_cmd(struct wmi_t *wmip, u16 fg_start_sec,
+ u16 fg_end_sec, u16 bg_sec,
+ u16 minact_chdw_msec,
+ u16 maxact_chdw_msec, u16 pas_chdw_msec,
u8 shScanRatio, u8 scanCtrlFlags,
A_UINT32 max_dfsch_act_time,
- A_UINT16 maxact_scan_per_ssid);
+ u16 maxact_scan_per_ssid);
int wmi_bssfilter_cmd(struct wmi_t *wmip, u8 filter, A_UINT32 ieMask);
int wmi_probedSsid_cmd(struct wmi_t *wmip, u8 index, u8 flag,
u8 ssidLength, A_UCHAR *ssid);
-int wmi_listeninterval_cmd(struct wmi_t *wmip, A_UINT16 listenInterval, A_UINT16 listenBeacons);
-int wmi_bmisstime_cmd(struct wmi_t *wmip, A_UINT16 bmisstime, A_UINT16 bmissbeacons);
+int wmi_listeninterval_cmd(struct wmi_t *wmip, u16 listenInterval, u16 listenBeacons);
+int wmi_bmisstime_cmd(struct wmi_t *wmip, u16 bmisstime, u16 bmissbeacons);
int wmi_associnfo_cmd(struct wmi_t *wmip, u8 ieType,
u8 ieLen, u8 *ieInfo);
int wmi_powermode_cmd(struct wmi_t *wmip, u8 powerMode);
int wmi_ibsspmcaps_cmd(struct wmi_t *wmip, u8 pmEnable, u8 ttl,
- A_UINT16 atim_windows, A_UINT16 timeout_value);
+ u16 atim_windows, u16 timeout_value);
int wmi_apps_cmd(struct wmi_t *wmip, u8 psType, A_UINT32 idle_time,
A_UINT32 ps_period, u8 sleep_period);
-int wmi_pmparams_cmd(struct wmi_t *wmip, A_UINT16 idlePeriod,
- A_UINT16 psPollNum, A_UINT16 dtimPolicy,
- A_UINT16 wakup_tx_policy, A_UINT16 num_tx_to_wakeup,
- A_UINT16 ps_fail_event_policy);
+int wmi_pmparams_cmd(struct wmi_t *wmip, u16 idlePeriod,
+ u16 psPollNum, u16 dtimPolicy,
+ u16 wakup_tx_policy, u16 num_tx_to_wakeup,
+ u16 ps_fail_event_policy);
int wmi_disctimeout_cmd(struct wmi_t *wmip, u8 timeout);
int wmi_sync_cmd(struct wmi_t *wmip, u8 syncNumber);
int wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
int wmi_delete_pstream_cmd(struct wmi_t *wmip, u8 trafficClass, u8 streamID);
-int wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, A_UINT16 rateMask);
+int wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, u16 rateMask);
int wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 dataRate, A_INT32 mgmtRate, A_INT32 ctlRate);
int wmi_get_bitrate_cmd(struct wmi_t *wmip);
A_INT8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, A_INT8 *rate_idx);
int wmi_get_channelList_cmd(struct wmi_t *wmip);
int wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
WMI_PHY_MODE mode, A_INT8 numChan,
- A_UINT16 *channelList);
+ u16 *channelList);
int wmi_set_snr_threshold_params(struct wmi_t *wmip,
WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd);
int wmi_clr_rssi_snr(struct wmi_t *wmip);
int wmi_set_lq_threshold_params(struct wmi_t *wmip,
WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd);
-int wmi_set_rts_cmd(struct wmi_t *wmip, A_UINT16 threshold);
+int wmi_set_rts_cmd(struct wmi_t *wmip, u16 threshold);
int wmi_set_lpreamble_cmd(struct wmi_t *wmip, u8 status, u8 preamblePolicy);
int wmi_set_error_report_bitmask(struct wmi_t *wmip, A_UINT32 bitmask);
int wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie,
A_UINT32 source);
-int wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
- A_UINT16 tsr, bool rep, A_UINT16 size,
+int wmi_config_debug_module_cmd(struct wmi_t *wmip, u16 mmask,
+ u16 tsr, bool rep, u16 size,
A_UINT32 valid);
int wmi_get_stats_cmd(struct wmi_t *wmip);
int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, bool en);
int wmi_setPmkid_cmd(struct wmi_t *wmip, u8 *bssid, u8 *pmkId,
bool set);
-int wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, A_UINT16 txop,
+int wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, u16 txop,
u8 eCWmin, u8 eCWmax,
u8 aifsn);
int wmi_set_retry_limits_cmd(struct wmi_t *wmip, u8 frameType,
u8 frmType,
u8 *dstMacAddr,
u8 *bssid,
- A_UINT16 optIEDataLen,
+ u16 optIEDataLen,
u8 *optIEData);
-int wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, A_UINT16 intvl);
-int wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, A_UINT16 voicePktSize);
+int wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, u16 intvl);
+int wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, u16 voicePktSize);
int wmi_set_max_sp_len_cmd(struct wmi_t *wmip, u8 maxSpLen);
u8 convert_userPriority_to_trafficClass(u8 userPriority);
u8 wmi_get_power_mode_cmd(struct wmi_t *wmip);
int wmi_set_appie_cmd(struct wmi_t *wmip, u8 mgmtFrmType,
u8 ieLen,u8 *ieInfo);
-int wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, A_UINT16 dataLen);
+int wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen);
A_INT32 wmi_get_rate(A_INT8 rateindex);
u8 acl_add_del_mac(WMI_AP_ACL *a, WMI_AP_ACL_MAC_CMD *acl);
int
-wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, A_UINT16 reason);
+wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, u16 reason);
int
-wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, bool flag);
+wmi_set_pvb_cmd(struct wmi_t *wmip, u16 aid, bool flag);
int
wmi_ap_conn_inact_time(struct wmi_t *wmip, A_UINT32 period);
wmi_set_ht_op_cmd(struct wmi_t *wmip, u8 sta_chan_width);
int
-wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, A_UINT16 sz);
+wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, u16 sz);
int
wmi_set_tx_select_rates_cmd(struct wmi_t *wmip, A_UINT32 *pMaskArray);
wmi_delete_aggr_cmd(struct wmi_t *wmip, u8 tid, bool uplink);
int
-wmi_allow_aggr_cmd(struct wmi_t *wmip, A_UINT16 tx_tidmask, A_UINT16 rx_tidmask);
+wmi_allow_aggr_cmd(struct wmi_t *wmip, u16 tx_tidmask, u16 rx_tidmask);
int
wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, u8 rxMetaVersion, bool rxDot11Hdr, bool defragOnHost);
int
wmi_set_pmk_cmd(struct wmi_t *wmip, u8 *pmk);
-A_UINT16
-wmi_ieee2freq (int chan);
+u16 wmi_ieee2freq (int chan);
A_UINT32
-wmi_freq2ieee (A_UINT16 freq);
+wmi_freq2ieee (u16 freq);
bss_t *
wmi_find_matching_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid,
{
int status = A_OK;
u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0};
- A_UINT16 baudVal;
+ u16 baudVal;
u8 *pEvent = NULL;
u8 *pBufferToFree = NULL;
do {
if (pConfig->Flags & AR3K_CONFIG_FLAG_SET_AR3K_BAUD) {
- baudVal = (A_UINT16)(pConfig->AR3KBaudRate / 100);
+ baudVal = (u16)(pConfig->AR3KBaudRate / 100);
hciBaudChangeCommand[3] = (u8)baudVal;
hciBaudChangeCommand[4] = (u8)(baudVal >> 8);
typedef struct tRamPatch
{
- A_UINT16 Len;
+ u16 Len;
u8 *Data;
} tRamPatch, *ptRamPatch;
char *Buffer;
char *pCharLine;
u8 TagCount;
- A_UINT16 ByteCount;
+ u16 ByteCount;
u8 ParseSection=RAM_PS_SECTION;
A_UINT32 pos;
#ifndef A_UINT32
#define A_UCHAR unsigned char
#define A_UINT32 unsigned long
-#define A_UINT16 unsigned short
+#define u16 unsigned short
#define u8 unsigned char
#define bool unsigned char
#endif /* A_UINT32 */
#endif /* CONFIG_AR6002_REV1_FORCE_HOST */
-void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription)
+void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription)
{
char stream[60];
char byteOffsetStr[10];
A_UINT32 i;
- A_UINT16 offset, count, byteOffset;
+ u16 offset, count, byteOffset;
A_PRINTF("<---------Dumping %d Bytes : %s ------>\n", length, pDescription);
skb && ar->arConnected) {
bool needWake = false;
if (isEvent) {
- if (A_NETBUF_LEN(skb) >= sizeof(A_UINT16)) {
- A_UINT16 cmd = *(const A_UINT16 *)A_NETBUF_DATA(skb);
+ if (A_NETBUF_LEN(skb) >= sizeof(u16)) {
+ u16 cmd = *(const u16 *)A_NETBUF_DATA(skb);
switch (cmd) {
case WMI_CONNECT_EVENTID:
case WMI_DISCONNECT_EVENTID:
#endif /* BLOCK_TX_PATH_FLAG */
typedef struct user_rssi_compensation_t {
- A_UINT16 customerID;
+ u16 customerID;
union {
- A_UINT16 a_enable;
- A_UINT16 bg_enable;
- A_UINT16 enable;
+ u16 a_enable;
+ u16 bg_enable;
+ u16 enable;
};
A_INT16 bg_param_a;
A_INT16 bg_param_b;
static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket);
#ifdef ATH_AR6K_11N_SUPPORT
-static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, A_UINT16 num);
+static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num);
#endif
static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf);
//static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf);
#ifdef ATH_AR6K_11N_SUPPORT
static void
-ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, A_UINT16 num)
+ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num)
{
void * osbuf;
static
void calculate_crc(A_UINT32 TargetType, A_UCHAR *eeprom_data)
{
- A_UINT16 *ptr_crc;
- A_UINT16 *ptr16_eeprom;
- A_UINT16 checksum;
+ u16 *ptr_crc;
+ u16 *ptr16_eeprom;
+ u16 checksum;
A_UINT32 i;
A_UINT32 eeprom_size;
if (TargetType == TARGET_TYPE_AR6001)
{
eeprom_size = 512;
- ptr_crc = (A_UINT16 *)eeprom_data;
+ ptr_crc = (u16 *)eeprom_data;
}
else if (TargetType == TARGET_TYPE_AR6003)
{
eeprom_size = 1024;
- ptr_crc = (A_UINT16 *)((A_UCHAR *)eeprom_data + 0x04);
+ ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04);
}
else
{
eeprom_size = 768;
- ptr_crc = (A_UINT16 *)((A_UCHAR *)eeprom_data + 0x04);
+ ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04);
}
// Recalculate new CRC
checksum = 0;
- ptr16_eeprom = (A_UINT16 *)eeprom_data;
+ ptr16_eeprom = (u16 *)eeprom_data;
for (i = 0;i < eeprom_size; i += 2)
{
checksum = checksum ^ (*ptr16_eeprom);
* of 0-3 */
connect.ConnectionFlags &= ~HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK;
connect.ConnectionFlags |=
- ((A_UINT16)reduce_credit_dribble - 1) & HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK;
+ ((u16)reduce_credit_dribble - 1) & HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK;
}
/* connect to best-effort service */
connect.ServiceID = WMI_DATA_BE_SVC;
void
-ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList)
+ar6000_channelList_rx(void *devt, A_INT8 numChan, u16 *chanList)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
- A_MEMCPY(ar->arChannelList, chanList, numChan * sizeof (A_UINT16));
+ A_MEMCPY(ar->arChannelList, chanList, numChan * sizeof (u16));
ar->arNumChannels = numChan;
wake_up(&arEvent);
AR6000_STAT_INC(ar, rx_length_errors);
A_NETBUF_FREE(skb);
} else {
- A_UINT16 seq_no;
+ u16 seq_no;
u8 meta_type;
#if 0
sta_t *conn = NULL;
u8 psState=0,prevPsState;
ATH_MAC_HDR *datap=NULL;
- A_UINT16 offset;
+ u16 offset;
meta_type = WMI_DATA_HDR_GET_META(dhdr);
}
void
-add_new_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 aid, u8 *wpaie,
+add_new_sta(AR_SOFTC_T *ar, u8 *mac, u16 aid, u8 *wpaie,
u8 ielen, u8 keymgmt, u8 ucipher, u8 auth)
{
u8 free_slot=aid-1;
}
void
-ar6000_connect_event(AR_SOFTC_T *ar, A_UINT16 channel, u8 *bssid,
- A_UINT16 listenInterval, A_UINT16 beaconInterval,
+ar6000_connect_event(AR_SOFTC_T *ar, u16 channel, u8 *bssid,
+ u16 listenInterval, u16 beaconInterval,
NETWORK_TYPE networkType, u8 beaconIeLen,
u8 assocReqLen, u8 assocRespLen,
u8 *assocInfo)
if (assocRespLen && (sizeof(buf) > (12 + (assocRespLen * 2))))
{
assoc_resp_ie_pos = beaconIeLen + assocReqLen +
- sizeof(A_UINT16) + /* capinfo*/
- sizeof(A_UINT16) + /* status Code */
- sizeof(A_UINT16) ; /* associd */
+ sizeof(u16) + /* capinfo*/
+ sizeof(u16) + /* status Code */
+ sizeof(u16) ; /* associd */
A_MEMZERO(buf, sizeof(buf));
sprintf(buf, "%s", tag2);
pos = buf + 12;
* assoc Request includes capability and listen interval. Skip these.
*/
assoc_req_ie_pos = beaconIeLen +
- sizeof(A_UINT16) + /* capinfo*/
- sizeof(A_UINT16); /* listen interval */
+ sizeof(u16) + /* capinfo*/
+ sizeof(u16); /* listen interval */
A_MEMZERO(buf, sizeof(buf));
sprintf(buf, "%s", tag1);
}
-u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 reason)
+u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason)
{
u8 i, removed=0;
void
ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid,
- u8 assocRespLen, u8 *assocInfo, A_UINT16 protocolReasonStatus)
+ u8 assocRespLen, u8 *assocInfo, u16 protocolReasonStatus)
{
u8 i;
unsigned long flags;
}
void
-ar6000_channel_change_event(AR_SOFTC_T *ar, A_UINT16 oldChannel,
- A_UINT16 newChannel)
+ar6000_channel_change_event(AR_SOFTC_T *ar, u16 oldChannel,
+ u16 newChannel)
{
A_PRINTF("Channel Change notification\nOld Channel: %d, New Channel: %d\n",
oldChannel, newChannel);
* the event ID and event content.
*/
#define EVENT_ID_LEN 2
-void ar6000_send_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId,
+void ar6000_send_event_to_app(AR_SOFTC_T *ar, u16 eventId,
u8 *datap, int len)
{
/* note: IWEVCUSTOM only exists in wireless extensions after version 15 */
char *buf;
- A_UINT16 size;
+ u16 size;
union iwreq_data wrqu;
size = len + EVENT_ID_LEN;
A_MEMCPY(buf, &eventId, EVENT_ID_LEN);
A_MEMCPY(buf+EVENT_ID_LEN, datap, len);
- //AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(A_UINT16*)buf, size));
+ //AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(u16 *)buf, size));
A_MEMZERO(&wrqu, sizeof(wrqu));
wrqu.data.length = size;
wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf);
* to the application. The buf which is sent to application
* includes the event ID and event content.
*/
-void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId,
+void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, u16 eventId,
u8 *datap, int len)
{
/* IWEVGENIE exists in wireless extensions version 18 onwards */
char *buf;
- A_UINT16 size;
+ u16 size;
union iwreq_data wrqu;
size = len + EVENT_ID_LEN;
int
ar6000_get_driver_cfg(struct net_device *dev,
- A_UINT16 cfgParam,
+ u16 cfgParam,
void *result)
{
cust_data_ptr = ar6000_get_cust_data_buffer(ar->arTargetType);
- rssi_compensation_param.customerID = *(A_UINT16 *)cust_data_ptr & 0xffff;
- rssi_compensation_param.enable = *(A_UINT16 *)(cust_data_ptr+2) & 0xffff;
- rssi_compensation_param.bg_param_a = *(A_UINT16 *)(cust_data_ptr+4) & 0xffff;
- rssi_compensation_param.bg_param_b = *(A_UINT16 *)(cust_data_ptr+6) & 0xffff;
- rssi_compensation_param.a_param_a = *(A_UINT16 *)(cust_data_ptr+8) & 0xffff;
- rssi_compensation_param.a_param_b = *(A_UINT16 *)(cust_data_ptr+10) &0xffff;
+ rssi_compensation_param.customerID = *(u16 *)cust_data_ptr & 0xffff;
+ rssi_compensation_param.enable = *(u16 *)(cust_data_ptr+2) & 0xffff;
+ rssi_compensation_param.bg_param_a = *(u16 *)(cust_data_ptr+4) & 0xffff;
+ rssi_compensation_param.bg_param_b = *(u16 *)(cust_data_ptr+6) & 0xffff;
+ rssi_compensation_param.a_param_a = *(u16 *)(cust_data_ptr+8) & 0xffff;
+ rssi_compensation_param.a_param_b = *(u16 *)(cust_data_ptr+10) &0xffff;
rssi_compensation_param.reserved = *(A_UINT32 *)(cust_data_ptr+12);
#ifdef RSSICOMPENSATION_PRINT
/* Set the listen interval into 1000TUs or more. This value will be indicated to Ap in the conn.
later set it back locally at the STA to 100/1000 TUs depending on the power mode */
if ((ar->arNetworkType == INFRA_NETWORK)) {
- wmi_listeninterval_cmd(ar->arWmi, max(ar->arListenIntervalT, (A_UINT16)A_MAX_WOW_LISTEN_INTERVAL), 0);
+ wmi_listeninterval_cmd(ar->arWmi, max(ar->arListenIntervalT, (u16)A_MAX_WOW_LISTEN_INTERVAL), 0);
}
status = wmi_connect_cmd(ar->arWmi, ar->arNetworkType,
ar->arDot11AuthMode, ar->arAuthMode,
}
int
-is_iwioctl_allowed(u8 mode, A_UINT16 cmd)
+is_iwioctl_allowed(u8 mode, u16 cmd)
{
if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) {
cmd -= SIOCSIWCOMMIT;
static void ar6000_wow_resume(AR_SOFTC_T *ar)
{
if (ar->arWowState!= WLAN_WOW_STATE_NONE) {
- A_UINT16 fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period;
- A_UINT16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
+ u16 fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period;
+ u16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false};
ar->arWowState = WLAN_WOW_STATE_NONE;
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) {
int ar6000_resume_ev(void *context)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
- A_UINT16 powerState = ar->arWlanPowerState;
+ u16 powerState = ar->arWlanPowerState;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: enter previous state %d wowState %d\n", __func__, powerState, ar->arWowState));
switch (powerState) {
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode;
if (state == WLAN_ENABLED) {
- A_UINT16 fg_start_period;
+ u16 fg_start_period;
/* Not in deep sleep state.. exit */
if (ar->arWlanPowerState != WLAN_POWER_STATE_DEEP_SLEEP) {
ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent)
{
int status = A_OK;
- A_UINT16 powerState, oldPowerState;
+ u16 powerState, oldPowerState;
AR6000_WLAN_STATE oldstate = ar->arWlanState;
bool wlanOff = ar->arWlanOff;
#ifdef CONFIG_PM
}
void
-ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel,
- u8 *bssid, A_UINT16 listenInterval,
- A_UINT16 beaconInterval,NETWORK_TYPE networkType,
+ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel,
+ u8 *bssid, u16 listenInterval,
+ u16 beaconInterval,NETWORK_TYPE networkType,
u8 beaconIeLen, u8 assocReqLen,
u8 assocRespLen, u8 *assocInfo)
{
- A_UINT16 size = 0;
- A_UINT16 capability = 0;
+ u16 size = 0;
+ u16 capability = 0;
struct cfg80211_bss *bss = NULL;
struct ieee80211_mgmt *mgmt = NULL;
struct ieee80211_channel *ibss_channel = NULL;
unsigned char *ieeemgmtbuf = NULL;
u8 source_mac[ATH_MAC_LEN];
- u8 assocReqIeOffset = sizeof(A_UINT16) + /* capinfo*/
- sizeof(A_UINT16); /* listen interval */
- u8 assocRespIeOffset = sizeof(A_UINT16) + /* capinfo*/
- sizeof(A_UINT16) + /* status Code */
- sizeof(A_UINT16); /* associd */
+ u8 assocReqIeOffset = sizeof(u16) + /* capinfo*/
+ sizeof(u16); /* listen interval */
+ u8 assocRespIeOffset = sizeof(u16) + /* capinfo*/
+ sizeof(u16) + /* status Code */
+ sizeof(u16); /* associd */
u8 *assocReqIe = assocInfo + beaconIeLen + assocReqIeOffset;
u8 *assocRespIe = assocInfo + beaconIeLen + assocReqLen + assocRespIeOffset;
A_MEMCPY(source_mac, ar->arNetDev->dev_addr, ATH_MAC_LEN);
ptr_ie_buf = ie_buf;
} else {
- capability = *(A_UINT16 *)(&assocInfo[beaconIeLen]);
+ capability = *(u16 *)(&assocInfo[beaconIeLen]);
A_MEMCPY(source_mac, bssid, ATH_MAC_LEN);
ptr_ie_buf = assocReqIe;
ie_buf_len = assocReqLen;
static int
ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
- A_UINT16 reason_code)
+ u16 reason_code)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
void
ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, u8 reason,
u8 *bssid, u8 assocRespLen,
- u8 *assocInfo, A_UINT16 protocolReasonStatus)
+ u8 *assocInfo, u16 protocolReasonStatus)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: reason=%u\n", __func__, reason));
ar6k_cfg80211_scan_node(void *arg, bss_t *ni)
{
struct wiphy *wiphy = (struct wiphy *)arg;
- A_UINT16 size;
+ u16 size;
unsigned char *ieeemgmtbuf = NULL;
struct ieee80211_mgmt *mgmt;
struct ieee80211_channel *channel;
update_mac(unsigned char *eeprom, int size, unsigned char *macaddr)
{
int i;
- A_UINT16* ptr = (A_UINT16*)(eeprom+4);
- A_UINT16 checksum = 0;
+ u16 *ptr = (u16 *)(eeprom+4);
+ u16 checksum = 0;
memcpy(eeprom+10,macaddr,6);
*ptr = 0;
- ptr = (A_UINT16*)eeprom;
+ ptr = (u16 *)eeprom;
for (i=0; i<size; i+=2) {
checksum ^= *ptr++;
}
checksum = ~checksum;
- ptr = (A_UINT16*)(eeprom+4);
+ ptr = (u16 *)(eeprom+4);
*ptr = checksum;
return;
}
#define TX_PACKET_RSV_OFFSET 32
#define NUM_HTC_PACKET_STRUCTS ((MAX_ACL_RECV_BUFS + MAX_EVT_RECV_BUFS + MAX_HCI_WRITE_QUEUE_DEPTH) * 2)
-#define HCI_GET_OP_CODE(p) (((A_UINT16)((p)[1])) << 8) | ((A_UINT16)((p)[0]))
+#define HCI_GET_OP_CODE(p) (((u16)((p)[1])) << 8) | ((u16)((p)[0]))
extern unsigned int setupbtdev;
AR3K_CONFIG_INFO ar3kconfig;
if ((hciuartscale != 0) || (hciuartstep != 0)) {
/* user wants to tune HCI bridge UART scale/step values */
- ar3kconfig.AR6KScale = (A_UINT16)hciuartscale;
- ar3kconfig.AR6KStep = (A_UINT16)hciuartstep;
+ ar3kconfig.AR6KScale = (u16)hciuartscale;
+ ar3kconfig.AR6KStep = (u16)hciuartstep;
ar3kconfig.Flags |= AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP;
}
(type == HCI_COMMAND_TYPE) ? "COMMAND" : "ACL",
skb->len));
if (type == HCI_COMMAND_TYPE) {
- A_UINT16 opcode = HCI_GET_OP_CODE(skb->data);
+ u16 opcode = HCI_GET_OP_CODE(skb->data);
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,(" HCI Command: OGF:0x%X OCF:0x%X \r\n",
opcode >> 10, opcode & 0x3FF));
}
#define STA_IS_PS_POLLED(sta) (sta->flags & (STA_PS_POLLED_MASK << STA_PS_POLLED_SHIFT))
typedef struct {
- A_UINT16 flags;
+ u16 flags;
u8 mac[ATH_MAC_LEN];
u8 aid;
u8 keymgmt;
struct ar_wep_key arWepKeyList[WMI_MAX_KEY_INDEX + 1];
u8 arBssid[6];
u8 arReqBssid[6];
- A_UINT16 arChannelHint;
- A_UINT16 arBssChannel;
- A_UINT16 arListenIntervalB;
- A_UINT16 arListenIntervalT;
+ u16 arChannelHint;
+ u16 arBssChannel;
+ u16 arListenIntervalB;
+ u16 arListenIntervalT;
struct ar6000_version arVersion;
A_UINT32 arTargetType;
A_INT8 arRssi;
struct net_device_stats arNetStats;
struct iw_statistics arIwStats;
A_INT8 arNumChannels;
- A_UINT16 arChannelList[32];
+ u16 arChannelList[32];
A_UINT32 arRegCode;
bool statsUpdatePending;
TARGET_STATS arTargetStats;
A_UINT32 arTargetMode;
A_UINT32 tcmdRxcrcErrPkt;
A_UINT32 tcmdRxsecErrPkt;
- A_UINT16 tcmdRateCnt[TCMD_MAX_RATES];
- A_UINT16 tcmdRateCntShortGuard[TCMD_MAX_RATES];
+ u16 tcmdRateCnt[TCMD_MAX_RATES];
+ u16 tcmdRateCntShortGuard[TCMD_MAX_RATES];
#endif
AR6000_WLAN_STATE arWlanState;
struct ar_node_mapping arNodeMap[MAX_NODE_NUM];
A_UINT32 arCookieCount;
A_UINT32 arRateMask;
u8 arSkipScan;
- A_UINT16 arBeaconInterval;
+ u16 arBeaconInterval;
bool arConnectPending;
bool arWmmEnabled;
struct ar_hb_chlng_resp arHBChallengeResp;
#endif
USER_RSSI_THOLD rssi_map[12];
u8 arUserBssFilter;
- A_UINT16 ap_profile_flag; /* AP mode */
+ u16 ap_profile_flag; /* AP mode */
WMI_AP_ACL g_acl; /* AP mode */
sta_t sta_list[AP_MAX_NUM_STA]; /* AP mode */
u8 sta_list_index; /* AP mode */
u8 ap_country_code[3];
u8 ap_wmode;
u8 ap_dtim_period;
- A_UINT16 ap_beacon_interval;
- A_UINT16 arRTS;
- A_UINT16 arACS; /* AP mode - Auto Channel Selection */
+ u16 ap_beacon_interval;
+ u16 arRTS;
+ u16 arACS; /* AP mode - Auto Channel Selection */
HTC_PACKET_QUEUE amsdu_rx_buffer_queue;
bool bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */
A_TIMER disconnect_timer;
struct cfg80211_scan_request *scan_request;
struct ar_key keys[WMI_MAX_KEY_INDEX + 1];
#endif /* ATH6K_CONFIG_CFG80211 */
- A_UINT16 arWlanPowerState;
+ u16 arWlanPowerState;
bool arWlanOff;
#ifdef CONFIG_PM
- A_UINT16 arWowState;
+ u16 arWowState;
bool arBTOff;
bool arBTSharing;
- A_UINT16 arSuspendConfig;
- A_UINT16 arWlanOffConfig;
- A_UINT16 arWow2Config;
+ u16 arSuspendConfig;
+ u16 arWlanOffConfig;
+ u16 arWow2Config;
#endif
u8 scan_triggered;
WMI_SCAN_PARAMS_CMD scParams;
sta_t *
ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid);
-u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 reason);
+u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason);
/* HCI support */
//==============================================================================
#ifndef _AR6K_PAL_H_
#define _AR6K_PAL_H_
-#define HCI_GET_OP_CODE(p) (((A_UINT16)((p)[1])) << 8) | ((A_UINT16)((p)[0]))
+#define HCI_GET_OP_CODE(p) (((u16)((p)[1])) << 8) | ((u16)((p)[0]))
/* transmit packet reserve offset */
#define TX_PACKET_RSV_OFFSET 32
void ar6000_ready_event(void *devt, u8 *datap, u8 phyCap,
A_UINT32 sw_ver, A_UINT32 abi_ver);
int ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid);
-void ar6000_connect_event(struct ar6_softc *ar, A_UINT16 channel,
- u8 *bssid, A_UINT16 listenInterval,
- A_UINT16 beaconInterval, NETWORK_TYPE networkType,
+void ar6000_connect_event(struct ar6_softc *ar, u16 channel,
+ u8 *bssid, u16 listenInterval,
+ u16 beaconInterval, NETWORK_TYPE networkType,
u8 beaconIeLen, u8 assocReqLen,
u8 assocRespLen,u8 *assocInfo);
void ar6000_disconnect_event(struct ar6_softc *ar, u8 reason,
u8 *bssid, u8 assocRespLen,
- u8 *assocInfo, A_UINT16 protocolReasonStatus);
+ u8 *assocInfo, u16 protocolReasonStatus);
void ar6000_tkip_micerr_event(struct ar6_softc *ar, u8 keyid,
bool ismcast);
void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps);
-void ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList);
+void ar6000_channelList_rx(void *devt, A_INT8 numChan, u16 *chanList);
void ar6000_regDomain_event(struct ar6_softc *ar, A_UINT32 regCode);
void ar6000_txPwr_rx(void *devt, u8 txPwr);
void ar6000_keepalive_rx(void *devt, u8 configured);
void ar6000_reportError_event(struct ar6_softc *, WMI_TARGET_ERROR_VAL errorVal);
void ar6000_cac_event(struct ar6_softc *ar, u8 ac, u8 cac_indication,
u8 statusCode, u8 *tspecSuggestion);
-void ar6000_channel_change_event(struct ar6_softc *ar, A_UINT16 oldChannel, A_UINT16 newChannel);
+void ar6000_channel_change_event(struct ar6_softc *ar, u16 oldChannel, u16 newChannel);
void ar6000_hbChallengeResp_event(struct ar6_softc *, A_UINT32 cookie, A_UINT32 source);
void
ar6000_roam_tbl_event(struct ar6_softc *ar, WMI_TARGET_ROAM_TBL *pTbl);
void ar6000_dbglog_init_done(struct ar6_softc *ar);
#ifdef SEND_EVENT_TO_APP
-void ar6000_send_event_to_app(struct ar6_softc *ar, A_UINT16 eventId, u8 *datap, int len);
-void ar6000_send_generic_event_to_app(struct ar6_softc *ar, A_UINT16 eventId, u8 *datap, int len);
+void ar6000_send_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len);
+void ar6000_send_generic_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len);
#endif
#ifdef CONFIG_HOST_TCMD_SUPPORT
void ar6000_ratemask_rx(void *devt, A_UINT32 ratemask);
int ar6000_get_driver_cfg(struct net_device *dev,
- A_UINT16 cfgParam,
+ u16 cfgParam,
void *result);
void ar6000_bssInfo_event_rx(struct ar6_softc *ar, u8 *data, int len);
int
ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie);
-int is_iwioctl_allowed(u8 mode, A_UINT16 cmd);
+int is_iwioctl_allowed(u8 mode, u16 cmd);
int is_xioctl_allowed(u8 mode, int cmd);
/* used by AR6000_IOCTL_WMI_GET_QOS_QUEUE */
struct ar6000_queuereq {
u8 trafficClass;
- A_UINT16 activeTsids;
+ u16 activeTsids;
};
/* used by AR6000_IOCTL_WMI_GET_TARGET_STATS */
A_UINT32 lq_val;
A_UINT32 wow_num_pkts_dropped;
- A_UINT16 wow_num_events_discarded;
+ u16 wow_num_events_discarded;
A_INT16 noise_floor_calibation;
A_INT16 cs_rssi;
/* used by the AR6000_XIOCTL_DBGLOG_CFG_MODULE */
typedef struct ar6000_dbglog_module_config_s {
A_UINT32 valid;
- A_UINT16 mmask;
- A_UINT16 tsr;
+ u16 mmask;
+ u16 tsr;
u32 rep;
- A_UINT16 size;
+ u16 size;
} DBGLOG_MODULE_CONFIG;
typedef struct user_rssi_thold_t {
void ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status);
-void ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel,
- u8 *bssid, A_UINT16 listenInterval,
- A_UINT16 beaconInterval,NETWORK_TYPE networkType,
+void ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel,
+ u8 *bssid, u16 listenInterval,
+ u16 beaconInterval,NETWORK_TYPE networkType,
u8 beaconIeLen, u8 assocReqLen,
u8 assocRespLen, u8 *assocInfo);
void ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, u8 reason,
u8 *bssid, u8 assocRespLen,
- u8 *assocInfo, A_UINT16 protocolReasonStatus);
+ u8 *assocInfo, u16 protocolReasonStatus);
void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast);
cmdp = A_MALLOC(130);
if (copy_from_user(cmdp, rq->ifr_data,
sizeof (*cmdp) +
- ((cmd.numChannels - 1) * sizeof(A_UINT16))))
+ ((cmd.numChannels - 1) * sizeof(u16))))
{
kfree(cmdp);
return -EFAULT;
buf[2] = ar->tcmdRxcrcErrPkt;
buf[3] = ar->tcmdRxsecErrPkt;
A_MEMCPY(((A_UCHAR *)buf)+(4*sizeof(A_UINT32)), ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt));
- A_MEMCPY(((A_UCHAR *)buf)+(4*sizeof(A_UINT32))+(TCMD_MAX_RATES *sizeof(A_UINT16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard));
+ A_MEMCPY(((A_UCHAR *)buf)+(4*sizeof(A_UINT32))+(TCMD_MAX_RATES *sizeof(u16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard));
if (!ret && copy_to_user(rq->ifr_data, buf, sizeof(buf))) {
ret = -EFAULT;
if (copy_from_user(cmdp, userdata,
sizeof (*cmdp) +
((setStartScanCmd.numChannels - 1) *
- sizeof(A_UINT16))))
+ sizeof(u16))))
{
kfree(cmdp);
ret = -EFAULT;
#ifdef WAPI_ENABLE
u8 *ie = erq->pointer;
u8 ie_type = ie[0];
- A_UINT16 ie_length = erq->length;
+ u16 ie_length = erq->length;
u8 wapi_ie[128];
#endif
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
bool profChanged;
- A_UINT16 param;
+ u16 param;
A_INT32 ret;
A_INT32 value;
struct iw_param *data, char *extra)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- A_UINT16 param;
+ u16 param;
A_INT32 ret;
if (ar->arWmiReady == false) {
typedef struct {
void *osbuf;
bool is_amsdu;
- A_UINT16 seq_no;
+ u16 seq_no;
}OSBUF_HOLD_Q;
#if 0
typedef struct {
- A_UINT16 seqno_st;
- A_UINT16 seqno_end;
+ u16 seqno_st;
+ u16 seqno_end;
}WINDOW_SNAPSHOT;
#endif
bool aggr; /* is it ON or OFF */
bool progress; /* true when frames have arrived after a timer start */
bool timerMon; /* true if the timer started for the sake of this TID */
- A_UINT16 win_sz; /* negotiated window size */
- A_UINT16 seq_next; /* Next seq no, in current window */
+ u16 win_sz; /* negotiated window size */
+ u16 seq_next; /* Next seq no, in current window */
A_UINT32 hold_q_sz; /* Num of frames that can be held in hold q */
OSBUF_HOLD_Q *hold_q; /* Hold q for re-order */
#if 0
aggr_timeout(A_ATH_TIMER arg);
static void
-aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, A_UINT16 seq_no, u8 order);
+aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, u16 seq_no, u8 order);
static void
aggr_dispatch_frames(AGGR_INFO *p_aggr, A_NETBUF_QUEUE_T *q);
void
-aggr_process_bar(void *cntxt, u8 tid, A_UINT16 seq_no)
+aggr_process_bar(void *cntxt, u8 tid, u16 seq_no)
{
AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt;
RXTID_STATS *stats;
void
-aggr_recv_addba_req_evt(void *cntxt, u8 tid, A_UINT16 seq_no, u8 win_sz)
+aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz)
{
AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt;
RXTID *rxtid;
}
static void
-aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, A_UINT16 seq_no, u8 order)
+aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, u16 seq_no, u8 order)
{
RXTID *rxtid;
OSBUF_HOLD_Q *node;
- A_UINT16 idx, idx_end, seq_end;
+ u16 idx, idx_end, seq_end;
RXTID_STATS *stats;
A_ASSERT(p_aggr);
aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf)
{
void *new_buf;
- A_UINT16 frame_8023_len, payload_8023_len, mac_hdr_len, amsdu_len;
+ u16 frame_8023_len, payload_8023_len, mac_hdr_len, amsdu_len;
u8 *framep;
/* Frame format at this point:
}
void
-aggr_process_recv_frm(void *cntxt, u8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf)
+aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osbuf)
{
AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt;
RXTID *rxtid;
RXTID_STATS *stats;
- A_UINT16 idx, st, cur, end;
- A_UINT16 *log_idx;
+ u16 idx, st, cur, end;
+ u16 *log_idx;
OSBUF_HOLD_Q *node;
PACKET_LOG *log;
* be assumed that the window has moved for some valid reason.
* Therefore, we dequeue all frames and start fresh.
*/
- A_UINT16 extended_end;
+ u16 extended_end;
extended_end = (end + rxtid->hold_q_sz-1) & IEEE80211_MAX_SEQ_NO;
u8 ouiType;
u8 ouiSubType;
u8 version;
- A_UINT16 tsInfo_info;
+ u16 tsInfo_info;
u8 tsInfo_reserved;
- A_UINT16 nominalMSDU;
- A_UINT16 maxMSDU;
+ u16 nominalMSDU;
+ u16 maxMSDU;
A_UINT32 minServiceInt;
A_UINT32 maxServiceInt;
A_UINT32 inactivityInt;
A_UINT32 maxBurstSize;
A_UINT32 delayBound;
A_UINT32 minPhyRate;
- A_UINT16 sba;
- A_UINT16 mediumTime;
+ u16 sba;
+ u16 mediumTime;
} POSTPACK WMM_TSPEC_IE;
/* unaligned little endian access */
#define LE_READ_2(p) \
- ((A_UINT16) \
+ ((u16) \
((((u8 *)(p))[0] ) | (((u8 *)(p))[1] << 8)))
#define LE_READ_4(p) \
A_MEMZERO(cie, sizeof(*cie));
cie->ie_tstamp = frm; frm += 8;
- cie->ie_beaconInt = A_LE2CPU16(*(A_UINT16 *)frm); frm += 2;
- cie->ie_capInfo = A_LE2CPU16(*(A_UINT16 *)frm); frm += 2;
+ cie->ie_beaconInt = A_LE2CPU16(*(u16 *)frm); frm += 2;
+ cie->ie_capInfo = A_LE2CPU16(*(u16 *)frm); frm += 2;
cie->ie_chan = 0;
while (frm < efrm) {
/*
* converts ieee channel number to frequency
*/
-A_UINT16
-wlan_ieee2freq(int chan)
+u16 wlan_ieee2freq(int chan)
{
if (chan == 14) {
return 2484;
* Converts MHz frequency to IEEE channel number.
*/
A_UINT32
-wlan_freq2ieee(A_UINT16 freq)
+wlan_freq2ieee(u16 freq)
{
if (freq == 2484)
return 14;
typedef PREPACK struct _iphdr {
u8 ip_ver_hdrlen; /* version and hdr length */
u8 ip_tos; /* type of service */
- A_UINT16 ip_len; /* total length */
- A_UINT16 ip_id; /* identification */
+ u16 ip_len; /* total length */
+ u16 ip_id; /* identification */
A_INT16 ip_off; /* fragment offset field */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
u8 ip_ttl; /* time to live */
u8 ip_p; /* protocol */
- A_UINT16 ip_sum; /* checksum */
+ u16 ip_sum; /* checksum */
u8 ip_src[4]; /* source and dest address */
u8 ip_dst[4];
} POSTPACK iphdr;
wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
{
u8 *datap;
- A_UINT16 typeorlen;
+ u16 typeorlen;
ATH_MAC_HDR macHdr;
ATH_LLC_SNAP_HDR *llcHdr;
datap = A_NETBUF_DATA(osbuf);
- typeorlen = *(A_UINT16 *)(datap + ATH_MAC_LEN + ATH_MAC_LEN);
+ typeorlen = *(u16 *)(datap + ATH_MAC_LEN + ATH_MAC_LEN);
if (!IS_ETHERTYPE(A_BE2CPU16(typeorlen))) {
/*
{
u8 *datap;
u8 trafficClass = WMM_AC_BE;
- A_UINT16 ipType = IP_ETHERTYPE;
+ u16 ipType = IP_ETHERTYPE;
WMI_DATA_HDR *dtHdr;
u8 streamExists = 0;
u8 userPriority;
wmi_dot11_hdr_add (struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode)
{
u8 *datap;
- A_UINT16 typeorlen;
+ u16 typeorlen;
ATH_MAC_HDR macHdr;
ATH_LLC_SNAP_HDR *llcHdr;
struct ieee80211_frame *wh;
datap = A_NETBUF_DATA(osbuf);
- typeorlen = *(A_UINT16 *)(datap + ATH_MAC_LEN + ATH_MAC_LEN);
+ typeorlen = *(u16 *)(datap + ATH_MAC_LEN + ATH_MAC_LEN);
if (!IS_ETHERTYPE(A_BE2CPU16(typeorlen))) {
/*
wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
{
WMIX_CMD_HDR *cmd;
- A_UINT16 id;
+ u16 id;
u8 *datap;
A_UINT32 len;
int status = A_OK;
wmi_control_rx(struct wmi_t *wmip, void *osbuf)
{
WMI_CMD_HDR *cmd;
- A_UINT16 id;
+ u16 id;
u8 *datap;
A_UINT32 len, i, loggingReq;
int status = A_OK;
/* initialize pointer to start of assoc rsp IEs */
pie = ev->assocInfo + ev->beaconIeLen + ev->assocReqLen +
- sizeof(A_UINT16) + /* capinfo*/
- sizeof(A_UINT16) + /* status Code */
- sizeof(A_UINT16) ; /* associd */
+ sizeof(u16) + /* capinfo*/
+ sizeof(u16) + /* status Code */
+ sizeof(u16) ; /* associd */
/* initialize pointer to end of assoc rsp IEs */
peie = ev->assocInfo + ev->beaconIeLen + ev->assocReqLen + ev->assocRespLen;
{
WMI_CAC_EVENT *reply;
WMM_TSPEC_IE *tspec_ie;
- A_UINT16 activeTsids;
+ u16 activeTsids;
if (len < sizeof(*reply)) {
return A_EINVAL;
static int
wmi_aplistEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
{
- A_UINT16 ap_info_entry_size;
+ u16 ap_info_entry_size;
WMI_APLIST_EVENT *ev = (WMI_APLIST_EVENT *)datap;
WMI_AP_INFO_V1 *ap_info_v1;
u8 i;
}
cHdr = (WMI_CMD_HDR *)A_NETBUF_DATA(osbuf);
- cHdr->commandId = (A_UINT16) cmdId;
+ cHdr->commandId = (u16) cmdId;
cHdr->info1 = 0; // added for virtual interface
/*
CRYPTO_TYPE pairwiseCrypto, u8 pairwiseCryptoLen,
CRYPTO_TYPE groupCrypto, u8 groupCryptoLen,
int ssidLength, A_UCHAR *ssid,
- u8 *bssid, A_UINT16 channel, A_UINT32 ctrl_flags)
+ u8 *bssid, u16 channel, A_UINT32 ctrl_flags)
{
void *osbuf;
WMI_CONNECT_CMD *cc;
}
int
-wmi_reconnect_cmd(struct wmi_t *wmip, u8 *bssid, A_UINT16 channel)
+wmi_reconnect_cmd(struct wmi_t *wmip, u8 *bssid, u16 channel)
{
void *osbuf;
WMI_RECONNECT_CMD *cc;
wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
u32 forceFgScan, u32 isLegacy,
A_UINT32 homeDwellTime, A_UINT32 forceScanInterval,
- A_INT8 numChan, A_UINT16 *channelList)
+ A_INT8 numChan, u16 *channelList)
{
void *osbuf;
WMI_START_SCAN_CMD *sc;
if (numChan > WMI_MAX_CHANNELS) {
return A_EINVAL;
}
- size += sizeof(A_UINT16) * (numChan - 1);
+ size += sizeof(u16) * (numChan - 1);
}
osbuf = A_NETBUF_ALLOC(size);
sc->forceScanInterval = forceScanInterval;
sc->numChannels = numChan;
if (numChan) {
- A_MEMCPY(sc->channelList, channelList, numChan * sizeof(A_UINT16));
+ A_MEMCPY(sc->channelList, channelList, numChan * sizeof(u16));
}
return (wmi_cmd_send(wmip, osbuf, WMI_START_SCAN_CMDID, NO_SYNC_WMIFLAG));
}
int
-wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
- A_UINT16 fg_end_sec, A_UINT16 bg_sec,
- A_UINT16 minact_chdw_msec, A_UINT16 maxact_chdw_msec,
- A_UINT16 pas_chdw_msec,
+wmi_scanparams_cmd(struct wmi_t *wmip, u16 fg_start_sec,
+ u16 fg_end_sec, u16 bg_sec,
+ u16 minact_chdw_msec, u16 maxact_chdw_msec,
+ u16 pas_chdw_msec,
u8 shScanRatio, u8 scanCtrlFlags,
- A_UINT32 max_dfsch_act_time, A_UINT16 maxact_scan_per_ssid)
+ A_UINT32 max_dfsch_act_time, u16 maxact_scan_per_ssid)
{
void *osbuf;
WMI_SCAN_PARAMS_CMD *sc;
}
int
-wmi_listeninterval_cmd(struct wmi_t *wmip, A_UINT16 listenInterval, A_UINT16 listenBeacons)
+wmi_listeninterval_cmd(struct wmi_t *wmip, u16 listenInterval, u16 listenBeacons)
{
void *osbuf;
WMI_LISTEN_INT_CMD *cmd;
}
int
-wmi_bmisstime_cmd(struct wmi_t *wmip, A_UINT16 bmissTime, A_UINT16 bmissBeacons)
+wmi_bmisstime_cmd(struct wmi_t *wmip, u16 bmissTime, u16 bmissBeacons)
{
void *osbuf;
WMI_BMISS_TIME_CMD *cmd;
{
void *osbuf;
WMI_SET_ASSOC_INFO_CMD *cmd;
- A_UINT16 cmdLen;
+ u16 cmdLen;
cmdLen = sizeof(*cmd) + ieLen - 1;
osbuf = A_NETBUF_ALLOC(cmdLen);
int
wmi_ibsspmcaps_cmd(struct wmi_t *wmip, u8 pmEnable, u8 ttl,
- A_UINT16 atim_windows, A_UINT16 timeout_value)
+ u16 atim_windows, u16 timeout_value)
{
void *osbuf;
WMI_IBSS_PM_CAPS_CMD *cmd;
}
int
-wmi_pmparams_cmd(struct wmi_t *wmip, A_UINT16 idlePeriod,
- A_UINT16 psPollNum, A_UINT16 dtimPolicy,
- A_UINT16 tx_wakeup_policy, A_UINT16 num_tx_to_wakeup,
- A_UINT16 ps_fail_event_policy)
+wmi_pmparams_cmd(struct wmi_t *wmip, u16 idlePeriod,
+ u16 psPollNum, u16 dtimPolicy,
+ u16 tx_wakeup_policy, u16 num_tx_to_wakeup,
+ u16 ps_fail_event_policy)
{
void *osbuf;
WMI_POWER_PARAMS_CMD *pm;
{
void *osbuf;
WMI_SET_PMKID_LIST_CMD *cmd;
- A_UINT16 cmdLen;
+ u16 cmdLen;
u8 i;
cmdLen = sizeof(pmkInfo->numPMKID) +
void *osbuf;
WMI_DELETE_PSTREAM_CMD *cmd;
int status;
- A_UINT16 activeTsids=0;
+ u16 activeTsids=0;
/* validate the parameters */
if (trafficClass > 3) {
}
int
-wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, A_UINT16 rateMask)
+wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, u16 rateMask)
{
void *osbuf;
WMI_FRAME_RATES_CMD *cmd;
int
wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
WMI_PHY_MODE mode, A_INT8 numChan,
- A_UINT16 *channelList)
+ u16 *channelList)
{
void *osbuf;
WMI_CHANNEL_PARAMS_CMD *cmd;
if (numChan > WMI_MAX_CHANNELS) {
return A_EINVAL;
}
- size += sizeof(A_UINT16) * (numChan - 1);
+ size += sizeof(u16) * (numChan - 1);
}
osbuf = A_NETBUF_ALLOC(size);
cmd->scanParam = scanParam;
cmd->phyMode = mode;
cmd->numChannels = numChan;
- A_MEMCPY(cmd->channelList, channelList, numChan * sizeof(A_UINT16));
+ A_MEMCPY(cmd->channelList, channelList, numChan * sizeof(u16));
return (wmi_cmd_send(wmip, osbuf, WMI_SET_CHANNEL_PARAMS_CMDID,
NO_SYNC_WMIFLAG));
void *osbuf;
A_INT8 size;
WMI_SET_HOST_SLEEP_MODE_CMD *cmd;
- A_UINT16 activeTsids=0;
+ u16 activeTsids=0;
u8 streamExists=0;
u8 i;
}
int
-wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
- A_UINT16 tsr, bool rep, A_UINT16 size,
+wmi_config_debug_module_cmd(struct wmi_t *wmip, u16 mmask,
+ u16 tsr, bool rep, u16 size,
A_UINT32 valid)
{
void *osbuf;
return wmi_simple_cmd(wmip, WMI_GET_TX_PWR_CMDID);
}
-A_UINT16
-wmi_get_mapped_qos_queue(struct wmi_t *wmip, u8 trafficClass)
+u16 wmi_get_mapped_qos_queue(struct wmi_t *wmip, u8 trafficClass)
{
- A_UINT16 activeTsids=0;
+ u16 activeTsids=0;
LOCK_WMI(wmip);
activeTsids = wmip->wmi_streamExistsForAC[trafficClass];
#endif /* CONFIG_HOST_GPIO_SUPPORT */
int
-wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, A_UINT16 txop, u8 eCWmin,
+wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, u16 txop, u8 eCWmin,
u8 eCWmax, u8 aifsn)
{
void *osbuf;
u8 frmType,
u8 *dstMacAddr,
u8 *bssid,
- A_UINT16 optIEDataLen,
+ u16 optIEDataLen,
u8 *optIEData)
{
void *osbuf;
}
int
-wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, A_UINT16 intvl)
+wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, u16 intvl)
{
void *osbuf;
WMI_BEACON_INT_CMD *cmd;
int
-wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, A_UINT16 voicePktSize)
+wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, u16 voicePktSize)
{
void *osbuf;
WMI_SET_VOICE_PKT_SIZE_CMD *cmd;
}
int
-wmi_set_rts_cmd(struct wmi_t *wmip, A_UINT16 threshold)
+wmi_set_rts_cmd(struct wmi_t *wmip, u16 threshold)
{
void *osbuf;
WMI_SET_RTS_CMD *cmd;
{
void *osbuf;
WMI_SET_APPIE_CMD *cmd;
- A_UINT16 cmdLen;
+ u16 cmdLen;
cmdLen = sizeof(*cmd) + ieLen - 1;
osbuf = A_NETBUF_ALLOC(cmdLen);
}
int
-wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, A_UINT16 dataLen)
+wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen)
{
void *osbuf;
u8 *data;
* firware will allow all STAs till the count reaches AP_MAX_NUM_STA.
*/
int
-wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, A_UINT16 reason)
+wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, u16 reason)
{
void *osbuf;
WMI_AP_SET_MLME_CMD *mlme;
#endif
int
-wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, bool flag)
+wmi_set_pvb_cmd(struct wmi_t *wmip, u16 aid, bool flag)
{
WMI_AP_SET_PVB_CMD *cmd;
void *osbuf = NULL;
int
-wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, A_UINT16 sz)
+wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, u16 sz)
{
void *osbuf;
WMI_HCI_CMD *cmd;
#ifdef ATH_AR6K_11N_SUPPORT
int
-wmi_allow_aggr_cmd(struct wmi_t *wmip, A_UINT16 tx_tidmask, A_UINT16 rx_tidmask)
+wmi_allow_aggr_cmd(struct wmi_t *wmip, u16 tx_tidmask, u16 rx_tidmask)
{
void *osbuf;
WMI_ALLOW_AGGR_CMD *cmd;
return node;
}
-A_UINT16
-wmi_ieee2freq (int chan)
+u16 wmi_ieee2freq (int chan)
{
- A_UINT16 freq = 0;
+ u16 freq = 0;
freq = wlan_ieee2freq (chan);
return freq;
}
A_UINT32
-wmi_freq2ieee (A_UINT16 freq)
+wmi_freq2ieee (u16 freq)
{
- A_UINT16 chan = 0;
+ u16 chan = 0;
chan = wlan_freq2ieee (freq);
return chan;
}
struct wmi_t {
bool wmi_ready;
bool wmi_numQoSStream;
- A_UINT16 wmi_streamExistsForAC[WMM_NUM_AC];
+ u16 wmi_streamExistsForAC[WMM_NUM_AC];
u8 wmi_fatPipeExists;
void *wmi_devt;
struct wmi_stats wmi_stats;