Changeset 1dcc0b9 in mainline for uspace/drv/nic/ar9271/htc.h


Ignore:
Timestamp:
2015-04-06T10:47:51Z (10 years ago)
Author:
Jan Kolarik <kolarik@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d7dadcb4
Parents:
59fa7ab
Message:

Scanning whole 2.4GHz spectrum, created supplicant for managing connection between device STA and AP, finished association process between STA and AP, handling 4way handshake protocol used for key management, written needed cryptographic algorithms (AES, SHA1, HMAC, PBKDF2) for CCMP protocol, data communication on OPEN/CCMP networks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ar9271/htc.h

    r59fa7ab r1dcc0b9  
    4545
    4646#define HTC_RTS_THRESHOLD 2304
    47 #define HTC_RX_HEADER_LENGTH 40
    48 
    49 /**
    50  * HTC message IDs
     47#define HTC_RATES_MAX_LENGTH 30
     48
     49/**
     50 * HTC message IDs.
    5151 */
    5252typedef enum {
     
    5959
    6060/**
    61  * HTC response message status codes
     61 * HTC response message status codes.
    6262 */
    6363typedef enum {
     
    7070
    7171/**
    72  * HTC operating mode definition
     72 * HTC operating mode definition.
    7373 */
    7474typedef enum {
     
    8080
    8181/**
    82  * HTC endpoint numbers
     82 * HTC data type indicator.
     83 */
     84typedef enum {
     85        HTC_DATA_AMPDU = 1,
     86        HTC_DATA_NORMAL = 2,
     87        HTC_DATA_BEACON = 3,
     88        HTC_DATA_MGMT = 4
     89} htc_data_type_t;
     90
     91/**
     92 * HTC endpoint numbers.
    8393 */
    8494typedef struct {
     
    96106
    97107/**
    98  * HTC device data
     108 * HTC device data.
    99109 */
    100110typedef struct {
     
    119129
    120130/**
    121  * HTC frame header structure 
     131 * HTC frame header structure.
    122132 */
    123133typedef struct {
     
    126136        uint16_t  payload_length;       /**< Big Endian value! */
    127137        uint8_t   control_bytes[4];
    128    
    129         /* Message payload starts after the header. */
    130138} __attribute__((packed)) htc_frame_header_t;
    131139
    132140/**
    133  * HTC management TX frame header structure 
     141 * HTC management TX frame header structure.
    134142 */
    135143typedef struct {
     
    145153
    146154/**
    147  * HTC ready message structure
     155 * HTC data TX frame header structure.
     156 */
     157typedef struct {
     158        uint8_t data_type;
     159        uint8_t node_idx;
     160        uint8_t vif_idx;
     161        uint8_t tidno;
     162        uint32_t flags;                 /**< Big Endian value! */
     163        uint8_t key_type;
     164        uint8_t keyix;
     165        uint8_t cookie;
     166        uint8_t pad;
     167} __attribute__((packed)) htc_tx_data_header_t;
     168
     169/**
     170 * HTC ready message structure.
    148171 */
    149172typedef struct {
     
    157180
    158181/**
    159  * HTC service message structure 
     182 * HTC service message structure.
    160183 */
    161184typedef struct {
     
    171194
    172195/**
    173  * HTC service response message structure 
     196 * HTC service response message structure.
    174197 */
    175198typedef struct {
     
    184207
    185208/**
    186  * HTC credits config message structure
     209 * HTC credits config message structure.
    187210 */
    188211typedef struct {
     
    193216
    194217/**
    195  * HTC new virtual interface message
     218 * HTC new virtual interface message.
    196219 */
    197220typedef struct {
     
    205228
    206229/**
    207  * HTC new station message
     230 * HTC new station message.
    208231 */
    209232typedef struct {
     
    231254        uint8_t pad;
    232255} __attribute__((packed)) htc_cap_msg_t;
     256
     257typedef struct {
     258        uint8_t sta_index;
     259        uint8_t is_new;
     260        uint32_t cap_flags;     /**< Big Endian value! */
     261        uint8_t legacy_rates_count;
     262        uint8_t legacy_rates[HTC_RATES_MAX_LENGTH];
     263        uint16_t pad;
     264} htc_rate_msg_t;
     265
     266/**
     267 * HTC RX status structure used in incoming HTC data messages.
     268 */
     269typedef struct {
     270        uint64_t timestamp;     /**< Big Endian value! */
     271        uint16_t data_length;   /**< Big Endian value! */
     272        uint8_t status;
     273        uint8_t phy_err;
     274        int8_t rssi;
     275        int8_t rssi_ctl[3];
     276        int8_t rssi_ext[3];
     277        uint8_t keyix;
     278        uint8_t rate;
     279        uint8_t antenna;
     280        uint8_t more;
     281        uint8_t is_aggr;
     282        uint8_t more_aggr;
     283        uint8_t num_delims;
     284        uint8_t flags;
     285        uint8_t dummy;
     286        uint32_t evm0;          /**< Big Endian value! */
     287        uint32_t evm1;          /**< Big Endian value! */
     288        uint32_t evm2;          /**< Big Endian value! */
     289} htc_rx_status_t;
    233290
    234291/**
Note: See TracChangeset for help on using the changeset viewer.