linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.39] mac80211: always clear PS filtering for non-AP interfaces
@ 2011-05-06  0:41 Felix Fietkau
  2011-05-06  8:39 ` Johannes Berg
  2011-05-06 13:08 ` Christian Lamparter
  0 siblings, 2 replies; 9+ messages in thread
From: Felix Fietkau @ 2011-05-06  0:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes, greearb

PS filtering is only useful in AP mode and by setting the flags in mac80211,
vif mode checks do not have to be added to every single driver supporting
this.
Fixes part of a regression introduced in commit 93ae2dd2
"ath9k: assign keycache slots to unencrypted stations"

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/tx.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e1a39ed..b301216 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1267,6 +1267,9 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 	else if (test_and_clear_sta_flags(tx->sta, WLAN_STA_CLEAR_PS_FILT))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
+	else if (sdata->vif.type != NL80211_IFTYPE_AP &&
+	         sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
+		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
 	hdrlen = ieee80211_hdrlen(hdr->frame_control);
 	if (skb->len > hdrlen + sizeof(rfc1042_header) + 2) {
-- 
1.7.3.2


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

end of thread, other threads:[~2011-05-06 15:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-06  0:41 [PATCH 2.6.39] mac80211: always clear PS filtering for non-AP interfaces Felix Fietkau
2011-05-06  8:39 ` Johannes Berg
2011-05-06 13:08 ` Christian Lamparter
2011-05-06 13:20   ` Felix Fietkau
2011-05-06 13:26     ` Johannes Berg
2011-05-06 13:35       ` Felix Fietkau
2011-05-06 13:43         ` Johannes Berg
2011-05-06 13:47           ` Felix Fietkau
2011-05-06 15:53             ` Christian Lamparter

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).