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; 14+ 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] 14+ messages in thread

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

Thread overview: 14+ 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

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.