linux/net/mac80211/iface.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Interface handling
 *
 * Copyright 2002-2005, Instant802 Networks, Inc.
 * Copyright 2005-2006, Devicescape Software, Inc.
 * Copyright (c) 2006 Jiri Benc <[email protected]>
 * Copyright 2008, Johannes Berg <[email protected]>
 * Copyright 2013-2014  Intel Mobile Communications GmbH
 * Copyright (c) 2016        Intel Deutschland GmbH
 * Copyright (C) 2018-2024 Intel Corporation
 */
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/if_arp.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
#include <linux/kcov.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
#include "ieee80211_i.h"
#include "sta_info.h"
#include "debugfs_netdev.h"
#include "mesh.h"
#include "led.h"
#include "driver-ops.h"
#include "wme.h"
#include "rate.h"

/**
 * DOC: Interface list locking
 *
 * The interface list in each struct ieee80211_local is protected
 * three-fold:
 *
 * (1) modifications may only be done under the RTNL *and* wiphy mutex
 *     *and* iflist_mtx
 * (2) modifications are done in an RCU manner so atomic readers
 *     can traverse the list in RCU-safe blocks.
 *
 * As a consequence, reads (traversals) of the list can be protected
 * by either the RTNL, the wiphy mutex, the iflist_mtx or RCU.
 */

static void ieee80211_iface_work(struct wiphy *wiphy, struct wiphy_work *work);

bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata,
			      bool update_bss)
{}

static u32 __ieee80211_idle_off(struct ieee80211_local *local)
{}

static u32 __ieee80211_idle_on(struct ieee80211_local *local)
{}

static u32 __ieee80211_recalc_idle(struct ieee80211_local *local,
				   bool force_active)
{}

u32 ieee80211_idle_off(struct ieee80211_local *local)
{}

void ieee80211_recalc_idle(struct ieee80211_local *local)
{}

static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr,
				bool check_dup)
{}

static int ieee80211_can_powered_addr_change(struct ieee80211_sub_if_data *sdata)
{}

static int _ieee80211_change_mac(struct ieee80211_sub_if_data *sdata,
				 void *addr)
{}

static int ieee80211_change_mac(struct net_device *dev, void *addr)
{}

static inline int identical_mac_addr_allowed(int type1, int type2)
{}

static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
					    enum nl80211_iftype iftype)
{}

static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata,
				  enum nl80211_iftype iftype)
{}

static int ieee80211_open(struct net_device *dev)
{}

static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_down)
{}

static void ieee80211_stop_mbssid(struct ieee80211_sub_if_data *sdata)
{}

static int ieee80211_stop(struct net_device *dev)
{}

static void ieee80211_set_multicast_list(struct net_device *dev)
{}

/*
 * Called when the netdev is removed or, by the code below, before
 * the interface type changes.
 */
static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata)
{}

static void ieee80211_uninit(struct net_device *dev)
{}

static int ieee80211_netdev_setup_tc(struct net_device *dev,
				     enum tc_setup_type type, void *type_data)
{}

static const struct net_device_ops ieee80211_dataif_ops =;

static u16 ieee80211_monitor_select_queue(struct net_device *dev,
					  struct sk_buff *skb,
					  struct net_device *sb_dev)
{}

static const struct net_device_ops ieee80211_monitorif_ops =;

static int ieee80211_netdev_fill_forward_path(struct net_device_path_ctx *ctx,
					      struct net_device_path *path)
{}

static const struct net_device_ops ieee80211_dataif_8023_ops =;

static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
{}

static bool ieee80211_set_sdata_offload_flags(struct ieee80211_sub_if_data *sdata)
{}

static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata)
{}

static void ieee80211_recalc_sdata_offload(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_recalc_offload(struct ieee80211_local *local)
{}

void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
				    const int offset)
{}

static void ieee80211_set_default_queues(struct ieee80211_sub_if_data *sdata)
{}

static void ieee80211_sdata_init(struct ieee80211_local *local,
				 struct ieee80211_sub_if_data *sdata)
{}

int ieee80211_add_virtual_monitor(struct ieee80211_local *local)
{}

void ieee80211_del_virtual_monitor(struct ieee80211_local *local)
{}

/*
 * NOTE: Be very careful when changing this function, it must NOT return
 * an error on interface type changes that have been pre-checked, so most
 * checks should be in ieee80211_check_concurrent_iface.
 */
int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
{}

static void ieee80211_if_setup(struct net_device *dev)
{}

static void ieee80211_iface_process_skb(struct ieee80211_local *local,
					struct ieee80211_sub_if_data *sdata,
					struct sk_buff *skb)
{}

static void ieee80211_iface_process_status(struct ieee80211_sub_if_data *sdata,
					   struct sk_buff *skb)
{}

static void ieee80211_iface_work(struct wiphy *wiphy, struct wiphy_work *work)
{}

static void ieee80211_activate_links_work(struct wiphy *wiphy,
					  struct wiphy_work *work)
{}

/*
 * Helper function to initialise an interface to a specific type.
 */
static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
				  enum nl80211_iftype type)
{}

static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
					   enum nl80211_iftype type)
{}

int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
			     enum nl80211_iftype type)
{}

static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
				       u8 *perm_addr, enum nl80211_iftype type)
{}

int ieee80211_if_add(struct ieee80211_local *local, const char *name,
		     unsigned char name_assign_type,
		     struct wireless_dev **new_wdev, enum nl80211_iftype type,
		     struct vif_params *params)
{}

void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_sdata_stop(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_remove_interfaces(struct ieee80211_local *local)
{}

static int netdev_notify(struct notifier_block *nb,
			 unsigned long state, void *ptr)
{}

static struct notifier_block mac80211_netdev_notifier =;

int ieee80211_iface_init(void)
{}

void ieee80211_iface_exit(void)
{}

void ieee80211_vif_inc_num_mcast(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_vif_dec_num_mcast(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_vif_block_queues_csa(struct ieee80211_sub_if_data *sdata)
{}

void ieee80211_vif_unblock_queues_csa(struct ieee80211_sub_if_data *sdata)
{}