Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268024
b: refs/heads/master
c: cc69855
h: refs/heads/master
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Aug 26, 2011
1 parent aab25e6 commit fdb895d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 182 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6f29edecd95f2eb4715e9d1778688eb1a44c83c
refs/heads/master: cc698552f3ba1f59f96672229a74e4647b82ed51
35 changes: 0 additions & 35 deletions trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ u16 read_radio_reg(struct brcms_phy *pi, u16 addr)
if ((addr == RADIO_IDCODE))
return 0xffff;

if (NORADIO_ENAB(pi->pubpi))
return NORADIO_IDCODE & 0xffff;

switch (pi->pubpi.phy_type) {
case PHY_TYPE_N:
CASECHECK(PHYTYPE, PHY_TYPE_N);
Expand Down Expand Up @@ -265,9 +262,6 @@ u16 read_radio_reg(struct brcms_phy *pi, u16 addr)

void write_radio_reg(struct brcms_phy *pi, u16 addr, u16 val)
{
if (NORADIO_ENAB(pi->pubpi))
return;

if ((D11REV_GE(pi->sh->corerev, 24)) ||
(D11REV_IS(pi->sh->corerev, 22)
&& (pi->pubpi.phy_type != PHY_TYPE_SSN))) {
Expand All @@ -289,9 +283,6 @@ static u32 read_radio_id(struct brcms_phy *pi)
{
u32 id;

if (NORADIO_ENAB(pi->pubpi))
return NORADIO_IDCODE;

if (D11REV_GE(pi->sh->corerev, 24)) {
u32 b0, b1, b2;

Expand All @@ -317,9 +308,6 @@ void and_radio_reg(struct brcms_phy *pi, u16 addr, u16 val)
{
u16 rval;

if (NORADIO_ENAB(pi->pubpi))
return;

rval = read_radio_reg(pi, addr);
write_radio_reg(pi, addr, (rval & val));
}
Expand All @@ -328,9 +316,6 @@ void or_radio_reg(struct brcms_phy *pi, u16 addr, u16 val)
{
u16 rval;

if (NORADIO_ENAB(pi->pubpi))
return;

rval = read_radio_reg(pi, addr);
write_radio_reg(pi, addr, (rval | val));
}
Expand All @@ -339,9 +324,6 @@ void xor_radio_reg(struct brcms_phy *pi, u16 addr, u16 mask)
{
u16 rval;

if (NORADIO_ENAB(pi->pubpi))
return;

rval = read_radio_reg(pi, addr);
write_radio_reg(pi, addr, (rval ^ mask));
}
Expand All @@ -350,9 +332,6 @@ void mod_radio_reg(struct brcms_phy *pi, u16 addr, u16 mask, u16 val)
{
u16 rval;

if (NORADIO_ENAB(pi->pubpi))
return;

rval = read_radio_reg(pi, addr);
write_radio_reg(pi, addr, (rval & ~mask) | (val & mask));
}
Expand Down Expand Up @@ -1225,9 +1204,6 @@ void wlc_phy_switch_radio(struct brcms_phy_pub *pih, bool on)
{
struct brcms_phy *pi = (struct brcms_phy *) pih;

if (NORADIO_ENAB(pi->pubpi))
return;

{
uint mc;

Expand Down Expand Up @@ -2308,9 +2284,6 @@ wlc_phy_noise_sample_request(struct brcms_phy_pub *pih, u8 reason, u8 ch)
bool sampling_in_progress = (pi->phynoise_state != 0);
bool wait_for_intr = true;

if (NORADIO_ENAB(pi->pubpi))
return;

switch (reason) {
case PHY_NOISE_SAMPLE_MON:
pi->phynoise_chan_watchdog = ch;
Expand Down Expand Up @@ -2618,11 +2591,6 @@ void wlc_phy_rssi_compute(struct brcms_phy_pub *pih,
uint radioid = pih->radioid;
struct brcms_phy *pi = (struct brcms_phy *) pih;

if (NORADIO_ENAB(pi->pubpi)) {
rssi = BRCMS_RSSI_INVALID;
goto end;
}

if ((pi->sh->corerev >= 11)
&& !(le16_to_cpu(rxh->RxStatus2) & RXS_PHYRXST_VALID)) {
rssi = BRCMS_RSSI_INVALID;
Expand Down Expand Up @@ -2704,9 +2672,6 @@ void wlc_phy_watchdog(struct brcms_phy_pub *pih)
pi->phycal_txpower = pi->sh->now;
}

if (NORADIO_ENAB(pi->pubpi))
return;

if ((SCAN_RM_IN_PROGRESS(pi) || PLT_INPROG_PHY(pi)
|| ASSOC_INPROG_PHY(pi)))
return;
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,6 @@ enum phy_cal_mode {
#define PUB_NOT_ASSOC(pi) \
(mboolisset(pi->measure_hold, PHY_HOLD_FOR_NOT_ASSOC))

#if defined(EXT_CBALL)
#define NORADIO_ENAB(pub) ((pub).radioid == NORADIO_ID)
#else
#define NORADIO_ENAB(pub) 0
#endif

#define PHY_LTRN_LIST_LEN 64
extern u16 ltrn_list[PHY_LTRN_LIST_LEN];

Expand Down
57 changes: 4 additions & 53 deletions trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,10 +1218,8 @@ void wlc_phy_chanspec_set_lcnphy(struct brcms_phy *pi, u16 chanspec)
or_phy_reg(pi, 0x44a, 0x44);
write_phy_reg(pi, 0x44a, 0x80);

if (!NORADIO_ENAB(pi->pubpi)) {
wlc_lcnphy_radio_2064_channel_tune_4313(pi, channel);
udelay(1000);
}
wlc_lcnphy_radio_2064_channel_tune_4313(pi, channel);
udelay(1000);

wlc_lcnphy_toggle_afe_pwdn(pi);

Expand Down Expand Up @@ -1704,9 +1702,6 @@ static s8 wlc_lcnphy_tempcompensated_txpwrctrl(struct brcms_phy *pi)

index = FIXED_TXPWR;

if (NORADIO_ENAB(pi->pubpi))
return index;

if (pi_lcn->lcnphy_tempsense_slope == 0)
return index;

Expand Down Expand Up @@ -1875,9 +1870,6 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi,
u16 *values_to_save;
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

if (NORADIO_ENAB(pi->pubpi))
return;

values_to_save = kmalloc(sizeof(u16) * 20, GFP_ATOMIC);
if (NULL == values_to_save)
return;
Expand Down Expand Up @@ -2291,13 +2283,6 @@ static void wlc_lcnphy_tx_pwr_ctrl_init(struct brcms_phy_pub *ppi)
if (!suspend)
wlapi_suspend_mac_and_wait(pi->sh->physhim);

if (NORADIO_ENAB(pi->pubpi)) {
wlc_lcnphy_set_bbmult(pi, 0x30);
if (!suspend)
wlapi_enable_mac(pi->sh->physhim);
return;
}

if (!pi->hwpwrctrl_capable) {
if (CHSPEC_IS2G(pi->radio_chanspec)) {
tx_gains.gm_gain = 4;
Expand Down Expand Up @@ -2965,9 +2950,6 @@ s16 wlc_lcnphy_tempsense_new(struct brcms_phy *pi, bool mode)
s16 avg = 0;
bool suspend = 0;

if (NORADIO_ENAB(pi->pubpi))
return -1;

if (mode == 1) {
suspend =
(0 ==
Expand Down Expand Up @@ -3012,9 +2994,6 @@ u16 wlc_lcnphy_tempsense(struct brcms_phy *pi, bool mode)
u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

if (NORADIO_ENAB(pi->pubpi))
return -1;

if (mode == 1) {
suspend =
(0 ==
Expand Down Expand Up @@ -3081,9 +3060,6 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy *pi, bool mode)
s32 avg = 0;
bool suspend = 0;

if (NORADIO_ENAB(pi->pubpi))
return -1;

if (mode == 1) {
suspend =
(0 ==
Expand Down Expand Up @@ -3420,8 +3396,6 @@ wlc_lcnphy_rx_iq_cal(struct brcms_phy *pi,

static void wlc_lcnphy_temp_adj(struct brcms_phy *pi)
{
if (NORADIO_ENAB(pi->pubpi))
return;
}

static void wlc_lcnphy_glacial_timer_based_cal(struct brcms_phy *pi)
Expand Down Expand Up @@ -3461,9 +3435,6 @@ static void wlc_lcnphy_periodic_cal(struct brcms_phy *pi)
s32 tssi, pwr, maxtargetpwr, mintargetpwr;
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

if (NORADIO_ENAB(pi->pubpi))
return;

pi->phy_lastcal = pi->sh->now;
pi->phy_forcecal = false;
full_cal =
Expand Down Expand Up @@ -3594,9 +3565,6 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, u16 chanspec)
u8 channel = CHSPEC_CHANNEL(chanspec);
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

if (NORADIO_ENAB(pi->pubpi))
return;

if (channel == 14)
mod_phy_reg(pi, 0x448, (0x3 << 8), (2) << 8);
else
Expand Down Expand Up @@ -4444,9 +4412,6 @@ static void wlc_lcnphy_agc_temp_init(struct brcms_phy *pi)
u32 tableBuffer[2];
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

if (NORADIO_ENAB(pi->pubpi))
return;

temp = (s16) read_phy_reg(pi, 0x4df);
pi_lcn->lcnphy_ofdmgainidxtableoffset = (temp & (0xff << 0)) >> 0;

Expand Down Expand Up @@ -4497,9 +4462,6 @@ static void wlc_lcnphy_agc_temp_init(struct brcms_phy *pi)

static void wlc_lcnphy_bu_tweaks(struct brcms_phy *pi)
{
if (NORADIO_ENAB(pi->pubpi))
return;

or_phy_reg(pi, 0x805, 0x1);

mod_phy_reg(pi, 0x42f, (0x7 << 0), (0x3) << 0);
Expand Down Expand Up @@ -4623,19 +4585,13 @@ static void wlc_radio_2064_init(struct brcms_phy *pi)

static void wlc_lcnphy_radio_init(struct brcms_phy *pi)
{
if (NORADIO_ENAB(pi->pubpi))
return;

wlc_radio_2064_init(pi);
}

static void wlc_lcnphy_rcal(struct brcms_phy *pi)
{
u8 rcal_value;

if (NORADIO_ENAB(pi->pubpi))
return;

and_radio_reg(pi, RADIO_2064_REG05B, 0xfD);

or_radio_reg(pi, RADIO_2064_REG004, 0x40);
Expand Down Expand Up @@ -4665,9 +4621,6 @@ static void wlc_lcnphy_rc_cal(struct brcms_phy *pi)
u8 dflt_rc_cal_val;
u16 flt_val;

if (NORADIO_ENAB(pi->pubpi))
return;

dflt_rc_cal_val = 7;
if (LCNREV_IS(pi->pubpi.phy_rev, 1))
dflt_rc_cal_val = 11;
Expand Down Expand Up @@ -4830,8 +4783,7 @@ wlc_lcnphy_radio_2064_channel_tune_4313(struct brcms_phy *pi, u8 channel)
u8 d15, d16, f16, e44, e45;
u32 div_int, div_frac, fvco3, fpfd, fref3, fcal_div;
u16 loop_bw, d30, setCount;
if (NORADIO_ENAB(pi->pubpi))
return;

ci = &chan_info_2064_lcnphy[0];
rfpll_doubler = 1;

Expand Down Expand Up @@ -5021,8 +4973,7 @@ bool wlc_phy_attach_lcnphy(struct brcms_phy *pi)

pi_lcn = pi->u.pi_lcnphy;

if ((0 == (pi->sh->boardflags & BFL_NOPA)) &&
!NORADIO_ENAB(pi->pubpi)) {
if (0 == (pi->sh->boardflags & BFL_NOPA)) {
pi->hwpwrctrl = true;
pi->hwpwrctrl_capable = true;
}
Expand Down
Loading

0 comments on commit fdb895d

Please sign in to comment.