linux/drivers/net/wireless/marvell/mwifiex/cfp.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * NXP Wireless LAN device driver: Channel, Frequence and Power
 *
 * Copyright 2011-2020 NXP
 */

#include "decl.h"
#include "ioctl.h"
#include "util.h"
#include "fw.h"
#include "main.h"
#include "cfg80211.h"

/* 100mW */
#define MWIFIEX_TX_PWR_DEFAULT
/* 100mW */
#define MWIFIEX_TX_PWR_US_DEFAULT
/* 50mW */
#define MWIFIEX_TX_PWR_JP_DEFAULT
/* 100mW */
#define MWIFIEX_TX_PWR_FR_100MW
/* 10mW */
#define MWIFIEX_TX_PWR_FR_10MW
/* 100mW */
#define MWIFIEX_TX_PWR_EMEA_DEFAULT

static u8 adhoc_rates_b[B_SUPPORTED_RATES] =;

static u8 adhoc_rates_g[G_SUPPORTED_RATES] =;

static u8 adhoc_rates_bg[BG_SUPPORTED_RATES] =;

static u8 adhoc_rates_a[A_SUPPORTED_RATES] =;
static u8 supported_rates_a[A_SUPPORTED_RATES] =;
static u16 mwifiex_data_rates[MWIFIEX_SUPPORTED_RATES_EXT] =;

static u8 supported_rates_b[B_SUPPORTED_RATES] =;

static u8 supported_rates_g[G_SUPPORTED_RATES] =;

static u8 supported_rates_bg[BG_SUPPORTED_RATES] =;

u16 region_code_index[MWIFIEX_MAX_REGION_CODE] =;

static u8 supported_rates_n[N_SUPPORTED_RATES] =;

/* For every mcs_rate line, the first 8 bytes are for stream 1x1,
 * and all 16 bytes are for stream 2x2.
 */
static const u16 mcs_rate[4][16] =;

/* AC rates */
static const u16 ac_mcs_rate_nss1[8][10] =;

/* NSS2 note: the value in the table is 2 multiplier of the actual rate */
static const u16 ac_mcs_rate_nss2[8][10] =;

struct region_code_mapping {};

static struct region_code_mapping region_code_mapping_t[] =;

/* This function converts integer code to region string */
u8 *mwifiex_11d_code_2_region(u8 code)
{}

/*
 * This function maps an index in supported rates table into
 * the corresponding data rate.
 */
u32 mwifiex_index_to_acs_data_rate(struct mwifiex_private *priv,
				   u8 index, u8 ht_info)
{}

/* This function maps an index in supported rates table into
 * the corresponding data rate.
 */
u32 mwifiex_index_to_data_rate(struct mwifiex_private *priv,
			       u8 index, u8 ht_info)
{}

/*
 * This function returns the current active data rates.
 *
 * The result may vary depending upon connection status.
 */
u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv, u8 *rates)
{}

/*
 * This function locates the Channel-Frequency-Power triplet based upon
 * band and channel/frequency parameters.
 */
struct mwifiex_chan_freq_power *
mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq)
{}

/*
 * This function checks if the data rate is set to auto.
 */
u8
mwifiex_is_rate_auto(struct mwifiex_private *priv)
{}

/* This function gets the supported data rates from bitmask inside
 * cfg80211_scan_request.
 */
u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv,
				    u8 *rates, u8 radio_type)
{}

/* This function gets the supported data rates. The function works in
 * both Ad-Hoc and infra mode by printing the band and returning the
 * data rates.
 */
u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
{}

u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv,
			    u8 rx_rate, u8 rate_info)
{}