diff options
Diffstat (limited to 'sys/net80211/ieee80211_proto.h')
-rw-r--r-- | sys/net80211/ieee80211_proto.h | 79 |
1 files changed, 45 insertions, 34 deletions
diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index f650cf5..b00c8ec 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -52,32 +52,36 @@ void ieee80211_proto_detach(struct ieee80211com *); struct ieee80211_node; int ieee80211_input(struct ieee80211com *, struct mbuf *, - struct ieee80211_node *, int, u_int32_t); + struct ieee80211_node *, int, int, uint32_t); +void ieee80211_deliver_data(struct ieee80211com *, + struct ieee80211_node *, struct mbuf *); +struct mbuf *ieee80211_decap1(struct mbuf *, int *); int ieee80211_setup_rates(struct ieee80211_node *ni, - const u_int8_t *rates, const u_int8_t *xrates, int flags); -void ieee80211_saveie(u_int8_t **, const u_int8_t *); + const uint8_t *rates, const uint8_t *xrates, int flags); +void ieee80211_saveie(uint8_t **, const uint8_t *); +void ieee80211_saveath(struct ieee80211_node *, uint8_t *); void ieee80211_recv_mgmt(struct ieee80211com *, struct mbuf *, - struct ieee80211_node *, int, int, u_int32_t); + struct ieee80211_node *, int, int, int, uint32_t); +int ieee80211_mgmt_output(struct ieee80211com *, struct ieee80211_node *, + struct mbuf *, int type); struct ieee80211_bpf_params; int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); int ieee80211_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); int ieee80211_send_nulldata(struct ieee80211_node *); -int ieee80211_send_probereq(struct ieee80211_node *ni, - const u_int8_t sa[IEEE80211_ADDR_LEN], - const u_int8_t da[IEEE80211_ADDR_LEN], - const u_int8_t bssid[IEEE80211_ADDR_LEN], - const u_int8_t *ssid, size_t ssidlen, - const void *optie, size_t optielen); int ieee80211_send_mgmt(struct ieee80211com *, struct ieee80211_node *, int, int); +int ieee80211_send_probereq(struct ieee80211_node *ni, + const uint8_t sa[IEEE80211_ADDR_LEN], + const uint8_t da[IEEE80211_ADDR_LEN], + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t *ssid, size_t ssidlen, + const void *optie, size_t optielen); int ieee80211_classify(struct ieee80211com *, struct mbuf *, struct ieee80211_node *); struct mbuf *ieee80211_encap(struct ieee80211com *, struct mbuf *, struct ieee80211_node *); -void ieee80211_pwrsave(struct ieee80211com *, struct ieee80211_node *, - struct mbuf *); void ieee80211_reset_erp(struct ieee80211com *); void ieee80211_set_shortslottime(struct ieee80211com *, int onoff); @@ -101,12 +105,12 @@ ieee80211_hdrsize(const void *data) if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) size += IEEE80211_ADDR_LEN; if (IEEE80211_QOS_HAS_SEQ(wh)) - size += sizeof(u_int16_t); + size += sizeof(uint16_t); return size; } /* - * Return the size of the 802.11 header; handles any type of frame. + * Like ieee80211_hdrsize, but handles any type of frame. */ static __inline int ieee80211_anyhdrsize(const void *data) @@ -118,6 +122,8 @@ ieee80211_anyhdrsize(const void *data) case IEEE80211_FC0_SUBTYPE_CTS: case IEEE80211_FC0_SUBTYPE_ACK: return sizeof(struct ieee80211_frame_ack); + case IEEE80211_FC0_SUBTYPE_BAR: + return sizeof(struct ieee80211_frame_bar); } return sizeof(struct ieee80211_frame_min); } else @@ -154,11 +160,11 @@ struct ieee80211_aclator { int (*iac_attach)(struct ieee80211com *); void (*iac_detach)(struct ieee80211com *); int (*iac_check)(struct ieee80211com *, - const u_int8_t mac[IEEE80211_ADDR_LEN]); + const uint8_t mac[IEEE80211_ADDR_LEN]); int (*iac_add)(struct ieee80211com *, - const u_int8_t mac[IEEE80211_ADDR_LEN]); + const uint8_t mac[IEEE80211_ADDR_LEN]); int (*iac_remove)(struct ieee80211com *, - const u_int8_t mac[IEEE80211_ADDR_LEN]); + const uint8_t mac[IEEE80211_ADDR_LEN]); int (*iac_flush)(struct ieee80211com *); int (*iac_setpolicy)(struct ieee80211com *, int); int (*iac_getpolicy)(struct ieee80211com *); @@ -174,7 +180,8 @@ const struct ieee80211_aclator *ieee80211_aclator_get(const char *name); #define IEEE80211_F_DOFRATE 0x00000002 /* use fixed rate */ #define IEEE80211_F_DONEGO 0x00000004 /* calc negotiated rate */ #define IEEE80211_F_DODEL 0x00000008 /* delete ignore rate */ -#define IEEE80211_F_JOIN 0x00000010 /* sta joining our bss */ +#define IEEE80211_F_DOBRS 0x00000010 /* check basic rate set */ +#define IEEE80211_F_JOIN 0x00000020 /* sta joining our bss */ int ieee80211_fix_rate(struct ieee80211_node *, struct ieee80211_rateset *, int); @@ -182,18 +189,18 @@ int ieee80211_fix_rate(struct ieee80211_node *, * WME/WMM support. */ struct wmeParams { - u_int8_t wmep_acm; - u_int8_t wmep_aifsn; - u_int8_t wmep_logcwmin; /* log2(cwmin) */ - u_int8_t wmep_logcwmax; /* log2(cwmax) */ - u_int8_t wmep_txopLimit; - u_int8_t wmep_noackPolicy; /* 0 (ack), 1 (no ack) */ + uint8_t wmep_acm; + uint8_t wmep_aifsn; + uint8_t wmep_logcwmin; /* log2(cwmin) */ + uint8_t wmep_logcwmax; /* log2(cwmax) */ + uint8_t wmep_txopLimit; + uint8_t wmep_noackPolicy; /* 0 (ack), 1 (no ack) */ }; #define IEEE80211_TXOP_TO_US(_txop) ((_txop)<<5) #define IEEE80211_US_TO_TXOP(_us) ((_us)>>5) struct chanAccParams { - u_int8_t cap_info; /* version of the current set */ + uint8_t cap_info; /* version of the current set */ struct wmeParams cap_wmeParams[WME_NUM_AC]; }; @@ -219,9 +226,12 @@ void ieee80211_wme_updateparams_locked(struct ieee80211com *); #define ieee80211_new_state(_ic, _nstate, _arg) \ (((_ic)->ic_newstate)((_ic), (_nstate), (_arg))) +int ieee80211_init(struct ieee80211com *, int forcescan); +void ieee80211_dturbo_switch(struct ieee80211com *, int newflags); void ieee80211_beacon_miss(struct ieee80211com *); -void ieee80211_print_essid(const u_int8_t *, int); -void ieee80211_dump_pkt(const u_int8_t *, int, int, int); +void ieee80211_print_essid(const uint8_t *, int); +void ieee80211_dump_pkt(struct ieee80211com *, + const uint8_t *, int, int, int); extern const char *ieee80211_opmode_name[]; extern const char *ieee80211_state_name[IEEE80211_S_MAX]; @@ -233,13 +243,14 @@ extern const char *ieee80211_wme_acnames[]; * can update the frame later w/ minimal overhead. */ struct ieee80211_beacon_offsets { - u_int16_t *bo_caps; /* capabilities */ - u_int8_t *bo_tim; /* start of atim/dtim */ - u_int8_t *bo_wme; /* start of WME parameters */ - u_int8_t *bo_trailer; /* start of fixed-size trailer */ - u_int16_t bo_tim_len; /* atim/dtim length in bytes */ - u_int16_t bo_trailer_len; /* trailer length in bytes */ - u_int8_t *bo_erp; /* start of ERP element */ + uint16_t *bo_caps; /* capabilities */ + uint8_t *bo_tim; /* start of atim/dtim */ + uint8_t *bo_wme; /* start of WME parameters */ + uint8_t *bo_trailer; /* start of fixed-size trailer */ + uint16_t bo_tim_len; /* atim/dtim length in bytes */ + uint16_t bo_trailer_len; /* trailer length in bytes */ + uint8_t *bo_erp; /* start of ERP element */ + uint8_t *bo_htinfo; /* start of HT info element */ }; struct mbuf *ieee80211_beacon_alloc(struct ieee80211com *, struct ieee80211_node *, struct ieee80211_beacon_offsets *); |