From: Kevin Mitchell Date: Thu, 27 Aug 2009 21:03:23 -0700 Subject: [ath9k-devel] new rfkill causes intermittent transmission Message-ID: <1ecf80920908272103y5edf9aa3we774f73e6ba7f7a8@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org I am running ath9k on an ar5418 in a Thinkpad T60. My AP is a Dlink DIR-655. I have bisected this regression down to the big rfkill rewrite 19d337dff95cbf76edd3ad95c0cee2732c3e1ec5. Starting with this commit, I find that transmitting and receiving cycle through working/not working at ~1HZ. As this is a rather large commit, I have further pinpointed the problem down to the call to ath_radio_enable() in ath9k_rfkill_poll_state(). In particular if i comment out if (blocked) ath_radio_disable(sc); else ath_radio_enable(sc); everything works fine again with the likely exception of rfkill. At this stage, my understanding becomes sketchy, but I dug into ath_radio_enable and found everything worked if i commented out spin_lock_bh(&sc->sc_resetlock); r = ath9k_hw_reset(ah, ah->curchan, false); if (r) { DPRINTF(sc, ATH_DBG_FATAL, "Unable to reset channel %u (%uMhz) ", "reset status %d\n", channel->center_freq, r); } spin_unlock_bh(&sc->sc_resetlock); Again, I admit complete ignorance at such a low level, but isn't it kind of severe to be continually resetting the hardware inside a polling loop? On a side note, I find that if I comment out only the ath9k_hw_reset, but leave the spinlock/unlock, the cycling functionality of TX/RX is no longer present, but the connection seems kind of unstable. By that I mean I can get through one default iperf -c test, but the connection usually drops in the second. Kevin