linux/drivers/staging/rtl8712/rtl871x_mlme.c

// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
 * rtl871x_mlme.c
 *
 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
 * Linux device driver for RTL8192SU
 *
 * Modifications for inclusion into the Linux staging tree are
 * Copyright(c) 2010 Larry Finger. All rights reserved.
 *
 * Contact information:
 * WLAN FAE <[email protected]>
 * Larry Finger <[email protected]>
 *
 ******************************************************************************/

#define _RTL871X_MLME_C_

#include <linux/etherdevice.h>

#include "osdep_service.h"
#include "drv_types.h"
#include "recv_osdep.h"
#include "xmit_osdep.h"
#include "mlme_osdep.h"
#include "sta_info.h"
#include "wifi.h"
#include "wlan_bssdef.h"

static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len);

int r8712_init_mlme_priv(struct _adapter *padapter)
{}

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

static void _free_network(struct mlme_priv *pmlmepriv,
			  struct wlan_network *pnetwork)
{}

static void 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...
 */
static struct wlan_network *r8712_find_network(struct  __queue *scanned_queue,
					       u8 *addr)
{}

void r8712_free_network_queue(struct _adapter *padapter)
{}

sint r8712_if_up(struct _adapter *padapter)
{}

void r8712_generate_random_ibss(u8 *pibss)
{}

uint r8712_get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
{}

u8 *r8712_get_capability_from_ie(u8 *ie)
{}

void r8712_free_mlme_priv(struct mlme_priv *pmlmepriv)
{}

static struct	wlan_network *alloc_network(struct mlme_priv *pmlmepriv)
{}

int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork)
{}

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

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

static void update_network(struct wlan_bssid_ex *dst,
			   struct wlan_bssid_ex *src,
			   struct _adapter *padapter)
{}

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

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

static void rtl8711_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
 */
static int is_desired_network(struct _adapter *adapter,
				struct wlan_network *pnetwork)
{}

/* TODO: Perry : For Power Management */
void r8712_atimdone_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_survey_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

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

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

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

/*Notes:
 *pnetwork : returns from r8712_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).
 */
void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_stadel_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_cpwm_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

/*	When the Netgear 3500 AP is with WPA2PSK-AES mode, it will send
 *	 the ADDBA req frame with start seq control = 0 to wifi client after
 *	 the WPA handshake and the sequence number of following data packet
 *	will be 0. In this case, the Rx reorder sequence is not longer than 0
 *	 and the WiFi client will drop the data with seq number 0.
 *	So, the 8712 firmware has to inform driver with receiving the
 *	 ADDBA-Req frame so that the driver can reset the
 *	sequence value of Rx reorder control.
 */
void r8712_got_addbareq_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void r8712_wpspbc_event_callback(struct _adapter *adapter, u8 *pbuf)
{}

void _r8712_sitesurvey_ctrl_handler(struct _adapter *adapter)
{}

void _r8712_join_timeout_handler(struct _adapter *adapter)
{}

void r8712_scan_timeout_handler (struct _adapter *adapter)
{}

void _r8712_dhcp_timeout_handler (struct _adapter *adapter)
{}

int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
{}

int r8712_set_auth(struct _adapter *adapter,
		   struct security_priv *psecuritypriv)
{}

int r8712_set_key(struct _adapter *adapter,
		  struct security_priv *psecuritypriv,
		  sint keyid)
{}

/* adjust IEs for r8712_joinbss_cmd in WMM */
int r8712_restruct_wmm_ie(struct _adapter *adapter, u8 *in_ie, u8 *out_ie,
		    uint in_len, uint initial_out_len)
{}

/*
 * Ported from 8185: IsInPreAuthKeyList().
 *
 * 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)
{}

sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie,
		     u8 *out_ie, uint in_len)
{}

void r8712_init_registrypriv_dev_network(struct _adapter *adapter)
{}

void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
{}

/*the function is at passive_level*/
void r8712_joinbss_reset(struct _adapter *padapter)
{}

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

/* the function is > passive_level (in critical_section) */
static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len)
{}

void r8712_issue_addbareq_cmd(struct _adapter *padapter, int priority)
{}