Skip to contentSkip to conversation

p54: fix pspoll mechanism in ap mode

RFC New Christian Lamparter 1 participant 1 message Apr 17, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 p54: fix pspoll mechanism in ap mode

pspolled data frames need be able to bypass the firmware's powersave filter.

---
I'm not sure about the mac80211 change...

But without it, all frames send after the pspoll request by the station are requeued into sta->tx_filtered.

The reason:
the firmware rejected them (tx_status) because the station is blacklisted.
---

net/mac80211/tx.c +2 -1
index 3fb04a8..d1fcfef 100644
@@ -409,7 +409,8 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
 		       sta->sta.addr);
 	}
 #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
-	clear_sta_flags(sta, WLAN_STA_PSPOLL);
+	if (test_and_clear_sta_flags(sta, WLAN_STA_PSPOLL))
+		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
 	return TX_CONTINUE;
 }
drivers/net/wireless/p54/p54common.c +2 -1
index adb812b..d80f2ec 100644
@@ -1650,7 +1650,8 @@ static int p54_tx_fill(struct ieee80211_hw *dev, struct sk_buff *skb,
 
 		if (info->control.sta)
 			*aid = info->control.sta->aid;
-		else
+
+		if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
 			*flags |= P54_HDR_FLAG_DATA_OUT_NOCANCEL;
 		break;
 	}