* [RFC]: ath5k: enable TXOK IRQ
@ 2008-12-10 5:13 Patrick McHardy
2008-12-17 15:38 ` John W. Linville
2008-12-17 16:52 ` Nick Kossifidis
0 siblings, 2 replies; 3+ messages in thread
From: Patrick McHardy @ 2008-12-10 5:13 UTC (permalink / raw)
To: linux-wireless; +Cc: Jiri Slaby, mickflemm, mcgrof, me
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
I tried to use ath5k in AP mode with hostapd, but hostapd never
added the authenticated and associated stations to the kernel.
The reason is that ath5k didn't invoke the tx tasklet, so it
did not call the ieee80211_tx_status() function and userspace
didn't receive the radiotap message indicating success.
The root cause appears to be that the TXOK interrupt is not
enabled, so the tasklet is never scheduled. I'm not sure whether
TXOK is really the correct one to handle ! IEEE80211_TX_CTL_NO_ACK,
but it fixes the problem for me.
[-- Attachment #2: 02.diff --]
[-- Type: text/x-patch, Size: 980 bytes --]
commit 5ecbb104a7202a6ed9bcfa8b8ef46474d1003600
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Dec 9 21:54:51 2008 +0100
ath5k: enable TXOK IRQ
Without the IRQ, the tx tasklet is not scheduled, which is necessary
to invoke ieee80211_tx_status() to notify userspace of successfully
sent frames.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 940c724..291a334 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1348,7 +1348,8 @@ ath5k_txq_setup(struct ath5k_softc *sc,
* up in which case the top half of the kernel may backup
* due to a lack of tx descriptors.
*/
- qi.tqi_flags = AR5K_TXQ_FLAG_TXEOLINT_ENABLE |
+ qi.tqi_flags = AR5K_TXQ_FLAG_TXOKINT_ENABLE |
+ AR5K_TXQ_FLAG_TXEOLINT_ENABLE |
AR5K_TXQ_FLAG_TXDESCINT_ENABLE;
qnum = ath5k_hw_setup_tx_queue(ah, qtype, &qi);
if (qnum < 0) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC]: ath5k: enable TXOK IRQ
2008-12-10 5:13 [RFC]: ath5k: enable TXOK IRQ Patrick McHardy
@ 2008-12-17 15:38 ` John W. Linville
2008-12-17 16:52 ` Nick Kossifidis
1 sibling, 0 replies; 3+ messages in thread
From: John W. Linville @ 2008-12-17 15:38 UTC (permalink / raw)
To: Patrick McHardy; +Cc: linux-wireless, Jiri Slaby, mickflemm, mcgrof, me
On Wed, Dec 10, 2008 at 06:13:52AM +0100, Patrick McHardy wrote:
> I tried to use ath5k in AP mode with hostapd, but hostapd never
> added the authenticated and associated stations to the kernel.
> The reason is that ath5k didn't invoke the tx tasklet, so it
> did not call the ieee80211_tx_status() function and userspace
> didn't receive the radiotap message indicating success.
>
> The root cause appears to be that the TXOK interrupt is not
> enabled, so the tasklet is never scheduled. I'm not sure whether
> TXOK is really the correct one to handle ! IEEE80211_TX_CTL_NO_ACK,
> but it fixes the problem for me.
Any comments from the ath5k "usual suspects" on this one?
John
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC]: ath5k: enable TXOK IRQ
2008-12-10 5:13 [RFC]: ath5k: enable TXOK IRQ Patrick McHardy
2008-12-17 15:38 ` John W. Linville
@ 2008-12-17 16:52 ` Nick Kossifidis
1 sibling, 0 replies; 3+ messages in thread
From: Nick Kossifidis @ 2008-12-17 16:52 UTC (permalink / raw)
To: Patrick McHardy; +Cc: linux-wireless, Jiri Slaby, mcgrof, me
2008/12/10 Patrick McHardy <kaber@trash.net>:
> I tried to use ath5k in AP mode with hostapd, but hostapd never
> added the authenticated and associated stations to the kernel.
> The reason is that ath5k didn't invoke the tx tasklet, so it
> did not call the ieee80211_tx_status() function and userspace
> didn't receive the radiotap message indicating success.
>
> The root cause appears to be that the TXOK interrupt is not
> enabled, so the tasklet is never scheduled. I'm not sure whether
> TXOK is really the correct one to handle ! IEEE80211_TX_CTL_NO_ACK,
> but it fixes the problem for me.
>
Can you put a simple printk on get_isr to see what interrupts are you getting ?
Your patch sets TXOK interrupt on the secondary interrupt mask
register but if you don't enable
TXOK on the primary imr you won't get any...
2236 sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
2237 AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
2238 AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB;
...so this is weird, you shouldn't get any txok interrupt even with
your patch. Txdesc/txeol should be enough.
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-17 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 5:13 [RFC]: ath5k: enable TXOK IRQ Patrick McHardy
2008-12-17 15:38 ` John W. Linville
2008-12-17 16:52 ` Nick Kossifidis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).