All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: p54: AP mode: no data frame despite traffic indication set in TIM
@ 2008-11-24 20:24 Christian Lamparter
  2008-11-26 13:38 ` Stefan Steuerwald
  0 siblings, 1 reply; 20+ messages in thread
From: Christian Lamparter @ 2008-11-24 20:24 UTC (permalink / raw)
  To: Stefan Steuerwald; +Cc: Johannes Berg, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On Monday 24 November 2008 17:51:45 Stefan Steuerwald wrote:
> Thanks again Christian and Johannes,
> 
> from a first quick check
> - set-and-clear.diff doesn't seem to change anything
> - both patches together freeze my system
> 
> I don't have a serial console on this embedded thing, so I don't know
> its death poem yet. Let me set up my debug environment properly and
> report back to you.

This might not be necessary.

Try this updated patch. And let us know if we no do the right thing.

Regards,
	Chr

[-- Attachment #2: p54-sta-flags-v2.diff --]
[-- Type: text/x-diff, Size: 2316 bytes --]

diff -Nurp a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
--- a/drivers/net/wireless/p54/p54common.c	2008-11-24 13:07:09.053832187 +0100
+++ b/drivers/net/wireless/p54/p54common.c	2008-11-24 21:05:42.590287518 +0100
@@ -688,7 +688,8 @@ static void p54_rx_frame_sent(struct iee
 			}
 		}
 
-		priv->tx_stats[entry_data->hw_queue].len--;
+		if (priv->tx_stats[entry_data->hw_queue].len > 0)
+			priv->tx_stats[entry_data->hw_queue].len--;
 		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
 		     (!payload->status))
 			info->flags |= IEEE80211_TX_STAT_ACK;
@@ -1067,9 +1068,15 @@ static int p54_tx_fill(struct ieee80211_
 			*queue = 3;
 			return 0;
 		}
-		if (info->control.sta)
+		if (info->control.sta) {
+			if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) {
+				ret = p54_sta_unlock(dev, info->control.sta->addr);
+				if (ret)
+					return ret;
+				*flags |= P54_HDR_FLAG_DATA_OUT_NOCANCEL;
+			}
 			*aid = info->control.sta->aid;
-		else
+		} else
 			*flags = P54_HDR_FLAG_DATA_OUT_NOCANCEL;
 	}
 	return ret;
@@ -1083,7 +1090,7 @@ static int p54_tx(struct ieee80211_hw *d
 	struct p54_hdr *hdr;
 	struct p54_tx_data *txhdr;
 	size_t padding, len, tim_len = 0;
-	int i, j, ridx;
+	int i, j, ridx, ret;
 	u16 hdr_flags = 0, aid = 0;
 	u8 rate, queue;
 	u8 cts_rate = 0x20;
@@ -1093,7 +1100,10 @@ static int p54_tx(struct ieee80211_hw *d
 
 	queue = skb_get_queue_mapping(skb);
 
-	if (p54_tx_fill(dev, skb, info, &queue, &tim_len, &hdr_flags, &aid)) {
+	ret = p54_tx_fill(dev, skb, info, &queue, &tim_len, &hdr_flags, &aid);
+	if (ret < 0)
+		return NETDEV_TX_BUSY;
+	if (ret) {
 		current_queue = &priv->tx_stats[queue];
 		if (unlikely(current_queue->len > current_queue->limit))
 			return NETDEV_TX_BUSY;
@@ -1106,17 +1116,6 @@ static int p54_tx(struct ieee80211_hw *d
 	padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3;
 	len = skb->len;
 
-	if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) {
-		if (info->control.sta)
-			if (p54_sta_unlock(dev, info->control.sta->addr)) {
-				if (current_queue) {
-					current_queue->len--;
-					current_queue->count--;
-				}
-				return NETDEV_TX_BUSY;
-			}
-	}
-
 	txhdr = (struct p54_tx_data *) skb_push(skb, sizeof(*txhdr) + padding);
 	hdr = (struct p54_hdr *) skb_push(skb, sizeof(*hdr));
 

^ permalink raw reply	[flat|nested] 20+ messages in thread
* p54: AP mode: no data frame despite traffic indication set in TIM
@ 2008-11-21 14:12 Stefan Steuerwald
  2008-11-24 13:36 ` Stefan Steuerwald
  2008-11-24 13:37 ` Johannes Berg
  0 siblings, 2 replies; 20+ messages in thread
From: Stefan Steuerwald @ 2008-11-21 14:12 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

I got another one to lay out before you for comment:

Setup:
- XG-601 card (ISL3880) with p54pci driver in AP mode
- iPod Touch 2G (firmware 2.1.1) as the only client

The client does an http request and waits for an answer. In this case,
the web server answers, but the answer seemingly is never sent over
the air.

Please see the attached pcap:
- frame 7: http request
- frame 13: iPod goes to sleep
- frame 23: AP beacon indicates traffic for iPod (AID 1 in TIM)
- frame 25: iPod wakes up
- in between: MISSING DATA ???
- frame 27: AP beacon with no traffic indicated ???
- frame 29: iPod goes to sleep again
- subsequent frames: repetitions of this, until the TCP connection is closed

My understanding is that the AP would not indicate any traffic without
actually having some ready to send? Wrong assumption?

Both the iPod and the monitoring device seem to agree the http reply
is not there. This would be a good reason for the application-level
timeouts I'm seeing.

Best wishes,
  Stefan.


See also: previous conversation about app-level timeouts and powersave:
http://article.gmane.org/gmane.linux.kernel.wireless.general/24278

[-- Attachment #2: ipod-no-data-despite-traffic-in-tim.pcap --]
[-- Type: application/cap, Size: 13587 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-11-28 21:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 20:24 p54: AP mode: no data frame despite traffic indication set in TIM Christian Lamparter
2008-11-26 13:38 ` Stefan Steuerwald
2008-11-26 21:13   ` Christian Lamparter
2008-11-27  5:34     ` Stefan Steuerwald
2008-11-27  8:57     ` Stefan Steuerwald
2008-11-27 11:06       ` Christian Lamparter
2008-11-27 14:05         ` Stefan Steuerwald
2008-11-27 14:13           ` Johannes Berg
2008-11-27 14:42             ` Christian Lamparter
2008-11-27 15:16               ` Stefan Steuerwald
2008-11-27 15:59               ` Johannes Berg
2008-11-28 20:09                 ` [RFC] mac80211 & p54: add sta_notify_ps callback Christian Lamparter
2008-11-28 20:43                   ` Christian Lamparter
2008-11-28 21:18                     ` Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2008-11-21 14:12 p54: AP mode: no data frame despite traffic indication set in TIM Stefan Steuerwald
2008-11-24 13:36 ` Stefan Steuerwald
2008-11-24 13:41   ` Johannes Berg
2008-11-24 13:37 ` Johannes Berg
2008-11-24 15:19   ` Christian Lamparter
2008-11-24 16:51     ` Stefan Steuerwald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.