| 1 | #ifndef _A_DRV_API_H_ |
| 2 | #define _A_DRV_API_H_ |
| 3 | /* |
| 4 | * Copyright (c) 2004-2006 Atheros Communications Inc. |
| 5 | * All rights reserved. |
| 6 | * |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation; |
| 11 | * |
| 12 | * Software distributed under the License is distributed on an "AS |
| 13 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 14 | * implied. See the License for the specific language governing |
| 15 | * rights and limitations under the License. |
| 16 | * |
| 17 | * |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | /****************************************************************************/ |
| 26 | /****************************************************************************/ |
| 27 | /** **/ |
| 28 | /** WMI related hooks **/ |
| 29 | /** **/ |
| 30 | /****************************************************************************/ |
| 31 | /****************************************************************************/ |
| 32 | |
| 33 | #include <ar6000_api.h> |
| 34 | |
| 35 | #define A_WMI_CHANNELLIST_RX(devt, numChan, chanList) \ |
| 36 | ar6000_channelList_rx((devt), (numChan), (chanList)) |
| 37 | |
| 38 | #define A_WMI_SET_NUMDATAENDPTS(devt, num) \ |
| 39 | ar6000_set_numdataendpts((devt), (num)) |
| 40 | |
| 41 | #define A_WMI_CONTROL_TX(devt, osbuf, streamID) \ |
| 42 | ar6000_control_tx((devt), (osbuf), (streamID)) |
| 43 | |
| 44 | #define A_WMI_TARGETSTATS_EVENT(devt, pStats) \ |
| 45 | ar6000_targetStats_event((devt), (pStats)) |
| 46 | |
| 47 | #define A_WMI_SCANCOMPLETE_EVENT(devt, status) \ |
| 48 | ar6000_scanComplete_event((devt), (status)) |
| 49 | |
| 50 | #ifdef CONFIG_HOST_DSET_SUPPORT |
| 51 | |
| 52 | #define A_WMI_DSET_DATA_REQ(devt, access_cookie, offset, length, targ_buf, targ_reply_fn, targ_reply_arg) \ |
| 53 | ar6000_dset_data_req((devt), (access_cookie), (offset), (length), (targ_buf), (targ_reply_fn), (targ_reply_arg)) |
| 54 | |
| 55 | #define A_WMI_DSET_CLOSE(devt, access_cookie) \ |
| 56 | ar6000_dset_close((devt), (access_cookie)) |
| 57 | |
| 58 | #endif |
| 59 | |
| 60 | #define A_WMI_DSET_OPEN_REQ(devt, id, targ_handle, targ_reply_fn, targ_reply_arg) \ |
| 61 | ar6000_dset_open_req((devt), (id), (targ_handle), (targ_reply_fn), (targ_reply_arg)) |
| 62 | |
| 63 | #define A_WMI_CONNECT_EVENT(devt, channel, bssid, listenInterval, beaconInterval, networkType, beaconIeLen, assocReqLen, assocRespLen, assocInfo) \ |
| 64 | ar6000_connect_event((devt), (channel), (bssid), (listenInterval), (beaconInterval), (networkType), (beaconIeLen), (assocReqLen), (assocRespLen), (assocInfo)) |
| 65 | |
| 66 | #define A_WMI_REGDOMAIN_EVENT(devt, regCode) \ |
| 67 | ar6000_regDomain_event((devt), (regCode)) |
| 68 | |
| 69 | #define A_WMI_NEIGHBORREPORT_EVENT(devt, numAps, info) \ |
| 70 | ar6000_neighborReport_event((devt), (numAps), (info)) |
| 71 | |
| 72 | #define A_WMI_DISCONNECT_EVENT(devt, reason, bssid, assocRespLen, assocInfo, protocolReasonStatus) \ |
| 73 | ar6000_disconnect_event((devt), (reason), (bssid), (assocRespLen), (assocInfo), (protocolReasonStatus)) |
| 74 | |
| 75 | #define A_WMI_TKIP_MICERR_EVENT(devt, keyid, ismcast) \ |
| 76 | ar6000_tkip_micerr_event((devt), (keyid), (ismcast)) |
| 77 | |
| 78 | #define A_WMI_BITRATE_RX(devt, rateKbps) \ |
| 79 | ar6000_bitrate_rx((devt), (rateKbps)) |
| 80 | |
| 81 | #define A_WMI_TXPWR_RX(devt, txPwr) \ |
| 82 | ar6000_txPwr_rx((devt), (txPwr)) |
| 83 | |
| 84 | #define A_WMI_READY_EVENT(devt, datap, phyCap) \ |
| 85 | ar6000_ready_event((devt), (datap), (phyCap)) |
| 86 | |
| 87 | #define A_WMI_DBGLOG_INIT_DONE(ar) \ |
| 88 | ar6000_dbglog_init_done(ar); |
| 89 | |
| 90 | #define A_WMI_RSSI_THRESHOLD_EVENT(devt, newThreshold, rssi) \ |
| 91 | ar6000_rssiThreshold_event((devt), (newThreshold), (rssi)) |
| 92 | |
| 93 | #define A_WMI_REPORT_ERROR_EVENT(devt, errorVal) \ |
| 94 | ar6000_reportError_event((devt), (errorVal)) |
| 95 | |
| 96 | #define A_WMI_ROAM_TABLE_EVENT(devt, pTbl) \ |
| 97 | ar6000_roam_tbl_event((devt), (pTbl)) |
| 98 | |
| 99 | #define A_WMI_ROAM_DATA_EVENT(devt, p) \ |
| 100 | ar6000_roam_data_event((devt), (p)) |
| 101 | |
| 102 | #define A_WMI_WOW_LIST_EVENT(devt, num_filters, wow_filters) \ |
| 103 | ar6000_wow_list_event((devt), (num_filters), (wow_filters)) |
| 104 | |
| 105 | #define A_WMI_CAC_EVENT(devt, ac, cac_indication, statusCode, tspecSuggestion) \ |
| 106 | ar6000_cac_event((devt), (ac), (cac_indication), (statusCode), (tspecSuggestion)) |
| 107 | |
| 108 | #define A_WMI_IPTOS_TO_USERPRIORITY(pkt) \ |
| 109 | ar6000_iptos_to_userPriority((pkt)) |
| 110 | |
| 111 | #define A_WMI_PMKID_LIST_EVENT(devt, num_pmkid, pmkid_list) \ |
| 112 | ar6000_pmkid_list_event((devt), (num_pmkid), (pmkid_list)) |
| 113 | |
| 114 | #ifdef CONFIG_HOST_GPIO_SUPPORT |
| 115 | |
| 116 | #define A_WMI_GPIO_INTR_RX(intr_mask, input_values) \ |
| 117 | ar6000_gpio_intr_rx((intr_mask), (input_values)) |
| 118 | |
| 119 | #define A_WMI_GPIO_DATA_RX(reg_id, value) \ |
| 120 | ar6000_gpio_data_rx((reg_id), (value)) |
| 121 | |
| 122 | #define A_WMI_GPIO_ACK_RX() \ |
| 123 | ar6000_gpio_ack_rx() |
| 124 | |
| 125 | #endif |
| 126 | |
| 127 | #ifdef SEND_EVENT_TO_APP |
| 128 | |
| 129 | #define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len) \ |
| 130 | ar6000_send_event_to_app((ar), (eventId), (datap), (len)) |
| 131 | |
| 132 | #else |
| 133 | |
| 134 | #define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len) |
| 135 | |
| 136 | #endif |
| 137 | |
| 138 | #ifdef CONFIG_HOST_TCMD_SUPPORT |
| 139 | #define A_WMI_TCMD_RX_REPORT_EVENT(devt, results, len) \ |
| 140 | ar6000_tcmd_rx_report_event((devt), (results), (len)) |
| 141 | #endif |
| 142 | |
| 143 | #define A_WMI_HBCHALLENGERESP_EVENT(devt, cookie, source) \ |
| 144 | ar6000_hbChallengeResp_event((devt), (cookie), (source)) |
| 145 | |
| 146 | #define A_WMI_TX_RETRY_ERR_EVENT(devt) \ |
| 147 | ar6000_tx_retry_err_event((devt)) |
| 148 | |
| 149 | #define A_WMI_SNR_THRESHOLD_EVENT_RX(devt, newThreshold, snr) \ |
| 150 | ar6000_snrThresholdEvent_rx((devt), (newThreshold), (snr)) |
| 151 | |
| 152 | #define A_WMI_LQ_THRESHOLD_EVENT_RX(devt, range, lqVal) \ |
| 153 | ar6000_lqThresholdEvent_rx((devt), (range), (lqVal)) |
| 154 | |
| 155 | #define A_WMI_RATEMASK_RX(devt, ratemask) \ |
| 156 | ar6000_ratemask_rx((devt), (ratemask)) |
| 157 | |
| 158 | #define A_WMI_KEEPALIVE_RX(devt, configured) \ |
| 159 | ar6000_keepalive_rx((devt), (configured)) |
| 160 | |
| 161 | #define A_WMI_BSSINFO_EVENT_RX(ar, datp, len) \ |
| 162 | ar6000_bssInfo_event_rx((ar), (datap), (len)) |
| 163 | |
| 164 | #define A_WMI_DBGLOG_EVENT(ar, dropped, buffer, length) \ |
| 165 | ar6000_dbglog_event((ar), (dropped), (buffer), (length)); |
| 166 | |
| 167 | #define A_WMI_STREAM_TX_ACTIVE(devt,trafficClass) \ |
| 168 | ar6000_indicate_tx_activity((devt),(trafficClass), TRUE) |
| 169 | |
| 170 | #define A_WMI_STREAM_TX_INACTIVE(devt,trafficClass) \ |
| 171 | ar6000_indicate_tx_activity((devt),(trafficClass), FALSE) |
| 172 | |
| 173 | /****************************************************************************/ |
| 174 | /****************************************************************************/ |
| 175 | /** **/ |
| 176 | /** HTC related hooks **/ |
| 177 | /** **/ |
| 178 | /****************************************************************************/ |
| 179 | /****************************************************************************/ |
| 180 | |
| 181 | #ifdef __cplusplus |
| 182 | } |
| 183 | #endif |
| 184 | |
| 185 | #endif |
| 186 | |