hostap.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifndef HOSTAP_H
  2. #define HOSTAP_H
  3. #include <linux/ethtool.h>
  4. #include "hostap_wlan.h"
  5. #include "hostap_ap.h"
  6. static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
  7. 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
  8. #define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
  9. /* hostap.c */
  10. extern struct proc_dir_entry *hostap_proc;
  11. u16 hostap_tx_callback_register(local_info_t *local,
  12. void (*func)(struct sk_buff *, int ok, void *),
  13. void *data);
  14. int hostap_tx_callback_unregister(local_info_t *local, u16 idx);
  15. int hostap_set_word(struct net_device *dev, int rid, u16 val);
  16. int hostap_set_string(struct net_device *dev, int rid, const char *val);
  17. u16 hostap_get_porttype(local_info_t *local);
  18. int hostap_set_encryption(local_info_t *local);
  19. int hostap_set_antsel(local_info_t *local);
  20. int hostap_set_roaming(local_info_t *local);
  21. int hostap_set_auth_algs(local_info_t *local);
  22. void hostap_dump_rx_header(const char *name,
  23. const struct hfa384x_rx_frame *rx);
  24. void hostap_dump_tx_header(const char *name,
  25. const struct hfa384x_tx_frame *tx);
  26. int hostap_80211_header_parse(struct sk_buff *skb, unsigned char *haddr);
  27. int hostap_80211_prism_header_parse(struct sk_buff *skb, unsigned char *haddr);
  28. int hostap_80211_get_hdrlen(u16 fc);
  29. struct net_device_stats *hostap_get_stats(struct net_device *dev);
  30. void hostap_setup_dev(struct net_device *dev, local_info_t *local,
  31. int main_dev);
  32. void hostap_set_multicast_list_queue(void *data);
  33. int hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked);
  34. int hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked);
  35. void hostap_cleanup(local_info_t *local);
  36. void hostap_cleanup_handler(void *data);
  37. struct net_device * hostap_add_interface(struct local_info *local,
  38. int type, int rtnl_locked,
  39. const char *prefix, const char *name);
  40. void hostap_remove_interface(struct net_device *dev, int rtnl_locked,
  41. int remove_from_list);
  42. int prism2_update_comms_qual(struct net_device *dev);
  43. int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
  44. u8 *body, size_t bodylen);
  45. int prism2_sta_deauth(local_info_t *local, u16 reason);
  46. int prism2_wds_add(local_info_t *local, u8 *remote_addr,
  47. int rtnl_locked);
  48. int prism2_wds_del(local_info_t *local, u8 *remote_addr,
  49. int rtnl_locked, int do_not_remove);
  50. /* hostap_ap.c */
  51. int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
  52. int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
  53. void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
  54. int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
  55. void ap_control_kickall(struct ap_data *ap);
  56. void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
  57. struct ieee80211_crypt_data ***crypt);
  58. int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
  59. struct iw_quality qual[], int buf_size,
  60. int aplist);
  61. int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
  62. int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
  63. /* hostap_proc.c */
  64. void hostap_init_proc(local_info_t *local);
  65. void hostap_remove_proc(local_info_t *local);
  66. /* hostap_info.c */
  67. void hostap_info_init(local_info_t *local);
  68. void hostap_info_process(local_info_t *local, struct sk_buff *skb);
  69. /* hostap_ioctl.c */
  70. extern const struct iw_handler_def hostap_iw_handler_def;
  71. extern struct ethtool_ops prism2_ethtool_ops;
  72. int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
  73. #endif /* HOSTAP_H */