new rfkill causes intermittent transmission
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
It seems that this is cleared up in the the last several patches. Thanks again for the great work!
Kevin
Quoted 40 lines · Kevin Mitchell
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 toath_radio_enable()inath9k_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_enableand 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