linux/drivers/staging/rtl8723bs/core/rtw_mlme.c

// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 ******************************************************************************/
#include <linux/etherdevice.h>
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_btcoex.h>
#include <linux/jiffies.h>

int	rtw_init_mlme_priv(struct adapter *padapter)
{}

static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen)
{}

void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
{}

void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{}

struct	wlan_network *rtw_alloc_network(struct	mlme_priv *pmlmepriv)
{}

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)
{}

/*
	return the wlan_network with the matching addr

	Shall be called under atomic context... to avoid possible racing condition...
*/
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{}

void rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
{}

signed int rtw_if_up(struct adapter *padapter)
{}

void rtw_generate_random_ibss(u8 *pibss)
{}

u8 *rtw_get_capability_from_ie(u8 *ie)
{}

u16 rtw_get_capability(struct wlan_bssid_ex *bss)
{}

u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
{}

void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{}

void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork);
void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork)
{}

/*
	return the wlan_network with the matching addr

	Shall be called under atomic context... to avoid possible racing condition...
*/
struct	wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{}

int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
{}

inline int is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b)
{}

int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 feature)
{}

struct wlan_network *_rtw_find_same_network(struct __queue *scanned_queue, struct wlan_network *network)
{}

struct	wlan_network	*rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
{}

void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
	struct adapter *padapter, bool update_ie)
{}

static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
{}

/*
Caller must hold pmlmepriv->lock first.
*/
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
{}

void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork);
void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
{}

/* select the desired network based on the capability of the (i)bss. */
/*  check items: (1) security */
/* 			   (2) network_type */
/* 			   (3) WMM */
/* 			   (4) HT */
/*                      (5) others */
int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork);
int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork)
{}

/* TODO: Perry : For Power Management */
void rtw_atimdone_event_callback(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_dummy_event_callback(struct adapter *adapter, u8 *pbuf)
{}

void rtw_fwdbg_event_callback(struct adapter *adapter, u8 *pbuf)
{}

static void free_scanqueue(struct	mlme_priv *pmlmepriv)
{}

static void rtw_reset_rx_info(struct debug_priv *pdbgpriv)
{}

static void find_network(struct adapter *adapter)
{}

/*
*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
*/
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
{}

/*
*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
*/
void rtw_indicate_connect(struct adapter *padapter)
{}

/*
*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
*/
void rtw_indicate_disconnect(struct adapter *padapter)
{}

inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted)
{}

void rtw_scan_abort(struct adapter *adapter)
{}

static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, struct wlan_network *pnetwork)
{}

/* pnetwork : returns from rtw_joinbss_event_callback */
/* ptarget_wlan: found from scanned_queue */
static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_network *ptarget_wlan, struct wlan_network  *pnetwork)
{}

/* Notes: the function could be > passive_level (the same context as Rx tasklet) */
/* pnetwork : returns from rtw_joinbss_event_callback */
/* ptarget_wlan: found from scanned_queue */
/* if join_res > 0, for (fw_state ==WIFI_STATION_STATE), we check if  "ptarget_sta" & "ptarget_wlan" exist. */
/* if join_res > 0, for (fw_state ==WIFI_ADHOC_STATE), we only check if "ptarget_wlan" exist. */
/* if join_res > 0, update "cur_network->network" from "pnetwork->network" if (ptarget_wlan != NULL). */
/*  */
/* define REJOIN */
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
{}

void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf)
{}

/* FOR STA, AP , AD-HOC mode */
void rtw_sta_media_status_rpt(struct adapter *adapter, struct sta_info *psta, u32 mstatus)
{}

void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
{}

void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
{}

void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
{}

void rtw_wmm_event_callback(struct adapter *padapter, u8 *pbuf)
{}

/*
* _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
* @adapter: pointer to struct adapter structure
*/
void _rtw_join_timeout_handler(struct timer_list *t)
{}

/*
* rtw_scan_timeout_handler - Timeout/Failure handler for CMD SiteSurvey
* @adapter: pointer to struct adapter structure
*/
void rtw_scan_timeout_handler(struct timer_list *t)
{}

void rtw_mlme_reset_auto_scan_int(struct adapter *adapter)
{}

static void rtw_auto_scan_handler(struct adapter *padapter)
{}

void rtw_dynamic_check_timer_handler(struct adapter *adapter)
{}

inline bool rtw_is_scan_deny(struct adapter *adapter)
{}

inline void rtw_clear_scan_deny(struct adapter *adapter)
{}

void rtw_set_scan_deny(struct adapter *adapter, u32 ms)
{}

/*
* Select a new roaming candidate from the original @param candidate and @param competitor
* @return true: candidate is updated
* @return false: candidate is not updated
*/
static int rtw_check_roaming_candidate(struct mlme_priv *mlme
	, struct wlan_network **candidate, struct wlan_network *competitor)
{}

int rtw_select_roaming_candidate(struct mlme_priv *mlme)
{}

/*
* Select a new join candidate from the original @param candidate and @param competitor
* @return true: candidate is updated
* @return false: candidate is not updated
*/
static int rtw_check_join_candidate(struct mlme_priv *mlme
	, struct wlan_network **candidate, struct wlan_network *competitor)
{}

/*
Calling context:
The caller of the sub-routine will be in critical section...
The caller must hold the following spinlock
pmlmepriv->lock
*/

int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
{}

signed int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
{}

signed int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, signed int keyid, u8 set_tx, bool enqueue)
{}

/* adjust ies for rtw_joinbss_cmd in WMM */
int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, uint initial_out_len)
{}

/*  */
/*  Ported from 8185: IsInPreAuthKeyList(). (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.) */
/*  Added by Annie, 2006-05-07. */
/*  */
/*  Search by BSSID, */
/*  Return Value: */
/* 		-1		:if there is no pre-auth key in the  table */
/* 		>= 0		:if there is pre-auth key, and   return the entry id */
/*  */
/*  */

static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
{}

/*  */
/*  Check the RSN IE length */
/*  If the RSN IE length <= 20, the RSN IE didn't include the PMKID information */
/*  0-11th element in the array are the fixed IE */
/*  12th element in the array is the IE */
/*  13th element in the array is the IE length */
/*  */

static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie_len)
{}

signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len)
{}

void rtw_init_registrypriv_dev_network(struct adapter *adapter)
{}

void rtw_update_registrypriv_dev_network(struct adapter *adapter)
{}

void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter)
{}

/* the function is at passive_level */
void rtw_joinbss_reset(struct adapter *padapter)
{}

void rtw_ht_use_default_setting(struct adapter *padapter)
{}

void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
{}

/* the function is >= passive_level */
unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len, u8 channel)
{}

/* the function is > passive_level (in critical_section) */
void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channel)
{}

void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe)
{}

void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len)
{}

inline void rtw_set_to_roam(struct adapter *adapter, u8 to_roam)
{}

inline u8 rtw_dec_to_roam(struct adapter *adapter)
{}

inline u8 rtw_to_roam(struct adapter *adapter)
{}

void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
{}
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
{}

signed int rtw_linked_check(struct adapter *padapter)
{}