linux/drivers/net/wireless/marvell/libertas/main.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This file contains the major functions in WLAN
 * driver. It includes init, exit, open, close and main
 * thread etc..
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/hardirq.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/kthread.h>
#include <linux/kfifo.h>
#include <linux/slab.h>
#include <net/cfg80211.h>

#include "host.h"
#include "decl.h"
#include "dev.h"
#include "cfg.h"
#include "debugfs.h"
#include "cmd.h"
#include "mesh.h"

#define DRIVER_RELEASE_VERSION
const char lbs_driver_version[] =;


/* Module parameters */
unsigned int lbs_debug;
EXPORT_SYMBOL_GPL();
module_param_named(libertas_debug, lbs_debug, int, 0644);

static unsigned int lbs_disablemesh;
module_param_named(libertas_disablemesh, lbs_disablemesh, int, 0644);


/*
 * This global structure is used to send the confirm_sleep command as
 * fast as possible down to the firmware.
 */
struct cmd_confirm_sleep confirm_sleep;


/*
 * the table to keep region code
 */
u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =;

/*
 * FW rate table.  FW refers to rates by their index in this table, not by the
 * rate value itself.  Values of 0x00 are
 * reserved positions.
 */
static u8 fw_data_rates[MAX_RATES] =;

/**
 *  lbs_fw_index_to_data_rate - use index to get the data rate
 *
 *  @idx:	The index of data rate
 *  returns:	data rate or 0
 */
u32 lbs_fw_index_to_data_rate(u8 idx)
{}

/**
 *  lbs_data_rate_to_fw_index - use rate to get the index
 *
 *  @rate:	data rate
 *  returns:	index or 0
 */
u8 lbs_data_rate_to_fw_index(u32 rate)
{}

int lbs_set_iface_type(struct lbs_private *priv, enum nl80211_iftype type)
{}

int lbs_start_iface(struct lbs_private *priv)
{}

/**
 *  lbs_dev_open - open the ethX interface
 *
 *  @dev:	A pointer to &net_device structure
 *  returns:	0 or -EBUSY if monitor mode active
 */
static int lbs_dev_open(struct net_device *dev)
{}

static bool lbs_command_queue_empty(struct lbs_private *priv)
{}

int lbs_stop_iface(struct lbs_private *priv)
{}

/**
 *  lbs_eth_stop - close the ethX interface
 *
 *  @dev:	A pointer to &net_device structure
 *  returns:	0
 */
static int lbs_eth_stop(struct net_device *dev)
{}

void lbs_host_to_card_done(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();

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


static inline int mac_in_list(unsigned char *list, int list_len,
			      unsigned char *mac)
{}


static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd,
			       struct net_device *dev, int nr_addrs)
{}

void lbs_update_mcast(struct lbs_private *priv)
{}

static void lbs_set_mcast_worker(struct work_struct *work)
{}

void lbs_set_multicast_list(struct net_device *dev)
{}

/**
 *  lbs_thread - handles the major jobs in the LBS driver.
 *  It handles all events generated by firmware, RX data received
 *  from firmware and TX data sent from kernel.
 *
 *  @data:	A pointer to &lbs_thread structure
 *  returns:	0
 */
static int lbs_thread(void *data)
{}

/**
 * lbs_setup_firmware - gets the HW spec from the firmware and sets
 *        some basic parameters
 *
 *  @priv:	A pointer to &struct lbs_private structure
 *  returns:	0 or -1
 */
static int lbs_setup_firmware(struct lbs_private *priv)
{}

int lbs_suspend(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();

int lbs_resume(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();

/**
 * lbs_cmd_timeout_handler - handles the timeout of command sending.
 * It will re-send the same command again.
 *
 * @t: Context from which to retrieve a &struct lbs_private pointer
 */
static void lbs_cmd_timeout_handler(struct timer_list *t)
{}

/**
 * lbs_tx_lockup_handler - handles the timeout of the passing of TX frames
 * to the hardware. This is known to frequently happen with SD8686 when
 * waking up after a Wake-on-WLAN-triggered resume.
 *
 * @t: Context from which to retrieve a &struct lbs_private pointer
 */
static void lbs_tx_lockup_handler(struct timer_list *t)
{}

/**
 * auto_deepsleep_timer_fn - put the device back to deep sleep mode when
 * timer expires and no activity (command, event, data etc.) is detected.
 * @t: Context from which to retrieve a &struct lbs_private pointer
 * returns:	N/A
 */
static void auto_deepsleep_timer_fn(struct timer_list *t)
{}

int lbs_enter_auto_deep_sleep(struct lbs_private *priv)
{}

int lbs_exit_auto_deep_sleep(struct lbs_private *priv)
{}

static int lbs_init_adapter(struct lbs_private *priv)
{}

static void lbs_free_adapter(struct lbs_private *priv)
{}

static const struct net_device_ops lbs_netdev_ops =;

/**
 * lbs_add_card - adds the card. It will probe the
 * card, allocate the lbs_priv and initialize the device.
 *
 * @card:	A pointer to card
 * @dmdev:	A pointer to &struct device
 * returns:	A pointer to &struct lbs_private structure
 */
struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
{}
EXPORT_SYMBOL_GPL();


void lbs_remove_card(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();


int lbs_rtap_supported(struct lbs_private *priv)
{}


int lbs_start_card(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();


void lbs_stop_card(struct lbs_private *priv)
{}
EXPORT_SYMBOL_GPL();


void lbs_queue_event(struct lbs_private *priv, u32 event)
{}
EXPORT_SYMBOL_GPL();

void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx)
{}
EXPORT_SYMBOL_GPL();

static int __init lbs_init_module(void)
{}

static void __exit lbs_exit_module(void)
{}

module_init();
module_exit(lbs_exit_module);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();