diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-30 07:55:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-30 16:50:39 -0400 |
commit | 22403def134e2c1017cb04ae9129a38e841b2d8c (patch) | |
tree | b513210b85fad90cd4309162cfbf30972bf996fa /include/linux | |
parent | e7d17cf4f7e1b8d06575b6db2397c99c151674b8 (diff) |
mac80211: also drop qos-nullfunc frames silently
We drop nullfunc frames, but not qos-nullfunc frames,
even though those could be used for PS state control
as well.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ieee80211.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 52e15e079c61..0aa831467493 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -472,7 +472,7 @@ static inline int ieee80211_is_cfendack(__le16 fc) | |||
472 | } | 472 | } |
473 | 473 | ||
474 | /** | 474 | /** |
475 | * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC | 475 | * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame |
476 | * @fc: frame control bytes in little-endian byteorder | 476 | * @fc: frame control bytes in little-endian byteorder |
477 | */ | 477 | */ |
478 | static inline int ieee80211_is_nullfunc(__le16 fc) | 478 | static inline int ieee80211_is_nullfunc(__le16 fc) |
@@ -481,6 +481,16 @@ static inline int ieee80211_is_nullfunc(__le16 fc) | |||
481 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); | 481 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); |
482 | } | 482 | } |
483 | 483 | ||
484 | /** | ||
485 | * ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame | ||
486 | * @fc: frame control bytes in little-endian byteorder | ||
487 | */ | ||
488 | static inline int ieee80211_is_qos_nullfunc(__le16 fc) | ||
489 | { | ||
490 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
491 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); | ||
492 | } | ||
493 | |||
484 | struct ieee80211s_hdr { | 494 | struct ieee80211s_hdr { |
485 | u8 flags; | 495 | u8 flags; |
486 | u8 ttl; | 496 | u8 ttl; |