wifi: brcm80211: Remove more unused functions
This is a subset of unused functions in bcrmsmac phy_cmn.c,
They're unused since the original 2010
commit a9533e7ea3 ("Staging: Add initial release of brcm80211 - Broadcom
802.11n wireless LAN driver.")
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>>
Link: https://patch.msgid.link/20250626140812.56700-3-linux@treblig.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
9edf3f855b
commit
b83c7f4971
@@ -1308,56 +1308,6 @@ int wlc_phy_txpower_get(struct brcms_phy_pub *ppi, uint *qdbm, bool *override)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void wlc_phy_txpower_target_set(struct brcms_phy_pub *ppi,
|
||||
struct txpwr_limits *txpwr)
|
||||
{
|
||||
bool mac_enabled = false;
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_CCK],
|
||||
&txpwr->cck[0], BRCMS_NUM_RATES_CCK);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM],
|
||||
&txpwr->ofdm[0], BRCMS_NUM_RATES_OFDM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_20_CDD],
|
||||
&txpwr->ofdm_cdd[0], BRCMS_NUM_RATES_OFDM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_SISO],
|
||||
&txpwr->ofdm_40_siso[0], BRCMS_NUM_RATES_OFDM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_CDD],
|
||||
&txpwr->ofdm_40_cdd[0], BRCMS_NUM_RATES_OFDM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SISO],
|
||||
&txpwr->mcs_20_siso[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_CDD],
|
||||
&txpwr->mcs_20_cdd[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_STBC],
|
||||
&txpwr->mcs_20_stbc[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SDM],
|
||||
&txpwr->mcs_20_mimo[0], BRCMS_NUM_RATES_MCS_2_STREAM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SISO],
|
||||
&txpwr->mcs_40_siso[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_CDD],
|
||||
&txpwr->mcs_40_cdd[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_STBC],
|
||||
&txpwr->mcs_40_stbc[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SDM],
|
||||
&txpwr->mcs_40_mimo[0], BRCMS_NUM_RATES_MCS_2_STREAM);
|
||||
|
||||
if (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & MCTL_EN_MAC)
|
||||
mac_enabled = true;
|
||||
|
||||
if (mac_enabled)
|
||||
wlapi_suspend_mac_and_wait(pi->sh->physhim);
|
||||
|
||||
wlc_phy_txpower_recalc_target(pi);
|
||||
wlc_phy_cal_txpower_recalc_sw(pi);
|
||||
|
||||
if (mac_enabled)
|
||||
wlapi_enable_mac(pi->sh->physhim);
|
||||
}
|
||||
|
||||
int wlc_phy_txpower_set(struct brcms_phy_pub *ppi, uint qdbm, bool override)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
@@ -1441,59 +1391,6 @@ wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint channel, u8 *min_pwr,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, uint chan,
|
||||
u8 *max_txpwr, u8 *min_txpwr)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
u8 tx_pwr_max = 0;
|
||||
u8 tx_pwr_min = 255;
|
||||
u8 max_num_rate;
|
||||
u8 maxtxpwr, mintxpwr, rate, pactrl;
|
||||
|
||||
pactrl = 0;
|
||||
|
||||
max_num_rate = ISNPHY(pi) ? TXP_NUM_RATES :
|
||||
ISLCNPHY(pi) ? (TXP_LAST_SISO_MCS_20 +
|
||||
1) : (TXP_LAST_OFDM + 1);
|
||||
|
||||
for (rate = 0; rate < max_num_rate; rate++) {
|
||||
|
||||
wlc_phy_txpower_sromlimit(ppi, chan, &mintxpwr, &maxtxpwr,
|
||||
rate);
|
||||
|
||||
maxtxpwr = (maxtxpwr > pactrl) ? (maxtxpwr - pactrl) : 0;
|
||||
|
||||
maxtxpwr = (maxtxpwr > 6) ? (maxtxpwr - 6) : 0;
|
||||
|
||||
tx_pwr_max = max(tx_pwr_max, maxtxpwr);
|
||||
tx_pwr_min = min(tx_pwr_min, maxtxpwr);
|
||||
}
|
||||
*max_txpwr = tx_pwr_max;
|
||||
*min_txpwr = tx_pwr_min;
|
||||
}
|
||||
|
||||
void
|
||||
wlc_phy_txpower_boardlimit_band(struct brcms_phy_pub *ppi, uint bandunit,
|
||||
s32 *max_pwr, s32 *min_pwr, u32 *step_pwr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
u8 wlc_phy_txpower_get_target_min(struct brcms_phy_pub *ppi)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
|
||||
return pi->tx_power_min;
|
||||
}
|
||||
|
||||
u8 wlc_phy_txpower_get_target_max(struct brcms_phy_pub *ppi)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
|
||||
return pi->tx_power_max;
|
||||
}
|
||||
|
||||
static s8 wlc_phy_env_measure_vbat(struct brcms_phy *pi)
|
||||
{
|
||||
if (ISLCNPHY(pi))
|
||||
@@ -1797,13 +1694,6 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
}
|
||||
}
|
||||
|
||||
void wlc_phy_txpwr_percent_set(struct brcms_phy_pub *ppi, u8 txpwr_percent)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
|
||||
pi->txpwr_percent = txpwr_percent;
|
||||
}
|
||||
|
||||
void wlc_phy_machwcap_set(struct brcms_phy_pub *ppi, u32 machwcap)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
@@ -1811,35 +1701,6 @@ void wlc_phy_machwcap_set(struct brcms_phy_pub *ppi, u32 machwcap)
|
||||
pi->sh->machwcap = machwcap;
|
||||
}
|
||||
|
||||
void wlc_phy_runbist_config(struct brcms_phy_pub *ppi, bool start_end)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
u16 rxc;
|
||||
rxc = 0;
|
||||
|
||||
if (start_end == ON) {
|
||||
if (!ISNPHY(pi))
|
||||
return;
|
||||
|
||||
if (NREV_IS(pi->pubpi.phy_rev, 3)
|
||||
|| NREV_IS(pi->pubpi.phy_rev, 4)) {
|
||||
bcma_wflush16(pi->d11core, D11REGOFFS(phyregaddr),
|
||||
0xa0);
|
||||
bcma_set16(pi->d11core, D11REGOFFS(phyregdata),
|
||||
0x1 << 15);
|
||||
}
|
||||
} else {
|
||||
if (NREV_IS(pi->pubpi.phy_rev, 3)
|
||||
|| NREV_IS(pi->pubpi.phy_rev, 4)) {
|
||||
bcma_wflush16(pi->d11core, D11REGOFFS(phyregaddr),
|
||||
0xa0);
|
||||
bcma_write16(pi->d11core, D11REGOFFS(phyregdata), rxc);
|
||||
}
|
||||
|
||||
wlc_phy_por_inform(ppi);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
wlc_phy_txpower_limit_set(struct brcms_phy_pub *ppi, struct txpwr_limits *txpwr,
|
||||
u16 chanspec)
|
||||
@@ -1940,37 +1801,6 @@ bool wlc_phy_txpower_hw_ctrl_get(struct brcms_phy_pub *ppi)
|
||||
return pi->hwpwrctrl;
|
||||
}
|
||||
|
||||
void wlc_phy_txpower_hw_ctrl_set(struct brcms_phy_pub *ppi, bool hwpwrctrl)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
bool suspend;
|
||||
|
||||
if (!pi->hwpwrctrl_capable)
|
||||
return;
|
||||
|
||||
pi->hwpwrctrl = hwpwrctrl;
|
||||
pi->nphy_txpwrctrl = hwpwrctrl;
|
||||
pi->txpwrctrl = hwpwrctrl;
|
||||
|
||||
if (ISNPHY(pi)) {
|
||||
suspend = (0 == (bcma_read32(pi->d11core,
|
||||
D11REGOFFS(maccontrol)) &
|
||||
MCTL_EN_MAC));
|
||||
if (!suspend)
|
||||
wlapi_suspend_mac_and_wait(pi->sh->physhim);
|
||||
|
||||
wlc_phy_txpwrctrl_enable_nphy(pi, pi->nphy_txpwrctrl);
|
||||
if (pi->nphy_txpwrctrl == PHY_TPC_HW_OFF)
|
||||
wlc_phy_txpwr_fixpower_nphy(pi);
|
||||
else
|
||||
mod_phy_reg(pi, 0x1e7, (0x7f << 0),
|
||||
pi->saved_txpwr_idx);
|
||||
|
||||
if (!suspend)
|
||||
wlapi_enable_mac(pi->sh->physhim);
|
||||
}
|
||||
}
|
||||
|
||||
void wlc_phy_txpower_ipa_upd(struct brcms_phy *pi)
|
||||
{
|
||||
|
||||
@@ -2128,13 +1958,6 @@ void wlc_phy_antsel_type_set(struct brcms_phy_pub *ppi, u8 antsel_type)
|
||||
pi->antsel_type = antsel_type;
|
||||
}
|
||||
|
||||
bool wlc_phy_test_ison(struct brcms_phy_pub *ppi)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
|
||||
return pi->phytest_on;
|
||||
}
|
||||
|
||||
void wlc_phy_ant_rxdiv_set(struct brcms_phy_pub *ppi, u8 val)
|
||||
{
|
||||
struct brcms_phy *pi = container_of(ppi, struct brcms_phy, pubpi_ro);
|
||||
@@ -2448,15 +2271,6 @@ done:
|
||||
|
||||
}
|
||||
|
||||
void wlc_phy_noise_sample_request_external(struct brcms_phy_pub *pih)
|
||||
{
|
||||
u8 channel;
|
||||
|
||||
channel = CHSPEC_CHANNEL(wlc_phy_chanspec_get(pih));
|
||||
|
||||
wlc_phy_noise_sample_request(pih, PHY_NOISE_SAMPLE_EXTERNAL, channel);
|
||||
}
|
||||
|
||||
static const s8 lcnphy_gain_index_offset_for_pkt_rssi[] = {
|
||||
8,
|
||||
8,
|
||||
|
||||
@@ -205,10 +205,6 @@ u16 wlc_phy_chanspec_band_firstch(struct brcms_phy_pub *ppi, uint band);
|
||||
|
||||
void wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint chan, u8 *_min_,
|
||||
u8 *_max_, int rate);
|
||||
void wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, uint chan,
|
||||
u8 *_max_, u8 *_min_);
|
||||
void wlc_phy_txpower_boardlimit_band(struct brcms_phy_pub *ppi, uint band,
|
||||
s32 *, s32 *, u32 *);
|
||||
void wlc_phy_txpower_limit_set(struct brcms_phy_pub *ppi, struct txpwr_limits *,
|
||||
u16 chanspec);
|
||||
int wlc_phy_txpower_get(struct brcms_phy_pub *ppi, uint *qdbm, bool *override);
|
||||
@@ -216,9 +212,6 @@ int wlc_phy_txpower_set(struct brcms_phy_pub *ppi, uint qdbm, bool override);
|
||||
void wlc_phy_txpower_target_set(struct brcms_phy_pub *ppi,
|
||||
struct txpwr_limits *);
|
||||
bool wlc_phy_txpower_hw_ctrl_get(struct brcms_phy_pub *ppi);
|
||||
void wlc_phy_txpower_hw_ctrl_set(struct brcms_phy_pub *ppi, bool hwpwrctrl);
|
||||
u8 wlc_phy_txpower_get_target_min(struct brcms_phy_pub *ppi);
|
||||
u8 wlc_phy_txpower_get_target_max(struct brcms_phy_pub *ppi);
|
||||
|
||||
void wlc_phy_stf_chain_init(struct brcms_phy_pub *pih, u8 txchain, u8 rxchain);
|
||||
void wlc_phy_stf_chain_set(struct brcms_phy_pub *pih, u8 txchain, u8 rxchain);
|
||||
@@ -226,7 +219,6 @@ u8 wlc_phy_stf_chain_active_get(struct brcms_phy_pub *pih);
|
||||
void wlc_phy_ldpc_override_set(struct brcms_phy_pub *ppi, bool val);
|
||||
|
||||
void wlc_phy_cal_perical(struct brcms_phy_pub *ppi, u8 reason);
|
||||
void wlc_phy_noise_sample_request_external(struct brcms_phy_pub *ppi);
|
||||
void wlc_phy_edcrs_lock(struct brcms_phy_pub *pih, bool lock);
|
||||
void wlc_phy_cal_papd_recal(struct brcms_phy_pub *ppi);
|
||||
|
||||
@@ -241,14 +233,10 @@ void wlc_phy_txpower_get_current(struct brcms_phy_pub *ppi,
|
||||
struct tx_power *power, uint channel);
|
||||
|
||||
void wlc_phy_initcal_enable(struct brcms_phy_pub *pih, bool initcal);
|
||||
bool wlc_phy_test_ison(struct brcms_phy_pub *ppi);
|
||||
void wlc_phy_txpwr_percent_set(struct brcms_phy_pub *ppi, u8 txpwr_percent);
|
||||
void wlc_phy_ofdm_rateset_war(struct brcms_phy_pub *pih, bool war);
|
||||
void wlc_phy_bf_preempt_enable(struct brcms_phy_pub *pih, bool bf_preempt);
|
||||
void wlc_phy_machwcap_set(struct brcms_phy_pub *ppi, u32 machwcap);
|
||||
|
||||
void wlc_phy_runbist_config(struct brcms_phy_pub *ppi, bool start_end);
|
||||
|
||||
const u8 *wlc_phy_get_ofdm_rate_lookup(void);
|
||||
|
||||
s8 wlc_phy_get_tx_power_offset_by_mcs(struct brcms_phy_pub *ppi,
|
||||
|
||||
Reference in New Issue
Block a user