0001
0002 #ifndef HOSTAP_H
0003 #define HOSTAP_H
0004
0005 #include <linux/ethtool.h>
0006 #include <linux/kernel.h>
0007
0008 #include "hostap_wlan.h"
0009 #include "hostap_ap.h"
0010
0011 static const long __maybe_unused freq_list[] = {
0012 2412, 2417, 2422, 2427, 2432, 2437, 2442,
0013 2447, 2452, 2457, 2462, 2467, 2472, 2484
0014 };
0015 #define FREQ_COUNT ARRAY_SIZE(freq_list)
0016
0017
0018
0019 extern struct proc_dir_entry *hostap_proc;
0020
0021 u16 hostap_tx_callback_register(local_info_t *local,
0022 void (*func)(struct sk_buff *, int ok, void *),
0023 void *data);
0024 int hostap_tx_callback_unregister(local_info_t *local, u16 idx);
0025 int hostap_set_word(struct net_device *dev, int rid, u16 val);
0026 int hostap_set_string(struct net_device *dev, int rid, const char *val);
0027 u16 hostap_get_porttype(local_info_t *local);
0028 int hostap_set_encryption(local_info_t *local);
0029 int hostap_set_antsel(local_info_t *local);
0030 int hostap_set_roaming(local_info_t *local);
0031 int hostap_set_auth_algs(local_info_t *local);
0032 void hostap_dump_rx_header(const char *name,
0033 const struct hfa384x_rx_frame *rx);
0034 void hostap_dump_tx_header(const char *name,
0035 const struct hfa384x_tx_frame *tx);
0036 extern const struct header_ops hostap_80211_ops;
0037 int hostap_80211_get_hdrlen(__le16 fc);
0038 struct net_device_stats *hostap_get_stats(struct net_device *dev);
0039 void hostap_setup_dev(struct net_device *dev, local_info_t *local,
0040 int type);
0041 void hostap_set_multicast_list_queue(struct work_struct *work);
0042 int hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked);
0043 int hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked);
0044 void hostap_cleanup(local_info_t *local);
0045 void hostap_cleanup_handler(void *data);
0046 struct net_device * hostap_add_interface(struct local_info *local,
0047 int type, int rtnl_locked,
0048 const char *prefix, const char *name);
0049 void hostap_remove_interface(struct net_device *dev, int rtnl_locked,
0050 int remove_from_list);
0051 int prism2_update_comms_qual(struct net_device *dev);
0052 int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
0053 u8 *body, size_t bodylen);
0054 int prism2_sta_deauth(local_info_t *local, u16 reason);
0055 int prism2_wds_add(local_info_t *local, u8 *remote_addr,
0056 int rtnl_locked);
0057 int prism2_wds_del(local_info_t *local, u8 *remote_addr,
0058 int rtnl_locked, int do_not_remove);
0059
0060
0061
0062
0063 int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
0064 int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
0065 void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
0066 int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
0067 void ap_control_kickall(struct ap_data *ap);
0068 void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
0069 struct lib80211_crypt_data ***crypt);
0070 int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
0071 struct iw_quality qual[], int buf_size,
0072 int aplist);
0073 int prism2_ap_translate_scan(struct net_device *dev,
0074 struct iw_request_info *info, char *buffer);
0075 int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
0076
0077
0078
0079
0080 void hostap_init_proc(local_info_t *local);
0081 void hostap_remove_proc(local_info_t *local);
0082
0083
0084
0085
0086 void hostap_info_init(local_info_t *local);
0087 void hostap_info_process(local_info_t *local, struct sk_buff *skb);
0088
0089
0090
0091
0092 extern const struct iw_handler_def hostap_iw_handler_def;
0093 extern const struct ethtool_ops prism2_ethtool_ops;
0094
0095 int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
0096 int hostap_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
0097 void __user *data, int cmd);
0098
0099 #endif