linux/drivers/net/wireless/broadcom/b43/phy_g.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*

  Broadcom B43 wireless driver
  IEEE 802.11g PHY driver

  Copyright (c) 2005 Martin Langer <[email protected]>,
  Copyright (c) 2005-2007 Stefano Brivio <[email protected]>
  Copyright (c) 2005-2008 Michael Buesch <[email protected]>
  Copyright (c) 2005, 2006 Danny van Dyk <[email protected]>
  Copyright (c) 2005, 2006 Andreas Jaggi <[email protected]>


*/

#include "b43.h"
#include "phy_g.h"
#include "phy_common.h"
#include "lo.h"
#include "main.h"
#include "wa.h"

#include <linux/bitrev.h>
#include <linux/slab.h>


static const s8 b43_tssi2dbm_g_table[] =;

static const u8 b43_radio_channel_codes_bg[] =;


static void b43_calc_nrssi_threshold(struct b43_wldev *dev);


#define bitrev4(tmp)


/* Get the freq, as it has to be written to the device. */
static inline u16 channel2freq_bg(u8 channel)
{}

static void generate_rfatt_list(struct b43_wldev *dev,
				struct b43_rfatt_list *list)
{}

static void generate_bbatt_list(struct b43_wldev *dev,
				struct b43_bbatt_list *list)
{}

static void b43_shm_clear_tssi(struct b43_wldev *dev)
{}

/* Synthetic PU workaround */
static void b43_synth_pu_workaround(struct b43_wldev *dev, u8 channel)
{}

/* Set the baseband attenuation value on chip. */
void b43_gphy_set_baseband_attenuation(struct b43_wldev *dev,
				       u16 baseband_attenuation)
{}

/* Adjust the transmission power output (G-PHY) */
static void b43_set_txpower_g(struct b43_wldev *dev,
			      const struct b43_bbatt *bbatt,
			      const struct b43_rfatt *rfatt, u8 tx_control)
{}

/* GPHY_TSSI_Power_Lookup_Table_Init */
static void b43_gphy_tssi_power_lt_init(struct b43_wldev *dev)
{}

/* GPHY_Gain_Lookup_Table_Init */
static void b43_gphy_gain_lt_init(struct b43_wldev *dev)
{}

static void b43_set_all_gains(struct b43_wldev *dev,
			      s16 first, s16 second, s16 third)
{}

static void b43_set_original_gains(struct b43_wldev *dev)
{}

/* https://bcm-specs.sipsolutions.net/NRSSILookupTable */
static void b43_nrssi_hw_write(struct b43_wldev *dev, u16 offset, s16 val)
{}

/* https://bcm-specs.sipsolutions.net/NRSSILookupTable */
static s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
{}

/* https://bcm-specs.sipsolutions.net/NRSSILookupTable */
static void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
{}

/* https://bcm-specs.sipsolutions.net/NRSSILookupTable */
static void b43_nrssi_mem_update(struct b43_wldev *dev)
{}

static void b43_calc_nrssi_offset(struct b43_wldev *dev)
{}

static void b43_calc_nrssi_slope(struct b43_wldev *dev)
{}

static void b43_calc_nrssi_threshold(struct b43_wldev *dev)
{}

/* Stack implementation to save/restore values from the
 * interference mitigation code.
 * It is save to restore values in random order.
 */
static void _stack_save(u32 *_stackptr, size_t *stackidx,
			u8 id, u16 offset, u16 value)
{}

static u16 _stack_restore(u32 *stackptr, u8 id, u16 offset)
{}

#define phy_stacksave
#define phy_stackrestore
#define radio_stacksave
#define radio_stackrestore
#define ofdmtab_stacksave
#define ofdmtab_stackrestore

static void
b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
{}

static void
b43_radio_interference_mitigation_disable(struct b43_wldev *dev, int mode)
{}

#undef phy_stacksave
#undef phy_stackrestore
#undef radio_stacksave
#undef radio_stackrestore
#undef ofdmtab_stacksave
#undef ofdmtab_stackrestore

static u16 b43_radio_core_calibration_value(struct b43_wldev *dev)
{}

