[PATCH] zd1211rw: fix filter for PSPOLL frames
authorUlrich Kunitz <kune@deine-taler.de>
Sat, 21 Jul 2007 21:42:02 +0000 (22:42 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Aug 2007 19:06:03 +0000 (15:06 -0400)
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 <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/zd1211rw/zd_mac.c

index f6c487aa8246ac12a2143f9c891801659dd8acaf..26869d107e52acbc4c04b322272b0806cea74ca2 100644 (file)
@@ -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 */