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