mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Remove dead code for CONFIG_TDLS
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
0e4009c999
commit
e79535e153
23 changed files with 50 additions and 5135 deletions
|
@ -139,17 +139,6 @@
|
|||
//#define CONFIG_P2P_IPS
|
||||
#endif
|
||||
|
||||
// Added by Kurt 20110511
|
||||
//#define CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS
|
||||
// #ifndef CONFIG_WFD
|
||||
// #define CONFIG_WFD
|
||||
// #endif
|
||||
// #define CONFIG_TDLS_AUTOSETUP
|
||||
// #define CONFIG_TDLS_AUTOCHECKALIVE
|
||||
#endif
|
||||
|
||||
|
||||
#define CONFIG_SKB_COPY //for amsdu
|
||||
|
||||
#define CONFIG_LED
|
||||
|
|
|
@ -67,7 +67,6 @@ typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER;
|
|||
#include <rtw_led.h>
|
||||
#include <rtw_mlme_ext.h>
|
||||
#include <rtw_p2p.h>
|
||||
#include <rtw_tdls.h>
|
||||
#include <rtw_ap.h>
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
|
@ -394,10 +393,6 @@ struct _ADAPTER{
|
|||
struct wifidirect_info wdinfo;
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
struct tdls_info tdlsinfo;
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
u8 WapiSupport;
|
||||
RT_WAPI_T wapiInfo;
|
||||
|
|
|
@ -1026,26 +1026,6 @@ enum _PUBLIC_ACTION{
|
|||
ACT_PUBLIC_MAX
|
||||
};
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
enum TDLS_ACTION_FIELD{
|
||||
TDLS_SETUP_REQUEST = 0,
|
||||
TDLS_SETUP_RESPONSE = 1,
|
||||
TDLS_SETUP_CONFIRM = 2,
|
||||
TDLS_TEARDOWN = 3,
|
||||
TDLS_PEER_TRAFFIC_INDICATION = 4,
|
||||
TDLS_CHANNEL_SWITCH_REQUEST = 5,
|
||||
TDLS_CHANNEL_SWITCH_RESPONSE = 6,
|
||||
TDLS_PEER_PSM_REQUEST = 7,
|
||||
TDLS_PEER_PSM_RESPONSE = 8,
|
||||
TDLS_PEER_TRAFFIC_RESPONSE = 9,
|
||||
TDLS_DISCOVERY_REQUEST = 10,
|
||||
TDLS_DISCOVERY_RESPONSE = 14, //it's used in public action frame
|
||||
};
|
||||
|
||||
#define TUNNELED_PROBE_REQ 15
|
||||
#define TUNNELED_PROBE_RSP 16
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
/* BACK action code */
|
||||
enum rtw_ieee80211_back_actioncode {
|
||||
RTW_WLAN_ACTION_ADDBA_REQ = 0,
|
||||
|
|
|
@ -320,42 +320,7 @@ struct ss_res
|
|||
|
||||
#define WIFI_FW_LINKING_STATE (WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE | WIFI_FW_AUTH_SUCCESS |WIFI_FW_ASSOC_STATE)
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
// 1: Write RCR DATA BIT
|
||||
// 2: Issue peer traffic indication
|
||||
// 3: Go back to the channel linked with AP, terminating channel switch procedure
|
||||
// 4: Init channel sensing, receive all data and mgnt frame
|
||||
// 5: Channel sensing and report candidate channel
|
||||
// 6: First time set channel to off channel
|
||||
// 7: Go back tp the channel linked with AP when set base channel as target channel
|
||||
// 8: Set channel back to base channel
|
||||
// 9: Set channel back to off channel
|
||||
// 10: Restore RCR DATA BIT
|
||||
// 11: Check alive
|
||||
// 12: Check alive
|
||||
// 13: Free TDLS sta
|
||||
enum TDLS_option
|
||||
{
|
||||
TDLS_WRCR = 1,
|
||||
TDLS_SD_PTI = 2,
|
||||
TDLS_CS_OFF = 3,
|
||||
TDLS_INIT_CH_SEN = 4,
|
||||
TDLS_DONE_CH_SEN = 5,
|
||||
TDLS_OFF_CH = 6,
|
||||
TDLS_BASE_CH = 7,
|
||||
TDLS_P_OFF_CH = 8,
|
||||
TDLS_P_BASE_CH = 9,
|
||||
TDLS_RS_RCR = 10,
|
||||
TDLS_CKALV_PH1 = 11,
|
||||
TDLS_CKALV_PH2 = 12,
|
||||
TDLS_FREE_STA = 13,
|
||||
maxTDLS,
|
||||
};
|
||||
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
struct FW_Sta_Info
|
||||
{
|
||||
struct FW_Sta_Info {
|
||||
struct sta_info *psta;
|
||||
u32 status;
|
||||
u32 rx_pkt;
|
||||
|
|
|
@ -414,16 +414,6 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe);
|
|||
u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
void wpa_tdls_generate_tpk(_adapter *padapter, struct sta_info *psta);
|
||||
int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq,
|
||||
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie,
|
||||
u8 *mic);
|
||||
int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
||||
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie);
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
void rtw_use_tkipkey_handler(void* FunctionContext);
|
||||
|
||||
#endif //__RTL871X_SECURITY_H_
|
||||
|
|
|
@ -1,142 +0,0 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __RTW_TDLS_H_
|
||||
#define __RTW_TDLS_H_
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
/* TDLS STA state */
|
||||
#define TDLS_STATE_NONE 0x00000000 //default state
|
||||
#define TDLS_INITIATOR_STATE 0x10000000
|
||||
#define TDLS_RESPONDER_STATE 0x20000000
|
||||
#define TDLS_LINKED_STATE 0x40000000
|
||||
#define TDLS_CH_SWITCH_ON_STATE 0x01000000
|
||||
#define TDLS_PEER_AT_OFF_STATE 0x02000000 //could send pkt on target ch
|
||||
#define TDLS_AT_OFF_CH_STATE 0x04000000
|
||||
#define TDLS_CH_SW_INITIATOR_STATE 0x08000000 //avoiding duplicated or unconditional ch. switch rsp.
|
||||
#define TDLS_APSD_CHSW_STATE 0x00100000 //in APSD and want to setup channel switch
|
||||
#define TDLS_PEER_SLEEP_STATE 0x00200000 //peer sta is sleeping
|
||||
#define TDLS_SW_OFF_STATE 0x00400000 //terminate channel swithcing
|
||||
#define TDLS_ALIVE_STATE 0x00010000 //Check if peer sta is alived.
|
||||
|
||||
#define TPK_RESEND_COUNT 301
|
||||
#define CH_SWITCH_TIME 10
|
||||
#define CH_SWITCH_TIME 30
|
||||
#define TDLS_STAY_TIME 500
|
||||
#define TDLS_SIGNAL_THRESH 0x20
|
||||
#define TDLS_WATCHDOG_PERIOD 10 //Periodically sending tdls discovery request in TDLS_WATCHDOG_PERIOD * 2 sec
|
||||
#define TDLS_ALIVE_TIMER_PH1 5000
|
||||
#define TDLS_ALIVE_TIMER_PH2 2000
|
||||
#define TDLS_STAY_TIME 500
|
||||
#define TDLS_HANDSHAKE_TIME 8000
|
||||
#define TDLS_ALIVE_COUNT 3
|
||||
#define TDLS_INI_MACID_ENTRY 6
|
||||
|
||||
/* TDLS */
|
||||
#define TDLS_MIC_LEN 16
|
||||
#define WPA_NONCE_LEN 32
|
||||
#define TDLS_TIMEOUT_LEN 4
|
||||
|
||||
struct wpa_tdls_ftie {
|
||||
u8 ie_type; /* FTIE */
|
||||
u8 ie_len;
|
||||
u8 mic_ctrl[2];
|
||||
u8 mic[TDLS_MIC_LEN];
|
||||
u8 Anonce[WPA_NONCE_LEN]; /* Responder Nonce in TDLS */
|
||||
u8 Snonce[WPA_NONCE_LEN]; /* Initiator Nonce in TDLS */
|
||||
/* followed by optional elements */
|
||||
} ;
|
||||
|
||||
struct wpa_tdls_lnkid {
|
||||
u8 ie_type; /* Link Identifier IE */
|
||||
u8 ie_len;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 init_sta[ETH_ALEN];
|
||||
u8 resp_sta[ETH_ALEN];
|
||||
} ;
|
||||
|
||||
static u8 TDLS_RSNIE[]={ 0x01, 0x00, //version shall be set to 1
|
||||
0x00, 0x0f, 0xac, 0x07, //group sipher suite
|
||||
0x01, 0x00, //pairwise cipher suite count
|
||||
0x00, 0x0f, 0xac, 0x04, //pairwise cipher suite list; CCMP only
|
||||
0x01, 0x00, //AKM suite count
|
||||
0x00, 0x0f, 0xac, 0x07, //TPK Handshake
|
||||
0x00, 0x02,
|
||||
//PMKID shall not be present
|
||||
};
|
||||
|
||||
static u8 TDLS_WMMIE[]={0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; //Qos info all set zero
|
||||
|
||||
static u8 TDLS_EXT_CAPIE[] = {0x00, 0x00, 0x00, 0x50, 0x20}; //bit(28), bit(30), bit(37)
|
||||
|
||||
// SRC: Supported Regulatory Classes
|
||||
static u8 TDLS_SRC[] = { 0x01, 0x01, 0x02, 0x03, 0x04, 0x0c, 0x16, 0x17, 0x18, 0x19, 0x1b, 0x1c, 0x1d, 0x1e, 0x20, 0x21 };
|
||||
|
||||
void rtw_reset_tdls_info(_adapter* padapter);
|
||||
int rtw_init_tdls_info(_adapter* padapter);
|
||||
void rtw_free_tdls_info(struct tdls_info *ptdlsinfo);
|
||||
void issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, struct sta_info *ptdls_sta, unsigned int power_mode);
|
||||
void init_TPK_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void init_ch_switch_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void init_base_ch_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void init_off_ch_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void init_tdls_alive_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void init_handshake_timer(_adapter *padapter, struct sta_info *psta);
|
||||
void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta);
|
||||
#ifdef CONFIG_WFD
|
||||
void issue_tunneled_probe_req(_adapter *padapter);
|
||||
void issue_tunneled_probe_rsp(_adapter *padapter, union recv_frame *precv_frame);
|
||||
#endif //CONFIG_WFD
|
||||
void issue_tdls_dis_req(_adapter *padapter, u8 *mac_addr);
|
||||
void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr);
|
||||
void issue_tdls_setup_rsp(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void issue_tdls_setup_cfm(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void issue_tdls_dis_rsp(_adapter * padapter, union recv_frame * precv_frame, u8 dialog);
|
||||
void issue_tdls_teardown(_adapter *padapter, u8 *mac_addr);
|
||||
void issue_tdls_peer_traffic_indication(_adapter *padapter, struct sta_info *psta);
|
||||
void issue_tdls_ch_switch_req(_adapter *padapter, u8 *mac_addr);
|
||||
void issue_tdls_ch_switch_rsp(_adapter *padapter, u8 *mac_addr);
|
||||
sint On_TDLS_Dis_Rsp(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Setup_Rsp(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Setup_Cfm(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Dis_Req(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Teardown(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Peer_Traffic_Rsp(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Ch_Switch_Req(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint On_TDLS_Ch_Switch_Rsp(_adapter *adapter, union recv_frame *precv_frame);
|
||||
void rtw_build_tdls_setup_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_setup_rsp_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_setup_cfm_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_teardown_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_dis_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_dis_rsp_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe, u8 dialog);
|
||||
void rtw_build_tdls_peer_traffic_indication_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_ch_switch_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tdls_ch_switch_rsp_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tunneled_probe_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
void rtw_build_tunneled_probe_rsp_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe);
|
||||
|
||||
int update_sgi_tdls(_adapter *padapter, struct sta_info *psta);
|
||||
u32 update_mask_tdls(_adapter *padapter, struct sta_info *psta);
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#endif
|
|
@ -432,9 +432,6 @@ extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe
|
|||
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
||||
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
||||
extern s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe);
|
||||
#ifdef CONFIG_TDLS
|
||||
s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, u8 action);
|
||||
#endif
|
||||
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
|
||||
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
||||
|
||||
|
@ -454,7 +451,7 @@ void rtw_free_hwxmits(_adapter *padapter);
|
|||
|
||||
s32 rtw_xmit(_adapter *padapter, _pkt **pkt);
|
||||
|
||||
#if defined(CONFIG_AP_MODE) || defined(CONFIG_TDLS)
|
||||
#if defined(CONFIG_AP_MODE)
|
||||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void stop_sta_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
|
|
|
@ -85,13 +85,6 @@ struct stainfo_stats {
|
|||
|
||||
};
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
struct TDLS_PeerKey {
|
||||
u8 kck[16]; /* TPK-KCK */
|
||||
u8 tk[16]; /* TPK-TK; only CCMP will be used */
|
||||
} ;
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
struct sta_info {
|
||||
|
||||
_lock lock;
|
||||
|
@ -136,32 +129,6 @@ struct sta_info {
|
|||
u8 wireless_mode; // NETWORK_TYPE
|
||||
struct stainfo_stats sta_stats;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
u32 tdls_sta_state;
|
||||
u8 dialog;
|
||||
u8 SNonce[32];
|
||||
u8 ANonce[32];
|
||||
u32 TDLS_PeerKey_Lifetime;
|
||||
u16 TPK_count;
|
||||
_timer TPK_timer;
|
||||
struct TDLS_PeerKey tpk;
|
||||
_adapter *padapter;
|
||||
u16 stat_code;
|
||||
u8 off_ch;
|
||||
u16 ch_switch_time;
|
||||
u16 ch_switch_timeout;
|
||||
u8 option;
|
||||
_timer option_timer;
|
||||
_timer base_ch_timer;
|
||||
_timer off_ch_timer;
|
||||
|
||||
_timer handshake_timer;
|
||||
_timer alive_timer1;
|
||||
_timer alive_timer2;
|
||||
u8 timer_flag;
|
||||
u8 alive_count;
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
//for A-MPDU TX, ADDBA timeout check
|
||||
_timer addba_retry_timer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue