linux/net/wireless/sme.c

// SPDX-License-Identifier: GPL-2.0
/*
 * SME code for cfg80211
 * both driver SME event handling and the SME implementation
 * (for nl80211's connect() and wext)
 *
 * Copyright 2009	Johannes Berg <[email protected]>
 * Copyright (C) 2009, 2020, 2022-2024 Intel Corporation. All rights reserved.
 * Copyright 2017	Intel Deutschland GmbH
 */

#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/wireless.h>
#include <linux/export.h>
#include <net/iw_handler.h>
#include <net/cfg80211.h>
#include <net/rtnetlink.h>
#include "nl80211.h"
#include "reg.h"
#include "rdev-ops.h"

/*
 * Software SME in cfg80211, using auth/assoc/deauth calls to the
 * driver. This is for implementing nl80211's connect/disconnect
 * and wireless extensions (if configured.)
 */

struct cfg80211_conn {};

static void cfg80211_sme_free(struct wireless_dev *wdev)
{}

static int cfg80211_conn_scan(struct wireless_dev *wdev)
{}

static int cfg80211_conn_do_work(struct wireless_dev *wdev,
				 enum nl80211_timeout_reason *treason)
{}

void cfg80211_conn_work(struct work_struct *work)
{}

static void cfg80211_step_auth_next(struct cfg80211_conn *conn,
				    struct cfg80211_bss *bss)
{}

/* Returned bss is reference counted and must be cleaned up appropriately. */
static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev)
{}

void cfg80211_sme_scan_done(struct net_device *dev)
{}

void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len)
{}

bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status)
{}

void cfg80211_sme_deauth(struct wireless_dev *wdev)
{}

void cfg80211_sme_auth_timeout(struct wireless_dev *wdev)
{}

void cfg80211_sme_disassoc(struct wireless_dev *wdev)
{}

void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev)
{}

void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev)
{}

static void cfg80211_wdev_release_bsses(struct wireless_dev *wdev)
{}

void cfg80211_wdev_release_link_bsses(struct wireless_dev *wdev, u16 link_mask)
{}

static int cfg80211_sme_get_conn_ies(struct wireless_dev *wdev,
				     const u8 *ies, size_t ies_len,
				     const u8 **out_ies, size_t *out_ies_len)
{}

static int cfg80211_sme_connect(struct wireless_dev *wdev,
				struct cfg80211_connect_params *connect,
				const u8 *prev_bssid)
{}

static int cfg80211_sme_disconnect(struct wireless_dev *wdev, u16 reason)
{}

/*
 * code shared for in-device and software SME
 */

static bool cfg80211_is_all_idle(void)
{}

static void disconnect_work(struct work_struct *work)
{}

DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);

static void
cfg80211_connect_result_release_bsses(struct wireless_dev *wdev,
				      struct cfg80211_connect_resp_params *cr)
{}

/*
 * API calls for drivers implementing connect/disconnect and
 * SME event handling
 */

/* This method must consume bss one way or another */
void __cfg80211_connect_result(struct net_device *dev,
			       struct cfg80211_connect_resp_params *cr,
			       bool wextev)
{}

static void cfg80211_update_link_bss(struct wireless_dev *wdev,
				     struct cfg80211_bss **bss)
{}

/* Consumes bss object(s) one way or another */
void cfg80211_connect_done(struct net_device *dev,
			   struct cfg80211_connect_resp_params *params,
			   gfp_t gfp)
{}
EXPORT_SYMBOL();

/* Consumes bss object one way or another */
void __cfg80211_roamed(struct wireless_dev *wdev,
		       struct cfg80211_roam_info *info)
{}

/* Consumes info->links.bss object(s) one way or another */
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
		     gfp_t gfp)
{}
EXPORT_SYMBOL();

void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *peer_addr,
					const u8 *td_bitmap, u8 td_bitmap_len)
{}

void cfg80211_port_authorized(struct net_device *dev, const u8 *peer_addr,
			      const u8 *td_bitmap, u8 td_bitmap_len, gfp_t gfp)
{}
EXPORT_SYMBOL();

void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
			     size_t ie_len, u16 reason, bool from_ap)
{}

void cfg80211_disconnected(struct net_device *dev, u16 reason,
			   const u8 *ie, size_t ie_len,
			   bool locally_generated, gfp_t gfp)
{}
EXPORT_SYMBOL();

/*
 * API calls for nl80211/wext compatibility code
 */
int cfg80211_connect(struct cfg80211_registered_device *rdev,
		     struct net_device *dev,
		     struct cfg80211_connect_params *connect,
		     struct cfg80211_cached_keys *connkeys,
		     const u8 *prev_bssid)
{}

int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
			struct net_device *dev, u16 reason, bool wextev)
{}

/*
 * Used to clean up after the connection / connection attempt owner socket
 * disconnects
 */
void cfg80211_autodisconnect_wk(struct work_struct *work)
{}