mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
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>
This commit is contained in:
committed by
John W. Linville
parent
fe643414db
commit
b770b43e95
@@ -2110,6 +2110,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool rate_usable_index_exists(struct ieee80211_supported_band *sband,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sband->n_bitrates; i++)
|
||||
if (rate_supported(sta, sband->band, i))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int ieee80211_rate_control_register(struct rate_control_ops *ops);
|
||||
void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
|
||||
|
||||
Reference in New Issue
Block a user