diff options
author | Igor Perminov <igor.perminov@inbox.ru> | 2009-08-08 23:55:55 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:53 -0400 |
commit | 1afcfd54fdf913017c07fa1ee497141a7958991d (patch) | |
tree | 38e9bfc5af6ad83b014a795f6bf4623cd9083e40 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 17512dc3b7fc9ff1a60d3748ce87c323df507c3d (diff) |
rt2x00: FIF_PSPOLL filter flag support
This patch implements FIF_PSPOLL filter flag support in rt2x00 drivers,
which has been introduced in mac80211 (see
http://marc.info/?l=linux-wireless&m=124897986330807&w=2).
Signed-off-by: Igor Perminov <igor.perminov@inbox.ru>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 74451f9672d..cb7b6d45933 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -392,6 +392,7 @@ void rt2x00mac_configure_filter(struct ieee80211_hw *hw, FIF_FCSFAIL | FIF_PLCPFAIL | FIF_CONTROL | + FIF_PSPOLL | FIF_OTHER_BSS | FIF_PROMISC_IN_BSS; @@ -407,6 +408,22 @@ void rt2x00mac_configure_filter(struct ieee80211_hw *hw, *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; /* + * If the device has a single filter for all control frames, + * FIF_CONTROL and FIF_PSPOLL flags imply each other. + * And if the device has more than one filter for control frames + * of different types, but has no a separate filter for PS Poll frames, + * FIF_CONTROL flag implies FIF_PSPOLL. + */ + if (!test_bit(DRIVER_SUPPORT_CONTROL_FILTERS, &rt2x00dev->flags)) { + if (*total_flags & FIF_CONTROL || *total_flags & FIF_PSPOLL) + *total_flags |= FIF_CONTROL | FIF_PSPOLL; + } + if (!test_bit(DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, &rt2x00dev->flags)) { + if (*total_flags & FIF_CONTROL) + *total_flags |= FIF_PSPOLL; + } + + /* * Check if there is any work left for us. */ if (rt2x00dev->packet_filter == *total_flags) |