linux/drivers/net/wireless/broadcom/b43legacy/phy.c

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

  Broadcom B43legacy wireless driver

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

  Some parts of the code in this file are derived from the ipw2200
  driver  Copyright(c) 2003 - 2004 Intel Corporation.


*/

#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/types.h>

#include "b43legacy.h"
#include "phy.h"
#include "main.h"
#include "radio.h"
#include "ilt.h"


static const s8 b43legacy_tssi2dbm_b_table[] =;

static const s8 b43legacy_tssi2dbm_g_table[] =;

static void b43legacy_phy_initg(struct b43legacy_wldev *dev);

/* Lock the PHY registers against concurrent access from the microcode.
 * This lock is nonrecursive. */
void b43legacy_phy_lock(struct b43legacy_wldev *dev)
{}

void b43legacy_phy_unlock(struct b43legacy_wldev *dev)
{}

u16 b43legacy_phy_read(struct b43legacy_wldev *dev, u16 offset)
{}

void b43legacy_phy_write(struct b43legacy_wldev *dev, u16 offset, u16 val)
{}

void b43legacy_phy_calibrate(struct b43legacy_wldev *dev)
{}

/* initialize B PHY power control
 * as described in https://bcm-specs.sipsolutions.net/InitPowerControl
 */
static void b43legacy_phy_init_pctl(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_agcsetup(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_setupg(struct b43legacy_wldev *dev)
{}

/* Initialize the APHY portion of a GPHY. */
static void b43legacy_phy_inita(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_initb2(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_initb4(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_initb5(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_initb6(struct b43legacy_wldev *dev)
{}

static void b43legacy_calc_loopback_gain(struct b43legacy_wldev *dev)
{}

static void b43legacy_phy_initg(struct b43legacy_wldev *dev)
{}

static u16 b43legacy_phy_lo_b_r15_loop(struct b43legacy_wldev *dev)
{}

void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)
{}

static inline
u16 b43legacy_phy_lo_g_deviation_subval(struct b43legacy_wldev *dev,
					u16 control)
{}

static u32 b43legacy_phy_lo_g_singledeviation(struct b43legacy_wldev *dev,
					      u16 control)
{}

/* Write the LocalOscillator CONTROL */
static inline
void b43legacy_lo_write(struct b43legacy_wldev *dev,
			struct b43legacy_lopair *pair)
{}

static inline
struct b43legacy_lopair *b43legacy_find_lopair(struct b43legacy_wldev *dev,
					       u16 bbatt,
					       u16 rfatt,
					       u16 tx)
{}

static inline
struct b43legacy_lopair *b43legacy_current_lopair(struct b43legacy_wldev *dev)
{}

/* Adjust B/G LO */
void b43legacy_phy_lo_adjust(struct b43legacy_wldev *dev, int fixed)
{}

static void b43legacy_phy_lo_g_measure_txctl2(struct b43legacy_wldev *dev)
{}

static
void b43legacy_phy_lo_g_state(struct b43legacy_wldev *dev,
			      const struct b43legacy_lopair *in_pair,
			      struct b43legacy_lopair *out_pair,
			      u16 r27)
{}

/* Set the baseband attenuation value on chip. */
void b43legacy_phy_set_baseband_attenuation(struct b43legacy_wldev *dev,
					    u16 bbatt)
{}

/* https://bcm-specs.sipsolutions.net/LocalOscillator/Measure */
void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev)
{}

static
void b43legacy_phy_lo_mark_current_used(struct b43legacy_wldev *dev)
{}

void b43legacy_phy_lo_mark_all_unused(struct b43legacy_wldev *dev)
{}

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

/* https://bcm-specs.sipsolutions.net/RecalculateTransmissionPower */
void b43legacy_phy_xmitpower(struct b43legacy_wldev *dev)
{}

static inline
s32 b43legacy_tssi2dbm_ad(s32 num, s32 den)
{}

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

/* http://bcm-specs.sipsolutions.net/TSSI_to_DBM_Table */
int b43legacy_phy_init_tssi2dbm_table(struct b43legacy_wldev *dev)
{}

int b43legacy_phy_init(struct b43legacy_wldev *dev)
{}

void b43legacy_phy_set_antenna_diversity(struct b43legacy_wldev *dev)
{}

/* Set the PowerSavingControlBits.
 * Bitvalues:
 *   0  => unset the bit
 *   1  => set the bit
 *   -1 => calculate the bit
 */
void b43legacy_power_saving_ctl_bits(struct b43legacy_wldev *dev,
				     int bit25, int bit26)
{}