1 #ifndef _HOST_WLAN_API_H_
2 #define _HOST_WLAN_API_H_
4 * Copyright (c) 2004-2005 Atheros Communications Inc.
7 * This file contains the API for the host wlan module
9 * $Id: //depot/sw/releases/olca2.0-GPL/host/include/wlan_api.h#1 $
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation;
16 * Software distributed under the License is distributed on an "AS
17 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
18 * implied. See the License for the specific language governing
19 * rights and limitations under the License.
29 struct ieee80211_node_table
;
30 struct ieee80211_frame
;
32 struct ieee80211_common_ie
{
44 A_UINT16 ie_beaconInt
;
52 A_UINT8 ni_macaddr
[6];
55 struct bss
*ni_list_next
;
56 struct bss
*ni_list_prev
;
57 struct bss
*ni_hash_next
;
58 struct bss
*ni_hash_prev
;
59 struct ieee80211_common_ie ni_cie
;
61 struct ieee80211_node_table
*ni_table
;
67 typedef void wlan_node_iter_func(void *arg
, bss_t
*);
69 bss_t
*wlan_node_alloc(struct ieee80211_node_table
*nt
, int wh_size
);
70 void wlan_node_free(bss_t
*ni
);
71 void wlan_setup_node(struct ieee80211_node_table
*nt
, bss_t
*ni
,
72 const A_UINT8
*macaddr
);
73 bss_t
*wlan_find_node(struct ieee80211_node_table
*nt
, const A_UINT8
*macaddr
);
74 void wlan_node_reclaim(struct ieee80211_node_table
*nt
, bss_t
*ni
);
75 void wlan_free_allnodes(struct ieee80211_node_table
*nt
);
76 void wlan_iterate_nodes(struct ieee80211_node_table
*nt
, wlan_node_iter_func
*f
,
79 void wlan_node_table_init(void *wmip
, struct ieee80211_node_table
*nt
);
80 void wlan_node_table_reset(struct ieee80211_node_table
*nt
);
81 void wlan_node_table_cleanup(struct ieee80211_node_table
*nt
);
83 A_STATUS
wlan_parse_beacon(A_UINT8
*buf
, int framelen
,
84 struct ieee80211_common_ie
*cie
);
86 A_UINT16
wlan_ieee2freq(int chan
);
87 A_UINT32
wlan_freq2ieee(A_UINT16 freq
);
91 wlan_find_Ssidnode (struct ieee80211_node_table
*nt
, A_UCHAR
*pSsid
,
92 A_UINT32 ssidLength
, A_BOOL bIsWPA2
);
95 wlan_node_return (struct ieee80211_node_table
*nt
, bss_t
*ni
);
101 #endif /* _HOST_WLAN_API_H_ */