* [PATCH 07/12] ath9k: Do a full reset for AR9280
From: Sujith @ 2009-09-17 3:57 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
AR9280 requires a full reset during channel change and HW reset.
Currently, a fast channel change is done. This patch fixes
this bug.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 2c904c6..323df96 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2366,8 +2366,8 @@ 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) || IS_CHAN_A_5MHZ_SPACED(chan) ||
+ IS_CHAN_A_5MHZ_SPACED(ah->curchan))) {
if (ath9k_hw_channel_change(ah, chan, sc->tx_chan_width)) {
ath9k_hw_loadnf(ah, ah->curchan);
--
1.6.4.3
^ permalink raw reply related
* [PATCH 06/12] ath9k: Don't read NF when chip has gone through full sleep mode
From: Sujith @ 2009-09-17 3:56 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
NF value may be incorrect when we read it just after the chip
has gone through a full sleep mode. Reading incorrect NF values
affects RX throughput.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4731ad2..2c904c6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2357,7 +2357,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
return -EIO;
- if (curchan)
+ if (curchan && !ah->chip_fullsleep)
ath9k_hw_getnf(ah, curchan);
if (bChannelChange &&
--
1.6.4.3
^ permalink raw reply related
* [PATCH 05/12] ath9k: Fix rx data corruption
From: Sujith @ 2009-09-17 3:56 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Setting bit 20 and 25 of 0x8344 can cause occasional rx data
corruption, clear them to fix this issue.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index af5bb50..4731ad2 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1273,6 +1273,15 @@ static void ath9k_hw_override_ini(struct ath_hw *ah,
*/
REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));
+ if (AR_SREV_9280_10_OR_LATER(ah)) {
+ val = REG_READ(ah, AR_PCU_MISC_MODE2) &
+ (~AR_PCU_MISC_MODE2_HWWAR1);
+
+ if (AR_SREV_9287_10_OR_LATER(ah))
+ val = val & (~AR_PCU_MISC_MODE2_HWWAR2);
+
+ REG_WRITE(ah, AR_PCU_MISC_MODE2, val);
+ }
if (!AR_SREV_5416_20_OR_LATER(ah) ||
AR_SREV_9280_10_OR_LATER(ah))
--
1.6.4.3
^ permalink raw reply related
* [PATCH 04/12] ath9k: Fix chip wakeup issue
From: Sujith @ 2009-09-17 3:55 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Waking up the chip after powering it down fails sometimes.
In this case the CPU is locked for 200ms. Reduce this
interval to 10ms to avoid excessive busy looping.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 75c3041..b892345 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -106,7 +106,7 @@
#define AH_TSF_WRITE_TIMEOUT 100 /* (us) */
#define AH_TIME_QUANTUM 10
#define AR_KEYTABLE_SIZE 128
-#define POWER_UP_TIME 200000
+#define POWER_UP_TIME 10000
#define SPUR_RSSI_THRESH 40
#define CAB_TIMEOUT_VAL 10
--
1.6.4.3
^ permalink raw reply related
* [PATCH 03/12] ath9k: Restore TSF after RESET
From: Sujith @ 2009-09-17 3:55 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
For chips requiring RTC reset, TSF has to be restored
after power on reset.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 82a2440..af5bb50 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2338,6 +2338,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_channel *curchan = ah->curchan;
u32 saveDefAntenna;
u32 macStaId1;
+ u64 tsf = 0;
int i, rx_chainmask, r;
ah->extprotspacing = sc->ht_extprotspacing;
@@ -2372,6 +2373,10 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
macStaId1 = REG_READ(ah, AR_STA_ID1) & AR_STA_ID1_BASE_RATE_11B;
+ /* For chips on which RTC reset is done, save TSF before it gets cleared */
+ if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
+ tsf = ath9k_hw_gettsf64(ah);
+
saveLedState = REG_READ(ah, AR_CFG_LED) &
(AR_CFG_LED_ASSOC_CTL | AR_CFG_LED_MODE_SEL |
AR_CFG_LED_BLINK_THRESH_SEL | AR_CFG_LED_BLINK_SLOW);
@@ -2398,6 +2403,10 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
udelay(50);
}
+ /* Restore TSF */
+ if (tsf && AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
+ ath9k_hw_settsf64(ah, tsf);
+
if (AR_SREV_9280_10_OR_LATER(ah))
REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
--
1.6.4.3
^ permalink raw reply related
* [PATCH 02/12] ath9k: Revamp PCIE workarounds
From: Sujith @ 2009-09-17 3:54 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vivek Natarajan <vnatarajan@atheros.com>
* Disable L1 state ONLY when device is in D3 mode.
* Clear bit 22 of register 0x4004.
* Handle power on/off properly
Not setting the workarounds properly resulted in the
disappearance of the card in certain cases.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 162 +++++++++++++++++++-------------
drivers/net/wireless/ath/ath9k/hw.h | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 8 +-
drivers/net/wireless/ath/ath9k/reg.h | 3 +-
4 files changed, 103 insertions(+), 72 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index b6c6cca..82a2440 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -965,7 +965,7 @@ int ath9k_hw_init(struct ath_hw *ah)
ath9k_hw_init_mode_regs(ah);
if (ah->is_pciexpress)
- ath9k_hw_configpcipowersave(ah, 0);
+ ath9k_hw_configpcipowersave(ah, 0, 0);
else
ath9k_hw_disablepcie(ah);
@@ -3005,9 +3005,10 @@ void ath9k_ps_restore(struct ath_softc *sc)
* Programming the SerDes must go through the same 288 bit serial shift
* register as the other analog registers. Hence the 9 writes.
*/
-void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore)
+void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off)
{
u8 i;
+ u32 val;
if (ah->is_pciexpress != true)
return;
@@ -3017,84 +3018,113 @@ void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore)
return;
/* Nothing to do on restore for 11N */
- if (restore)
- return;
-
- if (AR_SREV_9280_20_OR_LATER(ah)) {
- /*
- * AR9280 2.0 or later chips use SerDes values from the
- * initvals.h initialized depending on chipset during
- * ath9k_hw_init()
- */
- for (i = 0; i < ah->iniPcieSerdes.ia_rows; i++) {
- REG_WRITE(ah, INI_RA(&ah->iniPcieSerdes, i, 0),
- INI_RA(&ah->iniPcieSerdes, i, 1));
- }
- } else if (AR_SREV_9280(ah) &&
- (ah->hw_version.macRev == AR_SREV_REVISION_9280_10)) {
- REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fd00);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
+ if (!restore) {
+ if (AR_SREV_9280_20_OR_LATER(ah)) {
+ /*
+ * AR9280 2.0 or later chips use SerDes values from the
+ * initvals.h initialized depending on chipset during
+ * ath9k_hw_init()
+ */
+ for (i = 0; i < ah->iniPcieSerdes.ia_rows; i++) {
+ REG_WRITE(ah, INI_RA(&ah->iniPcieSerdes, i, 0),
+ INI_RA(&ah->iniPcieSerdes, i, 1));
+ }
+ } else if (AR_SREV_9280(ah) &&
+ (ah->hw_version.macRev == AR_SREV_REVISION_9280_10)) {
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fd00);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
+
+ /* RX shut off when elecidle is asserted */
+ REG_WRITE(ah, AR_PCIE_SERDES, 0xa8000019);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x13160820);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0xe5980560);
+
+ /* Shut off CLKREQ active in L1 */
+ if (ah->config.pcie_clock_req)
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x401deffc);
+ else
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x401deffd);
- /* RX shut off when elecidle is asserted */
- REG_WRITE(ah, AR_PCIE_SERDES, 0xa8000019);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x13160820);
- REG_WRITE(ah, AR_PCIE_SERDES, 0xe5980560);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x00043007);
- /* Shut off CLKREQ active in L1 */
- if (ah->config.pcie_clock_req)
- REG_WRITE(ah, AR_PCIE_SERDES, 0x401deffc);
- else
- REG_WRITE(ah, AR_PCIE_SERDES, 0x401deffd);
+ /* Load the new settings */
+ REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
- REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x00043007);
+ } else {
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
- /* Load the new settings */
- REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
+ /* RX shut off when elecidle is asserted */
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x28000039);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x53160824);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0xe5980579);
- } else {
- REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
+ /*
+ * Ignore ah->ah_config.pcie_clock_req setting for
+ * pre-AR9280 11n
+ */
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x001defff);
- /* RX shut off when elecidle is asserted */
- REG_WRITE(ah, AR_PCIE_SERDES, 0x28000039);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x53160824);
- REG_WRITE(ah, AR_PCIE_SERDES, 0xe5980579);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
+ REG_WRITE(ah, AR_PCIE_SERDES, 0x000e3007);
- /*
- * Ignore ah->ah_config.pcie_clock_req setting for
- * pre-AR9280 11n
- */
- REG_WRITE(ah, AR_PCIE_SERDES, 0x001defff);
+ /* Load the new settings */
+ REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
+ }
- REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
- REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
- REG_WRITE(ah, AR_PCIE_SERDES, 0x000e3007);
+ udelay(1000);
- /* Load the new settings */
- REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
- }
+ /* set bit 19 to allow forcing of pcie core into L1 state */
+ REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA);
- udelay(1000);
+ /* Several PCIe massages to ensure proper behaviour */
+ if (ah->config.pcie_waen) {
+ val = ah->config.pcie_waen;
+ if (!power_off)
+ val &= (~AR_WA_D3_L1_DISABLE);
+ } else {
+ if (AR_SREV_9285(ah) || AR_SREV_9271(ah) ||
+ AR_SREV_9287(ah)) {
+ val = AR9285_WA_DEFAULT;
+ if (!power_off)
+ val &= (~AR_WA_D3_L1_DISABLE);
+ } else if (AR_SREV_9280(ah)) {
+ /*
+ * On AR9280 chips bit 22 of 0x4004 needs to be
+ * set otherwise card may disappear.
+ */
+ val = AR9280_WA_DEFAULT;
+ if (!power_off)
+ val &= (~AR_WA_D3_L1_DISABLE);
+ } else
+ val = AR_WA_DEFAULT;
+ }
- /* set bit 19 to allow forcing of pcie core into L1 state */
- REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA);
+ REG_WRITE(ah, AR_WA, val);
+ }
- /* Several PCIe massages to ensure proper behaviour */
- if (ah->config.pcie_waen) {
- REG_WRITE(ah, AR_WA, ah->config.pcie_waen);
- } else {
- if (AR_SREV_9285(ah) || AR_SREV_9271(ah) || AR_SREV_9287(ah))
- REG_WRITE(ah, AR_WA, AR9285_WA_DEFAULT);
+ if (power_off) {
/*
- * On AR9280 chips bit 22 of 0x4004 needs to be set to
- * otherwise card may disappear.
+ * Set PCIe workaround bits
+ * bit 14 in WA register (disable L1) should only
+ * be set when device enters D3 and be cleared
+ * when device comes back to D0.
*/
- else if (AR_SREV_9280(ah))
- REG_WRITE(ah, AR_WA, AR9280_WA_DEFAULT);
- else
- REG_WRITE(ah, AR_WA, AR_WA_DEFAULT);
+ if (ah->config.pcie_waen) {
+ if (ah->config.pcie_waen & AR_WA_D3_L1_DISABLE)
+ REG_SET_BIT(ah, AR_WA, AR_WA_D3_L1_DISABLE);
+ } else {
+ if (((AR_SREV_9285(ah) || AR_SREV_9271(ah) ||
+ AR_SREV_9287(ah)) &&
+ (AR9285_WA_DEFAULT & AR_WA_D3_L1_DISABLE)) ||
+ (AR_SREV_9280(ah) &&
+ (AR9280_WA_DEFAULT & AR_WA_D3_L1_DISABLE))) {
+ REG_SET_BIT(ah, AR_WA, AR_WA_D3_L1_DISABLE);
+ }
+ }
}
}
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 9106a0b..75c3041 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -650,7 +650,7 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
const struct ath9k_beacon_state *bs);
bool ath9k_hw_setpower(struct ath_hw *ah,
enum ath9k_power_mode mode);
-void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore);
+void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off);
/* Interrupt Handling */
bool ath9k_hw_intrpend(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3dc7b5a..5055f18 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1131,7 +1131,7 @@ void ath_radio_enable(struct ath_softc *sc)
int r;
ath9k_ps_wakeup(sc);
- ath9k_hw_configpcipowersave(ah, 0);
+ ath9k_hw_configpcipowersave(ah, 0, 0);
if (!ah->curchan)
ah->curchan = ath_get_curchannel(sc, sc->hw);
@@ -1202,7 +1202,7 @@ void ath_radio_disable(struct ath_softc *sc)
spin_unlock_bh(&sc->sc_resetlock);
ath9k_hw_phy_disable(ah);
- ath9k_hw_configpcipowersave(ah, 1);
+ ath9k_hw_configpcipowersave(ah, 1, 1);
ath9k_ps_restore(sc);
ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP);
}
@@ -1942,7 +1942,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
init_channel = ath_get_curchannel(sc, hw);
/* Reset SERDES registers */
- ath9k_hw_configpcipowersave(sc->sc_ah, 0);
+ ath9k_hw_configpcipowersave(sc->sc_ah, 0, 0);
/*
* The basic interface to setting the hardware in a good
@@ -2170,7 +2170,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
/* disable HAL and put h/w to sleep */
ath9k_hw_disable(sc->sc_ah);
- ath9k_hw_configpcipowersave(sc->sc_ah, 1);
+ ath9k_hw_configpcipowersave(sc->sc_ah, 1, 1);
ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP);
sc->sc_flags |= SC_OP_INVALID;
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index e5c29eb..d83b77f 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -676,8 +676,9 @@
#define AR_RC_HOSTIF 0x00000100
#define AR_WA 0x4004
+#define AR_WA_D3_L1_DISABLE (1 << 14)
#define AR9285_WA_DEFAULT 0x004a05cb
-#define AR9280_WA_DEFAULT 0x0040073f
+#define AR9280_WA_DEFAULT 0x0040073b
#define AR_WA_DEFAULT 0x0000073f
--
1.6.4.3
^ permalink raw reply related
* [PATCH 01/12] ath9k: Set default noise floor value for AR9287
From: Sujith @ 2009-09-17 3:54 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vivek Natarajan <vnatarajan@atheros.com>
The default noise floor was never initialized for
AR9287.This patch helps in reporting the correct
RSSI for this version of chipset.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 2 ++
drivers/net/wireless/ath/ath9k/calib.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 3234995..439f2c7 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -697,6 +697,8 @@ void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah)
noise_floor = AR_PHY_CCA_MAX_AR9280_GOOD_VALUE;
else if (AR_SREV_9285(ah))
noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE;
+ else if (AR_SREV_9287(ah))
+ noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE;
else
noise_floor = AR_PHY_CCA_MAX_AR5416_GOOD_VALUE;
diff --git a/drivers/net/wireless/ath/ath9k/calib.h b/drivers/net/wireless/ath/ath9k/calib.h
index 019bcbb..9028ab1 100644
--- a/drivers/net/wireless/ath/ath9k/calib.h
+++ b/drivers/net/wireless/ath/ath9k/calib.h
@@ -28,6 +28,7 @@ extern const struct ath9k_percal_data adc_init_dc_cal;
#define AR_PHY_CCA_MAX_AR5416_GOOD_VALUE -85
#define AR_PHY_CCA_MAX_AR9280_GOOD_VALUE -112
#define AR_PHY_CCA_MAX_AR9285_GOOD_VALUE -118
+#define AR_PHY_CCA_MAX_AR9287_GOOD_VALUE -118
#define AR_PHY_CCA_MAX_HIGH_VALUE -62
#define AR_PHY_CCA_MIN_BAD_VALUE -140
#define AR_PHY_CCA_FILTERWINDOW_LENGTH_INIT 3
--
1.6.4.3
^ permalink raw reply related
* [PATCH 00/12] ath9k bug fixes
From: Sujith @ 2009-09-17 3:53 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
John,
A bunch of patches fixing various bugs in the driver.
These apply on top of wireless-testing.
Luis would rebase his pending patches on top of these
and resend them.
Thanks.
Sujith
Senthil Balasubramanian (2):
ath9k: Adjust the chainmasks properly
ath9k: Fix bug in chain handling
Sujith (3):
ath9k: Restore TSF after RESET
ath9k: Fix chip wakeup issue
ath9k: Fix regression in PA calibration
Vasanthakumar Thiagarajan (3):
ath9k: Fix rx data corruption
ath9k: Don't read NF when chip has gone through full sleep mode
ath9k: Do a full reset for AR9280
Vivek Natarajan (4):
ath9k: Set default noise floor value for AR9287
ath9k: Revamp PCIE workarounds
ath9k: Fix AHB reset for AR9280
ath9k: Disable autosleep feature by default.
drivers/net/wireless/ath/ath9k/calib.c | 23 +++-
drivers/net/wireless/ath/ath9k/calib.h | 1 +
drivers/net/wireless/ath/ath9k/eeprom_def.c | 4 +-
drivers/net/wireless/ath/ath9k/hw.c | 198 ++++++++++++++++-----------
drivers/net/wireless/ath/ath9k/hw.h | 4 +-
drivers/net/wireless/ath/ath9k/main.c | 8 +-
drivers/net/wireless/ath/ath9k/reg.h | 3 +-
7 files changed, 149 insertions(+), 92 deletions(-)
^ permalink raw reply
* Re: [b43] About supporting of BCM4312 [14e4:4315] with Low Power PHY
From: Bryan Wu @ 2009-09-17 3:38 UTC (permalink / raw)
To: Larry Finger; +Cc: Gábor Stefanik, mb, linux-wireless
In-Reply-To: <4AB109D7.2060300@lwfinger.net>
Larry Finger wrote:
> Bryan Wu wrote:
>
>> Do you guys think it is related to 64bit DMA issue? I really want to help to develop this b43 opensource driver,
>> anything need me to do, please feel free ping me.
>
> Not an issue with 64-bit DMA. Those people with 64-bit DMA problems
> get error messages.
>
OK, got you. Thanks. I'm just wandering how to debug this driver. It seems that probing passes but the wlan1
interface does not work at all.
-Bryan
^ permalink raw reply
* Re: [b43] About supporting of BCM4312 [14e4:4315] with Low Power PHY
From: Bryan Wu @ 2009-09-17 3:34 UTC (permalink / raw)
To: Gábor Stefanik; +Cc: mb, stefano.brivio, linux-wireless
In-Reply-To: <69e28c910909160813h2a91ff32hb5fa836f1f7a4963@mail.gmail.com>
Gábor Stefanik wrote:
> 2009/9/16 Bryan Wu <bryan.wu@canonical.com>:
>> Hi Gabor,
>>
>> I tried the latest cmpat-wireless 09-16 snapshot on my machine which runs on 2.6.31
>> Ubuntu Karmic latest kernel. The hardware probing passes and wlan1 interface shows up.
>> But the iwlist scanning got no data from wlan1 interface,
>>
>> dmesg:
>> ---
>> [ 364.371703] b43-pci-bridge 0000:07:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
>> [ 364.371761] b43-pci-bridge 0000:07:00.0: setting latency timer to 64
>> [ 364.437779] ssb: Sonics Silicon Backplane found on PCI device 0000:07:00.0
>> [ 364.491488] b43-phy0: Broadcom 4312 WLAN found (core revision 15)
>> [ 364.533562] b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1
>> [ 364.533604] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2
>> [ 364.693040] phy0: Selected rate control algorithm 'minstrel'
>> [ 364.701666] Broadcom 43xx driver loaded [ Features: PML, Firmware-ID: FW13 ]
>> [ 364.748486] udev: renamed network interface wlan0 to wlan1
>> [ 364.824296] b43 ssb0:0: firmware: requesting b43/ucode15.fw
>> [ 364.901848] b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw
>> [ 364.931482] b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw
>> [ 365.140212] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
>
> Please test with v478 or newer.
OK, do you know where can I find this firmware? I just followed the wiki page to get the firmware, but it seems the same version as I am using.
http://linuxwireless.org/en/users/Drivers/b43#device_firmware
>
>> [ 365.144349] b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz.
>> [ 365.412558] b43-phy0 debug: Chip initialized
>> [ 365.413163] b43-phy0 debug: 64-bit DMA initialized
>> [ 365.413356] b43-phy0 debug: QoS enabled
>
> Try disabling QoS via modparam. Also, try earlier compat-wireless versions.
>
Yeah, I disabled the QoS via qos=0 modparam, but the result it is the same.
>> [ 365.434064] Registered led device: b43-phy0::tx
>> [ 365.434315] Registered led device: b43-phy0::rx
>> [ 365.434545] Registered led device: b43-phy0::radio
>> [ 365.435079] b43-phy0 debug: Wireless interface started
>> [ 365.435208] b43-phy0 debug: Adding Interface type 2
>> ----
>>
>> ifconfig:
>> ---
>> $ ifconfig
>> eth0 Link encap:Ethernet HWaddr 00:24:e8:bd:c9:3d
>> inet addr:10.101.46.6 Bcast:10.101.46.255 Mask:255.255.255.0
>> inet6 addr: fe80::224:e8ff:febd:c93d/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:797 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:663 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:76364 (76.3 KB) TX bytes:452350 (452.3 KB)
>> Interrupt:30 Base address:0xc000
>>
>> lo Link encap:Local Loopback
>> inet addr:127.0.0.1 Mask:255.0.0.0
>> inet6 addr: ::1/128 Scope:Host
>> UP LOOPBACK RUNNING MTU:16436 Metric:1
>> RX packets:29 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:6202 (6.2 KB) TX bytes:6202 (6.2 KB)
>>
>> wlan1 Link encap:Ethernet HWaddr 00:25:56:a0:15:58
>> UP BROADCAST MULTICAST MTU:1500 Metric:1
>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>> ---
>>
>> $ iwconfig wlan1
>> wlan1 IEEE 802.11bg Mode:Managed Access Point: Not-Associated
>> Tx-Power=20 dBm
>> Retry long limit:7 RTS thr:off Fragment thr:off
>> Power Management:off
>>
>> $ sudo iwlist wlan1 scanning
>> wlan1 No scan results
>
> Use "sudo iw dev wlan1 scan" with mac80211 drivers.
>
Tried that, but the same result, nothing shows up.
Thanks a lot
-Bryan
>> Do you guys think it is related to 64bit DMA issue? I really want to help to develop this b43 opensource driver,
>> anything need me to do, please feel free ping me.
>>
>> Thanks
>> -Bryan
>>
>> Gábor Stefanik wrote:
>>> This chip works (though not quite "supported", that is, can't
>>> guarantee that it will work for you, and speed is not up to par with
>>> wl_hybrid) in wireless-testing. It should also work in
>>> compat-wireless, though compat-wireless is having problems with 64-bit
>>> DMA lately (probably also affects the G-PHY 4311/02). Specifically,
>>> the Dell 1397 (half-mini version of the 1395) and the HP 459263-002
>>> are known to work.
>>>
>>> On Fri, Sep 11, 2009 at 4:22 AM, Bryan Wu <bryan.wu@canonical.com> wrote:
>>>> Dear Michael and Stefano,
>>>>
>>>> I have a project which integrate Broadcom Wifi chip. But the mainline b43 still does not support this chip, because it has Low Power PHY.
>>>>
>>>> Here is my lspci -vvnn output for this device:
>>>> ------
>>>> 07:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g [14e4:4315] (rev 01)
>>>> Subsystem: Dell Device [1028:000c]
>>>> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>>>> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>>>> Latency: 0, Cache Line Size: 32 bytes
>>>> Interrupt: pin A routed to IRQ 17
>>>> Region 0: Memory at f0100000 (64-bit, non-prefetchable) [size=16K]
>>>> Capabilities: [40] Power Management version 3
>>>> Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
>>>> Status: D0 PME-Enable- DSel=0 DScale=2 PME-
>>>> Capabilities: [58] Vendor Specific Information <?>
>>>> Capabilities: [e8] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
>>>> Address: 0000000000000000 Data: 0000
>>>> Capabilities: [d0] Express (v1) Endpoint, MSI 00
>>>> DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
>>>> ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
>>>> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>>>> RlxdOrd- ExtTag+ PhantFunc- AuxPwr- NoSnoop-
>>>> MaxPayload 128 bytes, MaxReadReq 128 bytes
>>>> DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
>>>> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 <64us
>>>> ClockPM+ Suprise- LLActRep- BwNot-
>>>> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>>> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>>>> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>>>> Kernel driver in use: b43-pci-bridge
>>>> Kernel modules: ssb
>>>> ------
>>>>
>>>> Do you guys know how to support this device in 2.6.31 kernel? Need I backport some code from wireless-testing? I enabled the PHY_LP config manually in 2.6.31 kernel and b43 driver recognized the hardware wifi device, but it still
>>>> does not work at all.
>>>>
>>>> Or there is no choice but Broadcom's STA driver? I do not like such non-GPL stuff.
>>>>
>>>> Thanks a lot
>>>> --
>>>> Bryan Wu <bryan.wu@canonical.com>
>>>> Kernel Developer +86.138-1617-6545 Mobile
>>>> Ubuntu Kernel Team | Hardware Enablement Team
>>>> Canonical Ltd. www.canonical.com
>>>> Ubuntu - Linux for human beings | www.ubuntu.com
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>
>>>
^ permalink raw reply
* Re[4]: 2.6.25 kernel & compat-wireless-2009-09-14
From: Nikolai ZHUBR @ 2009-09-17 3:38 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <1253153088.9450.10.camel@johannes.local>
Thursday, September 17, 2009, 5:04:48 AM, Johannes Berg wrote:
>>
>> --- everything.orig/net/wireless/core.c 2009-09-16 23:45:40.000000000 +0400
>> +++ everything/net/wireless/core.c 2009-09-16 23:48:22.000000000 +0400
>> @@ -350,6 +350,7 @@
>>
>> /* give it a proper name */
>> dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx);
>> + snprintf(rdev->wiphy.dev.bus_id, BUS_ID_SIZE, PHY_NAME "%d", rdev->wiphy_idx);
> Isn't that exactly what dev_set_name() is/was supposed to do?
Well, probably yes, but still it doesn't set bus_id, I've checked.
Probably it needs some correction.
> johannes
^ permalink raw reply
* Re: Re[2]: 2.6.25 kernel & compat-wireless-2009-09-14
From: Johannes Berg @ 2009-09-17 2:04 UTC (permalink / raw)
To: Nikolai ZHUBR; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <142272111.20090917060119@mail.ru>
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
On Thu, 2009-09-17 at 06:01 +0300, Nikolai ZHUBR wrote:
> Thursday, September 17, 2009, 2:54:28 AM, Luis R. Rodriguez wrote:
> >> device_add in 2.6.25.20 wants some bus_id, but bus_id seems to not
> >> be assigned anymore, so device_add fails. Therefore, wiphy_register
> >> fails, and then clearly ieee80211_register_hw fails too.
> >>
> >> Any ideas how to properly fix this?
>
> > FIgure out what the bus_id is used for first.
>
> Hmm, don't know, but the following helps and wlan0 appears:
>
> --- everything.orig/net/wireless/core.c 2009-09-16 23:45:40.000000000 +0400
> +++ everything/net/wireless/core.c 2009-09-16 23:48:22.000000000 +0400
> @@ -350,6 +350,7 @@
>
> /* give it a proper name */
> dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx);
> + snprintf(rdev->wiphy.dev.bus_id, BUS_ID_SIZE, PHY_NAME "%d", rdev->wiphy_idx);
Isn't that exactly what dev_set_name() is/was supposed to do?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re[2]: 2.6.25 kernel & compat-wireless-2009-09-14
From: Nikolai ZHUBR @ 2009-09-17 3:01 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <43e72e890909161654x141f48e4q54f0526bf6c04ea3@mail.gmail.com>
Thursday, September 17, 2009, 2:54:28 AM, Luis R. Rodriguez wrote:
>> device_add in 2.6.25.20 wants some bus_id, but bus_id seems to not
>> be assigned anymore, so device_add fails. Therefore, wiphy_register
>> fails, and then clearly ieee80211_register_hw fails too.
>>
>> Any ideas how to properly fix this?
> FIgure out what the bus_id is used for first.
Hmm, don't know, but the following helps and wlan0 appears:
--- everything.orig/net/wireless/core.c 2009-09-16 23:45:40.000000000 +0400
+++ everything/net/wireless/core.c 2009-09-16 23:48:22.000000000 +0400
@@ -350,6 +350,7 @@
/* give it a proper name */
dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx);
+ snprintf(rdev->wiphy.dev.bus_id, BUS_ID_SIZE, PHY_NAME "%d", rdev->wiphy_idx);
mutex_init(&rdev->mtx);
mutex_init(&rdev->devlist_mtx);
> Luis
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2009-09-16
From: David Miller @ 2009-09-17 0:03 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20090916204150.GG10634@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 16 Sep 2009 16:41:51 -0400
> Dave,
>
> Here is a batch of fixes for 2.6.32...nothing too controversial
> AFAICT...
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* Re: 2.6.25 kernel & compat-wireless-2009-09-14
From: Luis R. Rodriguez @ 2009-09-16 23:54 UTC (permalink / raw)
To: Nikolai ZHUBR; +Cc: linux-wireless
In-Reply-To: <191513177.20090917035628@mail.ru>
On Wed, Sep 16, 2009 at 5:56 PM, Nikolai ZHUBR <zhubr@mail.ru> wrote:
> Hello all,
>
> After some more digging I think I've found an incompatibility.
>
> device_add in 2.6.25.20 wants some bus_id, but bus_id seems to not
> be assigned anymore, so device_add fails. Therefore, wiphy_register
> fails, and then clearly ieee80211_register_hw fails too.
>
> Any ideas how to properly fix this?
FIgure out what the bus_id is used for first.
Luis
^ permalink raw reply
* 2.6.25 kernel & compat-wireless-2009-09-14
From: Nikolai ZHUBR @ 2009-09-17 0:56 UTC (permalink / raw)
To: linux-wireless
Hello all,
After some more digging I think I've found an incompatibility.
device_add in 2.6.25.20 wants some bus_id, but bus_id seems to not
be assigned anymore, so device_add fails. Therefore, wiphy_register
fails, and then clearly ieee80211_register_hw fails too.
Any ideas how to properly fix this?
Thank you,
Nikolai
^ permalink raw reply
* Re: iwlagn rfkill and 2.6.31 on Intel Corporation PRO/Wireless 5100 AGN
From: Hin-Tak Leung @ 2009-09-16 23:15 UTC (permalink / raw)
To: Fabio Coatti
Cc: reinette chatre, John W. Linville, linux-wireless@vger.kernel.org,
mjg@redhat.com
In-Reply-To: <200909170005.56145.fabio.coatti@gmail.com>
On Wed, Sep 16, 2009 at 11:05 PM, Fabio Coatti <fabio.coatti@gmail.com> wrote:
> In data mercoledì 16 settembre 2009 18:30:19, reinette chatre ha scritto:
>
>> On Wed, 2009-09-16 at 07:57 -0700, Fabio Coatti wrote:
>> > But the behaviour of wifi sybsystem is still weird, (maybe for some
>> > faults on my side). Basically if the laptop starts with wifi enabled
>> > (rfkill off) wpa_supplicant can establish a connection, that can be
>> > killed by rfkill switch (both wifi and bluetooth seems to be killed). But
>> > when I turn off rfkill switch wpa_supplicant is unable to connect again;
>> > looking at syslog/dmesg I can see activity in bt stack, but no messages
>> > regarding wlan0.
>>
>> I think at this point you need to bring the interface back up. When you
>> enable rfkill the interface is brought down, the opposite (bringing
>> interface up) is not done automatically when you disable rfkill.
>>
>
> Ok, I understand your point. In fact I can bring up the interface using
> "ip link set wlan0 up"
> but this leads me to another question: I fail to see how restart the interface
> automatically when rfkill switch is turned off.
> The expected behaviour in this case should be, imho, that wpa_supplicant wakes
> up and restarts the connection.
> IIRC netplug doesn't work with wireless connections and this leaves me
> wondering how I can have wireless la to wake up after turning off rfkill
> switch :)
Hmm, I recently looked to the interaction between rfkill and hal, and
may be able to answer that. The kernel rfkill module also exports its
state via either /dev/rfkill or sysfs's /sys/class/rfkill (depending
on kernel version; I think /dev/rfkill is new to
2.6.31/wireless-testing/compat-wireless, and not in 2.6.30). hald or
devicekit (again, depend on distro/kernel version) monitors those, and
informs NetworkManager via d-bus messaging when the rkfill state
changes. NetworkManager then if up/down the device and tell
wpa_supplicant accordingly. So the ifconfig-interface-up is supposed
to happen automatically, if hald/devicekit works and talk to
NetworkManager.
i.e. the waking-up should happen automatically if you have the
combination of hald/devicekit and networkmanager.
Does this answer your question?
^ permalink raw reply
* Re: WARNING: at net/mac80211/scan.c:267 ieee80211_scan_completed+0x299/0x2b0 [mac80211]()
From: reinette chatre @ 2009-09-16 22:13 UTC (permalink / raw)
To: Maciej Rutecki
Cc: Linux Kernel Mailing List, Linux Wireless List,
ilw@linux.intel.com, Zhu, Yi
In-Reply-To: <8db1092f0909161259i5e007282i42f426bc2d0fc0c4@mail.gmail.com>
Hi Maciej,
On Wed, 2009-09-16 at 12:59 -0700, Maciej Rutecki wrote:
> Script (wifi_wpa.sh):
> #!/bin/sh
> INTERFACE=wlan0
> WPA_FILE=/etc/wpa_supplicant/wpa_supplicant.conf
> DRIVER=wext
> ifconfig eth0 down
> ifconfig $INTERFACE up
> sleep 3
> killall wpa_supplicant &> /dev/null
> wpa_supplicant -c $WPA_FILE -D $DRIVER -i $INTERFACE -B
> dhclient $INTERFACE
I think there is a potential race here. You start wpa_supplicant in
background and then immediately request an IP. It is not guaranteed at
this point that you are associated.
Could you perform the last three steps of your script manually?
Reinette
^ permalink raw reply
* Re: iwlagn rfkill and 2.6.31 on Intel Corporation PRO/Wireless 5100 AGN
From: Fabio Coatti @ 2009-09-16 22:05 UTC (permalink / raw)
To: reinette chatre
Cc: John W. Linville, linux-wireless@vger.kernel.org, mjg@redhat.com
In-Reply-To: <1253118619.26521.420.camel@rc-desk>
In data mercoledì 16 settembre 2009 18:30:19, reinette chatre ha scritto:
> On Wed, 2009-09-16 at 07:57 -0700, Fabio Coatti wrote:
> > But the behaviour of wifi sybsystem is still weird, (maybe for some
> > faults on my side). Basically if the laptop starts with wifi enabled
> > (rfkill off) wpa_supplicant can establish a connection, that can be
> > killed by rfkill switch (both wifi and bluetooth seems to be killed). But
> > when I turn off rfkill switch wpa_supplicant is unable to connect again;
> > looking at syslog/dmesg I can see activity in bt stack, but no messages
> > regarding wlan0.
>
> I think at this point you need to bring the interface back up. When you
> enable rfkill the interface is brought down, the opposite (bringing
> interface up) is not done automatically when you disable rfkill.
>
Ok, I understand your point. In fact I can bring up the interface using
"ip link set wlan0 up"
but this leads me to another question: I fail to see how restart the interface
automatically when rfkill switch is turned off.
The expected behaviour in this case should be, imho, that wpa_supplicant wakes
up and restarts the connection.
IIRC netplug doesn't work with wireless connections and this leaves me
wondering how I can have wireless la to wake up after turning off rfkill
switch :)
^ permalink raw reply
* Re[8]: cfg80211 and rfkill_backport question.
From: Nikolai ZHUBR @ 2009-09-16 22:11 UTC (permalink / raw)
To: linux-wireless
Cc: Hin-Tak Leung, Luis R. Rodriguez, Gaurav Jauhar,
Senthil Balasubramanian
In-Reply-To: <3ace41890909160824w146d63e6haddabe645d3e27d2@mail.gmail.com>
Wednesday, September 16, 2009, 6:24:11 PM, Hin-Tak Leung wrote:
>> From what I checked it all looks fine to me, except that there is
>> a circular dependency between cfg80211 and rfkill_backport (which
>> is confirmed by nm output I suppose). Is this circular dependency
>> intentional? Or, could it be avoided? (My understanding was that
>> as module loader loads one file at a time, it just have no way
>> to resolve such symbols, maybe I'm wrong on this)
> Hmm, yes and no... insmod loads modules one at a time; but as long as
> you run depmod, modprobe loads dependent modules automatically. I
> don't know if modprobe works for circular dependency, but it probably
> works correctly (since AFAIK, it reference-counts)?
Well, maybe modprobe is smart enough these days already, but openwrt
doesn't have it.
Anyway.
Circular dependency issue is now gone together with rfkill_backport
as I don't need rfkill at this point.
"Unable to reserve mem region" error was probably MIPS-related or
PCI-related and gone after cold reboot.
Now here is another:
in function wiphy_register (net/wireless/core.c):
device_add returns an error (-22)
Looks like some problem in mac80211<-->kernel_2.6.25 communication?
regards,
Nikolai
^ permalink raw reply
* Re: [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling
From: Thomas Ilnseher @ 2009-09-16 21:00 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Broadcom Wireless, linux-wireless, Larry Finger
In-Reply-To: <69e28c910909161344h511bcddeqcdc82b2e8a734dbb@mail.gmail.com>
>
> Put a printk here to see if this branch is getting hit.
>
> (BTW, are you loading b43 with the "hwpctl" modparam? That enables
> experimental HW TX power control support, which might explain what you
> were seeing.)
Hi Gabor,
I'm stupid.
I applied 3 Patches, the analog switch patch, and the other two patches.
The analog switch patch did it.
> >>
> >>
> >
> >
>
>
>
^ permalink raw reply
* Re: [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling
From: Michael Buesch @ 2009-09-16 21:00 UTC (permalink / raw)
To: bcm43xx-dev
Cc: Thomas Ilnseher, Gábor Stefanik, Larry Finger,
linux-wireless
In-Reply-To: <1253132275.2989.75.camel@note>
On Wednesday 16 September 2009 22:17:55 Thomas Ilnseher wrote:
> Am Mittwoch, den 16.09.2009, 21:40 +0200 schrieb Gábor Stefanik:
> > You are essentially implementing dead code at this point - this will
> > only ever be called if hardware-accelerated TX power control is
> > enabled - and HW TX power control is unsupported, even for G-PHYs.
> Then the question remains, why this brings my device to 54 MBit/s ?
>
> I did double check again with the old driver:
>
> wlan0 IEEE 802.11bg ESSID:"tommy"
> Mode:Managed Frequency:2.412 GHz Access Point:
> Bit Rate=9 Mb/s Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=70/70 Signal level=5 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
> Patched driver:
>
> wlan0 IEEE 802.11bg ESSID:"tommy"
> Mode:Managed Frequency:2.412 GHz Access Point: XXX
> Bit Rate=54 Mb/s Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=70/70 Signal level=10 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
The iwconfig output doesn't tell you anything about the actual net TX rate.
Please benchmark it with iperf.
--
Greetings, Michael.
^ permalink raw reply
* Re: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
From: Andrey Yurovsky @ 2009-09-16 20:47 UTC (permalink / raw)
To: Bing Zhao
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
Amitkumar Karwar, Dan Williams
In-Reply-To: <477F20668A386D41ADCC57781B1F704306DB9CFDB7@SC-VEXCH1.marvell.com>
On Wed, Sep 16, 2009 at 1:20 PM, Bing Zhao <bzhao@marvell.com> wrote:
> Hi Andrey,
>
>> -----Original Message-----
>> From: Andrey Yurovsky [mailto:andrey@cozybit.com]
>> Sent: Tuesday, September 15, 2009 4:41 PM
>> To: Bing Zhao
>> Cc: libertas-dev@lists.infradead.org; linux-wireless@vger.kernel.org; Amitkumar Karwar; Dan Williams
>> Subject: Re: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
>>
>> Hi Bing. This is not specific to the actual implementation of the
>> deep sleep commands in your patch but,
>>
>> On Tue, Sep 15, 2009 at 4:45 PM, Bing Zhao <bzhao@marvell.com> wrote:
>> > + Path: /sys/kernel/debug/libertas_wireless/ethX/
>>
>> Is the sysfs interface really necessary? It seems like yet another
>> non-standard configuration option to keep track of.
>
> Actually the debugfs interface is used in the patch.
>
> Some information (such as the interface name and path) in README file is out of date. We just copy-and-paste it for the new deepsleep command. We need a separate patch to clean up the REAME file and keep it up to date.
Ok. Either way, this is another out-of-band interface (regardless of
if it's debugfs or sysfs). That said, I believe that debugfs should
be used for debugging, not for configuring driver/device features like
these.
>> Deep sleep seems to pretty much "turn off" the wifi card (as far as
>> the user is concerned) so how about a simpler approach: enter deep
>> sleep when the interface is brought down (ifconfig wlanN down) and
>> exit deep sleep when it's brought up. Do this only when deep sleep is
>> supported/possible. Alternately, maybe this belongs as an rfkill
>> feature?
>
> Entering/exiting deep sleep doesn't have to depend on wlanN interface's up and down. User can still put the chip into sleep when wlanN is up. And, with auto deep sleep feature, the driver automatically wakes the chip up for sending user commands (for example, scan) and put the chip back to sleep after certain time period of inactivity. The deepsleep command through debugfs interface provides the flexibility of deep sleep options.
>
> The rfkill shuts down the RF transmitter of the device but most of other modules may be still functioning. The deep sleep shuts down most of the modules (including the RF) on the chip to save as much power as possible.
It seems that when the device is in deep sleep, it's effectively
"turned off" as far as the user is concerned. That seems really
similar to "ifconfig down" or rfkill, does the user really care about
anything beyond that? I understand that it's possible to control this
feature independently of either of those functions, but is it ever
necessary? If not, it would be great to just integrate it into one
(or both) of these already standard network interface semantics and
not introduce a whole new configuration parameter.
-Andrey
> Regards,
>
> Bing
>
>>
>> -Andrey
>
^ permalink raw reply
* pull request: wireless-next-2.6 2009-09-16
From: John W. Linville @ 2009-09-16 20:41 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
Here is a batch of fixes for 2.6.32...nothing too controversial
AFAICT...
Please let me know if there are problems!
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6/
---
The following changes since commit 13af7a6ea502fcdd4c0e3d7de6e332b102309491:
Dhananjay Phadke (1):
netxen: update copyright
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Christian Lamparter (1):
p54usb: add Zcomax XG-705A usbid
Daniel C Halperin (1):
iwlwifi: fix HT operation in 2.4 GHz band
Holger Schurig (2):
cfg80211: use cfg80211_wext_freq() for freq conversion
cfg80211: minimal error handling for wext-compat freq scanning
Johannes Berg (2):
iwlwifi: disable powersave for 4965
cfg80211: fix SME connect
Larry Finger (1):
ssb: Fix error when V1 SPROM extraction is forced
Luis R. Rodriguez (1):
wireless: default CONFIG_WLAN to y
Martin Decky (1):
hostap: Revert a toxic part of the conversion to net_device_ops
Michael Buesch (3):
b43: Force-wake queues on init
ssb: Disable verbose SDIO coreswitch
b43: Fix resume failure
Pavel Roskin (1):
rc80211_minstrel: fix contention window calculation
Randy Dunlap (1):
ssb/sdio: fix printk format warnings
Reinette Chatre (1):
iwlwifi: fix potential rx buffer loss
Sujith (1):
ath9k: Fix bug in ANI channel handling
Wey-Yi Guy (1):
iwlwifi: find the correct first antenna
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/ath/ath9k/ani.c | 6 ++++--
drivers/net/wireless/b43/main.c | 8 +++-----
drivers/net/wireless/hostap/hostap_main.c | 3 ++-
drivers/net/wireless/iwlwifi/iwl-4965.c | 1 +
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 10 +++++++++-
drivers/net/wireless/iwlwifi/iwl-core.c | 9 ++++++---
drivers/net/wireless/iwlwifi/iwl-core.h | 1 +
drivers/net/wireless/iwlwifi/iwl-power.c | 5 +++--
drivers/net/wireless/iwlwifi/iwl-rx.c | 24 +++++++++++++++++-------
drivers/net/wireless/iwlwifi/iwl3945-base.c | 24 ++++++++++++++++--------
drivers/net/wireless/p54/p54usb.c | 1 +
drivers/ssb/pci.c | 1 +
drivers/ssb/sdio.c | 6 +++---
net/mac80211/rc80211_minstrel.c | 2 +-
net/wireless/scan.c | 7 ++++++-
net/wireless/sme.c | 21 +++++++++++++--------
17 files changed, 88 insertions(+), 42 deletions(-)
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index ad89d23..49ea9c9 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -5,6 +5,7 @@
menuconfig WLAN
bool "Wireless LAN"
depends on !S390
+ default y
---help---
This section contains all the pre 802.11 and 802.11 wireless
device drivers. For a complete list of drivers and documentation
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index a7cbb07..2b49374 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -327,7 +327,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
aniState->firstepLevel + 1);
return;
} else {
- if (conf->channel->band == IEEE80211_BAND_2GHZ) {
+ if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
+ !conf_is_ht(conf)) {
if (!aniState->ofdmWeakSigDetectOff)
ath9k_hw_ani_control(ah,
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
@@ -369,7 +370,8 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
aniState->firstepLevel + 1);
} else {
- if (conf->channel->band == IEEE80211_BAND_2GHZ) {
+ if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
+ !conf_is_ht(conf)) {
if (aniState->firstepLevel > 0)
ath9k_hw_ani_control(ah,
ATH9K_ANI_FIRSTEP_LEVEL, 0);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7a9a3fa..e789792 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2289,11 +2289,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
err = -ENODEV;
goto error;
}
- msleep_interruptible(50);
- if (signal_pending(current)) {
- err = -EINTR;
- goto error;
- }
+ msleep(50);
}
b43_read32(dev, B43_MMIO_GEN_IRQ_REASON); /* dummy read */
@@ -4287,6 +4283,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
if (!dev->suspend_in_progress)
b43_rng_init(wl);
+ ieee80211_wake_queues(dev->wl->hw);
+
b43_set_status(dev, B43_STAT_INITIALIZED);
if (!dev->suspend_in_progress)
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 6fe122f..eb57d1e 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
switch(type) {
case HOSTAP_INTERFACE_AP:
+ dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_mgmt_netdev_ops;
dev->type = ARPHRD_IEEE80211;
dev->header_ops = &hostap_80211_ops;
break;
case HOSTAP_INTERFACE_MASTER:
- dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_master_ops;
break;
default:
+ dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_netdev_ops;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 6a13bfb..ca61d37 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2346,6 +2346,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.mod_params = &iwl4965_mod_params,
.use_isr_legacy = true,
.ht_greenfield_support = false,
+ .broken_powersave = true,
};
/* Module firmware */
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 40b207a..346dc06 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -760,6 +760,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
u16 high_low;
u8 switch_to_legacy = 0;
u8 is_green = lq_sta->is_green;
+ struct iwl_priv *priv = lq_sta->drv;
/* check if we need to switch from HT to legacy rates.
* assumption is that mandatory rates (1Mbps or 6Mbps)
@@ -773,7 +774,8 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
tbl->lq_type = LQ_G;
if (num_of_ant(tbl->ant_type) > 1)
- tbl->ant_type = ANT_A;/*FIXME:RS*/
+ tbl->ant_type =
+ first_antenna(priv->hw_params.valid_tx_ant);
tbl->is_ht40 = 0;
tbl->is_SGI = 0;
@@ -883,6 +885,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
mac_index &= RATE_MCS_CODE_MSK; /* Remove # of streams */
if (mac_index >= (IWL_RATE_9M_INDEX - IWL_FIRST_OFDM_RATE))
mac_index++;
+ /*
+ * mac80211 HT index is always zero-indexed; we need to move
+ * HT OFDM rates after CCK rates in 2.4 GHz band
+ */
+ if (priv->band == IEEE80211_BAND_2GHZ)
+ mac_index += IWL_FIRST_OFDM_RATE;
}
if ((mac_index < 0) ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index acfd7b4..fd26c0d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1585,9 +1585,12 @@ int iwl_setup_mac(struct iwl_priv *priv)
hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM |
IEEE80211_HW_AMPDU_AGGREGATION |
- IEEE80211_HW_SPECTRUM_MGMT |
- IEEE80211_HW_SUPPORTS_PS |
- IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+ IEEE80211_HW_SPECTRUM_MGMT;
+
+ if (!priv->cfg->broken_powersave)
+ hw->flags |= IEEE80211_HW_SUPPORTS_PS |
+ IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+
hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index c04d2a2..7ff9ffb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -252,6 +252,7 @@ struct iwl_cfg {
const u16 max_ll_items;
const bool shadow_ram_support;
const bool ht_greenfield_support;
+ const bool broken_powersave;
};
/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 4ec6a83..60be976 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -292,8 +292,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
else
dtimper = 1;
- /* TT power setting overwrites everything */
- if (tt->state >= IWL_TI_1)
+ if (priv->cfg->broken_powersave)
+ iwl_power_sleep_cam_cmd(priv, &cmd);
+ else if (tt->state >= IWL_TI_1)
iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper);
else if (!enabled)
iwl_power_sleep_cam_cmd(priv, &cmd);
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 8150c5c..b90adcb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -239,26 +239,22 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
struct iwl_rx_queue *rxq = &priv->rxq;
struct list_head *element;
struct iwl_rx_mem_buffer *rxb;
+ struct sk_buff *skb;
unsigned long flags;
while (1) {
spin_lock_irqsave(&rxq->lock, flags);
-
if (list_empty(&rxq->rx_used)) {
spin_unlock_irqrestore(&rxq->lock, flags);
return;
}
- element = rxq->rx_used.next;
- rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
- list_del(element);
-
spin_unlock_irqrestore(&rxq->lock, flags);
/* Alloc a new receive buffer */
- rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
+ skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
priority);
- if (!rxb->skb) {
+ if (!skb) {
IWL_CRIT(priv, "Can not allocate SKB buffers\n");
/* We don't reschedule replenish work here -- we will
* call the restock method and if it still needs
@@ -266,6 +262,20 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
break;
}
+ spin_lock_irqsave(&rxq->lock, flags);
+
+ if (list_empty(&rxq->rx_used)) {
+ spin_unlock_irqrestore(&rxq->lock, flags);
+ dev_kfree_skb_any(skb);
+ return;
+ }
+ element = rxq->rx_used.next;
+ rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
+ list_del(element);
+
+ spin_unlock_irqrestore(&rxq->lock, flags);
+
+ rxb->skb = skb;
/* Get physical address of RB/SKB */
rxb->real_dma_addr = pci_map_single(
priv->pci_dev,
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 2238c9f..0909668 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1134,6 +1134,7 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
struct iwl_rx_queue *rxq = &priv->rxq;
struct list_head *element;
struct iwl_rx_mem_buffer *rxb;
+ struct sk_buff *skb;
unsigned long flags;
while (1) {
@@ -1143,17 +1144,11 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
spin_unlock_irqrestore(&rxq->lock, flags);
return;
}
-
- element = rxq->rx_used.next;
- rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
- list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags);
/* Alloc a new receive buffer */
- rxb->skb =
- alloc_skb(priv->hw_params.rx_buf_size,
- priority);
- if (!rxb->skb) {
+ skb = alloc_skb(priv->hw_params.rx_buf_size, priority);
+ if (!skb) {
if (net_ratelimit())
IWL_CRIT(priv, ": Can not allocate SKB buffers\n");
/* We don't reschedule replenish work here -- we will
@@ -1162,6 +1157,19 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
break;
}
+ spin_lock_irqsave(&rxq->lock, flags);
+ if (list_empty(&rxq->rx_used)) {
+ spin_unlock_irqrestore(&rxq->lock, flags);
+ dev_kfree_skb_any(skb);
+ return;
+ }
+ element = rxq->rx_used.next;
+ rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
+ list_del(element);
+ spin_unlock_irqrestore(&rxq->lock, flags);
+
+ rxb->skb = skb;
+
/* If radiotap head is required, reserve some headroom here.
* The physical head count is a variable rx_stats->phy_count.
* We reserve 4 bytes here. Plus these extra bytes, the
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index e44460f..17e1995 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -67,6 +67,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
{USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/
{USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */
{USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
+ {USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */
{USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
{USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */
{USB_DEVICE(0x1260, 0xee22)}, /* SMC 2862W-G version 2 */
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index f853d56..9e50896 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -600,6 +600,7 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out,
ssb_printk(KERN_WARNING PFX "Unsupported SPROM"
" revision %d detected. Will extract"
" v1\n", out->revision);
+ out->revision = 1;
sprom_extract_r123(out, in);
}
}
diff --git a/drivers/ssb/sdio.c b/drivers/ssb/sdio.c
index 1140510..65a6080 100644
--- a/drivers/ssb/sdio.c
+++ b/drivers/ssb/sdio.c
@@ -21,7 +21,7 @@
#include "ssb_private.h"
/* Define the following to 1 to enable a printk on each coreswitch. */
-#define SSB_VERBOSE_SDIOCORESWITCH_DEBUG 1
+#define SSB_VERBOSE_SDIOCORESWITCH_DEBUG 0
/* Hardware invariants CIS tuples */
@@ -333,7 +333,7 @@ static void ssb_sdio_block_read(struct ssb_device *dev, void *buffer,
goto out;
err_out:
- dev_dbg(ssb_sdio_dev(bus), "%04X:%04X (width=%u, len=%u), error %d\n",
+ dev_dbg(ssb_sdio_dev(bus), "%04X:%04X (width=%u, len=%zu), error %d\n",
bus->sdio_sbaddr >> 16, offset, reg_width, saved_count, error);
out:
sdio_release_host(bus->host_sdio);
@@ -440,7 +440,7 @@ static void ssb_sdio_block_write(struct ssb_device *dev, const void *buffer,
goto out;
err_out:
- dev_dbg(ssb_sdio_dev(bus), "%04X:%04X (width=%u, len=%u), error %d\n",
+ dev_dbg(ssb_sdio_dev(bus), "%04X:%04X (width=%u, len=%zu), error %d\n",
bus->sdio_sbaddr >> 16, offset, reg_width, saved_count, error);
out:
sdio_release_host(bus->host_sdio);
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 7c51429..6e5d68b 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -418,7 +418,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
/* contention window */
tx_time_single += t_slot + min(cw, mp->cw_max);
- cw = (cw + 1) << 1;
+ cw = (cw << 1) | 1;
tx_time += tx_time_single;
tx_time_cts += tx_time_single + mi->sp_ack_dur;
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 4c210c2..e5f92ee 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev,
int k;
int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
for (k = 0; k < wreq->num_channels; k++) {
- int wext_freq = wreq->channel_list[k].m / 100000;
+ int wext_freq = cfg80211_wext_freq(wiphy, &wreq->channel_list[k]);
if (wext_freq == wiphy_freq)
goto wext_freq_found;
}
@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
wext_freq_not_found: ;
}
}
+ /* No channels found? */
+ if (!i) {
+ err = -EINVAL;
+ goto out;
+ }
/* Set real number of channels specified in creq->channels[] */
creq->n_channels = i;
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 6830788..7fae7ee 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -188,7 +188,7 @@ void cfg80211_conn_work(struct work_struct *work)
rtnl_unlock();
}
-static bool cfg80211_get_conn_bss(struct wireless_dev *wdev)
+static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev)
{
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
struct cfg80211_bss *bss;
@@ -205,7 +205,7 @@ static bool cfg80211_get_conn_bss(struct wireless_dev *wdev)
WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_PRIVACY,
capa);
if (!bss)
- return false;
+ return NULL;
memcpy(wdev->conn->bssid, bss->bssid, ETH_ALEN);
wdev->conn->params.bssid = wdev->conn->bssid;
@@ -213,14 +213,14 @@ static bool cfg80211_get_conn_bss(struct wireless_dev *wdev)
wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
schedule_work(&rdev->conn_work);
- cfg80211_put_bss(bss);
- return true;
+ return bss;
}
static void __cfg80211_sme_scan_done(struct net_device *dev)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+ struct cfg80211_bss *bss;
ASSERT_WDEV_LOCK(wdev);
@@ -234,7 +234,10 @@ static void __cfg80211_sme_scan_done(struct net_device *dev)
wdev->conn->state != CFG80211_CONN_SCAN_AGAIN)
return;
- if (!cfg80211_get_conn_bss(wdev)) {
+ bss = cfg80211_get_conn_bss(wdev);
+ if (bss) {
+ cfg80211_put_bss(bss);
+ } else {
/* not found */
if (wdev->conn->state == CFG80211_CONN_SCAN_AGAIN)
schedule_work(&rdev->conn_work);
@@ -670,6 +673,7 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct ieee80211_channel *chan;
+ struct cfg80211_bss *bss = NULL;
int err;
ASSERT_WDEV_LOCK(wdev);
@@ -760,7 +764,7 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
/* don't care about result -- but fill bssid & channel */
if (!wdev->conn->params.bssid || !wdev->conn->params.channel)
- cfg80211_get_conn_bss(wdev);
+ bss = cfg80211_get_conn_bss(wdev);
wdev->sme_state = CFG80211_SME_CONNECTING;
wdev->connect_keys = connkeys;
@@ -770,10 +774,11 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
wdev->conn->prev_bssid_valid = true;
}
- /* we're good if we have both BSSID and channel */
- if (wdev->conn->params.bssid && wdev->conn->params.channel) {
+ /* we're good if we have a matching bss struct */
+ if (bss) {
wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
err = cfg80211_conn_do_work(wdev);
+ cfg80211_put_bss(bss);
} else {
/* otherwise we'll need to scan for the AP first */
err = cfg80211_conn_scan(wdev);
--
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 related
* Re: [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling
From: Gábor Stefanik @ 2009-09-16 20:44 UTC (permalink / raw)
To: Thomas Ilnseher
Cc: John Linville, Broadcom Wireless, linux-wireless, Larry Finger
In-Reply-To: <1253132275.2989.75.camel@note>
2009/9/16 Thomas Ilnseher <illth@gmx.de>:
> Am Mittwoch, den 16.09.2009, 21:40 +0200 schrieb Gábor Stefanik:
>> You are essentially implementing dead code at this point - this will
>> only ever be called if hardware-accelerated TX power control is
>> enabled - and HW TX power control is unsupported, even for G-PHYs.
> Then the question remains, why this brings my device to 54 MBit/s ?
>
> I did double check again with the old driver:
>
> wlan0 IEEE 802.11bg ESSID:"tommy"
> Mode:Managed Frequency:2.412 GHz Access Point:
> Bit Rate=9 Mb/s Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=70/70 Signal level=5 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
> Patched driver:
>
> wlan0 IEEE 802.11bg ESSID:"tommy"
> Mode:Managed Frequency:2.412 GHz Access Point: XXX
> Bit Rate=54 Mb/s Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=70/70 Signal level=10 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
>
>
>> > Signed-off-by: Thomas Ilnseher <illth@gmx.de>
>> >
>> > ---
>> > diff -uNr a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
>> > --- a/drivers/net/wireless/b43/phy_lp.c 2009-09-16 20:52:17.501318374 +0200
>> > +++ b/drivers/net/wireless/b43/phy_lp.c 2009-09-16 20:53:36.593319452 +0200
>> > @@ -1125,6 +1125,18 @@
>> > dev->phy.lp->tssi_idx = (b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_STAT) & 0x7F00) >> 8;
>> > }
>> >
>> > +static void lpphy_clear_tx_power_offsets(struct b43_wldev *dev)
>> > +{
>> > + int i;
>> > + int id = 7;
>> > + if (dev->phy.rev < 2)
>> > + id = 10;
>> > + for (i = 0; i < 12; i++)
>> > + b43_lptab_write(dev, B43_LPTAB32(id, 0x40 + i), 0);
>> > + for (i = 0; i < 64; i++)
>> > + b43_lptab_write(dev, B43_LPTAB32(id, 0x80 + i), 0);
>> > +}
>> > +
>> > static void lpphy_set_tx_power_control(struct b43_wldev *dev,
>> > enum b43_lpphy_txpctl_mode mode)
>> > {
>> > @@ -1139,7 +1151,7 @@
>> >
>> > if (oldmode == B43_LPPHY_TXPCTL_HW) {
>> > lpphy_update_tx_power_npt(dev);
>> > - //TODO Clear all TX Power offsets
>> > + lpphy_clear_tx_power_offsets(dev);
Put a printk here to see if this branch is getting hit.
(BTW, are you loading b43 with the "hwpctl" modparam? That enables
experimental HW TX power control support, which might explain what you
were seeing.)
>> > } else {
>> > if (mode == B43_LPPHY_TXPCTL_HW) {
>> > //TODO Recalculate target TX power
>> >
>> >
>>
>>
>>
>
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply
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