]> Pileus Git - ~andy/linux/blob - drivers/staging/rtl8188eu/include/ioctl_cfg80211.h
Merge branch 'fortglx/3.12/sched-clock64-base' into fortglx/3.13/time
[~andy/linux] / drivers / staging / rtl8188eu / include / ioctl_cfg80211.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __IOCTL_CFG80211_H__
21 #define __IOCTL_CFG80211_H__
22
23 struct rtw_wdev_invit_info {
24         u8 token;
25         u8 flags;
26         u8 status;
27         u8 req_op_ch;
28         u8 rsp_op_ch;
29 };
30
31 #define rtw_wdev_invit_info_init(invit_info) \
32         do { \
33                 (invit_info)->token = 0; \
34                 (invit_info)->flags = 0x00; \
35                 (invit_info)->status = 0xff; \
36                 (invit_info)->req_op_ch = 0; \
37                 (invit_info)->rsp_op_ch = 0; \
38         } while (0)
39
40 struct rtw_wdev_priv {
41         struct wireless_dev *rtw_wdev;
42
43         struct adapter *padapter;
44
45         struct cfg80211_scan_request *scan_request;
46         spinlock_t scan_req_lock;
47
48         struct net_device *pmon_ndev;/* for monitor interface */
49         char ifname_mon[IFNAMSIZ + 1]; /* name of monitor interface */
50
51         u8 p2p_enabled;
52
53         u8 provdisc_req_issued;
54
55         struct rtw_wdev_invit_info invit_info;
56
57         u8 bandroid_scan;
58         bool block;
59         bool power_mgmt;
60 };
61
62 #define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
63
64 #define wiphy_to_wdev(x)                                \
65 ((struct wireless_dev *)(((struct rtw_wdev_priv *)wiphy_priv(x))->rtw_wdev))
66
67 int rtw_wdev_alloc(struct adapter *padapter, struct device *dev);
68 void rtw_wdev_free(struct wireless_dev *wdev);
69 void rtw_wdev_unregister(struct wireless_dev *wdev);
70
71 void rtw_cfg80211_init_wiphy(struct adapter *padapter);
72
73 void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter);
74
75 void rtw_cfg80211_indicate_connect(struct adapter *padapter);
76 void rtw_cfg80211_indicate_disconnect(struct adapter *padapter);
77 void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv,
78                                      bool aborted);
79
80 #ifdef CONFIG_88EU_AP_MODE
81 void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter,
82                                      u8 *pmgmt_frame, uint frame_len);
83 void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter,
84                                         unsigned char *da,
85                                         unsigned short reason);
86 #endif /* CONFIG_88EU_AP_MODE */
87
88 void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter,
89                                               const u8 *buf, size_t len);
90 void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter,
91                                        u8 *pmgmt_frame, uint frame_len);
92 void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame,
93                                 uint frame_len);
94 void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame,
95                             uint frame_len, const char *msg);
96
97 int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net,
98                                    char *buf, int len, int type);
99
100 bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter);
101
102 #define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)         \
103         cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)
104 #define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len)                  \
105         cfg80211_send_rx_assoc(dev, bss, buf, len)
106
107 #endif /* __IOCTL_CFG80211_H__ */