linux/drivers/net/wireless/ti/wl18xx/main.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This file is part of wl18xx
 *
 * Copyright (C) 2011 Texas Instruments
 */

#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/ip.h>
#include <linux/firmware.h>
#include <linux/etherdevice.h>
#include <linux/irq.h>

#include "../wlcore/wlcore.h"
#include "../wlcore/debug.h"
#include "../wlcore/io.h"
#include "../wlcore/acx.h"
#include "../wlcore/tx.h"
#include "../wlcore/rx.h"
#include "../wlcore/boot.h"

#include "reg.h"
#include "conf.h"
#include "cmd.h"
#include "acx.h"
#include "tx.h"
#include "wl18xx.h"
#include "io.h"
#include "scan.h"
#include "event.h"
#include "debugfs.h"

#define WL18XX_RX_CHECKSUM_MASK

static char *ht_mode_param =;
static char *board_type_param =;
static bool checksum_param =;
static int num_rx_desc_param =;

/* phy paramters */
static int dc2dc_param =;
static int n_antennas_2_param =;
static int n_antennas_5_param =;
static int low_band_component_param =;
static int low_band_component_type_param =;
static int high_band_component_param =;
static int high_band_component_type_param =;
static int pwr_limit_reference_11_abg_param =;

static const u8 wl18xx_rate_to_idx_2ghz[] =;

static const u8 wl18xx_rate_to_idx_5ghz[] =;

static const u8 *wl18xx_band_rate_to_idx[] =;

enum wl18xx_hw_rates {};

static struct wlcore_conf wl18xx_conf =;

static struct wl18xx_priv_conf wl18xx_default_priv_conf =;

static const struct wlcore_partition_set wl18xx_ptable[PART_TABLE_LEN] =;

static const int wl18xx_rtable[REG_TABLE_LEN] =;

static const struct wl18xx_clk_cfg wl18xx_clk_table_coex[NUM_CLOCK_CONFIGS] =;

static const struct wl18xx_clk_cfg wl18xx_clk_table[NUM_CLOCK_CONFIGS] =;

/* TODO: maybe move to a new header file? */
#define WL18XX_FW_NAME

static int wl18xx_identify_chip(struct wl1271 *wl)
{}

static int wl18xx_set_clk(struct wl1271 *wl)
{}

static int wl18xx_boot_soft_reset(struct wl1271 *wl)
{}

static int wl18xx_pre_boot(struct wl1271 *wl)
{}

static int wl18xx_pre_upload(struct wl1271 *wl)
{}

static int wl18xx_set_mac_and_phy(struct wl1271 *wl)
{}

static int wl18xx_enable_interrupts(struct wl1271 *wl)
{}

static int wl18xx_boot(struct wl1271 *wl)
{}

static int wl18xx_trigger_cmd(struct wl1271 *wl, int cmd_box_addr,
			       void *buf, size_t len)
{}

static int wl18xx_ack_event(struct wl1271 *wl)
{}

static u32 wl18xx_calc_tx_blocks(struct wl1271 *wl, u32 len, u32 spare_blks)
{}

static void
wl18xx_set_tx_desc_blocks(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
			  u32 blks, u32 spare_blks)
{}

static void
wl18xx_set_tx_desc_data_len(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
			    struct sk_buff *skb)
{}

static enum wl_rx_buf_align
wl18xx_get_rx_buf_align(struct wl1271 *wl, u32 rx_desc)
{}

static u32 wl18xx_get_rx_packet_len(struct wl1271 *wl, void *rx_data,
				    u32 data_len)
{}

static void wl18xx_tx_immediate_completion(struct wl1271 *wl)
{}

static int wl18xx_set_host_cfg_bitmap(struct wl1271 *wl, u32 extra_mem_blk)
{}

static int wl18xx_hw_init(struct wl1271 *wl)
{}

static void wl18xx_convert_fw_status_8_9_1(struct wl1271 *wl,
					   void *raw_fw_status,
					   struct wl_fw_status *fw_status)
{}

static void wl18xx_convert_fw_status_8_9_0(struct wl1271 *wl,
					   void *raw_fw_status,
					   struct wl_fw_status *fw_status)
{}

static void wl18xx_convert_fw_status(struct wl1271 *wl, void *raw_fw_status,
				     struct wl_fw_status *fw_status)
{}

static void wl18xx_set_tx_desc_csum(struct wl1271 *wl,
				    struct wl1271_tx_hw_descr *desc,
				    struct sk_buff *skb)
{}

