PS mode STA trigger driver bug
Jouni Malinen
jkmaline
Thu Apr 8 21:46:04 PDT 2004
On Thu, Apr 08, 2004 at 03:01:15PM -0400, Joe Parks wrote:
> When a STA with Power Saving mode enabled connects to one of my hostap boxes (firmware revisions 1.3.6 through 1.7.4 tested with driver revisions 0.1.1 through current CVS) it will *eventually* trigger the following:
>
> wlan1: driver bug - prism2_transmit() called when previous TX was pending
It looks like the FIX comment in pspoll_send_buffered() (hostap_ap.c) of
development branch is quite valid.. The driver is trying skip the
possible TX queue when sending a buffered frame after a PS poll from the
station. This bypasses some locking in the kernel and prism2_tx_80211()
ends up being called concurrently by the next "normal" data frame.
I need to take a bit closer look at this at some point, but if you are
interested in experimental changed, you could try to modify that
pspoll_send_buffered() function. One trivial change would be to change
the call to use kernel queue:
if (skb->dev->hard_start_xmit(skb, skb->dev)) {
PDEBUG(DEBUG_AP, "%s: TX failed for buffered frame (PS Poll)"
"\n", skb->dev->name);
dev_kfree_skb(skb);
}
into
dev_queue_xmit(skb);
another alternative would be to change this into
spin_lock_bh(&skb->dev->xmit_lock);
if (skb->dev->hard_start_xmit(skb, skb->dev)) {
spin_unlock_bh(&skb->dev->xmit_lock);
PDEBUG(DEBUG_AP, "%s: TX failed for buffered frame (PS Poll)"
"\n", skb->dev->name);
dev_kfree_skb(skb);
}
spin_unlock_bh(&skb->dev->xmit_lock);
this would at least try to send the frame faster (which would be useful
for this PS Poll case)
I haven't tried these, so if you happen to test them, I'm certainly
interested in hearing whether they helped with this issue.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list