1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
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
19 ******************************************************************************/
20 #ifndef __IOCTL_CFG80211_H__
21 #define __IOCTL_CFG80211_H__
23 struct rtw_wdev_invit_info {
31 #define rtw_wdev_invit_info_init(invit_info) \
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; \
40 struct rtw_wdev_priv {
41 struct wireless_dev *rtw_wdev;
43 struct adapter *padapter;
45 struct cfg80211_scan_request *scan_request;
46 spinlock_t scan_req_lock;
48 struct net_device *pmon_ndev;/* for monitor interface */
49 char ifname_mon[IFNAMSIZ + 1]; /* name of monitor interface */
53 u8 provdisc_req_issued;
55 struct rtw_wdev_invit_info invit_info;
62 #define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
64 #define wiphy_to_wdev(x) \
65 ((struct wireless_dev *)(((struct rtw_wdev_priv *)wiphy_priv(x))->rtw_wdev))
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);
71 void rtw_cfg80211_init_wiphy(struct adapter *padapter);
73 void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter);
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,
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,
85 unsigned short reason);
86 #endif /* CONFIG_88EU_AP_MODE */
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,
94 void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame,
95 uint frame_len, const char *msg);
97 int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net,
98 char *buf, int len, int type);
100 bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter);
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)
107 #endif /* __IOCTL_CFG80211_H__ */