diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-02-29 08:00:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-29 14:11:32 -0500 |
commit | 02f1434d4ed8197cefde6f6c4a8b2f502144cbb5 (patch) | |
tree | a27ab84e414715159b44b475d383d5f177130a2b /drivers/net/wireless/zd1211rw | |
parent | 659373d5152705b83283860364bfd4e2b1422f7a (diff) |
zd1211rw: wait between setting hash table and powering radio on
I am running Debian testing kernel 3.1.0-1-amd64, using a 079b:0062 Sagem
XG-76NA 802.11bg stick.
Upon zd1211rw interface
bringup (ifconfig wlan0 up) I get the following timeout:
[ 950.330573] zd1211rw 1-3:1.0: phy2
[ 955.108510] zd1211rw 1-3:1.0: firmware version 4725
[ 955.148532] zd1211rw 1-3:1.0: zd1211b chip 079b:0062 v4810 high 00-19-70
AL2230_RF pa0 g--NS
[snip]
[ 955.204072] zd1211rw 1-3:1.0: error ioread32(CR_REG1): -110
A second ifconfig wlan0 up brings the interface up without problems.
After a bit more debugging, the call trace is the following:
[10241.028130] zd1211rw 1-3:1.0: zd_chip_lock_phy_regs: error
ioread32(CR_REG1): -110
[10241.028140] zd1211rw 1-3:1.0: zd_switch_radio_on: failed to lock PHY regs
[10241.028148] zd1211rw 1-3:1.0: zd_op_start: failed to set radio on
Adding a 10 milliseconds delay between the call to set_mc_hash() and
zd_chip_switch_radio_on() allows successful interface bringups in all
cases and matches what the vendor driver did.
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 98a574a4a465..9fcde36d5013 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -306,9 +306,19 @@ int zd_op_start(struct ieee80211_hw *hw) | |||
306 | r = set_mc_hash(mac); | 306 | r = set_mc_hash(mac); |
307 | if (r) | 307 | if (r) |
308 | goto disable_int; | 308 | goto disable_int; |
309 | |||
310 | /* Wait after setting the multicast hash table and powering on | ||
311 | * the radio otherwise interface bring up will fail. This matches | ||
312 | * what the vendor driver did. | ||
313 | */ | ||
314 | msleep(10); | ||
315 | |||
309 | r = zd_chip_switch_radio_on(chip); | 316 | r = zd_chip_switch_radio_on(chip); |
310 | if (r < 0) | 317 | if (r < 0) { |
318 | dev_err(zd_chip_dev(chip), | ||
319 | "%s: failed to set radio on\n", __func__); | ||
311 | goto disable_int; | 320 | goto disable_int; |
321 | } | ||
312 | r = zd_chip_enable_rxtx(chip); | 322 | r = zd_chip_enable_rxtx(chip); |
313 | if (r < 0) | 323 | if (r < 0) |
314 | goto disable_radio; | 324 | goto disable_radio; |