blob: ef37a75d550b863cf4180fb4b466b00f4233b79f [file] [log] [blame]
Jouni Malinenff1d2762005-05-12 22:54:16 -04001#ifndef HOSTAP_H
2#define HOSTAP_H
3
Adrian Bunk5fad5a22006-01-14 03:09:34 +01004#include <linux/ethtool.h>
Ahmed S. Darwish51471d32007-02-05 18:58:52 +02005#include <linux/kernel.h>
Adrian Bunk5fad5a22006-01-14 03:09:34 +01006
7#include "hostap_wlan.h"
8#include "hostap_ap.h"
9
10static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
11 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
Ahmed S. Darwish51471d32007-02-05 18:58:52 +020012#define FREQ_COUNT ARRAY_SIZE(freq_list)
Adrian Bunk5fad5a22006-01-14 03:09:34 +010013
Jouni Malinenff1d2762005-05-12 22:54:16 -040014/* hostap.c */
15
16extern struct proc_dir_entry *hostap_proc;
17
18u16 hostap_tx_callback_register(local_info_t *local,
19 void (*func)(struct sk_buff *, int ok, void *),
20 void *data);
21int hostap_tx_callback_unregister(local_info_t *local, u16 idx);
22int hostap_set_word(struct net_device *dev, int rid, u16 val);
23int hostap_set_string(struct net_device *dev, int rid, const char *val);
24u16 hostap_get_porttype(local_info_t *local);
25int hostap_set_encryption(local_info_t *local);
26int hostap_set_antsel(local_info_t *local);
27int hostap_set_roaming(local_info_t *local);
28int hostap_set_auth_algs(local_info_t *local);
29void hostap_dump_rx_header(const char *name,
30 const struct hfa384x_rx_frame *rx);
31void hostap_dump_tx_header(const char *name,
32 const struct hfa384x_tx_frame *tx);
33int hostap_80211_header_parse(struct sk_buff *skb, unsigned char *haddr);
34int hostap_80211_prism_header_parse(struct sk_buff *skb, unsigned char *haddr);
35int hostap_80211_get_hdrlen(u16 fc);
36struct net_device_stats *hostap_get_stats(struct net_device *dev);
37void hostap_setup_dev(struct net_device *dev, local_info_t *local,
38 int main_dev);
David Howellsc4028952006-11-22 14:57:56 +000039void hostap_set_multicast_list_queue(struct work_struct *work);
Jouni Malinenff1d2762005-05-12 22:54:16 -040040int hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked);
41int hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked);
42void hostap_cleanup(local_info_t *local);
43void hostap_cleanup_handler(void *data);
44struct net_device * hostap_add_interface(struct local_info *local,
45 int type, int rtnl_locked,
46 const char *prefix, const char *name);
47void hostap_remove_interface(struct net_device *dev, int rtnl_locked,
48 int remove_from_list);
49int prism2_update_comms_qual(struct net_device *dev);
Jouni Malinen4339d322005-08-14 19:08:44 -070050int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
Jouni Malinenff1d2762005-05-12 22:54:16 -040051 u8 *body, size_t bodylen);
52int prism2_sta_deauth(local_info_t *local, u16 reason);
Adrian Bunk5fad5a22006-01-14 03:09:34 +010053int prism2_wds_add(local_info_t *local, u8 *remote_addr,
54 int rtnl_locked);
55int prism2_wds_del(local_info_t *local, u8 *remote_addr,
56 int rtnl_locked, int do_not_remove);
57
58
59/* hostap_ap.c */
60
61int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
62int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
63void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
64int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
65void ap_control_kickall(struct ap_data *ap);
66void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
67 struct ieee80211_crypt_data ***crypt);
68int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
69 struct iw_quality qual[], int buf_size,
70 int aplist);
71int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
72int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
Jouni Malinenff1d2762005-05-12 22:54:16 -040073
74
75/* hostap_proc.c */
76
77void hostap_init_proc(local_info_t *local);
78void hostap_remove_proc(local_info_t *local);
79
80
81/* hostap_info.c */
82
83void hostap_info_init(local_info_t *local);
84void hostap_info_process(local_info_t *local, struct sk_buff *skb);
85
86
Adrian Bunk5fad5a22006-01-14 03:09:34 +010087/* hostap_ioctl.c */
88
89extern const struct iw_handler_def hostap_iw_handler_def;
Jeff Garzik7282d492006-09-13 14:30:00 -040090extern const struct ethtool_ops prism2_ethtool_ops;
Adrian Bunk5fad5a22006-01-14 03:09:34 +010091
92int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
93
94
Jouni Malinenff1d2762005-05-12 22:54:16 -040095#endif /* HOSTAP_H */