* [PATCH] ath9k: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/common.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index 09effde..b4424a6 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -212,7 +212,6 @@ int ath9k_cmn_rx_skb_preprocess(struct ath_common *common,
rx_status->mactime = ath9k_hw_extend_tsf(ah, rx_stats->rs_tstamp);
rx_status->band = hw->conf.channel->band;
rx_status->freq = hw->conf.channel->center_freq;
- rx_status->noise = common->ani.noise_floor;
rx_status->signal = ATH_DEFAULT_NOISE_FLOOR + rx_stats->rs_rssi;
rx_status->antenna = rx_stats->rs_antenna;
rx_status->flag |= RX_FLAG_TSFT;
--
1.6.6.1
^ permalink raw reply related
* [PATCH] p54: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/p54/txrx.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 2ceff54..4e68910 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -350,7 +350,6 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
rx_status->flag |= RX_FLAG_MMIC_ERROR;
rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi);
- rx_status->noise = priv->noise;
if (hdr->rate & 0x10)
rx_status->flag |= RX_FLAG_SHORTPRE;
if (priv->hw->conf.channel->band == IEEE80211_BAND_5GHZ)
--
1.6.6.1
^ permalink raw reply related
* [PATCH] b43: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/b43/xmit.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index eda0652..e6b0528 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -610,7 +610,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
}
/* Link quality statistics */
- status.noise = dev->stats.link_noise;
if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
// s8 rssi = max(rxhdr->power0, rxhdr->power1);
//TODO: Find out what the rssi value is (dBm or percentage?)
--
1.6.6.1
^ permalink raw reply related
* [PATCH] rt2x00: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/rt2x00/rt2x00dev.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index b93731b..33c2f5f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -434,7 +434,6 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
rx_status->mactime = rxdesc.timestamp;
rx_status->rate_idx = rate_idx;
rx_status->signal = rxdesc.rssi;
- rx_status->noise = rxdesc.noise;
rx_status->flag = rxdesc.flags;
rx_status->antenna = rt2x00dev->link.ant.active.rx;
--
1.6.6.1
^ permalink raw reply related
* [PATCH] libertas_tf: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/libertas_tf/main.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 3b1db84..a6b30d7 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -555,7 +555,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
stats.freq = priv->cur_freq;
stats.band = IEEE80211_BAND_2GHZ;
stats.signal = prxpd->snr;
- stats.noise = prxpd->nf;
/* Marvell rate index has a hole at value 4 */
if (prxpd->rx_rate > 4)
--prxpd->rx_rate;
--
1.6.6.1
^ permalink raw reply related
* [PATCH] b43legacy: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/b43legacy/xmit.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 9c8882d..7d177d9 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -548,7 +548,6 @@ void b43legacy_rx(struct b43legacy_wldev *dev,
(phystat0 & B43legacy_RX_PHYST0_OFDM),
(phystat0 & B43legacy_RX_PHYST0_GAINCTL),
(phystat3 & B43legacy_RX_PHYST3_TRSTATE));
- status.noise = dev->stats.link_noise;
/* change to support A PHY */
if (phystat0 & B43legacy_RX_PHYST0_OFDM)
status.rate_idx = b43legacy_plcp_get_bitrate_idx_ofdm(plcp, false);
--
1.6.6.1
^ permalink raw reply related
* [PATCH] MAINTAINERS: add entry for include/linux/iw_handler.h
From: John W. Linville @ 2010-04-26 20:08 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
MAINTAINERS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index c685ee2..a43a105 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3882,6 +3882,7 @@ F: net/rfkill/
F: net/wireless/
F: include/net/ieee80211*
F: include/linux/wireless.h
+F: include/linux/iw_handler.h
F: drivers/net/wireless/
NETWORKING DRIVERS
--
1.6.6.1
^ permalink raw reply related
* [PATCH] ar9170: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ar9170/main.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index fed6695..cfc6a35 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -926,7 +926,6 @@ static void ar9170_rx_phy_status(struct ar9170 *ar,
/* TODO: we could do something with phy_errors */
status->signal = ar->noise[0] + phy->rssi_combined;
- status->noise = ar->noise[0];
}
static struct sk_buff *ar9170_rx_copy_data(u8 *buf, int len)
--
1.6.6.1
^ permalink raw reply related
* [PATCH] mwl8k: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/mwl8k.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 4e58ebe..9af6c94 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -749,7 +749,6 @@ mwl8k_rxd_8366_ap_process(void *_rxd, struct ieee80211_rx_status *status,
memset(status, 0, sizeof(*status));
status->signal = -rxd->rssi;
- status->noise = -rxd->noise_floor;
if (rxd->rate & MWL8K_8366_AP_RATE_INFO_MCS_FORMAT) {
status->flag |= RX_FLAG_HT;
@@ -851,7 +850,6 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status,
memset(status, 0, sizeof(*status));
status->signal = -rxd->rssi;
- status->noise = -rxd->noise_level;
status->antenna = MWL8K_STA_RATE_INFO_ANTSELECT(rate_info);
status->rate_idx = MWL8K_STA_RATE_INFO_RATEID(rate_info);
--
1.6.6.1
^ permalink raw reply related
* [PATCH] ath5k: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath5k/base.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a49ede7..1f3e5b0 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2029,8 +2029,7 @@ accept:
rxs->freq = sc->curchan->center_freq;
rxs->band = sc->curband->band;
- rxs->noise = sc->ah->ah_noise_floor;
- rxs->signal = rxs->noise + rs.rs_rssi;
+ rxs->signal = sc->ah->ah_noise_floor + rs.rs_rssi;
rxs->antenna = rs.rs_antenna;
--
1.6.6.1
^ permalink raw reply related
* [PATCH] wl1251: remove usage of deprecated noise value
From: John W. Linville @ 2010-04-26 20:09 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/wl12xx/wl1251_rx.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_rx.c b/drivers/net/wireless/wl12xx/wl1251_rx.c
index b567322..295203a 100644
--- a/drivers/net/wireless/wl12xx/wl1251_rx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_rx.c
@@ -73,12 +73,6 @@ static void wl1251_rx_status(struct wl1251 *wl,
status->signal = desc->rssi;
- /*
- * FIXME: guessing that snr needs to be divided by two, otherwise
- * the values don't make any sense
- */
- status->noise = desc->rssi - desc->snr / 2;
-
status->freq = ieee80211_channel_to_frequency(desc->channel);
status->flag |= RX_FLAG_TSFT;
--
1.6.6.1
^ permalink raw reply related
* Re: [PATCH 6/9] rt2x00: Finish rt3070 support in rt2800 register initialization.
From: Helmut Schaa @ 2010-04-26 19:59 UTC (permalink / raw)
To: Gertjan van Wingerde
Cc: John W. Linville, Ivo van Doorn, linux-wireless, users,
Luis Correia
In-Reply-To: <4BD5EEFC.6050003@gmail.com>
Am Montag 26 April 2010 schrieb Gertjan van Wingerde:
> On 04/26/10 13:02, Helmut Schaa wrote:
> > Am Sonntag 11 April 2010 schrieb Gertjan van Wingerde:
> >> rt2x00 had preliminary support for RT3070 based devices, but the support was
> >> incomplete.
> >> Update the RT3070 register initialization to be similar to the latest Ralink
> >> vendor driver.
> >>
> >> With this patch my rt3070 based devices start showing a sign of life.
> >
> > Gertjan, this patch breaks rx on my 305x SoC device. See inline comments for
> > more details.
> >
> > [...]
> >
> >> @@ -1643,18 +1653,12 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> >> {
> >> u8 rfcsr;
> >> u8 bbp;
> >> + u32 reg;
> >> + u16 eeprom;
> >>
> >> - if (rt2x00_is_usb(rt2x00dev) &&
> >> - !rt2x00_rt_rev(rt2x00dev, RT3070, REV_RT3070E))
> >> + if (!rt2x00_rt(rt2x00dev, RT3070))
> >> return 0;
> >>
> >> - if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) {
> >> - if (!rt2x00_rf(rt2x00dev, RF3020) &&
> >> - !rt2x00_rf(rt2x00dev, RF3021) &&
> >> - !rt2x00_rf(rt2x00dev, RF3022))
> >> - return 0;
> >> - }
> >
> > Any reason why you've removed this part? The following code was executed on
> > pci and soc devices when they had an 3020, 3021 or 3022 rf.
>
> I removed it because the Ralink driver only checks for RT chipset type, not for
> the RF chipset type. Looks like that in the conversion the unmentioned RT2872
> got lost.
>
> >
> >> /*
> >> * Init RF calibration.
> >> */
> >> @@ -1665,13 +1669,13 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> >> rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 0);
> >> rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
> >>
> >> - if (rt2x00_is_usb(rt2x00dev)) {
> >> + if (rt2x00_rt(rt2x00dev, RT3070)) {
> >> rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
> >> rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
> >> rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
> >> rt2800_rfcsr_write(rt2x00dev, 7, 0x70);
> >> rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
> >> - rt2800_rfcsr_write(rt2x00dev, 10, 0x71);
> >> + rt2800_rfcsr_write(rt2x00dev, 10, 0x41);
> >> rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
> >> rt2800_rfcsr_write(rt2x00dev, 12, 0x7b);
> >> rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
> >> @@ -1684,48 +1688,25 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> >> rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
> >> rt2800_rfcsr_write(rt2x00dev, 24, 0x16);
> >> rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
> >> - rt2800_rfcsr_write(rt2x00dev, 27, 0x03);
> >> rt2800_rfcsr_write(rt2x00dev, 29, 0x1f);
> >> - } else if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) {
> >> - rt2800_rfcsr_write(rt2x00dev, 0, 0x50);
> >> - rt2800_rfcsr_write(rt2x00dev, 1, 0x01);
> >> - rt2800_rfcsr_write(rt2x00dev, 2, 0xf7);
> >> - rt2800_rfcsr_write(rt2x00dev, 3, 0x75);
> >> - rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
> >> - rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
> >> - rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
> >> - rt2800_rfcsr_write(rt2x00dev, 7, 0x50);
> >> - rt2800_rfcsr_write(rt2x00dev, 8, 0x39);
> >> - rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
> >> - rt2800_rfcsr_write(rt2x00dev, 10, 0x60);
> >> - rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
> >> - rt2800_rfcsr_write(rt2x00dev, 12, 0x75);
> >> - rt2800_rfcsr_write(rt2x00dev, 13, 0x75);
> >> - rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
> >> - rt2800_rfcsr_write(rt2x00dev, 15, 0x58);
> >> - rt2800_rfcsr_write(rt2x00dev, 16, 0xb3);
> >> - rt2800_rfcsr_write(rt2x00dev, 17, 0x92);
> >> - rt2800_rfcsr_write(rt2x00dev, 18, 0x2c);
> >> - rt2800_rfcsr_write(rt2x00dev, 19, 0x02);
> >> - rt2800_rfcsr_write(rt2x00dev, 20, 0xba);
> >> - rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
> >> - rt2800_rfcsr_write(rt2x00dev, 22, 0x00);
> >> - rt2800_rfcsr_write(rt2x00dev, 23, 0x31);
> >> - rt2800_rfcsr_write(rt2x00dev, 24, 0x08);
> >> - rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
> >> - rt2800_rfcsr_write(rt2x00dev, 26, 0x25);
> >> - rt2800_rfcsr_write(rt2x00dev, 27, 0x23);
> >> - rt2800_rfcsr_write(rt2x00dev, 28, 0x13);
> >> - rt2800_rfcsr_write(rt2x00dev, 29, 0x83);
> >
> > This part is actually needed for getting rx to work on the SoC devices.
>
> Hmm, interesting, as I don't know where this code actually came from. It isn't needed for
> PCI devices in general (at least not the PCI devices I've checked), so it may be specific to SoC.
>
> >
> > Should I post a patch that adds this code again and is only executed on SoC
> > devices with rf3020, 3021 and 3022?
> >
>
> OK. I have just checked the two RT2872 based devices I have (one PCI one and one USB one),
> and both of them act very strangely.
Strangely ;) ? The SoC device was basically able to transmit frames but
could't receive at all (at least that was my impression). Do you have a
different issue?
> I'll check against the Ralink SoC driver code that I've got as to how the initialization should actually
> be.
Ok.
Helmut
^ permalink raw reply
* Re: [PATCH] rt2x00: rt2800lib: Fix rx path on SoC devices
From: Helmut Schaa @ 2010-04-26 19:56 UTC (permalink / raw)
To: Gertjan van Wingerde; +Cc: John Linville, Ivo van Doorn, linux-wireless
In-Reply-To: <4BD5EFAC.2080504@gmail.com>
Am Montag 26 April 2010 schrieb Gertjan van Wingerde:
> On 04/26/10 13:48, Helmut Schaa wrote:
> > Restore the rfcsr initialization for RT305x SoC devices which was removed
> > by "rt2x00: Finish rt3070 support in rt2800 register initialization.".
> >
> > This fixes the rx path on SoC devices.
> >
> > Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
>
> I'm checking the Ralink code for these SoC devices. Until I've finished that I'll wait
> with giving my Ack.
Sure.
> > ---
> > drivers/net/wireless/rt2x00/rt2800lib.c | 34 ++++++++++++++++++++++++++++++-
> > 1 files changed, 33 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> > index 2648f31..1358d9a 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> > +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> > @@ -1703,7 +1703,8 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> > if (!rt2x00_rt(rt2x00dev, RT3070) &&
> > !rt2x00_rt(rt2x00dev, RT3071) &&
> > !rt2x00_rt(rt2x00dev, RT3090) &&
> > - !rt2x00_rt(rt2x00dev, RT3390))
> > + !rt2x00_rt(rt2x00dev, RT3390) &&
> > + !(rt2x00_is_soc(rt2x00dev) && rt2x00_rt(rt2x00dev, RT2872)))
> > return 0;
> >
> > /*
> > @@ -1771,6 +1772,37 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> > rt2800_rfcsr_write(rt2x00dev, 29, 0x8f);
> > rt2800_rfcsr_write(rt2x00dev, 30, 0x20);
> > rt2800_rfcsr_write(rt2x00dev, 31, 0x0f);
> > + } else if (rt2x00_rt(rt2x00dev, RT2872)) {
> > + rt2800_rfcsr_write(rt2x00dev, 0, 0x50);
> > + rt2800_rfcsr_write(rt2x00dev, 1, 0x01);
> > + rt2800_rfcsr_write(rt2x00dev, 2, 0xf7);
> > + rt2800_rfcsr_write(rt2x00dev, 3, 0x75);
> > + rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
> > + rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
> > + rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
> > + rt2800_rfcsr_write(rt2x00dev, 7, 0x50);
> > + rt2800_rfcsr_write(rt2x00dev, 8, 0x39);
> > + rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
> > + rt2800_rfcsr_write(rt2x00dev, 10, 0x60);
> > + rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
> > + rt2800_rfcsr_write(rt2x00dev, 12, 0x75);
> > + rt2800_rfcsr_write(rt2x00dev, 13, 0x75);
> > + rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
> > + rt2800_rfcsr_write(rt2x00dev, 15, 0x58);
> > + rt2800_rfcsr_write(rt2x00dev, 16, 0xb3);
> > + rt2800_rfcsr_write(rt2x00dev, 17, 0x92);
> > + rt2800_rfcsr_write(rt2x00dev, 18, 0x2c);
> > + rt2800_rfcsr_write(rt2x00dev, 19, 0x02);
> > + rt2800_rfcsr_write(rt2x00dev, 20, 0xba);
> > + rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
> > + rt2800_rfcsr_write(rt2x00dev, 22, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 23, 0x31);
> > + rt2800_rfcsr_write(rt2x00dev, 24, 0x08);
> > + rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
> > + rt2800_rfcsr_write(rt2x00dev, 26, 0x25);
> > + rt2800_rfcsr_write(rt2x00dev, 27, 0x23);
> > + rt2800_rfcsr_write(rt2x00dev, 28, 0x13);
> > + rt2800_rfcsr_write(rt2x00dev, 29, 0x83);
> > }
> >
> > if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
>
>
^ permalink raw reply
* Re: [PATCH] rt2x00: rt2800lib: Fix rx path on SoC devices
From: Gertjan van Wingerde @ 2010-04-26 19:55 UTC (permalink / raw)
To: Helmut Schaa; +Cc: John Linville, Ivo van Doorn, linux-wireless
In-Reply-To: <201004261348.45044.helmut.schaa@googlemail.com>
On 04/26/10 13:48, Helmut Schaa wrote:
> Restore the rfcsr initialization for RT305x SoC devices which was removed
> by "rt2x00: Finish rt3070 support in rt2800 register initialization.".
>
> This fixes the rx path on SoC devices.
>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
I'm checking the Ralink code for these SoC devices. Until I've finished that I'll wait
with giving my Ack.
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 34 ++++++++++++++++++++++++++++++-
> 1 files changed, 33 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 2648f31..1358d9a 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1703,7 +1703,8 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> if (!rt2x00_rt(rt2x00dev, RT3070) &&
> !rt2x00_rt(rt2x00dev, RT3071) &&
> !rt2x00_rt(rt2x00dev, RT3090) &&
> - !rt2x00_rt(rt2x00dev, RT3390))
> + !rt2x00_rt(rt2x00dev, RT3390) &&
> + !(rt2x00_is_soc(rt2x00dev) && rt2x00_rt(rt2x00dev, RT2872)))
> return 0;
>
> /*
> @@ -1771,6 +1772,37 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> rt2800_rfcsr_write(rt2x00dev, 29, 0x8f);
> rt2800_rfcsr_write(rt2x00dev, 30, 0x20);
> rt2800_rfcsr_write(rt2x00dev, 31, 0x0f);
> + } else if (rt2x00_rt(rt2x00dev, RT2872)) {
> + rt2800_rfcsr_write(rt2x00dev, 0, 0x50);
> + rt2800_rfcsr_write(rt2x00dev, 1, 0x01);
> + rt2800_rfcsr_write(rt2x00dev, 2, 0xf7);
> + rt2800_rfcsr_write(rt2x00dev, 3, 0x75);
> + rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
> + rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
> + rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
> + rt2800_rfcsr_write(rt2x00dev, 7, 0x50);
> + rt2800_rfcsr_write(rt2x00dev, 8, 0x39);
> + rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
> + rt2800_rfcsr_write(rt2x00dev, 10, 0x60);
> + rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
> + rt2800_rfcsr_write(rt2x00dev, 12, 0x75);
> + rt2800_rfcsr_write(rt2x00dev, 13, 0x75);
> + rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
> + rt2800_rfcsr_write(rt2x00dev, 15, 0x58);
> + rt2800_rfcsr_write(rt2x00dev, 16, 0xb3);
> + rt2800_rfcsr_write(rt2x00dev, 17, 0x92);
> + rt2800_rfcsr_write(rt2x00dev, 18, 0x2c);
> + rt2800_rfcsr_write(rt2x00dev, 19, 0x02);
> + rt2800_rfcsr_write(rt2x00dev, 20, 0xba);
> + rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
> + rt2800_rfcsr_write(rt2x00dev, 22, 0x00);
> + rt2800_rfcsr_write(rt2x00dev, 23, 0x31);
> + rt2800_rfcsr_write(rt2x00dev, 24, 0x08);
> + rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
> + rt2800_rfcsr_write(rt2x00dev, 26, 0x25);
> + rt2800_rfcsr_write(rt2x00dev, 27, 0x23);
> + rt2800_rfcsr_write(rt2x00dev, 28, 0x13);
> + rt2800_rfcsr_write(rt2x00dev, 29, 0x83);
> }
>
> if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
^ permalink raw reply
* Re: [PATCH 6/9] rt2x00: Finish rt3070 support in rt2800 register initialization.
From: Gertjan van Wingerde @ 2010-04-26 19:52 UTC (permalink / raw)
To: Helmut Schaa
Cc: John W. Linville, Ivo van Doorn, linux-wireless, users,
Luis Correia
In-Reply-To: <201004261302.14682.helmut.schaa@googlemail.com>
On 04/26/10 13:02, Helmut Schaa wrote:
> Am Sonntag 11 April 2010 schrieb Gertjan van Wingerde:
>> rt2x00 had preliminary support for RT3070 based devices, but the support was
>> incomplete.
>> Update the RT3070 register initialization to be similar to the latest Ralink
>> vendor driver.
>>
>> With this patch my rt3070 based devices start showing a sign of life.
>
> Gertjan, this patch breaks rx on my 305x SoC device. See inline comments for
> more details.
>
> [...]
>
>> @@ -1643,18 +1653,12 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
>> {
>> u8 rfcsr;
>> u8 bbp;
>> + u32 reg;
>> + u16 eeprom;
>>
>> - if (rt2x00_is_usb(rt2x00dev) &&
>> - !rt2x00_rt_rev(rt2x00dev, RT3070, REV_RT3070E))
>> + if (!rt2x00_rt(rt2x00dev, RT3070))
>> return 0;
>>
>> - if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) {
>> - if (!rt2x00_rf(rt2x00dev, RF3020) &&
>> - !rt2x00_rf(rt2x00dev, RF3021) &&
>> - !rt2x00_rf(rt2x00dev, RF3022))
>> - return 0;
>> - }
>
> Any reason why you've removed this part? The following code was executed on
> pci and soc devices when they had an 3020, 3021 or 3022 rf.
I removed it because the Ralink driver only checks for RT chipset type, not for
the RF chipset type. Looks like that in the conversion the unmentioned RT2872
got lost.
>
>> /*
>> * Init RF calibration.
>> */
>> @@ -1665,13 +1669,13 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
>> rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 0);
>> rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
>>
>> - if (rt2x00_is_usb(rt2x00dev)) {
>> + if (rt2x00_rt(rt2x00dev, RT3070)) {
>> rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
>> rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
>> rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
>> rt2800_rfcsr_write(rt2x00dev, 7, 0x70);
>> rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
>> - rt2800_rfcsr_write(rt2x00dev, 10, 0x71);
>> + rt2800_rfcsr_write(rt2x00dev, 10, 0x41);
>> rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
>> rt2800_rfcsr_write(rt2x00dev, 12, 0x7b);
>> rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
>> @@ -1684,48 +1688,25 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
>> rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
>> rt2800_rfcsr_write(rt2x00dev, 24, 0x16);
>> rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
>> - rt2800_rfcsr_write(rt2x00dev, 27, 0x03);
>> rt2800_rfcsr_write(rt2x00dev, 29, 0x1f);
>> - } else if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) {
>> - rt2800_rfcsr_write(rt2x00dev, 0, 0x50);
>> - rt2800_rfcsr_write(rt2x00dev, 1, 0x01);
>> - rt2800_rfcsr_write(rt2x00dev, 2, 0xf7);
>> - rt2800_rfcsr_write(rt2x00dev, 3, 0x75);
>> - rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
>> - rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
>> - rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
>> - rt2800_rfcsr_write(rt2x00dev, 7, 0x50);
>> - rt2800_rfcsr_write(rt2x00dev, 8, 0x39);
>> - rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
>> - rt2800_rfcsr_write(rt2x00dev, 10, 0x60);
>> - rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
>> - rt2800_rfcsr_write(rt2x00dev, 12, 0x75);
>> - rt2800_rfcsr_write(rt2x00dev, 13, 0x75);
>> - rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
>> - rt2800_rfcsr_write(rt2x00dev, 15, 0x58);
>> - rt2800_rfcsr_write(rt2x00dev, 16, 0xb3);
>> - rt2800_rfcsr_write(rt2x00dev, 17, 0x92);
>> - rt2800_rfcsr_write(rt2x00dev, 18, 0x2c);
>> - rt2800_rfcsr_write(rt2x00dev, 19, 0x02);
>> - rt2800_rfcsr_write(rt2x00dev, 20, 0xba);
>> - rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
>> - rt2800_rfcsr_write(rt2x00dev, 22, 0x00);
>> - rt2800_rfcsr_write(rt2x00dev, 23, 0x31);
>> - rt2800_rfcsr_write(rt2x00dev, 24, 0x08);
>> - rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
>> - rt2800_rfcsr_write(rt2x00dev, 26, 0x25);
>> - rt2800_rfcsr_write(rt2x00dev, 27, 0x23);
>> - rt2800_rfcsr_write(rt2x00dev, 28, 0x13);
>> - rt2800_rfcsr_write(rt2x00dev, 29, 0x83);
>
> This part is actually needed for getting rx to work on the SoC devices.
Hmm, interesting, as I don't know where this code actually came from. It isn't needed for
PCI devices in general (at least not the PCI devices I've checked), so it may be specific to SoC.
>
> Should I post a patch that adds this code again and is only executed on SoC
> devices with rf3020, 3021 and 3022?
>
OK. I have just checked the two RT2872 based devices I have (one PCI one and one USB one),
and both of them act very strangely.
I'll check against the Ralink SoC driver code that I've got as to how the initialization should actually
be.
---
Gertjan.
^ permalink raw reply
* Re: [PATCH PING] ssb patches for SPROM location
From: Rafał Miłecki @ 2010-04-26 19:49 UTC (permalink / raw)
To: John W. Linville; +Cc: Larry Finger, linux-wireless
In-Reply-To: <20100426190911.GH2387@tuxdriver.com>
2010/4/26 John W. Linville <linville@tuxdriver.com>:
> On Mon, Apr 26, 2010 at 02:04:03PM -0500, Larry Finger wrote:
>> On 04/26/2010 01:33 PM, Rafał Miłecki wrote:
>> > 2010/4/26 John W. Linville <linville@tuxdriver.com>:
>
>> >> FWIW, this patch series also still results in a hang on my problematic
>> >> netbook. I'm going to merge them anyway, in hopes that they make
>> >> things better for someone (or at least get us closer to it). I'll try
>> >> to pinpoint this hang as well.
>> >
>> > Did it actually pick another (newly discovered) offset for SPROM
>> > location in your case? Could you add some single printk to check this?
>>
>> My suggestion is that for now we only implement John's patch for no
>> SPROM. I am hoping that we try to fix the failures for boxes with the
>> SPROM in a normal location. Once we do that, there will be a simpler fix
>> for testing at the alternate location. The patch will all be contained
>> in sprom_do_read().
>
> Hmmm...well, I just pushed (just to my public trees, not to Dave)
> Rafał's trio of patches on top of mine. Should I revert them?
AFAIU so far we didn't have any confirmation that it actually fixes
anything. Don't know... maybe it would be better to wait for any
successful feedback? I don't 100% know patches rules, let you decide.
In case we decide to implement that letter, it should be easy to
rebase patches.
> P.S. With those patches, this box (soon to be Larry's) still uses
> an sprom_offset value of 0x1000.
Hm, so it looks like you device doesn't match our "if (version)"
condition... It's just a blind guess, but maybe it would be worth to
*force* other SPROM location on your machine? It seems quite proven
that reading some incorrect registers (in this case incorrect SPROM
location) can cause lock up. Of course it's just my guess, assuming
you have other SPROM location, lock up is caused by reading wrong
register and that Larry's condition in incorrect/not full. However if
you're gonna to send whole machine to Larry, it sounds worthy to check
this trick.
--
Rafał
^ permalink raw reply
* Re: [PATCH] rt2x00: rt2800lib: Remove redundant check for RT2872
From: Gertjan van Wingerde @ 2010-04-26 19:44 UTC (permalink / raw)
To: Helmut Schaa, John Linville; +Cc: Ivo van Doorn, linux-wireless
In-Reply-To: <201004261350.27212.helmut.schaa@googlemail.com>
On 04/26/10 13:50, Helmut Schaa wrote:
> Remove redundant check for RT2872.
>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 1358d9a..b30d59c 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -2018,7 +2018,6 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word);
> } else if (rt2x00_rt(rt2x00dev, RT2860) ||
> rt2x00_rt(rt2x00dev, RT2870) ||
> - rt2x00_rt(rt2x00dev, RT2872) ||
> rt2x00_rt(rt2x00dev, RT2872)) {
> /*
> * There is a max of 2 RX streams for RT28x0 series
^ permalink raw reply
* Re: [PATCH PING] ssb patches for SPROM location
From: John W. Linville @ 2010-04-26 19:09 UTC (permalink / raw)
To: Larry Finger; +Cc: Rafał Miłecki, linux-wireless
In-Reply-To: <4BD5E3A3.4050907@lwfinger.net>
On Mon, Apr 26, 2010 at 02:04:03PM -0500, Larry Finger wrote:
> On 04/26/2010 01:33 PM, Rafał Miłecki wrote:
> > 2010/4/26 John W. Linville <linville@tuxdriver.com>:
> >> FWIW, this patch series also still results in a hang on my problematic
> >> netbook. I'm going to merge them anyway, in hopes that they make
> >> things better for someone (or at least get us closer to it). I'll try
> >> to pinpoint this hang as well.
> >
> > Did it actually pick another (newly discovered) offset for SPROM
> > location in your case? Could you add some single printk to check this?
>
> My suggestion is that for now we only implement John's patch for no
> SPROM. I am hoping that we try to fix the failures for boxes with the
> SPROM in a normal location. Once we do that, there will be a simpler fix
> for testing at the alternate location. The patch will all be contained
> in sprom_do_read().
Hmmm...well, I just pushed (just to my public trees, not to Dave)
Rafał's trio of patches on top of mine. Should I revert them?
John
P.S. With those patches, this box (soon to be Larry's) still uses
an sprom_offset value of 0x1000.
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [PATCH 11/13] ath9k_hw: Fix endian bug in an AR9003 EEPROM field
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25dd44d..8a79550 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -659,6 +659,9 @@ static void ar9300_swap_eeprom(struct ar9300_eeprom *eep)
word = swab16(eep->baseEepHeader.regDmn[1]);
eep->baseEepHeader.regDmn[1] = word;
+ dword = swab32(eep->baseEepHeader.swreg);
+ eep->baseEepHeader.swreg = dword;
+
dword = swab32(eep->modalHeader2G.antCtrlCommon);
eep->modalHeader2G.antCtrlCommon = dword;
--
1.6.3.3
^ permalink raw reply related
* [PATCH 12/13] ath9k_hw: fix noisefloor timeout handling on AR9003
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
When the noisefloor calibration times out, do not load -50 into
the registers, since this might cause rx issues. Instead, leave
enough time for the noise floor calibration to complete until
the next check.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 806f4a5..80431a2 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1093,6 +1093,7 @@ static void ar9003_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
ath_print(common, ATH_DBG_ANY, "Timeout while waiting for nf "
"to load: AR_PHY_AGC_CONTROL=0x%x\n",
REG_READ(ah, AR_PHY_AGC_CONTROL));
+ return;
}
/*
--
1.6.3.3
^ permalink raw reply related
* [PATCH 01/13] ath9k_hw: update initvals for AR9003
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau, Luis R. Rodriguez
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
This synchs up the initvals to the values used on the
Atheros HAL for AR9003. This specific change adds support
for a new high power module.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/ar9003_initvals.h | 265 +++++++++++-----------
1 files changed, 128 insertions(+), 137 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_initvals.h
index e0391b1..a131cd1 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_initvals.h
@@ -31,7 +31,7 @@ static const u32 ar9300_2p0_radio_postamble[][5] = {
static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p0[][5] = {
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
- {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da},
+ {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
{0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
@@ -545,7 +545,7 @@ static const u32 ar9300_2p0_soc_postamble[][5] = {
};
static const u32 ar9200_merlin_2p0_radio_core[][2] = {
- /* Addr common */
+ /* Addr allmodes */
{0x00007800, 0x00040000},
{0x00007804, 0xdb005012},
{0x00007808, 0x04924914},
@@ -835,71 +835,71 @@ static const u32 ar9300_2p0_baseband_core[][2] = {
static const u32 ar9300Modes_high_power_tx_gain_table_2p0[][5] = {
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
- {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da},
+ {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000},
{0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002},
- {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004},
- {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200},
- {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202},
- {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400},
- {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402},
- {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404},
- {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603},
- {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02},
- {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04},
- {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20},
- {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20},
- {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22},
- {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24},
- {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640},
- {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660},
- {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861},
- {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81},
- {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83},
- {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84},
- {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3},
- {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5},
- {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9},
- {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb},
- {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
+ {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
+ {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
+ {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
+ {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
+ {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
+ {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
+ {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
+ {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
+ {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
+ {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
+ {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20},
+ {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22},
+ {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24},
+ {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640},
+ {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660},
+ {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861},
+ {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81},
+ {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83},
+ {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84},
+ {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3},
+ {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5},
+ {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9},
+ {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb},
+ {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec},
+ {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec},
+ {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
{0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000},
{0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002},
- {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004},
- {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200},
- {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202},
- {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400},
- {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402},
- {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404},
- {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603},
- {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02},
- {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04},
- {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20},
- {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20},
- {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22},
- {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24},
- {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640},
- {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660},
- {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861},
- {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81},
- {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83},
- {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84},
- {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3},
- {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5},
- {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9},
- {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb},
- {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
+ {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004},
+ {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200},
+ {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202},
+ {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400},
+ {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402},
+ {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404},
+ {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603},
+ {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02},
+ {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04},
+ {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20},
+ {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20},
+ {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22},
+ {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24},
+ {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640},
+ {0x0000a5c0, 0x4c8a3065, 0x44883e46, 0x44883e46, 0x38801660},
+ {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861},
+ {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81},
+ {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83},
+ {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84},
+ {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3},
+ {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5},
+ {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9},
+ {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb},
+ {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec},
+ {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec},
+ {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
{0x00016044, 0x056db2e6, 0x056db2e6, 0x056db2e6, 0x056db2e6},
{0x00016048, 0xad241a61, 0xad241a61, 0xad241a61, 0xad241a61},
{0x00016068, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c},
@@ -913,71 +913,71 @@ static const u32 ar9300Modes_high_power_tx_gain_table_2p0[][5] = {
static const u32 ar9300Modes_high_ob_db_tx_gain_table_2p0[][5] = {
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
- {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da},
+ {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000},
{0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002},
- {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004},
- {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200},
- {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202},
- {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400},
- {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402},
- {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404},
- {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603},
- {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02},
- {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04},
- {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20},
- {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20},
- {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22},
- {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24},
- {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640},
- {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660},
- {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861},
- {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81},
- {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83},
- {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84},
- {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3},
- {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5},
- {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9},
- {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb},
- {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
- {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
+ {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
+ {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
+ {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
+ {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
+ {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
+ {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
+ {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
+ {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
+ {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
+ {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
+ {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20},
+ {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22},
+ {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24},
+ {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640},
+ {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660},
+ {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861},
+ {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81},
+ {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83},
+ {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84},
+ {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3},
+ {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5},
+ {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9},
+ {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb},
+ {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec},
+ {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec},
+ {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
+ {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
{0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000},
{0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002},
- {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004},
- {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200},
- {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202},
- {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400},
- {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402},
- {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404},
- {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603},
- {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02},
- {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04},
- {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20},
- {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20},
- {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22},
- {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24},
- {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640},
- {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660},
- {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861},
- {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81},
- {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83},
- {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84},
- {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3},
- {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5},
- {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9},
- {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb},
- {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
- {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
+ {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004},
+ {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200},
+ {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202},
+ {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400},
+ {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402},
+ {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404},
+ {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603},
+ {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02},
+ {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04},
+ {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20},
+ {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20},
+ {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22},
+ {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24},
+ {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640},
+ {0x0000a5c0, 0x44883e46, 0x44883e46, 0x38801660, 0x38801660},
+ {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861},
+ {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81},
+ {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83},
+ {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84},
+ {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3},
+ {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5},
+ {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9},
+ {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb},
+ {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec},
+ {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec},
+ {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
+ {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
{0x00016044, 0x056db2e4, 0x056db2e4, 0x056db2e4, 0x056db2e4},
{0x00016048, 0x8c001a61, 0x8c001a61, 0x8c001a61, 0x8c001a61},
{0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
@@ -1251,7 +1251,7 @@ static const u32 ar9300Common_rx_gain_table_2p0[][2] = {
static const u32 ar9300Modes_low_ob_db_tx_gain_table_2p0[][5] = {
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
- {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da},
+ {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
{0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
@@ -1760,31 +1760,22 @@ static const u32 ar9300_2p0_soc_preamble[][2] = {
{0x00007038, 0x000004c2},
};
-/*
- * PCIE-PHY programming array, to be used prior to entering
- * full sleep (holding RTC in reset, PLL is ON in L1 mode)
- */
static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p0[][2] = {
+ /* Addr allmodes */
{0x00004040, 0x08212e5e},
{0x00004040, 0x0008003b},
{0x00004044, 0x00000000},
};
-/*
- * PCIE-PHY programming array, to be used when not in
- * full sleep (holding RTC in reset)
- */
static const u32 ar9300PciePhy_clkreq_enable_L1_2p0[][2] = {
+ /* Addr allmodes */
{0x00004040, 0x08253e5e},
{0x00004040, 0x0008003b},
{0x00004044, 0x00000000},
};
-/*
- * PCIE-PHY programming array, to be used prior to entering
- * full sleep (holding RTC in reset)
- */
static const u32 ar9300PciePhy_clkreq_disable_L1_2p0[][2] = {
+ /* Addr allmodes */
{0x00004040, 0x08213e5e},
{0x00004040, 0x0008003b},
{0x00004044, 0x00000000},
--
1.6.3.3
^ permalink raw reply related
* [PATCH 13/13] ath9k_hw: Fix TX interrupt mitigation settings
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
TX interrupt mitigation reduces the number of interrupts
by addressing several interrupt actions (AR_IMR_TXOK,
AR_IMR_TXDESC) all in one interrupt so when enabling
it discard setting the other interrupts.
Without this TX interrupt mitigation would actually
increase the number of interrupts two-fold. We still
leave TX interrupt mitigation disabled as it is still
being tested.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/mac.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 7bbf502..0e425cb 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -878,10 +878,12 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah,
if (ints & ATH9K_INT_TX) {
if (ah->config.tx_intr_mitigation)
mask |= AR_IMR_TXMINTR | AR_IMR_TXINTM;
- if (ah->txok_interrupt_mask)
- mask |= AR_IMR_TXOK;
- if (ah->txdesc_interrupt_mask)
- mask |= AR_IMR_TXDESC;
+ else {
+ if (ah->txok_interrupt_mask)
+ mask |= AR_IMR_TXOK;
+ if (ah->txdesc_interrupt_mask)
+ mask |= AR_IMR_TXDESC;
+ }
if (ah->txerr_interrupt_mask)
mask |= AR_IMR_TXERR;
if (ah->txeol_interrupt_mask)
--
1.6.3.3
^ permalink raw reply related
* [PATCH 10/13] ath9k_hw: Fix typos in tx rate power level parsing for AR9003
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 79b0e28..25dd44d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -1200,7 +1200,7 @@ static u8 ar9003_hw_eeprom_get_tgt_pwr(struct ath_hw *ah,
u8 *pFreqBin;
if (is2GHz) {
- numPiers = AR9300_NUM_5G_20_TARGET_POWERS;
+ numPiers = AR9300_NUM_2G_20_TARGET_POWERS;
pEepromTargetPwr = eep->calTargetPower2G;
pFreqBin = eep->calTarget_freqbin_2G;
} else {
@@ -1236,7 +1236,7 @@ static u8 ar9003_hw_eeprom_get_ht20_tgt_pwr(struct ath_hw *ah,
u8 *pFreqBin;
if (is2GHz) {
- numPiers = AR9300_NUM_5G_20_TARGET_POWERS;
+ numPiers = AR9300_NUM_2G_20_TARGET_POWERS;
pEepromTargetPwr = eep->calTargetPower2GHT20;
pFreqBin = eep->calTarget_freqbin_2GHT20;
} else {
--
1.6.3.3
^ permalink raw reply related
* [PATCH 07/13] ath9k_hw: fix fast clock handling for 5GHz channels
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
Combine multiple checks that were supposed to check for the same
conditions, but didn't. Always enable fast PLL clock on AR9280 2.0
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 5 ++---
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 16 ++++++----------
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 ++--
drivers/net/wireless/ath/ath9k/hw.c | 8 ++++++--
drivers/net/wireless/ath/ath9k/hw.h | 5 ++---
5 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 3395ac4..c594814 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -852,7 +852,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
REG_WRITE_ARRAY(&ah->iniBB_RfGain, freqIndex, regWrites);
- if (AR_SREV_9280_20(ah) && IS_CHAN_A_5MHZ_SPACED(chan)) {
+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) {
REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex,
regWrites);
}
@@ -894,8 +894,7 @@ static void ar5008_hw_set_rfmode(struct ath_hw *ah, struct ath9k_channel *chan)
rfMode |= (IS_CHAN_5GHZ(chan)) ?
AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ;
- if ((AR_SREV_9280_20(ah) || AR_SREV_9300_20_OR_LATER(ah))
- && IS_CHAN_A_5MHZ_SPACED(chan))
+ if (IS_CHAN_A_FAST_CLOCK(ah, chan))
rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE);
REG_WRITE(ah, AR_PHY_MODE, rfMode);
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
index 18cfe1a..ed314e8 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
@@ -455,16 +455,12 @@ static u32 ar9002_hw_compute_pll_control(struct ath_hw *ah,
pll |= SM(0x2, AR_RTC_9160_PLL_CLKSEL);
if (chan && IS_CHAN_5GHZ(chan)) {
- pll |= SM(0x28, AR_RTC_9160_PLL_DIV);
-
-
- if (AR_SREV_9280_20(ah)) {
- if (((chan->channel % 20) == 0)
- || ((chan->channel % 10) == 0))
- pll = 0x2850;
- else
- pll = 0x142c;
- }
+ if (IS_CHAN_A_FAST_CLOCK(ah, chan))
+ pll = 0x142c;
+ else if (AR_SREV_9280_20(ah))
+ pll = 0x2850;
+ else
+ pll |= SM(0x28, AR_RTC_9160_PLL_DIV);
} else {
pll |= SM(0x2c, AR_RTC_9160_PLL_DIV);
}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index bf8ec68..806f4a5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -583,7 +583,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
* For 5GHz channels requiring Fast Clock, apply
* different modal values.
*/
- if (IS_CHAN_A_5MHZ_SPACED(chan))
+ if (IS_CHAN_A_FAST_CLOCK(ah, chan))
REG_WRITE_ARRAY(&ah->iniModesAdditional,
modesIndex, regWrites);
@@ -613,7 +613,7 @@ static void ar9003_hw_set_rfmode(struct ath_hw *ah,
rfMode |= (IS_CHAN_B(chan) || IS_CHAN_G(chan))
? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM;
- if (IS_CHAN_A_5MHZ_SPACED(chan))
+ if (IS_CHAN_A_FAST_CLOCK(ah, chan))
rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE);
REG_WRITE(ah, AR_PHY_MODE, rfMode);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index ca676cd..2db3ecd 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1232,8 +1232,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
(chan->channel != ah->curchan->channel) &&
((chan->channelFlags & CHANNEL_ALL) ==
(ah->curchan->channelFlags & CHANNEL_ALL)) &&
- !(AR_SREV_9280(ah) || IS_CHAN_A_5MHZ_SPACED(chan) ||
- IS_CHAN_A_5MHZ_SPACED(ah->curchan))) {
+ !AR_SREV_9280(ah)) {
if (ath9k_hw_channel_change(ah, chan)) {
ath9k_hw_loadnf(ah, ah->curchan);
@@ -2206,6 +2205,11 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
pCap->txs_len = sizeof(struct ar9003_txs);
} else {
pCap->tx_desc_len = sizeof(struct ath_desc);
+ if (AR_SREV_9280_20(ah) &&
+ ((ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) <=
+ AR5416_EEP_MINOR_VER_16) ||
+ ah->eep_ops->get_eeprom(ah, EEP_FSTCLK_5G)))
+ pCap->hw_caps |= ATH9K_HW_CAP_FASTCLOCK;
}
if (AR_SREV_9300_20_OR_LATER(ah))
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7a1347b..bc682da 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -369,10 +369,9 @@ struct ath9k_channel {
#define IS_CHAN_2GHZ(_c) (((_c)->channelFlags & CHANNEL_2GHZ) != 0)
#define IS_CHAN_HALF_RATE(_c) (((_c)->channelFlags & CHANNEL_HALF) != 0)
#define IS_CHAN_QUARTER_RATE(_c) (((_c)->channelFlags & CHANNEL_QUARTER) != 0)
-#define IS_CHAN_A_5MHZ_SPACED(_c) \
+#define IS_CHAN_A_FAST_CLOCK(_ah, _c) \
((((_c)->channelFlags & CHANNEL_5GHZ) != 0) && \
- (((_c)->channel % 20) != 0) && \
- (((_c)->channel % 10) != 0))
+ ((_ah)->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK))
/* These macros check chanmode and not channelFlags */
#define IS_CHAN_B(_c) ((_c)->chanmode == CHANNEL_B)
--
1.6.3.3
^ permalink raw reply related
* [PATCH 03/13] ath9k_hw: fix typo in the AR9003 EEPROM data structure definition
From: Luis R. Rodriguez @ 2010-04-26 19:04 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Felix Fietkau
In-Reply-To: <1272308681-32396-1-git-send-email-lrodriguez@atheros.com>
From: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
index 5fe335e..d8c0318 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
@@ -265,7 +265,7 @@ struct cal_ctl_edge_pwr {
} __packed;
struct cal_ctl_data_2g {
- struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_5G];
+ struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_2G];
} __packed;
struct cal_ctl_data_5g {
--
1.6.3.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox