- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/modules/mac/src/mac_types.h

Go to the documentation of this file.

    00001
    00016 #ifndef _MAC_TYPES_H_
    00017 #define _MAC_TYPES_H_
    00018
    00028 #include "co_int.h"
    00029 #include "co_bool.h"
    00030 #include "co_bit.h"
    00031
    00033 enum mac_vif_type
    00034 {
    00036     VIF_STA,
    00038     VIF_IBSS,
    00040     VIF_AP,
    00042     VIF_MESH_POINT,
    00044     VIF_MONITOR,
    00046     VIF_UNKNOWN
    00047 };
    00048
    00050 #define MAC_ADDR_LEN 6
    00051
    00053 struct mac_addr
    00054 {
    00056     uint16_t array[MAC_ADDR_LEN/2];
    00057 };
    00058
    00060 #define MAC_SSID_LEN 32
    00061
    00063 struct mac_ssid
    00064 {
    00066     uint8_t length;
    00068     uint8_t array[MAC_SSID_LEN];
    00069 };
    00070
    00072 enum mac_bss_type
    00073 {
    00074     INFRASTRUCTURE_MODE = 1,
    00075     INDEPENDENT_BSS_MODE,
    00076     ANY_BSS_MODE
    00077 };
    00078
    00080 enum mac_chan_band
    00081 {
    00083     PHY_BAND_2G4,
    00085     PHY_BAND_5G,
    00087     PHY_BAND_MAX,
    00088 };
    00089
    00091 enum mac_chan_bandwidth
    00092 {
    00094     PHY_CHNL_BW_20,
    00096     PHY_CHNL_BW_40,
    00098     PHY_CHNL_BW_80,
    00100     PHY_CHNL_BW_160,
    00102     PHY_CHNL_BW_80P80,
    00104     PHY_CHNL_BW_OTHER,
    00105 };
    00106
    00108 #define MAC_DOMAINCHANNEL_24G_MAX 14
    00109
    00111 #define MAC_DOMAINCHANNEL_5G_MAX 28
    00112
    00114 enum mac_chan_flags
    00115 {
    00117     CHAN_NO_IR = CO_BIT(0),
    00119     CHAN_DISABLED = CO_BIT(1),
    00121     CHAN_RADAR = CO_BIT(2),
    00122 };
    00123
    00125 struct mac_chan_def
    00126 {
    00128     uint16_t freq;
    00130     uint8_t band;
    00132     uint8_t flags;
    00134     int8_t tx_power;
    00135 };
    00136
    00138 struct mac_chan_op
    00139 {
    00141     uint8_t band;
    00143     uint8_t type;
    00145     uint16_t prim20_freq;
    00147     uint16_t center1_freq;
    00149     uint16_t center2_freq;
    00151     int8_t tx_power;
    00153     uint8_t flags;
    00154 };
    00155
    00157 enum mac_cipher_suite
    00158 {
    00160     MAC_CIPHER_WEP40 = 0,
    00162     MAC_CIPHER_TKIP = 1,
    00164     MAC_CIPHER_CCMP = 2,
    00166     MAC_CIPHER_WEP104 = 3,
    00168     MAC_CIPHER_WPI_SMS4 = 4,
    00170     MAC_CIPHER_BIP_CMAC_128 = 5,
    00171
    00172     // following cipher are not supported by MACHW
    00174     MAC_CIPHER_GCMP_128,
    00176     MAC_CIPHER_GCMP_256,
    00178     MAC_CIPHER_CCMP_256,
    00180     MAC_CIPHER_BIP_GMAC_128,
    00182     MAC_CIPHER_BIP_GMAC_256,
    00184     MAC_CIPHER_BIP_CMAC_256,
    00185
    00186     MAC_CIPHER_INVALID = 0xFF
    00187 };
    00188
    00190 enum mac_akm_suite
    00191 {
    00193     MAC_AKM_NONE,
    00195     MAC_AKM_PRE_RSN,
    00197     MAC_AKM_8021X,
    00199     MAC_AKM_PSK,
    00201     MAC_AKM_FT_8021X,
    00203     MAC_AKM_FT_PSK,
    00205     MAC_AKM_8021X_SHA256,
    00207     MAC_AKM_PSK_SHA256,
    00209     MAC_AKM_TDLS,
    00211     MAC_AKM_SAE,
    00213     MAC_AKM_FT_OVER_SAE,
    00215     MAC_AKM_8021X_SUITE_B,
    00217     MAC_AKM_8021X_SUITE_B_192,
    00219     MAC_AKM_FILS_SHA256,
    00221     MAC_AKM_FILS_SHA384,
    00223     MAC_AKM_FT_FILS_SHA256,
    00225     MAC_AKM_FT_FILS_SHA384,
    00227     MAC_AKM_OWE,
    00228
    00230     MAC_AKM_WAPI_CERT,
    00232     MAC_AKM_WAPI_PSK,
    00233 };
    00234
    00236 struct mac_scan_result
    00237 {
    00239     bool valid_flag;
    00241     struct mac_addr bssid;
    00243     struct mac_ssid ssid;
    00245     uint16_t bsstype;
    00247     struct mac_chan_def *chan;
    00249     uint32_t akm;
    00251     uint16_t group_cipher;
    00253     uint16_t pairwise_cipher;
    00255     int8_t rssi;
    00257     uint8_t multi_bssid_index;
    00259     uint8_t max_bssid_indicator;
    00260 };
    00261
    00263 enum mac_legacy_rates
    00264 {
    00266     MAC_RATE_1MBPS   =   2,
    00268     MAC_RATE_2MBPS   =   4,
    00270     MAC_RATE_5_5MBPS =  11,
    00272     MAC_RATE_6MBPS   =  12,
    00274     MAC_RATE_9MBPS   =  18,
    00276     MAC_RATE_11MBPS  =  22,
    00278     MAC_RATE_12MBPS  =  24,
    00280     MAC_RATE_18MBPS  =  36,
    00282     MAC_RATE_24MBPS  =  48,
    00284     MAC_RATE_36MBPS  =  72,
    00286     MAC_RATE_48MBPS  =  96,
    00288     MAC_RATE_54MBPS  = 108
    00289 };
    00290
    00292 enum mac_bss_membership
    00293 {
    00295     MAC_BSS_MEMBERSHIP_HT_PHY = 127,
    00297     MAC_BSS_MEMBERSHIP_VHT_PHY = 126,
    00298 };
    00299
    00301 #define MAC_RATESET_LEN 12
    00302
    00304 struct mac_rateset
    00305 {
    00307     uint8_t length;
    00309     uint8_t array[MAC_RATESET_LEN];
    00310 };
    00311
    00313 #define MAC_SEC_KEY_LEN 32  // TKIP keys 256 bits (max length) with MIC keys
    00314
    00316 struct mac_sec_key
    00317 {
    00319     uint8_t length;
    00321     uint32_t array[MAC_SEC_KEY_LEN/4];
    00322 };
    00323
    00325 enum mac_ac
    00326 {
    00328     AC_BK = 0,
    00330     AC_BE,
    00332     AC_VI,
    00334     AC_VO,
    00336     AC_MAX
    00337 };
    00338
    00340 enum mac_tid
    00341 {
    00343     TID_0,
    00345     TID_1,
    00347     TID_2,
    00349     TID_3,
    00351     TID_4,
    00353     TID_5,
    00355     TID_6,
    00357     TID_7,
    00359     TID_MGT,
    00361     TID_MAX
    00362 };
    00363
    00365 #define MAX_MCS_LEN 16 // 16 * 8 = 128
    00366
    00368 struct mac_htcapability
    00369 {
    00371     uint16_t ht_capa_info;
    00373     uint8_t a_mpdu_param;
    00375     uint8_t mcs_rate[MAX_MCS_LEN];
    00377     uint16_t ht_extended_capa;
    00379     uint32_t tx_beamforming_capa;
    00381     uint8_t asel_capa;
    00382 };
    00383
    00385 struct mac_vhtcapability
    00386 {
    00388     uint32_t vht_capa_info;
    00390     uint16_t rx_mcs_map;
    00392     uint16_t rx_highest;
    00394     uint16_t tx_mcs_map;
    00396     uint16_t tx_highest;
    00397 };
    00398
    00400 #define MAC_HE_MAC_CAPA_LEN 6
    00402 #define MAC_HE_PHY_CAPA_LEN 11
    00404 #define MAC_HE_PPE_THRES_MAX_LEN 25
    00405
    00407 struct mac_he_mcs_nss_supp
    00408 {
    00410     uint16_t rx_mcs_80;
    00412     uint16_t tx_mcs_80;
    00414     uint16_t rx_mcs_160;
    00416     uint16_t tx_mcs_160;
    00418     uint16_t rx_mcs_80p80;
    00420     uint16_t tx_mcs_80p80;
    00421 };
    00422
    00424 struct mac_hecapability
    00425 {
    00427     uint8_t mac_cap_info[MAC_HE_MAC_CAPA_LEN];
    00429     uint8_t phy_cap_info[MAC_HE_PHY_CAPA_LEN];
    00431     struct mac_he_mcs_nss_supp mcs_supp;
    00433     uint8_t ppe_thres[MAC_HE_PPE_THRES_MAX_LEN];
    00434 };
    00435
    00437 enum mac_sta_flags
    00438 {
    00440     STA_QOS_CAPA = CO_BIT(0),
    00442     STA_HT_CAPA = CO_BIT(1),
    00444     STA_VHT_CAPA = CO_BIT(2),
    00446     STA_MFP_CAPA = CO_BIT(3),
    00448     STA_OPMOD_NOTIF = CO_BIT(4),
    00450     STA_HE_CAPA = CO_BIT(5),
    00451 };
    00452
    00454 enum mac_connection_flags
    00455 {
    00457     CONTROL_PORT_HOST = CO_BIT(0),
    00459     CONTROL_PORT_NO_ENC = CO_BIT(1),
    00461     DISABLE_HT = CO_BIT(2),
    00463     WPA_WPA2_IN_USE = CO_BIT(3),
    00465     MFP_IN_USE = CO_BIT(4),
    00466 };
    00467
    00469 #endif // _MAC_TYPES_H_