File Index
Files and directories
Sign in
FILE

ioctl_cfg80211.h

File preview with syntax highlighting.

linux-6.19.14/drivers/staging/rtl8723bs/include/ioctl_cfg80211.h C
  1/* SPDX-License-Identifier: GPL-2.0 */
  2/******************************************************************************
  3 *
  4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  5 *
  6 ******************************************************************************/
  7#ifndef __IOCTL_CFG80211_H__
  8#define __IOCTL_CFG80211_H__
  9
 10struct rtw_wdev_invit_info {
 11	u8 state; /* 0: req, 1:rep */
 12	u8 peer_mac[ETH_ALEN];
 13	u8 active;
 14	u8 token;
 15	u8 flags;
 16	u8 status;
 17	u8 req_op_ch;
 18	u8 rsp_op_ch;
 19};
 20
 21#define rtw_wdev_invit_info_init(invit_info) \
 22	do { \
 23		(invit_info)->state = 0xff; \
 24		memset((invit_info)->peer_mac, 0, ETH_ALEN); \
 25		(invit_info)->active = 0xff; \
 26		(invit_info)->token = 0; \
 27		(invit_info)->flags = 0x00; \
 28		(invit_info)->status = 0xff; \
 29		(invit_info)->req_op_ch = 0; \
 30		(invit_info)->rsp_op_ch = 0; \
 31	} while (0)
 32
 33struct rtw_wdev_nego_info {
 34	u8 state; /* 0: req, 1:rep, 2:conf */
 35	u8 peer_mac[ETH_ALEN];
 36	u8 active;
 37	u8 token;
 38	u8 status;
 39	u8 req_intent;
 40	u8 req_op_ch;
 41	u8 req_listen_ch;
 42	u8 rsp_intent;
 43	u8 rsp_op_ch;
 44	u8 conf_op_ch;
 45};
 46
 47#define rtw_wdev_nego_info_init(nego_info) \
 48	do { \
 49		(nego_info)->state = 0xff; \
 50		memset((nego_info)->peer_mac, 0, ETH_ALEN); \
 51		(nego_info)->active = 0xff; \
 52		(nego_info)->token = 0; \
 53		(nego_info)->status = 0xff; \
 54		(nego_info)->req_intent = 0xff; \
 55		(nego_info)->req_op_ch = 0; \
 56		(nego_info)->req_listen_ch = 0; \
 57		(nego_info)->rsp_intent = 0xff; \
 58		(nego_info)->rsp_op_ch = 0; \
 59		(nego_info)->conf_op_ch = 0; \
 60	} while (0)
 61
 62struct rtw_wdev_priv {
 63	struct wireless_dev *rtw_wdev;
 64
 65	struct adapter *padapter;
 66
 67	struct cfg80211_scan_request *scan_request;
 68	spinlock_t scan_req_lock;
 69
 70	struct net_device *pmon_ndev;/* for monitor interface */
 71	char ifname_mon[IFNAMSIZ + 1]; /* interface name for monitor interface */
 72
 73	u8 p2p_enabled;
 74
 75	u8 provdisc_req_issued;
 76
 77	struct rtw_wdev_invit_info invit_info;
 78	struct rtw_wdev_nego_info nego_info;
 79
 80	u8 bandroid_scan;
 81	bool block;
 82	bool power_mgmt;
 83};
 84
 85#define wiphy_to_adapter(x) (*((struct adapter **)wiphy_priv(x)))
 86
 87#define wdev_to_ndev(w) ((w)->netdev)
 88
 89int rtw_wdev_alloc(struct adapter *padapter, struct device *dev);
 90void rtw_wdev_free(struct wireless_dev *wdev);
 91void rtw_wdev_unregister(struct wireless_dev *wdev);
 92
 93void rtw_cfg80211_init_wiphy(struct adapter *padapter);
 94
 95void rtw_cfg80211_unlink_bss(struct adapter *padapter, struct wlan_network *pnetwork);
 96void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter);
 97int rtw_ieee80211_channel_to_frequency(int chan);
 98struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wlan_network *pnetwork);
 99int rtw_cfg80211_check_bss(struct adapter *padapter);
100void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter);
101void rtw_cfg80211_indicate_connect(struct adapter *padapter);
102void rtw_cfg80211_indicate_disconnect(struct adapter *padapter);
103void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted);
104
105void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len);
106void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char *da, unsigned short reason);
107
108void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len, const char *msg);
109
110bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter);
111
112#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0)
113#define rtw_cfg80211_send_rx_assoc(adapter, bss, buf, len) cfg80211_send_rx_assoc((adapter)->pnetdev, bss, buf, len)
114#define rtw_cfg80211_mgmt_tx_status(adapter, cookie, buf, len, ack, gfp) cfg80211_mgmt_tx_status((adapter)->rtw_wdev, cookie, buf, len, ack, gfp)
115#define rtw_cfg80211_ready_on_channel(adapter, cookie, chan, channel_type, duration, gfp)  cfg80211_ready_on_channel((adapter)->rtw_wdev, cookie, chan, duration, gfp)
116#define rtw_cfg80211_remain_on_channel_expired(adapter, cookie, chan, chan_type, gfp) cfg80211_remain_on_channel_expired((adapter)->rtw_wdev, cookie, chan, gfp)
117
118#endif /* __IOCTL_CFG80211_H__ */
~/ Read-only file preview.