Skip to content

Commit

Permalink
staging: wfx: fix handling of MMIC error
Browse files Browse the repository at this point in the history
[ Upstream commit 8d350c1 ]

As expected, when the device detect a MMIC error, it returns a specific
status. However, it also strip IV from the frame (don't ask me why).

So, with the current code, mac80211 detects a corrupted frame and it
drops it before it handle the MMIC error. The expected behavior would be
to detect MMIC error then to renegotiate the EAP session.

So, this patch correctly informs mac80211 that IV is not available. So,
mac80211 correctly takes into account the MMIC error.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20201007101943.749898-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jerome-pouiller authored and gregkh committed Oct 29, 2020
1 parent 858c56f commit e1ec1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/wfx/data_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void wfx_rx_cb(struct wfx_vif *wvif,
goto drop;

if (arg->status == HIF_STATUS_RX_FAIL_MIC)
hdr->flag |= RX_FLAG_MMIC_ERROR;
hdr->flag |= RX_FLAG_MMIC_ERROR | RX_FLAG_IV_STRIPPED;
else if (arg->status)
goto drop;

Expand Down

0 comments on commit e1ec1c2

Please sign in to comment.