* Re: iwlagn rfkill and 2.6.31 on Intel Corporation PRO/Wireless 5100 AGN
From: Fabio Coatti @ 2009-09-17 9:16 UTC (permalink / raw)
To: Hin-Tak Leung
Cc: reinette chatre, John W. Linville, linux-wireless@vger.kernel.org,
mjg@redhat.com
In-Reply-To: <3ace41890909161615u64d2878i8ddb52c2ba03ea52@mail.gmail.com>
I
> 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?
>
Indeed; it's a good explanation of what's going on. Now I'll follow each step
of your descripiton and I'll try to find out where the chain breaks :)
Many thanks for your help.
^ permalink raw reply
* Re: [b43] About supporting of BCM4312 [14e4:4315] with Low Power PHY
From: Bryan Wu @ 2009-09-17 9:00 UTC (permalink / raw)
To: Bryan Wu; +Cc: Gábor Stefanik, mb, stefano.brivio, linux-wireless
In-Reply-To: <4AB1AE43.6000602@canonical.com>
Bryan Wu wrote:
> 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
>
I tried the one from here: http://downloads.openwrt.org/sources/broadcom-wl-4.178.10.4.tar.bz2
Still got the same result,
[ 95.360263] b43-pci-bridge 0000:07:00.0: PCI INT A disabled
[ 122.214822] b43-pci-bridge 0000:07:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 122.214880] b43-pci-bridge 0000:07:00.0: setting latency timer to 64
[ 122.285420] ssb: Sonics Silicon Backplane found on PCI device 0000:07:00.0
[ 122.354411] b43-phy0: Broadcom 4312 WLAN found (core revision 15)
[ 122.397222] b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1
[ 122.397260] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2
[ 122.544617] phy0: Selected rate control algorithm 'minstrel'
[ 122.549401] Broadcom 43xx driver loaded [ Features: PML, Firmware-ID: FW13 ]
[ 122.675356] udev: renamed network interface wlan0 to wlan1
[ 122.769147] b43 ssb0:0: firmware: requesting b43/ucode15.fw
[ 122.847433] b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw
[ 122.883806] b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw
[ 123.113178] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
[ 123.117334] b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz.
[ 123.385222] b43-phy0 debug: Chip initialized
[ 123.385794] b43-phy0 debug: 64-bit DMA initialized
[ 123.385850] b43-phy0 debug: QoS disabled
[ 123.406615] Registered led device: b43-phy0::tx
[ 123.406745] Registered led device: b43-phy0::rx
[ 123.406874] Registered led device: b43-phy0::radio
[ 123.407281] b43-phy0 debug: Wireless interface started
[ 123.407374] b43-phy0 debug: Adding Interface type 2
[ 123.421273] ADDRCONF(NETDEV_UP): wlan1: link is not ready
Thanks,
-Bryan
^ permalink raw reply
* Re: WARNING: at net/mac80211/scan.c:267 ieee80211_scan_completed+0x299/0x2b0 [mac80211]()
From: Maciej Rutecki @ 2009-09-17 6:32 UTC (permalink / raw)
To: reinette chatre
Cc: Linux Kernel Mailing List, Linux Wireless List,
ilw@linux.intel.com, Zhu, Yi
In-Reply-To: <1253139186.26521.449.camel@rc-desk>
2009/9/17 reinette chatre <reinette.chatre@intel.com>:
[...]
>
> 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
>
>
>
root@gumis:/home/maciek# INTERFACE=wlan0
root@gumis:/home/maciek# WPA_FILE=/etc/wpa_supplicant/wpa_supplicant.conf
root@gumis:/home/maciek# DRIVER=wext
root@gumis:/home/maciek# ifconfig eth0 down
root@gumis:/home/maciek# killall dhclient3
Dmesg:
[ 130.925689] b44: eth0: powering down PHY
root@gumis:/home/maciek# ifconfig $INTERFACE up
Demsg:
[ 171.563937] iwl3945 0000:08:00.0: firmware: requesting iwlwifi-3945-2.ucode
[ 171.611178] iwl3945 0000:08:00.0: loaded firmware version 15.32.2.9
[ 171.688664] Registered led device: iwl-phy0::radio
[ 171.688759] Registered led device: iwl-phy0::assoc
[ 171.688802] Registered led device: iwl-phy0::RX
[ 171.688844] Registered led device: iwl-phy0::TX
root@gumis:/home/maciek# killall wpa_supplicant &> /dev/null
(wait 5 seconds)
root@gumis:/home/maciek# wpa_supplicant -c $WPA_FILE -D $DRIVER -i $INTERFACE -B
(and wait)
Dmesg:
[ 249.340094] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
[ 249.345339] wlan0 direct probe responded
[ 249.345347] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
[ 249.347122] wlan0: authenticated
[ 249.347152] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
[ 249.349703] wlan0: RX AssocResp from 00:1b:11:f6:0f:28 (capab=0x431
status=0 aid=1)
[ 249.349711] wlan0: associated
[ 253.411858] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason:
6)
[ 256.116488] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
[ 256.118910] wlan0 direct probe responded
[ 256.118918] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
[ 256.120663] wlan0: authenticated
[ 256.120694] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
[ 256.122944] wlan0: RX ReassocResp from 00:1b:11:f6:0f:28
(capab=0x431 status=0 aid=1)
[ 256.122951] wlan0: associated
[...]
[ 353.353780] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason: 6)
[ 356.070680] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
[ 356.073112] wlan0 direct probe responded
[ 356.073121] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
[ 356.074849] wlan0: authenticated
[ 356.074879] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
[ 356.077160] wlan0: RX ReassocResp from 00:1b:11:f6:0f:28
(capab=0x431 status=0 aid=1)
[ 356.077168] wlan0: associated
(Stop wainting)
root@gumis:/home/maciek# dhclient $INTERFACE
Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/wlan0/00:13:02:c3:96:a8
Sending on LPF/wlan0/00:13:02:c3:96:a8
Sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPOFFER from 192.168.0.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
Reloading /etc/samba/smb.conf: smbd only.
bound to 192.168.0.102 -- renewal in 474672 seconds.
Dmesg:
[ 390.228036] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason:
6)
[ 392.969750] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
[ 392.972333] wlan0 direct probe responded
[ 392.972342] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
[ 392.974072] wlan0: authenticated
[...]
[ 425.722523] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
[ 425.724773] wlan0: RX ReassocResp from 00:1b:11:f6:0f:28
(capab=0x431 status=0 aid=1)
[ 425.724782] wlan0: associated
[ 429.231829] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason: 6)
[ 431.936205] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
[ 431.938624] wlan0 direct probe responded
[ 431.938631] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
[ 431.940470] wlan0: authenticated
[ 431.940502] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
[ 431.942754] wlan0: RX ReassocResp from 00:1b:11:f6:0f:28
(capab=0x431 status=0 aid=1)
[ 431.942761] wlan0: associated
root@gumis:/home/maciek# iwconfig $INTERFACE
wlan0 IEEE 802.11abg ESSID:"x"
Mode:Managed Frequency:2.457 GHz Access Point: 00:1B:11:F6:0F:28
Bit Rate=54 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=53/70 Signal level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
root@gumis:/home/maciek# ping onet.pl
PING onet.pl (213.180.146.27) 56(84) bytes of data.
64 bytes from s4.m1r2.onet.pl (213.180.146.27): icmp_seq=1 ttl=53 time=18.3 ms
64 bytes from s4.m1r2.onet.pl (213.180.146.27): icmp_seq=2 ttl=53 time=21.0 ms
^C
--- onet.pl ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 18.395/19.702/21.009/1.307 ms
===============================
Compare to 2.6.31:
root@gumis:/home/maciek# /home/maciek/bin/wifi/wifi_wpa.sh
Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/wlan0/00:13:02:c3:96:a8
Sending on LPF/wlan0/00:13:02:c3:96:a8
Sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
Reloading /etc/samba/smb.conf: smbd only.
bound to 192.168.0.102 -- renewal in 596714 seconds.
wlan0 IEEE 802.11abg ESSID:"x"
Mode:Managed Frequency:2.457 GHz Access Point: 00:1B:11:F6:0F:28
Bit Rate=1 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption
key:D99A-9047-D4B3-05CD-5AD4-041C-A1A1-577D-CF2C-7BC4-1F49-08F8-9802-2A2D-F5B3-0861
[2]
Power Management:off
Link Quality=50/70 Signal level=-60 dBm Noise level=-127 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Demsg:
[ 92.188241] b44: eth0: powering down PHY
[ 92.191643] iwl3945 0000:08:00.0: firmware: requesting iwlwifi-3945-2.ucode
[ 92.305225] iwl3945 0000:08:00.0: loaded firmware version 15.32.2.9
[ 92.380738] Registered led device: iwl-phy0::radio
[ 92.381651] Registered led device: iwl-phy0::assoc
[ 92.381685] Registered led device: iwl-phy0::RX
[ 92.381708] Registered led device: iwl-phy0::TX
[ 98.353640] wlan0: authenticate with AP 00:1b:11:f6:0f:28
[ 98.355401] wlan0: authenticated
[ 98.355407] wlan0: associate with AP 00:1b:11:f6:0f:28
[ 98.357622] wlan0: RX AssocResp from 00:1b:11:f6:0f:28 (capab=0x431
status=0 aid=1)
[ 98.357630] wlan0: associated
--
Maciej Rutecki
http://www.maciek.unixy.pl
^ permalink raw reply
* [PATCH 12/12] ath9k: Disable autosleep feature by default.
From: Sujith @ 2009-09-17 3:59 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vivek Natarajan <vnatarajan@atheros.com>
Autosleep needs to be disabled for AR9287 chipsets also.
Since autosleep is not used for any of the currently supported
chipsets, disable it by default and can be enabled if needed
for any of the future chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 8146826..84abf30 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3700,15 +3700,7 @@ void ath9k_hw_fill_cap_info(struct ath_hw *ah)
}
#endif
- if ((ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) ||
- (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE) ||
- (ah->hw_version.macVersion == AR_SREV_VERSION_9160) ||
- (ah->hw_version.macVersion == AR_SREV_VERSION_9100) ||
- (ah->hw_version.macVersion == AR_SREV_VERSION_9280) ||
- (ah->hw_version.macVersion == AR_SREV_VERSION_9285))
- pCap->hw_caps &= ~ATH9K_HW_CAP_AUTOSLEEP;
- else
- pCap->hw_caps |= ATH9K_HW_CAP_AUTOSLEEP;
+ pCap->hw_caps &= ~ATH9K_HW_CAP_AUTOSLEEP;
if (AR_SREV_9280(ah) || AR_SREV_9285(ah))
pCap->hw_caps &= ~ATH9K_HW_CAP_4KB_SPLITTRANS;
--
1.6.4.3
^ permalink raw reply related
* [PATCH 11/12] ath9k: Fix regression in PA calibration
From: Sujith @ 2009-09-17 3:58 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
The commit "ath9k: Fix bugs in programming registers during PA CAL"
removed a REG_READ of 0x7834. This resulted in incorrect
computation of the subsequent value to be written in RF2G6.
This patch fixes the regression by re-adding the REG_READ.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 22a3a69..0ad6d0b 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -936,6 +936,7 @@ static inline void ath9k_hw_9285_pa_cal(struct ath_hw *ah, bool is_reset)
regVal |= (1 << (19 + i));
REG_WRITE(ah, 0x7834, regVal);
udelay(1);
+ regVal = REG_READ(ah, 0x7834);
regVal &= (~(0x1 << (19 + i)));
reg_field = MS(REG_READ(ah, 0x7840), AR9285_AN_RXTXBB1_SPARE9);
regVal |= (reg_field << (19 + i));
--
1.6.4.3
^ permalink raw reply related
* [PATCH 10/12] ath9k: Fix bug in chain handling
From: Sujith @ 2009-09-17 3:58 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
* This patch fixes a bug in calculating the scaled
power for three chain chipsets.
* Also, a delay is needed after setting DAC low-power mode in
TOP1 RF register (Top Level Register Bits).
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/eeprom_def.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index ae7fb5d..4071fc9 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -509,6 +509,8 @@ static void ath9k_hw_def_set_board_values(struct ath_hw *ah,
REG_RMW_FIELD(ah, AR_AN_TOP1, AR_AN_TOP1_DACIPMODE,
eep->baseEepHeader.dacLpMode);
+ udelay(100);
+
REG_RMW_FIELD(ah, AR_PHY_FRAME_CTL, AR_PHY_FRAME_CTL_TX_CLIP,
pModal->miscBits >> 2);
@@ -902,7 +904,7 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
u16 powerLimit)
{
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */
-#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10 /* 10*log10(3)*2 */
+#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
--
1.6.4.3
^ permalink raw reply related
* [PATCH 09/12] ath9k: Fix AHB reset for AR9280
From: Sujith @ 2009-09-17 3:57 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vivek Natarajan <vnatarajan@atheros.com>
The commit "ath9k: Do an AHB reset before doing RTC reset"
fixed RTC reset issue for AR9280 2.0 chipsets and above.
The fix is valid for all AR9280 chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@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 323df96..8146826 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1793,7 +1793,7 @@ static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan,
static bool ath9k_hw_chip_reset(struct ath_hw *ah,
struct ath9k_channel *chan)
{
- if (OLC_FOR_AR9280_20_LATER) {
+ if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) {
if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON))
return false;
} else if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
--
1.6.4.3
^ permalink raw reply related
* [PATCH 08/12] ath9k: Adjust the chainmasks properly
From: Sujith @ 2009-09-17 3:57 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
This is needed to account for the number of chains in use,
not just the number of chains present.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 439f2c7..22a3a69 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -609,14 +609,24 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
AR_PHY_CH1_EXT_CCA,
AR_PHY_CH2_EXT_CCA
};
- u8 chainmask;
+ u8 chainmask, rx_chain_status;
+ rx_chain_status = REG_READ(ah, AR_PHY_RX_CHAINMASK);
if (AR_SREV_9285(ah))
chainmask = 0x9;
- else if (AR_SREV_9280(ah) || AR_SREV_9287(ah))
- chainmask = 0x1B;
- else
- chainmask = 0x3F;
+ else if (AR_SREV_9280(ah) || AR_SREV_9287(ah)) {
+ if ((rx_chain_status & 0x2) || (rx_chain_status & 0x4))
+ chainmask = 0x1B;
+ else
+ chainmask = 0x09;
+ } else {
+ if (rx_chain_status & 0x4)
+ chainmask = 0x3F;
+ else if (rx_chain_status & 0x2)
+ chainmask = 0x1B;
+ else
+ chainmask = 0x09;
+ }
h = ah->nfCalHist;
--
1.6.4.3
^ permalink raw reply related
* [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
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