18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef HOSTAP_H
38c2ecf20Sopenharmony_ci#define HOSTAP_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/ethtool.h>
68c2ecf20Sopenharmony_ci#include <linux/kernel.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include "hostap_wlan.h"
98c2ecf20Sopenharmony_ci#include "hostap_ap.h"
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cistatic const long __maybe_unused freq_list[] = {
128c2ecf20Sopenharmony_ci	2412, 2417, 2422, 2427, 2432, 2437, 2442,
138c2ecf20Sopenharmony_ci	2447, 2452, 2457, 2462, 2467, 2472, 2484
148c2ecf20Sopenharmony_ci};
158c2ecf20Sopenharmony_ci#define FREQ_COUNT ARRAY_SIZE(freq_list)
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/* hostap.c */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciextern struct proc_dir_entry *hostap_proc;
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciu16 hostap_tx_callback_register(local_info_t *local,
228c2ecf20Sopenharmony_ci				void (*func)(struct sk_buff *, int ok, void *),
238c2ecf20Sopenharmony_ci				void *data);
248c2ecf20Sopenharmony_ciint hostap_tx_callback_unregister(local_info_t *local, u16 idx);
258c2ecf20Sopenharmony_ciint hostap_set_word(struct net_device *dev, int rid, u16 val);
268c2ecf20Sopenharmony_ciint hostap_set_string(struct net_device *dev, int rid, const char *val);
278c2ecf20Sopenharmony_ciu16 hostap_get_porttype(local_info_t *local);
288c2ecf20Sopenharmony_ciint hostap_set_encryption(local_info_t *local);
298c2ecf20Sopenharmony_ciint hostap_set_antsel(local_info_t *local);
308c2ecf20Sopenharmony_ciint hostap_set_roaming(local_info_t *local);
318c2ecf20Sopenharmony_ciint hostap_set_auth_algs(local_info_t *local);
328c2ecf20Sopenharmony_civoid hostap_dump_rx_header(const char *name,
338c2ecf20Sopenharmony_ci			   const struct hfa384x_rx_frame *rx);
348c2ecf20Sopenharmony_civoid hostap_dump_tx_header(const char *name,
358c2ecf20Sopenharmony_ci			   const struct hfa384x_tx_frame *tx);
368c2ecf20Sopenharmony_ciextern const struct header_ops hostap_80211_ops;
378c2ecf20Sopenharmony_ciint hostap_80211_get_hdrlen(__le16 fc);
388c2ecf20Sopenharmony_cistruct net_device_stats *hostap_get_stats(struct net_device *dev);
398c2ecf20Sopenharmony_civoid hostap_setup_dev(struct net_device *dev, local_info_t *local,
408c2ecf20Sopenharmony_ci		      int type);
418c2ecf20Sopenharmony_civoid hostap_set_multicast_list_queue(struct work_struct *work);
428c2ecf20Sopenharmony_ciint hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked);
438c2ecf20Sopenharmony_ciint hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked);
448c2ecf20Sopenharmony_civoid hostap_cleanup(local_info_t *local);
458c2ecf20Sopenharmony_civoid hostap_cleanup_handler(void *data);
468c2ecf20Sopenharmony_cistruct net_device * hostap_add_interface(struct local_info *local,
478c2ecf20Sopenharmony_ci					 int type, int rtnl_locked,
488c2ecf20Sopenharmony_ci					 const char *prefix, const char *name);
498c2ecf20Sopenharmony_civoid hostap_remove_interface(struct net_device *dev, int rtnl_locked,
508c2ecf20Sopenharmony_ci			     int remove_from_list);
518c2ecf20Sopenharmony_ciint prism2_update_comms_qual(struct net_device *dev);
528c2ecf20Sopenharmony_ciint prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
538c2ecf20Sopenharmony_ci			 u8 *body, size_t bodylen);
548c2ecf20Sopenharmony_ciint prism2_sta_deauth(local_info_t *local, u16 reason);
558c2ecf20Sopenharmony_ciint prism2_wds_add(local_info_t *local, u8 *remote_addr,
568c2ecf20Sopenharmony_ci		   int rtnl_locked);
578c2ecf20Sopenharmony_ciint prism2_wds_del(local_info_t *local, u8 *remote_addr,
588c2ecf20Sopenharmony_ci		   int rtnl_locked, int do_not_remove);
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci/* hostap_ap.c */
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciint ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
648c2ecf20Sopenharmony_ciint ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
658c2ecf20Sopenharmony_civoid ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
668c2ecf20Sopenharmony_ciint ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
678c2ecf20Sopenharmony_civoid ap_control_kickall(struct ap_data *ap);
688c2ecf20Sopenharmony_civoid * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
698c2ecf20Sopenharmony_ci			 struct lib80211_crypt_data ***crypt);
708c2ecf20Sopenharmony_ciint prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
718c2ecf20Sopenharmony_ci			   struct iw_quality qual[], int buf_size,
728c2ecf20Sopenharmony_ci			   int aplist);
738c2ecf20Sopenharmony_ciint prism2_ap_translate_scan(struct net_device *dev,
748c2ecf20Sopenharmony_ci			     struct iw_request_info *info, char *buffer);
758c2ecf20Sopenharmony_ciint prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci/* hostap_proc.c */
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_civoid hostap_init_proc(local_info_t *local);
818c2ecf20Sopenharmony_civoid hostap_remove_proc(local_info_t *local);
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci/* hostap_info.c */
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_civoid hostap_info_init(local_info_t *local);
878c2ecf20Sopenharmony_civoid hostap_info_process(local_info_t *local, struct sk_buff *skb);
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci/* hostap_ioctl.c */
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ciextern const struct iw_handler_def hostap_iw_handler_def;
938c2ecf20Sopenharmony_ciextern const struct ethtool_ops prism2_ethtool_ops;
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciint hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci#endif /* HOSTAP_H */
99