#define LPD(L, P, D)
static u16 radio2050_rfover_val(struct b43_wldev *dev,
				u16 phy_register, unsigned int lpd)
{}

struct init2050_saved_values {};

static u16 b43_radio_init2050(struct b43_wldev *dev)
{}

static void b43_phy_initb5(struct b43_wldev *dev)
{}

/* https://bcm-v4.sipsolutions.net/802.11/PHY/Init/B6 */
static void b43_phy_initb6(struct b43_wldev *dev)
{}

static void b43_calc_loopback_gain(struct b43_wldev *dev)
{}

static void b43_hardware_pctl_early_init(struct b43_wldev *dev)
{}

/* Hardware power control for G-PHY */
static void b43_hardware_pctl_init_gphy(struct b43_wldev *dev)
{}

/* Initialize B/G PHY power control */
static void b43_phy_init_pctl(struct b43_wldev *dev)
{}

static void b43_phy_inita(struct b43_wldev *dev)
{}

static void b43_phy_initg(struct b43_wldev *dev)
{}

void b43_gphy_channel_switch(struct b43_wldev *dev,
			     unsigned int channel,
			     bool synthetic_pu_workaround)
{}

static void default_baseband_attenuation(struct b43_wldev *dev,
					 struct b43_bbatt *bb)
{}

static void default_radio_attenuation(struct b43_wldev *dev,
				      struct b43_rfatt *rf)
{}

static u16 default_tx_control(struct b43_wldev *dev)
{}

static u8 b43_gphy_aci_detect(struct b43_wldev *dev, u8 channel)
{}

static u8 b43_gphy_aci_scan(struct b43_wldev *dev)
{}

static s32 b43_tssi2dbm_ad(s32 num, s32 den)
{}

static s8 b43_tssi2dbm_entry(s8 entry[], u8 index,
			     s16 pab0, s16 pab1, s16 pab2)
{}

u8 *b43_generate_dyn_tssi2dbm_tab(struct b43_wldev *dev,
				  s16 pab0, s16 pab1, s16 pab2)
{}

/* Initialise the TSSI->dBm lookup table */
static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev)
{}

static int b43_gphy_op_allocate(struct b43_wldev *dev)
{}

static void b43_gphy_op_prepare_structs(struct b43_wldev *dev)
{}

static void b43_gphy_op_free(struct b43_wldev *dev)
{}

static int b43_gphy_op_prepare_hardware(struct b43_wldev *dev)
{}

static int b43_gphy_op_init(struct b43_wldev *dev)
{}

static void b43_gphy_op_exit(struct b43_wldev *dev)
{}

static u16 b43_gphy_op_read(struct b43_wldev *dev, u16 reg)
{}

static void b43_gphy_op_write(struct b43_wldev *dev, u16 reg, u16 value)
{}

static u16 b43_gphy_op_radio_read(struct b43_wldev *dev, u16 reg)
{}

static void b43_gphy_op_radio_write(struct b43_wldev *dev, u16 reg, u16 value)
{}

static bool b43_gphy_op_supports_hwpctl(struct b43_wldev *dev)
{}

static void b43_gphy_op_software_rfkill(struct b43_wldev *dev,
					bool blocked)
{}

static int b43_gphy_op_switch_channel(struct b43_wldev *dev,
				      unsigned int new_channel)
{}

static unsigned int b43_gphy_op_get_default_chan(struct b43_wldev *dev)
{}

static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
{}

static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,
					 enum b43_interference_mitigation mode)
{}

/* https://bcm-specs.sipsolutions.net/EstimatePowerOut
 * This function converts a TSSI value to dBm in Q5.2
 */
static s8 b43_gphy_estimate_power_out(struct b43_wldev *dev, s8 tssi)
{}

static void b43_put_attenuation_into_ranges(struct b43_wldev *dev,
					    int *_bbatt, int *_rfatt)
{}

static void b43_gphy_op_adjust_txpower(struct b43_wldev *dev)
{}

static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
							bool ignore_tssi)
{}

static void b43_gphy_op_pwork_15sec(struct b43_wldev *dev)
{}

static void b43_gphy_op_pwork_60sec(struct b43_wldev *dev)
{}

const struct b43_phy_operations b43_phyops_g =;