hostap.h 3.6 KB

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