Changeset 56c0930 in mainline for uspace/drv/bus/usb/ar9271/htc.h
- Timestamp:
- 2015-02-20T14:33:29Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4cb0148
- Parents:
- ab365c4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ar9271/htc.h
rab365c4 r56c0930 37 37 #define ATHEROS_HTC_H 38 38 39 #include <ieee80211.h> 39 40 #include <usb/dev/driver.h> 40 41 #include <sys/types.h> 42 #include <nic.h> 41 43 42 44 #include "ath.h" 43 45 44 #define MAX_RESPONSE_LENGTH 64 46 #define HTC_RTS_THRESHOLD 2304 47 #define HTC_MAX_AMPDU 0xFFFF 45 48 46 49 /** … … 65 68 HTC_SERVICE_NO_MORE_EP 66 69 } htc_response_status_code_t; 70 71 /** 72 * HTC operating mode definition 73 */ 74 typedef enum { 75 HTC_OPMODE_ADHOC = 0, 76 HTC_OPMODE_STATION = 1, 77 HTC_OPMODE_MESH = 2, 78 HTC_OPMODE_AP = 6 79 } htc_operating_mode_t; 67 80 68 81 /** … … 98 111 fibril_mutex_t tx_lock; 99 112 113 /** Pointer to related IEEE 802.11 device */ 114 ieee80211_dev_t *ieee80211_dev; 115 100 116 /** Pointer to Atheros WiFi device structure */ 101 117 ath_t *ath_device; … … 113 129 /* Message payload starts after the header. */ 114 130 } __attribute__((packed)) htc_frame_header_t; 131 132 /** 133 * HTC management TX frame header structure 134 */ 135 typedef struct { 136 uint8_t node_idx; 137 uint8_t vif_idx; 138 uint8_t tidno; 139 uint8_t flags; 140 uint8_t key_type; 141 uint8_t keyix; 142 uint8_t cookie; 143 uint8_t pad; 144 } __attribute__((packed)) htc_tx_management_header_t; 115 145 116 146 /** … … 163 193 164 194 /** 195 * HTC new virtual interface message 196 */ 197 typedef struct { 198 uint8_t index; 199 uint8_t op_mode; 200 uint8_t addr[ETH_ADDR]; 201 uint8_t ath_cap; 202 uint16_t rts_thres; /**< Big Endian value! */ 203 uint8_t pad; 204 } __attribute__((packed)) htc_vif_msg_t; 205 206 /** 207 * HTC new station message 208 */ 209 typedef struct { 210 uint8_t addr[ETH_ADDR]; 211 uint8_t bssid[ETH_ADDR]; 212 uint8_t sta_index; 213 uint8_t vif_index; 214 uint8_t is_vif_sta; 215 216 uint16_t flags; /**< Big Endian value! */ 217 uint16_t ht_cap; /**< Big Endian value! */ 218 uint16_t max_ampdu; /**< Big Endian value! */ 219 220 uint8_t pad; 221 } __attribute__((packed)) htc_sta_msg_t; 222 223 /** 165 224 * HTC setup complete message structure 166 225 */ … … 169 228 } __attribute__((packed)) htc_setup_complete_msg_t; 170 229 171 extern int htc_device_init(ath_t *ath_device, htc_device_t *htc_device); 230 extern int htc_device_init(ath_t *ath_device, ieee80211_dev_t *ieee80211_dev, 231 htc_device_t *htc_device); 172 232 extern int htc_init(htc_device_t *htc_device); 173 extern int htc_read_message(htc_device_t *htc_device, void *buffer, 233 extern int htc_init_new_vif(htc_device_t *htc_device); 234 extern int htc_read_control_message(htc_device_t *htc_device, void *buffer, 174 235 size_t buffer_size, size_t *transferred_size); 175 extern int htc_send_message(htc_device_t *htc_device, void *buffer, 236 extern int htc_read_data_message(htc_device_t *htc_device, void *buffer, 237 size_t buffer_size, size_t *transferred_size); 238 extern int htc_send_control_message(htc_device_t *htc_device, void *buffer, 176 239 size_t buffer_size, uint8_t endpoint_id); 240 extern int htc_send_data_message(htc_device_t *htc_device, void *buffer, 241 size_t buffer_size, uint8_t endpoint_id); 177 242 178 243 #endif /* ATHEROS_HTC_H */
Note:
See TracChangeset
for help on using the changeset viewer.