Commit a3c0b87c authored by Lorenzo Nava's avatar Lorenzo Nava Committed by John W. Linville
Browse files

b43: fix b43_plcp_get_bitrate_idx_ofdm return type

This patch fixes the return type of b43_plcp_get_bitrate_idx_ofdm. If
the plcp contains an error, the function return value is 255 instead
of -1, and the packet was not dropped. This causes a warning in
__ieee80211_rx function because rate idx is out of range.

Signed-off-by: default avatarLorenzo Nava <>
Signed-off-by: default avatarMichael Buesch <>
Signed-off-by: default avatarJohn W. Linville <>
parent a1bfa0eb
......@@ -50,7 +50,7 @@ static int b43_plcp_get_bitrate_idx_cck(struct b43_plcp_hdr6 *plcp)
/* Extract the bitrate index out of an OFDM PLCP header. */
static u8 b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool aphy)
static int b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool aphy)
int base = aphy ? 0 : 4;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment