00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 #ifndef _NET_IF_IEEE80211_H_
00089 #define _NET_IF_IEEE80211_H_
00090
00091 #include <sys/queue.h>
00092 #ifdef CONFIG_NET_WIRELESS
00093 #include <linux/wireless.h>
00094 #endif
00095
00096 #define IEEE80211_ADDR_LEN 6
00097
00098
00099 struct ieee80211_plcp_hdr {
00100 u_int16_t i_sfd;
00101 u_int8_t i_signal;
00102 u_int8_t i_service;
00103 u_int16_t i_length;
00104 u_int16_t i_crc;
00105 } __attribute__((__packed__));
00106
00107
00108
00109
00110 struct ieee80211_frame {
00111 u_int8_t i_fc[2];
00112 u_int8_t i_dur[2];
00113 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
00114 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
00115 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
00116 u_int8_t i_seq[2];
00117
00118
00119 } __attribute__((__packed__));
00120
00121
00122 struct ieee80211_qosframe {
00123 u_int8_t i_fc[2];
00124 u_int8_t i_dur[2];
00125 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
00126 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
00127 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
00128 u_int8_t i_seq[2];
00129 u_int8_t i_qos[2];
00130
00131
00132 } __attribute__((__packed__));
00133
00134 struct ieee80211_qoscntl {
00135 u_int8_t i_qos[2];
00136 };
00137
00138 struct ieee80211_frame_addr4 {
00139 u_int8_t i_fc[2];
00140 u_int8_t i_dur[2];
00141 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
00142 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
00143 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
00144 u_int8_t i_seq[2];
00145 u_int8_t i_addr4[IEEE80211_ADDR_LEN];
00146 } __attribute__((__packed__));
00147
00148
00149 struct ieee80211_qosframe_addr4 {
00150 u_int8_t i_fc[2];
00151 u_int8_t i_dur[2];
00152 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
00153 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
00154 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
00155 u_int8_t i_seq[2];
00156 u_int8_t i_addr4[IEEE80211_ADDR_LEN];
00157 u_int8_t i_qos[2];
00158 } __attribute__((__packed__));
00159
00160
00161
00162
00163 struct ieee80211_mnf {
00164 u_int8_t mnf_category;
00165 u_int8_t mnf_action;
00166 u_int8_t mnf_dialog;
00167 u_int8_t mnf_status;
00168 } __attribute__((__packed__));
00169 #define MNF_SETUP_REQ 0
00170 #define MNF_SETUP_RESP 1
00171 #define MNF_TEARDOWN 2
00172
00173
00174
00175
00176 struct ieee80211_wme_tspec {
00177 u_int8_t ts_id;
00178 u_int8_t ts_len;
00179 u_int8_t ts_oui[3];
00180 u_int8_t ts_oui_type;
00181 u_int8_t ts_oui_subtype;
00182 u_int8_t ts_version;
00183 u_int8_t ts_tsinfo[3];
00184 u_int8_t ts_nom_msdu[2];
00185 u_int8_t ts_max_msdu[2];
00186 u_int8_t ts_min_svc[4];
00187 u_int8_t ts_max_svc[4];
00188 u_int8_t ts_inactv_intv[4];
00189 u_int8_t ts_susp_intv[4];
00190 u_int8_t ts_start_svc[4];
00191 u_int8_t ts_min_rate[4];
00192 u_int8_t ts_mean_rate[4];
00193 u_int8_t ts_max_burst[4];
00194 u_int8_t ts_min_phy[4];
00195 u_int8_t ts_peak_rate[4];
00196 u_int8_t ts_delay[4];
00197 u_int8_t ts_surplus[2];
00198 u_int8_t ts_medium_time[2];
00199 } __attribute__((__packed__));
00200
00201 #define IEEE80211_FC0_VERSION_MASK 0x03
00202 #define IEEE80211_FC0_VERSION_SHIFT 0
00203 #define IEEE80211_FC0_VERSION_0 0x00
00204 #define IEEE80211_FC0_TYPE_MASK 0x0c
00205 #define IEEE80211_FC0_TYPE_SHIFT 2
00206 #define IEEE80211_FC0_TYPE_MGT 0x00
00207 #define IEEE80211_FC0_TYPE_CTL 0x04
00208 #define IEEE80211_FC0_TYPE_DATA 0x08
00209
00210 #define IEEE80211_FC0_SUBTYPE_MASK 0xf0
00211 #define IEEE80211_FC0_SUBTYPE_SHIFT 4
00212
00213 #define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00
00214 #define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10
00215 #define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20
00216 #define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30
00217 #define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40
00218 #define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50
00219 #define IEEE80211_FC0_SUBTYPE_BEACON 0x80
00220 #define IEEE80211_FC0_SUBTYPE_ATIM 0x90
00221 #define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0
00222 #define IEEE80211_FC0_SUBTYPE_AUTH 0xb0
00223 #define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0
00224 #define IEEE80211_FC0_SUBTYPE_ACTION 0xd0
00225
00226 #define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0
00227 #define IEEE80211_FC0_SUBTYPE_RTS 0xb0
00228 #define IEEE80211_FC0_SUBTYPE_CTS 0xc0
00229 #define IEEE80211_FC0_SUBTYPE_ACK 0xd0
00230 #define IEEE80211_FC0_SUBTYPE_CF_END 0xe0
00231 #define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0
00232
00233 #define IEEE80211_FC0_SUBTYPE_DATA 0x00
00234 #define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10
00235 #define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20
00236 #define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30
00237 #define IEEE80211_FC0_SUBTYPE_NODATA 0x40
00238 #define IEEE80211_FC0_SUBTYPE_CFACK 0x50
00239 #define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
00240 #define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
00241 #define IEEE80211_FC0_SUBTYPE_QOS 0x80
00242
00243 #define IEEE80211_FC1_DIR_MASK 0x03
00244 #define IEEE80211_FC1_DIR_NODS 0x00
00245 #define IEEE80211_FC1_DIR_TODS 0x01
00246 #define IEEE80211_FC1_DIR_FROMDS 0x02
00247 #define IEEE80211_FC1_DIR_DSTODS 0x03
00248
00249 #define IEEE80211_FC1_MORE_FRAG 0x04
00250 #define IEEE80211_FC1_RETRY 0x08
00251 #define IEEE80211_FC1_PWR_MGT 0x10
00252 #define IEEE80211_FC1_MORE_DATA 0x20
00253 #define IEEE80211_FC1_WEP 0x40
00254 #define IEEE80211_FC1_ORDER 0x80
00255
00256 #define IEEE80211_SEQ_FRAG_MASK 0x000f
00257 #define IEEE80211_SEQ_FRAG_SHIFT 0
00258 #define IEEE80211_SEQ_SEQ_MASK 0xfff0
00259 #define IEEE80211_SEQ_SEQ_SHIFT 4
00260
00261 #define IEEE80211_NWID_LEN 32
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275 typedef u_int8_t *ieee80211_mgt_beacon_t;
00276
00277 #define IEEE80211_BEACON_INTERVAL(beacon) \
00278 ((beacon)[8] | ((beacon)[9] << 8))
00279 #define IEEE80211_BEACON_CAPABILITY(beacon) \
00280 ((beacon)[10] | ((beacon)[11] << 8))
00281
00282 #define IEEE80211_CAPINFO_ESS 0x0001
00283 #define IEEE80211_CAPINFO_IBSS 0x0002
00284 #define IEEE80211_CAPINFO_CF_POLLABLE 0x0004
00285 #define IEEE80211_CAPINFO_CF_POLLREQ 0x0008
00286 #define IEEE80211_CAPINFO_PRIVACY 0x0010
00287 #define IEEE80211_CAPINFO_SHORT_PREAMBLE 0x0020
00288 #define IEEE80211_CAPINFO_PBCC 0x0040
00289 #define IEEE80211_CAPINFO_CHNL_AGILITY 0x0080
00290
00291 #define IEEE80211_CAPINFO_SHORT_SLOTTIME 0x0400
00292
00293 #define IEEE80211_CAPINFO_DSSSOFDM 0x2000
00294
00295
00296
00297
00298
00299
00300 struct ieee80211_information {
00301 char ssid[IEEE80211_NWID_LEN+1];
00302 struct rates {
00303 u_int8_t *p;
00304 } rates;
00305 struct fh {
00306 u_int16_t dwell;
00307 u_int8_t set;
00308 u_int8_t pattern;
00309 u_int8_t index;
00310 } fh;
00311 struct ds {
00312 u_int8_t channel;
00313 } ds;
00314 struct cf {
00315 u_int8_t count;
00316 u_int8_t period;
00317 u_int8_t maxdur[2];
00318 u_int8_t dur[2];
00319 } cf;
00320 struct tim {
00321 u_int8_t count;
00322 u_int8_t period;
00323 u_int8_t bitctl;
00324
00325 } tim;
00326 struct ibss {
00327 u_int16_t atim;
00328 } ibss;
00329 struct challenge {
00330 u_int8_t *p;
00331 u_int8_t len;
00332 } challenge;
00333 struct erp {
00334 u_int8_t flags;
00335 } erp;
00336 };
00337
00338 #define IEEE80211_ELEMID_SSID 0
00339 #define IEEE80211_ELEMID_RATES 1
00340 #define IEEE80211_ELEMID_FHPARMS 2
00341 #define IEEE80211_ELEMID_DSPARMS 3
00342 #define IEEE80211_ELEMID_CFPARMS 4
00343 #define IEEE80211_ELEMID_TIM 5
00344 #define IEEE80211_ELEMID_IBSSPARMS 6
00345 #define IEEE80211_ELEMID_COUNTRY 7
00346 #define IEEE80211_ELEMID_CHALLENGE 16
00347 #define IEEE80211_ELEMID_ERP 42
00348 #define IEEE80211_ELEMID_XRATES 50
00349 #define IEEE80211_ELEMID_VENDOR 221
00350 #define OUI_WME 0x0050f2
00351 #define OUI_TYPE 0x02
00352 #define WME_PARAM_OUI_SUBTYPE 0x01
00353
00354
00355 #define WME_AC_BE 0
00356 #define WME_AC_BK 1
00357 #define WME_AC_VI 2
00358 #define WME_AC_VO 3
00359
00360
00361 #define IEEE80211_RATE_BASIC 0x80
00362 #define IEEE80211_RATE_VAL 0x7f
00363
00364
00365 #define IEEE80211_ERP_NON_ERP_PRESENT 0x01
00366 #define IEEE80211_ERP_USE_PROTECTION 0x02
00367 #define IEEE80211_ERP_BARKER_MODE 0x04
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380 typedef u_int8_t *ieee80211_mgt_auth_t;
00381
00382 #define IEEE80211_AUTH_ALGORITHM(auth) \
00383 ((auth)[0] | ((auth)[1] << 8))
00384 #define IEEE80211_AUTH_TRANSACTION(auth) \
00385 ((auth)[2] | ((auth)[3] << 8))
00386 #define IEEE80211_AUTH_STATUS(auth) \
00387 ((auth)[4] | ((auth)[5] << 8))
00388
00389 #define IEEE80211_AUTH_ALG_OPEN 0x0000
00390 #define IEEE80211_AUTH_ALG_SHARED 0x0001
00391
00392 #define IEEE80211_AUTH_OPEN_REQUEST 1
00393 #define IEEE80211_AUTH_OPEN_RESPONSE 2
00394
00395 #define IEEE80211_AUTH_SHARED_REQUEST 1
00396 #define IEEE80211_AUTH_SHARED_CHALLENGE 2
00397 #define IEEE80211_AUTH_SHARED_RESPONSE 3
00398 #define IEEE80211_AUTH_SHARED_PASS 4
00399
00400
00401
00402
00403
00404
00405
00406 #define IEEE80211_REASON_UNSPECIFIED 1
00407 #define IEEE80211_REASON_AUTH_EXPIRE 2
00408 #define IEEE80211_REASON_AUTH_LEAVE 3
00409 #define IEEE80211_REASON_ASSOC_EXPIRE 4
00410 #define IEEE80211_REASON_ASSOC_TOOMANY 5
00411 #define IEEE80211_REASON_NOT_AUTHED 6
00412 #define IEEE80211_REASON_NOT_ASSOCED 7
00413 #define IEEE80211_REASON_ASSOC_LEAVE 8
00414 #define IEEE80211_REASON_ASSOC_NOT_AUTHED 9
00415
00416 #define IEEE80211_STATUS_SUCCESS 0
00417 #define IEEE80211_STATUS_UNSPECIFIED 1
00418 #define IEEE80211_STATUS_CAPINFO 10
00419 #define IEEE80211_STATUS_NOT_ASSOCED 11
00420 #define IEEE80211_STATUS_OTHER 12
00421 #define IEEE80211_STATUS_ALG 13
00422 #define IEEE80211_STATUS_SEQUENCE 14
00423 #define IEEE80211_STATUS_CHALLENGE 15
00424 #define IEEE80211_STATUS_TIMEOUT 16
00425 #define IEEE80211_STATUS_TOOMANY 17
00426 #define IEEE80211_STATUS_BASIC_RATE 18
00427 #define IEEE80211_STATUS_SP_REQUIRED 19
00428 #define IEEE80211_STATUS_PBCC_REQUIRED 20
00429 #define IEEE80211_STATUS_CA_REQUIRED 21
00430 #define IEEE80211_STATUS_TOO_MANY_STATIONS 22
00431 #define IEEE80211_STATUS_RATES 23
00432 #define IEEE80211_STATUS_SHORTSLOT_REQUIRED 25
00433 #define IEEE80211_STATUS_DSSSOFDM_REQUIRED 26
00434
00435 #define IEEE80211_WEP_KEYLEN 5
00436 #define IEEE80211_WEP_IVLEN 3
00437 #define IEEE80211_WEP_KIDLEN 1
00438 #define IEEE80211_WEP_CRCLEN 4
00439 #define IEEE80211_WEP_NKID 4
00440
00441 #define IEEE80211_CRC_LEN 4
00442
00443 #define IEEE80211_MTU 1500
00444 #define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \
00445 (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
00446
00447
00448
00449
00450
00451 #define IEEE80211_RTS_DEFAULT 512
00452 #define IEEE80211_RTS_MIN 1
00453 #define IEEE80211_RTS_MAX IEEE80211_MAX_LEN
00454
00455 #define IEEE80211_CHAN_ANY 0xffff
00456
00457 #define IEEE80211_TXPOWER_MAX 100
00458 #define IEEE80211_TXPOWER_MIN 0
00459
00460 #define IEEE80211_AUTH_NONE 0
00461 #define IEEE80211_AUTH_OPEN 1
00462 #define IEEE80211_AUTH_SHARED 2
00463
00464 #ifdef __KERNEL__
00465
00466 #define IEEE80211_PSCAN_WAIT 5
00467 #define IEEE80211_TRANS_WAIT 5
00468 #define IEEE80211_INACT_WAIT 5
00469 #define IEEE80211_INACT_MAX (300/IEEE80211_INACT_WAIT)
00470
00471
00472
00473
00474
00475 #define IEEE80211_CHAN_MAX 255
00476 #define IEEE80211_CHAN_ANYC \
00477 ((struct ieee80211channel *) IEEE80211_CHAN_ANY)
00478
00479 #define IEEE80211_RATE_SIZE 8
00480 #define IEEE80211_RATE_MAXSIZE 15
00481 #define IEEE80211_KEYBUF_SIZE 16
00482 #define IEEE80211_NODE_HASHSIZE 32
00483
00484 #define IEEE80211_NODE_HASH(addr) \
00485 (((u_int8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % IEEE80211_NODE_HASHSIZE)
00486
00487 typedef TAILQ_HEAD(, ieee80211_node) IEEE80211_NODE_LIST;
00488
00489 enum ieee80211_phytype {
00490 IEEE80211_T_DS,
00491 IEEE80211_T_FH,
00492 IEEE80211_T_OFDM,
00493 IEEE80211_T_TURBO,
00494 };
00495 #define IEEE80211_T_CCK IEEE80211_T_DS
00496
00497
00498 enum ieee80211_phymode {
00499 IEEE80211_MODE_AUTO = 0,
00500 IEEE80211_MODE_11A = 1,
00501 IEEE80211_MODE_11B = 2,
00502 IEEE80211_MODE_11G = 3,
00503 IEEE80211_MODE_TURBO = 4,
00504 };
00505 #define IEEE80211_MODE_MAX (IEEE80211_MODE_TURBO+1)
00506
00507 enum ieee80211_opmode {
00508 IEEE80211_M_STA = 1,
00509 IEEE80211_M_IBSS = 0,
00510 IEEE80211_M_AHDEMO = 3,
00511 IEEE80211_M_HOSTAP = 6,
00512 IEEE80211_M_MONITOR = 8
00513 };
00514
00515 enum ieee80211_state {
00516 IEEE80211_S_INIT,
00517 IEEE80211_S_SCAN,
00518 IEEE80211_S_AUTH,
00519 IEEE80211_S_ASSOC,
00520 IEEE80211_S_RUN
00521 };
00522
00523
00524
00525
00526 struct wme_ie {
00527 u_int8_t wme_oui[3];
00528 u_int8_t wme_oui_type;
00529 u_int8_t wme_oui_subtype;
00530 u_int8_t wme_version;
00531 u_int8_t wme_info;
00532 } __attribute__((__packed__));
00533
00534
00535
00536
00537 struct wme_param_element {
00538 u_int8_t aifsn;
00539 u_int8_t cwminmax;
00540 u_int8_t txoplimit;
00541 };
00542
00543
00544
00545
00546
00547 struct ieee80211channel {
00548 u_int16_t ic_freq;
00549 u_int16_t ic_flags;
00550 };
00551
00552
00553
00554 #define IEEE80211_CHAN_TURBO 0x0010
00555 #define IEEE80211_CHAN_CCK 0x0020
00556 #define IEEE80211_CHAN_OFDM 0x0040
00557 #define IEEE80211_CHAN_2GHZ 0x0080
00558 #define IEEE80211_CHAN_5GHZ 0x0100
00559 #define IEEE80211_CHAN_PASSIVE 0x0200
00560 #define IEEE80211_CHAN_DYN 0x0400
00561 #define IEEE80211_CHAN_XR 0x0800
00562
00563
00564
00565 #define IEEE80211_CHAN_A \
00566 (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
00567 #define IEEE80211_CHAN_B \
00568 (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
00569 #define IEEE80211_CHAN_PUREG \
00570 (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
00571 #define IEEE80211_CHAN_G \
00572 (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
00573 #define IEEE80211_CHAN_T \
00574 (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
00575 #define IEEE80211_CHAN_X \
00576 (IEEE80211_CHAN_5GHZ|IEEE80211_CHAN_OFDM|IEEE80211_CHAN_XR)
00577
00578 #define IEEE80211_IS_CHAN_A(_c) \
00579 (((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
00580 #define IEEE80211_IS_CHAN_B(_c) \
00581 (((_c)->ic_flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B)
00582 #define IEEE80211_IS_CHAN_PUREG(_c) \
00583 (((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
00584 #define IEEE80211_IS_CHAN_G(_c) \
00585 (((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
00586 #define IEEE80211_IS_CHAN_T(_c) \
00587 (((_c)->ic_flags & IEEE80211_CHAN_T) == IEEE80211_CHAN_T)
00588 #define IEEE80211_IS_CHAN_X(_c) \
00589 (((_c)->ic_flags & IEEE80211_CHAN_T) == IEEE80211_CHAN_X)
00590
00591 #define IEEE80211_IS_CHAN_2GHZ(_c) \
00592 (((_c)->ic_flags & IEEE80211_CHAN_2GHZ) != 0)
00593 #define IEEE80211_IS_CHAN_5GHZ(_c) \
00594 (((_c)->ic_flags & IEEE80211_CHAN_5GHZ) != 0)
00595 #define IEEE80211_IS_CHAN_OFDM(_c) \
00596 (((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0)
00597 #define IEEE80211_IS_CHAN_CCK(_c) \
00598 (((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0)
00599
00600 struct ieee80211_rateset {
00601 u_int8_t rs_nrates;
00602 u_int8_t rs_rates[IEEE80211_RATE_MAXSIZE];
00603 };
00604
00605
00606 #define IEEE80211_RECV_HIST_LEN 16
00607 #define IEEE80211_JIFFIES_NONE ((ulong)(~0))
00608
00609 struct ieee80211_recv_hist {
00610 ulong hi_jiffies;
00611 u_int8_t hi_rssi;
00612 u_int32_t hi_rstamp;
00613 u_int8_t hi_rantenna;
00614 };
00615
00616
00617
00618 #define IEEE80211_N_QOSDATA 0x00000001
00619
00620
00621 #define IEEE80211_FH_CHANMOD 80
00622 #define IEEE80211_FH_CHAN(set,pat) (((set)-1)*IEEE80211_FH_CHANMOD+(pat))
00623 #define IEEE80211_FH_CHANSET(chan) ((chan)/IEEE80211_FH_CHANMOD+1)
00624 #define IEEE80211_FH_CHANPAT(chan) ((chan)%IEEE80211_FH_CHANMOD)
00625
00626 struct ieee80211_wepkey {
00627 int wk_len;
00628 u_int8_t wk_key[IEEE80211_KEYBUF_SIZE];
00629 };
00630
00631 struct proc_dir_entry;
00632
00633 #define IEEE80211_ADDR_EQ(a1,a2) (memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
00634 #define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN)
00635
00636 #define IEEE80211_IS_MULTICAST(a) ETHER_IS_MULTICAST(a)
00637
00638
00639 #define IEEE80211_F_ASCAN 0x00000001
00640 #define IEEE80211_F_SIBSS 0x00000002
00641 #define IEEE80211_F_WEPON 0x00000100
00642 #define IEEE80211_F_IBSSON 0x00000200
00643 #define IEEE80211_F_PMGTON 0x00000400
00644 #define IEEE80211_F_DESBSSID 0x00000800
00645 #define IEEE80211_F_SCANAP 0x00001000
00646 #define IEEE80211_F_ROAMING 0x00002000
00647 #define IEEE80211_F_SWRETRY 0x00004000
00648 #define IEEE80211_F_TXPMGT 0x00018000
00649 #define IEEE80211_F_TXPOW_OFF 0x00000000
00650 #define IEEE80211_F_TXPOW_FIXED 0x00008000
00651 #define IEEE80211_F_TXPOW_AUTO 0x00010000
00652 #define IEEE80211_F_SHSLOT 0x00020000
00653 #define IEEE80211_F_SHPREAMBLE 0x00040000
00654 #define IEEE80211_F_DATAPAD 0x00080000
00655
00656
00657 #define IEEE80211_C_WEP 0x00000001
00658 #define IEEE80211_C_IBSS 0x00000002
00659 #define IEEE80211_C_PMGT 0x00000004
00660 #define IEEE80211_C_HOSTAP 0x00000008
00661 #define IEEE80211_C_AHDEMO 0x00000010
00662 #define IEEE80211_C_SWRETRY 0x00000020
00663 #define IEEE80211_C_TXPMGT 0x00000040
00664 #define IEEE80211_C_SHSLOT 0x00000080
00665 #define IEEE80211_C_SHPREAMBLE 0x00000100
00666 #define IEEE80211_C_MONITOR 0x00000200
00667 #ifdef SOFTLED
00668 #define IEEE80211_C_SOFTLED 0x00100000
00669 #endif
00670
00671
00672 #define IEEE80211_F_DOSORT 0x00000001
00673 #define IEEE80211_F_DOFRATE 0x00000002
00674 #define IEEE80211_F_DONEGO 0x00000004
00675 #define IEEE80211_F_DODEL 0x00000008
00676
00677
00678 #define NETIF_MSG_DEBUG 0x80000000
00679 #define NETIF_MSG_LINK2 0x40000000
00680 #define netif_msg_debug(p) ((p)->msg_enable & NETIF_MSG_DEBUG)
00681 #define netif_msg_dumppkts(p) \
00682 (((p)->msg_enable & (NETIF_MSG_DEBUG|NETIF_MSG_LINK2)) == \
00683 (NETIF_MSG_DEBUG|NETIF_MSG_LINK2))
00684
00685 #ifdef SOFTLED
00686 #define POLL_EVENT 1
00687 #define TRANSMIT_EVENT 2
00688 #define RECEIVE_EVENT 3
00689 #endif
00690
00691 #endif
00692
00693 #endif