diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-07-16 13:15:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:14 -0400 |
commit | b770b43e95a66587fbd8c1841de83da87fbf23ea (patch) | |
tree | 8b91a3936e0964192e4f59a98e157606cbe932ac /include | |
parent | fe643414dbf330d6d910e01edd48dd93dc6f2942 (diff) |
mac80211: drop frames for sta with no valid rate
When we're associated we should be able to send data to
target sta. If we cannot we may be trying to use the incorrect
band to talk to the sta. Lets catch any such cases, warn, and
drop the frames to not invalidate assumptions being made on
rate control algorithms when they have a valid sta to
communicate with. Any such cases should be handled and fixed.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ce7cb1b5d453..d98fac54577b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2110,6 +2110,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband, | |||
2110 | return 0; | 2110 | return 0; |
2111 | } | 2111 | } |
2112 | 2112 | ||
2113 | static inline | ||
2114 | bool rate_usable_index_exists(struct ieee80211_supported_band *sband, | ||
2115 | struct ieee80211_sta *sta) | ||
2116 | { | ||
2117 | unsigned int i; | ||
2118 | |||
2119 | for (i = 0; i < sband->n_bitrates; i++) | ||
2120 | if (rate_supported(sta, sband->band, i)) | ||
2121 | return true; | ||
2122 | return false; | ||
2123 | } | ||
2113 | 2124 | ||
2114 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | 2125 | int ieee80211_rate_control_register(struct rate_control_ops *ops); |
2115 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | 2126 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); |