mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-07 13:13:57 +08:00
mac80211: don't check rates on PLCP error frames
Frames that failed PLCP error checks are most likely microwave transmissions (well, maybe not ...) and don't have a proper rate detected, so ignore it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
86df5f7284
commit
fc88518916
@ -2615,14 +2615,22 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
|||||||
if (WARN_ON(!local->started))
|
if (WARN_ON(!local->started))
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
|
if (likely(!(status->flag & RX_FLAG_FAILED_PLCP_CRC))) {
|
||||||
|
/*
|
||||||
|
* Validate the rate, unless a PLCP error means that
|
||||||
|
* we probably can't have a valid rate here anyway.
|
||||||
|
*/
|
||||||
|
|
||||||
if (status->flag & RX_FLAG_HT) {
|
if (status->flag & RX_FLAG_HT) {
|
||||||
/*
|
/*
|
||||||
* rate_idx is MCS index, which can be [0-76] as documented on:
|
* rate_idx is MCS index, which can be [0-76]
|
||||||
|
* as documented on:
|
||||||
*
|
*
|
||||||
* http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n
|
* http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n
|
||||||
*
|
*
|
||||||
* Anything else would be some sort of driver or hardware error.
|
* Anything else would be some sort of driver or
|
||||||
* The driver should catch hardware errors.
|
* hardware error. The driver should catch hardware
|
||||||
|
* errors.
|
||||||
*/
|
*/
|
||||||
if (WARN((status->rate_idx < 0 ||
|
if (WARN((status->rate_idx < 0 ||
|
||||||
status->rate_idx > 76),
|
status->rate_idx > 76),
|
||||||
@ -2638,6 +2646,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
|||||||
goto drop;
|
goto drop;
|
||||||
rate = &sband->bitrates[status->rate_idx];
|
rate = &sband->bitrates[status->rate_idx];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* key references and virtual interfaces are protected using RCU
|
* key references and virtual interfaces are protected using RCU
|
||||||
|
Loading…
Reference in New Issue
Block a user