1 //------------------------------------------------------------------------------
2 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
5 // Permission to use, copy, modify, and/or distribute this software for any
6 // purpose with or without fee is hereby granted, provided that the above
7 // copyright notice and this permission notice appear in all copies.
9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 //------------------------------------------------------------------------------
19 //==============================================================================
20 // This file contains the API for the host wlan module
22 // Author(s): ="Atheros"
23 //==============================================================================
24 #ifndef _HOST_WLAN_API_H_
25 #define _HOST_WLAN_API_H_
34 struct ieee80211_node_table;
35 struct ieee80211_frame;
37 struct ieee80211_common_ie {
49 A_UINT16 ie_beaconInt;
62 A_UINT8 ni_macaddr[6];
65 struct bss *ni_list_next;
66 struct bss *ni_list_prev;
67 struct bss *ni_hash_next;
68 struct bss *ni_hash_prev;
69 struct ieee80211_common_ie ni_cie;
72 struct ieee80211_node_table *ni_table;
78 #ifdef OS_ROAM_MANAGEMENT
83 typedef void wlan_node_iter_func(void *arg, bss_t *);
85 bss_t *wlan_node_alloc(struct ieee80211_node_table *nt, int wh_size);
86 void wlan_node_free(bss_t *ni);
87 void wlan_setup_node(struct ieee80211_node_table *nt, bss_t *ni,
88 const A_UINT8 *macaddr);
89 bss_t *wlan_find_node(struct ieee80211_node_table *nt, const A_UINT8 *macaddr);
90 void wlan_node_reclaim(struct ieee80211_node_table *nt, bss_t *ni);
91 void wlan_free_allnodes(struct ieee80211_node_table *nt);
92 void wlan_iterate_nodes(struct ieee80211_node_table *nt, wlan_node_iter_func *f,
95 void wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt);
96 void wlan_node_table_reset(struct ieee80211_node_table *nt);
97 void wlan_node_table_cleanup(struct ieee80211_node_table *nt);
99 A_STATUS wlan_parse_beacon(A_UINT8 *buf, int framelen,
100 struct ieee80211_common_ie *cie);
102 A_UINT16 wlan_ieee2freq(int chan);
103 A_UINT32 wlan_freq2ieee(A_UINT16 freq);
105 void wlan_set_nodeage(struct ieee80211_node_table *nt, A_UINT32 nodeAge);
108 wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt);
111 wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid,
112 A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID);
115 wlan_node_return (struct ieee80211_node_table *nt, bss_t *ni);
117 bss_t *wlan_node_remove(struct ieee80211_node_table *nt, A_UINT8 *bssid);
120 wlan_find_matching_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid,
121 A_UINT32 ssidLength, A_UINT32 dot11AuthMode, A_UINT32 authMode,
122 A_UINT32 pairwiseCryptoType, A_UINT32 grpwiseCryptoTyp);
128 #endif /* _HOST_WLAN_API_H_ */