static void wl18xx_set_rx_csum(struct wl1271 *wl,
			       struct wl1271_rx_descriptor *desc,
			       struct sk_buff *skb)
{}

static bool wl18xx_is_mimo_supported(struct wl1271 *wl)
{}

/*
 * TODO: instead of having these two functions to get the rate mask,
 * we should modify the wlvif->rate_set instead
 */
static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl,
				       struct wl12xx_vif *wlvif)
{}

static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
					     struct wl12xx_vif *wlvif)
{}

static const char *wl18xx_rdl_name(enum wl18xx_rdl_num rdl_num)
{}

static int wl18xx_get_pg_ver(struct wl1271 *wl, s8 *ver)
{}

static int wl18xx_load_conf_file(struct device *dev, struct wlcore_conf *conf,
				 struct wl18xx_priv_conf *priv_conf,
				 const char *file)
{}

static int wl18xx_conf_init(struct wl1271 *wl, struct device *dev)
{}

static int wl18xx_plt_init(struct wl1271 *wl)
{}

static int wl18xx_get_mac(struct wl1271 *wl)
{}

static int wl18xx_handle_static_data(struct wl1271 *wl,
				     struct wl1271_static_data *static_data)
{}

static int wl18xx_get_spare_blocks(struct wl1271 *wl, bool is_gem)
{}

static int wl18xx_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
			  struct ieee80211_vif *vif,
			  struct ieee80211_sta *sta,
			  struct ieee80211_key_conf *key_conf)
{}

static u32 wl18xx_pre_pkt_send(struct wl1271 *wl,
			       u32 buf_offset, u32 last_len)
{}

static void wl18xx_sta_rc_update(struct wl1271 *wl,
				 struct wl12xx_vif *wlvif)
{}

static int wl18xx_set_peer_cap(struct wl1271 *wl,
			       struct ieee80211_sta_ht_cap *ht_cap,
			       bool allow_ht_operation,
			       u32 rate_set, u8 hlid)
{}

static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid,
				 struct wl1271_link *lnk)
{}

static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid,
				struct wl1271_link *lnk)
{}

static u32 wl18xx_convert_hwaddr(struct wl1271 *wl, u32 hwaddr)
{}

static int wl18xx_setup(struct wl1271 *wl);

static struct wlcore_ops wl18xx_ops =;

/* HT cap appropriate for wide channels in 2Ghz */
static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap_2ghz =;

/* HT cap appropriate for wide channels in 5Ghz */
static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap_5ghz =;

/* HT cap appropriate for SISO 20 */
static struct ieee80211_sta_ht_cap wl18xx_siso20_ht_cap =;

/* HT cap appropriate for MIMO rates in 20mhz channel */
static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap_2ghz =;

static const struct ieee80211_iface_limit wl18xx_iface_limits[] =;

static const struct ieee80211_iface_limit wl18xx_iface_ap_limits[] =;

static const struct ieee80211_iface_combination
wl18xx_iface_combinations[] =;

static int wl18xx_setup(struct wl1271 *wl)
{}

static int wl18xx_probe(struct platform_device *pdev)
{}

static const struct platform_device_id wl18xx_id_table[] =;
MODULE_DEVICE_TABLE(platform, wl18xx_id_table);

static struct platform_driver wl18xx_driver =;

module_platform_driver();
module_param_named(ht_mode, ht_mode_param, charp, 0400);
MODULE_PARM_DESC();

module_param_named(board_type, board_type_param, charp, 0400);
MODULE_PARM_DESC();

module_param_named(checksum, checksum_param, bool, 0400);
MODULE_PARM_DESC();

module_param_named(dc2dc, dc2dc_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(n_antennas_2, n_antennas_2_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(n_antennas_5, n_antennas_5_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(low_band_component, low_band_component_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(low_band_component_type, low_band_component_type_param,
		   int, 0400);
MODULE_PARM_DESC();

module_param_named(high_band_component, high_band_component_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(high_band_component_type, high_band_component_type_param,
		   int, 0400);
MODULE_PARM_DESC();

module_param_named(pwr_limit_reference_11_abg,
		   pwr_limit_reference_11_abg_param, int, 0400);
MODULE_PARM_DESC();

module_param_named(num_rx_desc, num_rx_desc_param, int, 0400);
MODULE_PARM_DESC();

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