Linux Audio
Check our new training course
Embedded Linux Audio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
/** * This header file contains definition for global types */ #ifndef _LBS_TYPES_H_ #define _LBS_TYPES_H_ #include <linux/if_ether.h> #include <asm/byteorder.h> #include <linux/wireless.h> #include <net/ieee80211.h> struct ieeetypes_cfparamset { u8 elementid; u8 len; u8 cfpcnt; u8 cfpperiod; __le16 cfpmaxduration; __le16 cfpdurationremaining; } __attribute__ ((packed)); struct ieeetypes_ibssparamset { u8 elementid; u8 len; __le16 atimwindow; } __attribute__ ((packed)); union IEEEtypes_ssparamset { struct ieeetypes_cfparamset cfparamset; struct ieeetypes_ibssparamset ibssparamset; } __attribute__ ((packed)); struct ieeetypes_fhparamset { u8 elementid; u8 len; __le16 dwelltime; u8 hopset; u8 hoppattern; u8 hopindex; } __attribute__ ((packed)); struct ieeetypes_dsparamset { u8 elementid; u8 len; u8 currentchan; } __attribute__ ((packed)); union ieeetypes_phyparamset { struct ieeetypes_fhparamset fhparamset; struct ieeetypes_dsparamset dsparamset; } __attribute__ ((packed)); struct ieeetypes_assocrsp { __le16 capability; __le16 statuscode; __le16 aid; u8 iebuffer[1]; } __attribute__ ((packed)); /** TLV type ID definition */ #define PROPRIETARY_TLV_BASE_ID 0x0100 /* Terminating TLV type */ #define MRVL_TERMINATE_TLV_ID 0xffff #define TLV_TYPE_SSID 0x0000 #define TLV_TYPE_RATES 0x0001 #define TLV_TYPE_PHY_FH 0x0002 #define TLV_TYPE_PHY_DS 0x0003 #define TLV_TYPE_CF 0x0004 #define TLV_TYPE_IBSS 0x0006 #define TLV_TYPE_DOMAIN 0x0007 #define TLV_TYPE_POWER_CAPABILITY 0x0021 #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) #define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5) #define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6) #define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7) #define TLV_TYPE_LED_GPIO (PROPRIETARY_TLV_BASE_ID + 8) #define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9) #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) #define TLV_TYPE_REASSOCAP (PROPRIETARY_TLV_BASE_ID + 11) #define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12) #define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13) #define TLV_TYPE_BCASTPROBE (PROPRIETARY_TLV_BASE_ID + 14) #define TLV_TYPE_NUMSSID_PROBE (PROPRIETARY_TLV_BASE_ID + 15) #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) #define TLV_TYPE_CRYPTO_DATA (PROPRIETARY_TLV_BASE_ID + 17) #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) #define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23) /** TLV related data structures*/ struct mrvlietypesheader { __le16 type; __le16 len; } __attribute__ ((packed)); struct mrvlietypes_data { struct mrvlietypesheader header; u8 Data[1]; } __attribute__ ((packed)); struct mrvlietypes_ratesparamset { struct mrvlietypesheader header; u8 rates[1]; } __attribute__ ((packed)); struct mrvlietypes_ssidparamset { struct mrvlietypesheader header; u8 ssid[1]; } __attribute__ ((packed)); struct mrvlietypes_wildcardssidparamset { struct mrvlietypesheader header; u8 MaxSsidlength; u8 ssid[1]; } __attribute__ ((packed)); struct chanscanmode { #ifdef __BIG_ENDIAN_BITFIELD u8 reserved_2_7:6; u8 disablechanfilt:1; u8 passivescan:1; #else u8 passivescan:1; u8 disablechanfilt:1; u8 reserved_2_7:6; #endif } __attribute__ ((packed)); struct chanscanparamset { u8 radiotype; u8 channumber; struct chanscanmode chanscanmode; __le16 minscantime; __le16 maxscantime; } __attribute__ ((packed)); struct mrvlietypes_chanlistparamset { struct mrvlietypesheader header; struct chanscanparamset chanscanparam[1]; } __attribute__ ((packed)); struct cfparamset { u8 cfpcnt; u8 cfpperiod; __le16 cfpmaxduration; __le16 cfpdurationremaining; } __attribute__ ((packed)); struct ibssparamset { __le16 atimwindow; } __attribute__ ((packed)); struct mrvlietypes_ssparamset { struct mrvlietypesheader header; union { struct cfparamset cfparamset[1]; struct ibssparamset ibssparamset[1]; } cf_ibss; } __attribute__ ((packed)); struct fhparamset { __le16 dwelltime; u8 hopset; u8 hoppattern; u8 hopindex; } __attribute__ ((packed)); struct dsparamset { u8 currentchan; } __attribute__ ((packed)); struct mrvlietypes_phyparamset { struct mrvlietypesheader header; union { struct fhparamset fhparamset[1]; struct dsparamset dsparamset[1]; } fh_ds; } __attribute__ ((packed)); struct mrvlietypes_rsnparamset { struct mrvlietypesheader header; u8 rsnie[1]; } __attribute__ ((packed)); struct mrvlietypes_tsftimestamp { struct mrvlietypesheader header; __le64 tsftable[1]; } __attribute__ ((packed)); /** Local Power capability */ struct mrvlietypes_powercapability { struct mrvlietypesheader header; s8 minpower; s8 maxpower; } __attribute__ ((packed)); /* used in CMD_802_11_SUBSCRIBE_EVENT for SNR, RSSI and Failure */ struct mrvlietypes_thresholds { struct mrvlietypesheader header; u8 value; u8 freq; } __attribute__ ((packed)); struct mrvlietypes_beaconsmissed { struct mrvlietypesheader header; u8 beaconmissed; u8 reserved; } __attribute__ ((packed)); struct mrvlietypes_numprobes { struct mrvlietypesheader header; __le16 numprobes; } __attribute__ ((packed)); struct mrvlietypes_bcastprobe { struct mrvlietypesheader header; __le16 bcastprobe; } __attribute__ ((packed)); struct mrvlietypes_numssidprobe { struct mrvlietypesheader header; __le16 numssidprobe; } __attribute__ ((packed)); struct led_pin { u8 led; u8 pin; } __attribute__ ((packed)); struct mrvlietypes_ledgpio { struct mrvlietypesheader header; struct led_pin ledpin[1]; } __attribute__ ((packed)); struct led_bhv { uint8_t firmwarestate; uint8_t led; uint8_t ledstate; uint8_t ledarg; } __attribute__ ((packed)); struct mrvlietypes_ledbhv { struct mrvlietypesheader header; struct led_bhv ledbhv[1]; } __attribute__ ((packed)); /* Meant to be packed as the value member of a struct ieee80211_info_element. * Note that the len member of the ieee80211_info_element varies depending on * the mesh_id_len */ struct mrvl_meshie_val { uint8_t oui[P80211_OUI_LEN]; uint8_t type; uint8_t subtype; uint8_t version; uint8_t active_protocol_id; uint8_t active_metric_id; uint8_t mesh_capability; uint8_t mesh_id_len; uint8_t mesh_id[IW_ESSID_MAX_SIZE]; } __attribute__ ((packed)); struct mrvl_meshie { struct ieee80211_info_element hdr; struct mrvl_meshie_val val; } __attribute__ ((packed)); struct mrvl_mesh_defaults { __le32 bootflag; uint8_t boottime; uint8_t reserved; __le16 channel; struct mrvl_meshie meshie; } __attribute__ ((packed)); #endif