From: Ulrich Kunitz Date: Sat, 21 Jul 2007 21:42:02 +0000 (+0100) Subject: [PATCH] zd1211rw: fix filter for PSPOLL frames X-Git-Tag: v2.6.23-rc3~86^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69dad6e563140ce8578749a8c8651b7f1db8cdbc;p=linux-2.6 [PATCH] zd1211rw: fix filter for PSPOLL frames While filling the control set the driver tests for a PSPOLL frame. But it tested only the subtype of the packet. The full type needs to be tested to identify those packets reliably. [dsd@gentoo.org: backport to mainline] Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index f6c487aa82..26869d107e 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -822,7 +822,7 @@ static void cs_set_control(struct zd_mac *mac, struct zd_ctrlset *cs, cs->control |= ZD_CS_MULTICAST; /* PS-POLL */ - if (stype == IEEE80211_STYPE_PSPOLL) + if (ftype == IEEE80211_FTYPE_CTL && stype == IEEE80211_STYPE_PSPOLL) cs->control |= ZD_CS_PS_POLL_FRAME; /* Unicast data frames over the threshold should have RTS */