mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Fix checkpatch errors in include/*.h - part 3
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
7120e63109
commit
8a46c9e7a5
13 changed files with 1082 additions and 1051 deletions
|
@ -28,7 +28,7 @@
|
|||
#define MAX_BSS_CNT 128
|
||||
#define MAX_JOIN_TIMEOUT 6500
|
||||
|
||||
/* Increase the scanning timeout because of increasing the SURVEY_TO value. */
|
||||
/* Increase the scanning timeout because of increasing the SURVEY_TO value. */
|
||||
|
||||
#define SCANNING_TIMEOUT 8000
|
||||
|
||||
|
@ -36,29 +36,29 @@
|
|||
|
||||
#define SCANQUEUE_LIFETIME 20 /* unit:sec */
|
||||
|
||||
#define WIFI_NULL_STATE 0x00000000
|
||||
#define WIFI_NULL_STATE 0x00000000
|
||||
|
||||
#define WIFI_ASOC_STATE 0x00000001 /* Under Linked state... */
|
||||
#define WIFI_REASOC_STATE 0x00000002
|
||||
#define WIFI_SLEEP_STATE 0x00000004
|
||||
#define WIFI_ASOC_STATE 0x00000001 /* Under Linked state */
|
||||
#define WIFI_REASOC_STATE 0x00000002
|
||||
#define WIFI_SLEEP_STATE 0x00000004
|
||||
#define WIFI_STATION_STATE 0x00000008
|
||||
|
||||
#define WIFI_AP_STATE 0x00000010
|
||||
#define WIFI_ADHOC_STATE 0x00000020
|
||||
#define WIFI_ADHOC_MASTER_STATE 0x00000040
|
||||
#define WIFI_UNDER_LINKING 0x00000080
|
||||
#define WIFI_AP_STATE 0x00000010
|
||||
#define WIFI_ADHOC_STATE 0x00000020
|
||||
#define WIFI_ADHOC_MASTER_STATE 0x00000040
|
||||
#define WIFI_UNDER_LINKING 0x00000080
|
||||
|
||||
#define WIFI_UNDER_WPS 0x00000100
|
||||
#define WIFI_STA_ALIVE_CHK_STATE 0x00000400
|
||||
#define WIFI_SITE_MONITOR 0x00000800 /* to indicate the station is under site surveying */
|
||||
#define WIFI_SITE_MONITOR 0x00000800 /* to indicate the station is under site surveying */
|
||||
|
||||
#define WIFI_MP_STATE 0x00010000
|
||||
#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continous tx background */
|
||||
#define WIFI_MP_CTX_ST 0x00040000 /* in continous tx with single-tone */
|
||||
#define WIFI_MP_STATE 0x00010000
|
||||
#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continous tx background */
|
||||
#define WIFI_MP_CTX_ST 0x00040000 /* in continous tx with single-tone */
|
||||
#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in continous tx background due to out of skb */
|
||||
#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continous tx */
|
||||
#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continous tx with carrier suppression */
|
||||
#define WIFI_MP_LPBK_STATE 0x00400000
|
||||
#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continous tx */
|
||||
#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continous tx with carrier suppression */
|
||||
#define WIFI_MP_LPBK_STATE 0x00400000
|
||||
|
||||
#define _FW_UNDER_LINKING WIFI_UNDER_LINKING
|
||||
#define _FW_LINKED WIFI_ASOC_STATE
|
||||
|
@ -80,30 +80,29 @@ enum rt_scan_type {
|
|||
SCAN_MIX,
|
||||
};
|
||||
|
||||
enum SCAN_RESULT_TYPE
|
||||
{
|
||||
SCAN_RESULT_P2P_ONLY = 0, /* Will return all the P2P devices. */
|
||||
SCAN_RESULT_ALL = 1, /* Will return all the scanned device, include AP. */
|
||||
SCAN_RESULT_WFD_TYPE = 2 /* Will just return the correct WFD device. */
|
||||
/* If this device is Miracast sink device, it will just return all the Miracast source devices. */
|
||||
enum SCAN_RESULT_TYPE {
|
||||
SCAN_RESULT_P2P_ONLY = 0, /* Will return all the P2P devices. */
|
||||
SCAN_RESULT_ALL = 1, /* Will return all the scanned device,
|
||||
* include AP. */
|
||||
SCAN_RESULT_WFD_TYPE = 2 /* Will just return the correct WFD
|
||||
* device. */
|
||||
/* If this device is Miracast sink
|
||||
* device, it will just return all the
|
||||
* Miracast source devices. */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
there are several "locks" in mlme_priv,
|
||||
since mlme_priv is a shared resource between many threads,
|
||||
like ISR/Call-Back functions, the OID handlers, and even timer functions.
|
||||
|
||||
|
||||
Each _queue has its own locks, already.
|
||||
Other items are protected by mlme_priv.lock.
|
||||
|
||||
To avoid possible dead lock, any thread trying to modifiying mlme_priv
|
||||
SHALL not lock up more than one locks at a time!
|
||||
|
||||
SHALL not lock up more than one lock at a time!
|
||||
*/
|
||||
|
||||
|
||||
#define traffic_threshold 10
|
||||
#define traffic_scan_period 500
|
||||
|
||||
|
@ -122,8 +121,10 @@ struct rt_link_detect {
|
|||
bool bTxBusyTraffic;
|
||||
bool bRxBusyTraffic;
|
||||
bool bHigherBusyTraffic; /* For interrupt migration purpose. */
|
||||
bool bHigherBusyRxTraffic; /* We may disable Tx interrupt according as Rx traffic. */
|
||||
bool bHigherBusyTxTraffic; /* We may disable Tx interrupt according as Tx traffic. */
|
||||
bool bHigherBusyRxTraffic; /* We may disable Tx interrupt according
|
||||
* to Rx traffic. */
|
||||
bool bHigherBusyTxTraffic; /* We may disable Tx interrupt according
|
||||
* to Tx traffic. */
|
||||
};
|
||||
|
||||
struct profile_info {
|
||||
|
@ -132,174 +133,216 @@ struct profile_info {
|
|||
u8 peermac[ ETH_ALEN ];
|
||||
};
|
||||
|
||||
struct tx_invite_req_info{
|
||||
u8 token;
|
||||
u8 benable;
|
||||
u8 go_ssid[ WLAN_SSID_MAXLEN ];
|
||||
u8 ssidlen;
|
||||
u8 go_bssid[ ETH_ALEN ];
|
||||
u8 peer_macaddr[ ETH_ALEN ];
|
||||
u8 operating_ch; /* This information will be set by using the p2p_set op_ch=x */
|
||||
u8 peer_ch; /* The listen channel for peer P2P device */
|
||||
|
||||
struct tx_invite_req_info {
|
||||
u8 token;
|
||||
u8 benable;
|
||||
u8 go_ssid[ WLAN_SSID_MAXLEN ];
|
||||
u8 ssidlen;
|
||||
u8 go_bssid[ ETH_ALEN ];
|
||||
u8 peer_macaddr[ ETH_ALEN ];
|
||||
u8 operating_ch; /* This information will be set by using the
|
||||
* p2p_set op_ch=x */
|
||||
u8 peer_ch; /* The listen channel for peer P2P device */
|
||||
};
|
||||
|
||||
struct tx_invite_resp_info{
|
||||
u8 token; /* Used to record the dialog token of p2p invitation request frame. */
|
||||
struct tx_invite_resp_info {
|
||||
u8 token; /* Used to record the dialog token of p2p invitation
|
||||
* request frame. */
|
||||
};
|
||||
|
||||
struct tx_provdisc_req_info{
|
||||
u16 wps_config_method_request; /* Used when sending the provisioning request frame */
|
||||
u16 peer_channel_num[2]; /* The channel number which the receiver stands. */
|
||||
struct tx_provdisc_req_info {
|
||||
u16 wps_config_method_request; /* Used when sending the
|
||||
* provisioning request frame*/
|
||||
u16 peer_channel_num[2]; /* The channel number which the
|
||||
* receiver stands. */
|
||||
struct ndis_802_11_ssid ssid;
|
||||
u8 peerDevAddr[ ETH_ALEN ]; /* Peer device address */
|
||||
u8 peerIFAddr[ ETH_ALEN ]; /* Peer interface address */
|
||||
u8 benable; /* This provision discovery request frame is trigger to send or not */
|
||||
u8 peerDevAddr[ETH_ALEN]; /* Peer device address */
|
||||
u8 peerIFAddr[ETH_ALEN]; /* Peer interface address */
|
||||
u8 benable; /* This provision discovery
|
||||
* request frame is trigger
|
||||
* to send or not */
|
||||
};
|
||||
|
||||
struct rx_provdisc_req_info{ /* When peer device issue prov_disc_req first, we should store the following informations */
|
||||
u8 peerDevAddr[ ETH_ALEN ]; /* Peer device address */
|
||||
u8 strconfig_method_desc_of_prov_disc_req[4]; /* description for the config method located in the provisioning discovery request frame. */
|
||||
/* The UI must know this information to know which config method the remote p2p device is requiring. */
|
||||
/* When peer device issue prov_disc_req first, we should store the following
|
||||
* information */
|
||||
/* The UI must know this information to know which config method the
|
||||
* remote p2p device needs. */
|
||||
struct rx_provdisc_req_info {
|
||||
u8 peerDevAddr[ETH_ALEN]; /* Peer device address */
|
||||
u8 strconfig_method_desc_of_prov_disc_req[4]; /* description
|
||||
* for the config method located in the provisioning
|
||||
* discovery request frame. */
|
||||
};
|
||||
|
||||
struct tx_nego_req_info{
|
||||
u16 peer_channel_num[2]; /* The channel number which the receiver stands. */
|
||||
u8 peerDevAddr[ ETH_ALEN ]; /* Peer device address */
|
||||
u8 benable; /* This negoitation request frame is trigger to send or not */
|
||||
struct tx_nego_req_info {
|
||||
u16 peer_channel_num[2]; /* The channel number. */
|
||||
u8 peerDevAddr[ETH_ALEN]; /* Peer device address */
|
||||
u8 benable; /* This negotiation request frame is
|
||||
* trigger to send or not */
|
||||
};
|
||||
|
||||
struct group_id_info{
|
||||
u8 go_device_addr[ ETH_ALEN ]; /* The GO's device address of this P2P group */
|
||||
u8 ssid[ WLAN_SSID_MAXLEN ]; /* The SSID of this P2P group */
|
||||
struct group_id_info {
|
||||
u8 go_device_addr[ ETH_ALEN ]; /* The GO's device address of
|
||||
* this P2P group */
|
||||
u8 ssid[ WLAN_SSID_MAXLEN ]; /* The SSID of this P2P group */
|
||||
};
|
||||
|
||||
struct scan_limit_info{
|
||||
u8 scan_op_ch_only; /* When this flag is set, the driver should just scan the operation channel */
|
||||
u8 operation_ch[2]; /* Store the operation channel of invitation request frame */
|
||||
struct scan_limit_info {
|
||||
u8 scan_op_ch_only; /* When this flag is set, the driver
|
||||
* should only scan the op. channel */
|
||||
u8 operation_ch[2]; /* Store the op. chan of invitation */
|
||||
};
|
||||
|
||||
struct wifidirect_info{
|
||||
struct adapter* padapter;
|
||||
struct wifidirect_info {
|
||||
struct adapter *padapter;
|
||||
struct timer_list find_phase_timer;
|
||||
struct timer_list restore_p2p_state_timer;
|
||||
|
||||
/* Used to do the scanning. After confirming the peer is availalble, the driver transmits the P2P frame to peer. */
|
||||
/* Used to do the scanning. After confirming the peer is availalble,
|
||||
* the driver transmits the P2P frame to peer. */
|
||||
struct timer_list pre_tx_scan_timer;
|
||||
struct timer_list reset_ch_sitesurvey;
|
||||
struct timer_list reset_ch_sitesurvey2; /* Just for resetting the scan limit function by using p2p nego */
|
||||
struct timer_list reset_ch_sitesurvey2; /* Just for resetting the scan
|
||||
* limit function by using p2p nego */
|
||||
struct tx_provdisc_req_info tx_prov_disc_info;
|
||||
struct rx_provdisc_req_info rx_prov_disc_info;
|
||||
struct tx_invite_req_info invitereq_info;
|
||||
struct profile_info profileinfo[ P2P_MAX_PERSISTENT_GROUP_NUM ]; /* Store the profile information of persistent group */
|
||||
/* Store the profile information of persistent group */
|
||||
struct profile_info profileinfo[P2P_MAX_PERSISTENT_GROUP_NUM];
|
||||
struct tx_invite_resp_info inviteresp_info;
|
||||
struct tx_nego_req_info nego_req_info;
|
||||
struct group_id_info groupid_info; /* Store the group id information when doing the group negotiation handshake. */
|
||||
struct scan_limit_info rx_invitereq_info; /* Used for get the limit scan channel from the Invitation procedure */
|
||||
struct scan_limit_info p2p_info; /* Used for get the limit scan channel from the P2P negotiation handshake */
|
||||
enum P2P_ROLE role;
|
||||
enum P2P_STATE pre_p2p_state;
|
||||
enum P2P_STATE p2p_state;
|
||||
u8 device_addr[ETH_ALEN]; /* The device address should be the mac address of this device. */
|
||||
u8 interface_addr[ETH_ALEN];
|
||||
u8 social_chan[4];
|
||||
u8 listen_channel;
|
||||
u8 operating_channel;
|
||||
u8 listen_dwell; /* This value should be between 1 and 3 */
|
||||
u8 support_rate[8];
|
||||
u8 p2p_wildcard_ssid[P2P_WILDCARD_SSID_LEN];
|
||||
u8 intent; /* should only include the intent value. */
|
||||
u8 p2p_peer_interface_addr[ ETH_ALEN ];
|
||||
u8 p2p_peer_device_addr[ ETH_ALEN ];
|
||||
u8 peer_intent; /* Included the intent value and tie breaker value. */
|
||||
u8 device_name[ WPS_MAX_DEVICE_NAME_LEN ]; /* Device name for displaying on searching device screen */
|
||||
u8 device_name_len;
|
||||
u8 profileindex; /* Used to point to the index of profileinfo array */
|
||||
u8 peer_operating_ch;
|
||||
u8 find_phase_state_exchange_cnt;
|
||||
u16 device_password_id_for_nego; /* The device password ID for group negotation */
|
||||
u8 negotiation_dialog_token;
|
||||
u8 nego_ssid[ WLAN_SSID_MAXLEN ]; /* SSID information for group negotitation */
|
||||
u8 nego_ssidlen;
|
||||
u8 p2p_group_ssid[WLAN_SSID_MAXLEN];
|
||||
u8 p2p_group_ssid_len;
|
||||
u8 persistent_supported; /* Flag to know the persistent function should be supported or not. */
|
||||
/* In the Sigma test, the Sigma will provide this enable from the sta_set_p2p CAPI. */
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
u8 session_available; /* Flag to set the WFD session available to enable or disable "by Sigma" */
|
||||
/* In the Sigma test, the Sigma will disable the session available by using the sta_preset CAPI. */
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
/* Store the group id info when doing the group negot handshake. */
|
||||
struct group_id_info groupid_info;
|
||||
/* Used for get the limit scan channel from the Invitation procedure */
|
||||
struct scan_limit_info rx_invitereq_info;
|
||||
/* Used for get the limit scan chan from the P2P negotiation handshake*/
|
||||
struct scan_limit_info p2p_info;
|
||||
enum P2P_ROLE role;
|
||||
enum P2P_STATE pre_p2p_state;
|
||||
enum P2P_STATE p2p_state;
|
||||
/* The device address should be the mac address of this device. */
|
||||
u8 device_addr[ETH_ALEN];
|
||||
u8 interface_addr[ETH_ALEN];
|
||||
u8 social_chan[4];
|
||||
u8 listen_channel;
|
||||
u8 operating_channel;
|
||||
u8 listen_dwell; /* This value should be between 1 and 3 */
|
||||
u8 support_rate[8];
|
||||
u8 p2p_wildcard_ssid[P2P_WILDCARD_SSID_LEN];
|
||||
u8 intent; /* should only include the intent value. */
|
||||
u8 p2p_peer_interface_addr[ETH_ALEN];
|
||||
u8 p2p_peer_device_addr[ETH_ALEN];
|
||||
u8 peer_intent; /* Included the intent value and tie breaker value. */
|
||||
/* Device name for displaying on searching device screen */
|
||||
u8 device_name[WPS_MAX_DEVICE_NAME_LEN];
|
||||
u8 device_name_len;
|
||||
u8 profileindex; /* Used to point to the index of profileinfo array */
|
||||
u8 peer_operating_ch;
|
||||
u8 find_phase_state_exchange_cnt;
|
||||
/* The device password ID for group negotation */
|
||||
u16 device_password_id_for_nego;
|
||||
u8 negotiation_dialog_token;
|
||||
/* SSID information for group negotitation */
|
||||
u8 nego_ssid[WLAN_SSID_MAXLEN];
|
||||
u8 nego_ssidlen;
|
||||
u8 p2p_group_ssid[WLAN_SSID_MAXLEN];
|
||||
u8 p2p_group_ssid_len;
|
||||
/* Flag to know if the persistent function should be supported or not.*/
|
||||
u8 persistent_supported;
|
||||
/* In the Sigma test, the Sigma will provide this enable from the
|
||||
* sta_set_p2p CAPI. */
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
u8 session_available; /* Flag to set the WFD session available to
|
||||
* enable or disable "by Sigma" */
|
||||
/* In the Sigma test, the Sigma will disable the session available
|
||||
* by using the sta_preset CAPI. */
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
u8 wfd_tdls_enable; /* Flag to enable or disable the TDLS by WFD Sigma*/
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
u8 wfd_tdls_weaksec; /* Flag to enable or disable the weak security
|
||||
* function for TDLS by WFD Sigma */
|
||||
/* 0: disable */
|
||||
/* In this case, the driver can't issue the tdsl
|
||||
* setup request frame. */
|
||||
/* 1: enable */
|
||||
/* In this case, the driver can issue the tdls
|
||||
* setup request frame */
|
||||
/* even the current security is weak security. */
|
||||
|
||||
u8 wfd_tdls_enable; /* Flag to enable or disable the TDLS by WFD Sigma */
|
||||
/* 0: disable */
|
||||
/* 1: enable */
|
||||
u8 wfd_tdls_weaksec; /* Flag to enable or disable the weak security function for TDLS by WFD Sigma */
|
||||
/* 0: disable */
|
||||
/* In this case, the driver can't issue the tdsl setup request frame. */
|
||||
/* 1: enable */
|
||||
/* In this case, the driver can issue the tdls setup request frame */
|
||||
/* even the current security is weak security. */
|
||||
|
||||
enum P2P_WPSINFO ui_got_wps_info; /* This field will store the WPS value (PIN value or PBC) that UI had got from the user. */
|
||||
u16 supported_wps_cm; /* This field describes the WPS config method which this driver supported. */
|
||||
/* The value should be the combination of config method defined in page104 of WPS v2.0 spec. */
|
||||
uint channel_list_attr_len; /* This field will contain the length of body of P2P Channel List attribute of group negotitation response frame. */
|
||||
u8 channel_list_attr[100]; /* This field will contain the body of P2P Channel List attribute of group negotitation response frame. */
|
||||
/* We will use the channel_cnt and channel_list fields when constructing the group negotitation confirm frame. */
|
||||
enum P2P_PS_MODE p2p_ps_mode; /* indicate p2p ps mode */
|
||||
enum P2P_PS_STATE p2p_ps_state; /* indicate p2p ps state */
|
||||
u8 noa_index; /* Identifies and instance of Notice of Absence timing. */
|
||||
u8 ctwindow; /* Client traffic window. A period of time in TU after TBTT. */
|
||||
u8 opp_ps; /* opportunistic power save. */
|
||||
u8 noa_num; /* number of NoA descriptor in P2P IE. */
|
||||
u8 noa_count[P2P_MAX_NOA_NUM]; /* Count for owner, Type of client. */
|
||||
u32 noa_duration[P2P_MAX_NOA_NUM]; /* Max duration for owner, preferred or min acceptable duration for client. */
|
||||
u32 noa_interval[P2P_MAX_NOA_NUM]; /* Length of interval for owner, preferred or max acceptable interval of client. */
|
||||
u32 noa_start_time[P2P_MAX_NOA_NUM]; /* schedule expressed in terms of the lower 4 bytes of the TSF timer. */
|
||||
/* This field will store the WPS value (PIN value or PBC) that UI had
|
||||
* got from the user. */
|
||||
enum P2P_WPSINFO ui_got_wps_info;
|
||||
u16 supported_wps_cm; /* This field describes the WPS config method
|
||||
* which this driver supported. */
|
||||
/* The value should be the combination of config
|
||||
* method defined in page104 of WPS v2.0 spec.*/
|
||||
/* This field will contain the length of body of P2P Channel List
|
||||
* attribute of group negotiation response frame. */
|
||||
uint channel_list_attr_len;
|
||||
/* This field will contain the body of P2P Channel List attribute of
|
||||
* group negotitation response frame. */
|
||||
/* We will use the channel_cnt and channel_list fields when constructing
|
||||
* the group negotiation confirm frame. */
|
||||
u8 channel_list_attr[100];
|
||||
enum P2P_PS_MODE p2p_ps_mode; /* indicate p2p ps mode */
|
||||
enum P2P_PS_STATE p2p_ps_state; /* indicate p2p ps state */
|
||||
u8 noa_index; /* Identifies and instance of Notice of Absence timing. */
|
||||
u8 ctwindow; /* Client traffic window. A period of time in TU after TBTT. */
|
||||
u8 opp_ps; /* opportunistic power save. */
|
||||
u8 noa_num; /* number of NoA descriptor in P2P IE. */
|
||||
u8 noa_count[P2P_MAX_NOA_NUM]; /* Count for owner, Type of client. */
|
||||
/* Max duration for owner, preferred or min acceptable duration for
|
||||
* client. */
|
||||
u32 noa_duration[P2P_MAX_NOA_NUM];
|
||||
/* Length of interval for owner, preferred or max acceptable interval
|
||||
* of client. */
|
||||
u32 noa_interval[P2P_MAX_NOA_NUM];
|
||||
/* schedule expressed in terms of the lower 4 bytes of the TSF timer. */
|
||||
u32 noa_start_time[P2P_MAX_NOA_NUM];
|
||||
};
|
||||
|
||||
struct tdls_ss_record{ /* signal strength record */
|
||||
u8 macaddr[ETH_ALEN];
|
||||
u8 RxPWDBAll;
|
||||
u8 is_tdls_sta; /* true: direct link sta, false: else */
|
||||
struct tdls_ss_record { /* signal strength record */
|
||||
u8 macaddr[ETH_ALEN];
|
||||
u8 RxPWDBAll;
|
||||
u8 is_tdls_sta; /* true: direct link sta, false: else */
|
||||
};
|
||||
|
||||
struct tdls_info{
|
||||
u8 ap_prohibited;
|
||||
uint setup_state;
|
||||
u8 sta_cnt;
|
||||
u8 sta_maximum; /* 1:tdls sta is equal (NUM_STA-1), reach max direct link number; 0: else; */
|
||||
struct tdls_info {
|
||||
u8 ap_prohibited;
|
||||
uint setup_state;
|
||||
u8 sta_cnt;
|
||||
u8 sta_maximum; /* 1:tdls sta is equal (NUM_STA-1), reach max direct link number; 0: else; */
|
||||
struct tdls_ss_record ss_record;
|
||||
u8 macid_index; /* macid entry that is ready to write */
|
||||
u8 clear_cam; /* cam entry that is trying to clear, using it in direct link teardown */
|
||||
u8 ch_sensing;
|
||||
u8 cur_channel;
|
||||
u8 candidate_ch;
|
||||
u8 collect_pkt_num[MAX_CHANNEL_NUM];
|
||||
u8 macid_index; /* macid entry that is ready to write */
|
||||
u8 clear_cam; /* cam entry that is trying to clear, using it in direct link teardown */
|
||||
u8 ch_sensing;
|
||||
u8 cur_channel;
|
||||
u8 candidate_ch;
|
||||
u8 collect_pkt_num[MAX_CHANNEL_NUM];
|
||||
spinlock_t cmd_lock;
|
||||
spinlock_t hdl_lock;
|
||||
u8 watchdog_count;
|
||||
u8 dev_discovered; /* WFD_TDLS: for sigma test */
|
||||
u8 enable;
|
||||
u8 watchdog_count;
|
||||
u8 dev_discovered; /* WFD_TDLS: for sigma test */
|
||||
u8 enable;
|
||||
};
|
||||
|
||||
struct mlme_priv {
|
||||
|
||||
spinlock_t lock;
|
||||
int fw_state; /* shall we protect this variable? maybe not necessarily... */
|
||||
int fw_state; /* shall we protect this variable? maybe not necessarily... */
|
||||
u8 bScanInProcess;
|
||||
u8 to_join; /* flag */
|
||||
u8 to_join; /* flag */
|
||||
u8 to_roaming; /* roaming trying times */
|
||||
|
||||
u8 *nic_hdl;
|
||||
u8 *nic_hdl;
|
||||
|
||||
u8 not_indic_disco;
|
||||
u8 not_indic_disco;
|
||||
struct list_head *pscanned;
|
||||
struct __queue free_bss_pool;
|
||||
struct __queue scanned_queue;
|
||||
u8 *free_bss_buf;
|
||||
u8 *free_bss_buf;
|
||||
u32 num_of_scanned;
|
||||
|
||||
struct ndis_802_11_ssid assoc_ssid;
|
||||
|
@ -307,8 +350,6 @@ struct mlme_priv {
|
|||
|
||||
struct wlan_network cur_network;
|
||||
|
||||
/* uint wireless_mode; no used, remove it */
|
||||
|
||||
u32 scan_interval;
|
||||
|
||||
struct timer_list assoc_timer;
|
||||
|
@ -327,11 +368,8 @@ struct mlme_priv {
|
|||
/* Number of HT AP/stations 20 MHz */
|
||||
/* int num_sta_ht_20mhz; */
|
||||
|
||||
|
||||
int num_FortyMHzIntolerant;
|
||||
|
||||
struct ht_priv htpriv;
|
||||
|
||||
struct rt_link_detect LinkDetectInfo;
|
||||
struct timer_list dynamic_chk_timer; /* dynamic/periodic check timer */
|
||||
|
||||
|
@ -358,7 +396,7 @@ struct mlme_priv {
|
|||
|
||||
int olbc; /* Overlapping Legacy BSS Condition */
|
||||
|
||||
/* Number of HT associated stations that do not support greenfield */
|
||||
/* Number of HT assoc sta that do not support greenfield */
|
||||
int num_sta_ht_no_gf;
|
||||
|
||||
/* Number of associated non-HT stations */
|
||||
|
@ -404,52 +442,49 @@ struct mlme_priv {
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
struct hostapd_priv
|
||||
{
|
||||
struct hostapd_priv {
|
||||
struct adapter *padapter;
|
||||
};
|
||||
|
||||
extern int hostapd_mode_init(struct adapter *padapter);
|
||||
extern void hostapd_mode_unload(struct adapter *padapter);
|
||||
int hostapd_mode_init(struct adapter *padapter);
|
||||
void hostapd_mode_unload(struct adapter *padapter);
|
||||
#endif
|
||||
|
||||
|
||||
extern unsigned char WPA_TKIP_CIPHER[4];
|
||||
extern unsigned char RSN_TKIP_CIPHER[4];
|
||||
|
||||
extern unsigned char REALTEK_96B_IE[];
|
||||
|
||||
extern unsigned char MCS_rate_2R[16];
|
||||
extern unsigned char MCS_rate_1R[16];
|
||||
|
||||
extern void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_atimdone_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_cpwm_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_atimdone_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void rtw_cpwm_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||
void indicate_wx_scan_complete_event(struct adapter *padapter);
|
||||
void rtw_indicate_wx_assoc_event(struct adapter *padapter);
|
||||
void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
|
||||
extern int event_thread(void *context);
|
||||
extern void rtw_join_timeout_handler(void* FunctionContext);
|
||||
extern void _rtw_scan_timeout_handler(void* FunctionContext);
|
||||
extern void rtw_free_network_queue(struct adapter *adapter,u8 isfreeall);
|
||||
extern int rtw_init_mlme_priv(struct adapter *adapter);/* (struct mlme_priv *pmlmepriv); */
|
||||
extern void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
|
||||
extern int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
|
||||
extern int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, int keyid, u8 set_tx);
|
||||
extern int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv);
|
||||
int event_thread(void *context);
|
||||
void rtw_join_timeout_handler(void *FunctionContext);
|
||||
void _rtw_scan_timeout_handler(void *FunctionContext);
|
||||
void rtw_free_network_queue(struct adapter *adapter, u8 isfreeall);
|
||||
int rtw_init_mlme_priv(struct adapter *adapter);
|
||||
void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
|
||||
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
|
||||
int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv,
|
||||
int keyid, u8 set_tx);
|
||||
int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv);
|
||||
|
||||
__inline static u8 *get_bssid(struct mlme_priv *pmlmepriv)
|
||||
static inline u8 *get_bssid(struct mlme_priv *pmlmepriv)
|
||||
{ /* if sta_mode:pmlmepriv->cur_network.network.MacAddress=> bssid */
|
||||
/* if adhoc_mode:pmlmepriv->cur_network.network.MacAddress=> ibss mac address */
|
||||
return pmlmepriv->cur_network.network.MacAddress;
|
||||
}
|
||||
|
||||
__inline static int check_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
static inline int check_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
if (pmlmepriv->fw_state & state)
|
||||
return true;
|
||||
|
@ -457,7 +492,7 @@ __inline static int check_fwstate(struct mlme_priv *pmlmepriv, int state)
|
|||
return false;
|
||||
}
|
||||
|
||||
__inline static int get_fwstate(struct mlme_priv *pmlmepriv)
|
||||
static inline int get_fwstate(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
return pmlmepriv->fw_state;
|
||||
}
|
||||
|
@ -469,127 +504,131 @@ __inline static int get_fwstate(struct mlme_priv *pmlmepriv)
|
|||
* ### NOTE:#### (!!!!)
|
||||
* MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
|
||||
*/
|
||||
__inline static void set_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
static inline void set_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
pmlmepriv->fw_state |= state;
|
||||
/* FOR HW integration */
|
||||
if (_FW_UNDER_SURVEY==state){
|
||||
if (_FW_UNDER_SURVEY==state)
|
||||
pmlmepriv->bScanInProcess = true;
|
||||
}
|
||||
}
|
||||
|
||||
__inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
|
||||
static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
pmlmepriv->fw_state &= ~state;
|
||||
/* FOR HW integration */
|
||||
if (_FW_UNDER_SURVEY==state){
|
||||
if (_FW_UNDER_SURVEY==state)
|
||||
pmlmepriv->bScanInProcess = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* No Limit on the calling context,
|
||||
* therefore set it to be the critical section...
|
||||
*/
|
||||
__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irqL;
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
if (check_fwstate(pmlmepriv, state) == true)
|
||||
pmlmepriv->fw_state ^= state;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
}
|
||||
|
||||
__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
|
||||
static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irqL;
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
_clr_fwstate_(pmlmepriv, state);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
}
|
||||
|
||||
__inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irqL;
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
pmlmepriv->num_of_scanned++;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
}
|
||||
|
||||
__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irqL;
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
pmlmepriv->num_of_scanned--;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
}
|
||||
|
||||
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
|
||||
static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
|
||||
{
|
||||
unsigned long irqL;
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
pmlmepriv->num_of_scanned = val;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
}
|
||||
|
||||
extern u16 rtw_get_capability(struct wlan_bssid_ex *bss);
|
||||
extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target);
|
||||
extern void rtw_disconnect_hdl_under_linked(struct adapter* adapter, struct sta_info *psta, u8 free_assoc);
|
||||
extern void rtw_generate_random_ibss(u8 *pibss);
|
||||
extern struct wlan_network* rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||
extern struct wlan_network* rtw_get_oldest_wlan_network(struct __queue *scanned_queue);
|
||||
u16 rtw_get_capability(struct wlan_bssid_ex *bss);
|
||||
void rtw_update_scanned_network(struct adapter *adapter,
|
||||
struct wlan_bssid_ex *target);
|
||||
void rtw_disconnect_hdl_under_linked(struct adapter *adapter,
|
||||
struct sta_info *psta, u8 free_assoc);
|
||||
void rtw_generate_random_ibss(u8 *pibss);
|
||||
struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||
struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue);
|
||||
|
||||
extern void rtw_free_assoc_resources(struct adapter* adapter, int lock_scanned_queue);
|
||||
extern void rtw_indicate_disconnect(struct adapter* adapter);
|
||||
extern void rtw_indicate_connect(struct adapter* adapter);
|
||||
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue);
|
||||
void rtw_indicate_disconnect(struct adapter *adapter);
|
||||
void rtw_indicate_connect(struct adapter *adapter);
|
||||
void rtw_indicate_scan_done( struct adapter *padapter, bool aborted);
|
||||
void rtw_scan_abort(struct adapter *adapter);
|
||||
|
||||
extern int rtw_restruct_sec_ie(struct adapter *adapter,u8 *in_ie,u8 *out_ie,uint in_len);
|
||||
extern int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, uint initial_out_len);
|
||||
extern void rtw_init_registrypriv_dev_network(struct adapter *adapter);
|
||||
int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie,
|
||||
uint in_len);
|
||||
int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie,
|
||||
uint in_len, uint initial_out_len);
|
||||
void rtw_init_registrypriv_dev_network(struct adapter *adapter);
|
||||
|
||||
extern void rtw_update_registrypriv_dev_network(struct adapter *adapter);
|
||||
void rtw_update_registrypriv_dev_network(struct adapter *adapter);
|
||||
|
||||
extern void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
|
||||
void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
|
||||
|
||||
extern void _rtw_join_timeout_handler(struct adapter *adapter);
|
||||
extern void rtw_scan_timeout_handler(struct adapter *adapter);
|
||||
void _rtw_join_timeout_handler(struct adapter *adapter);
|
||||
void rtw_scan_timeout_handler(struct adapter *adapter);
|
||||
|
||||
extern void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
|
||||
void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
|
||||
#define rtw_is_scan_deny(adapter) false
|
||||
#define rtw_clear_scan_deny(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny(adapter, ms) do {} while (0)
|
||||
|
||||
|
||||
extern int _rtw_init_mlme_priv(struct adapter *padapter);
|
||||
int _rtw_init_mlme_priv(struct adapter *padapter);
|
||||
|
||||
void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
|
||||
|
||||
extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
||||
void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
||||
|
||||
extern int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
|
||||
int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
|
||||
|
||||
extern struct wlan_network* _rtw_dequeue_network(struct __queue *queue);
|
||||
struct wlan_network *_rtw_dequeue_network(struct __queue *queue);
|
||||
|
||||
extern struct wlan_network* _rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
||||
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
||||
|
||||
|
||||
extern void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall);
|
||||
extern void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork);
|
||||
void _rtw_free_network(struct mlme_priv *pmlmepriv,
|
||||
struct wlan_network *pnetwork, u8 isfreeall);
|
||||
void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
|
||||
struct wlan_network *pnetwork);
|
||||
|
||||
|
||||
extern struct wlan_network* _rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||
struct wlan_network* _rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||
|
||||
extern void _rtw_free_network_queue(struct adapter* padapter, u8 isfreeall);
|
||||
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall);
|
||||
|
||||
extern int rtw_if_up(struct adapter *padapter);
|
||||
int rtw_if_up(struct adapter *padapter);
|
||||
|
||||
|
||||
u8 *rtw_get_capability_from_ie(u8 *ie);
|
||||
|
@ -599,9 +638,11 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
|
|||
|
||||
void rtw_joinbss_reset(struct adapter *padapter);
|
||||
|
||||
unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len);
|
||||
unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie,
|
||||
u8 *out_ie, uint in_len, uint *pout_len);
|
||||
void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len);
|
||||
void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtw_issue_addbareq_cmd(struct adapter *padapter,
|
||||
struct xmit_frame *pxmitframe);
|
||||
|
||||
int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork);
|
||||
int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
|
||||
|
@ -610,4 +651,5 @@ void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network);
|
|||
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network);
|
||||
|
||||
void rtw_stassoc_hw_rpt(struct adapter *adapter,struct sta_info *psta);
|
||||
|
||||
#endif /* __RTL871X_MLME_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue