From patchwork Tue Oct 27 13:55:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 307369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 814E2C388F9 for ; Tue, 27 Oct 2020 16:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3954922275 for ; Tue, 27 Oct 2020 16:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603816279; bh=A37e4dVHhc52u326Jau40fDQWp8Wy/f8qd4T3PclcYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ugeS4/HFssluL4z0ii7QRIxpk4oBDucLppdqaKIwVOqnu9Kgi6+Bb4jW3C9vhfl4m wnGcbsfx8MknSQucocRFV9vENNe0MUY+5wGQ79HctllR5o9vU2EWHGzXqU3v1FFjOb xbvWamTQYp9/1ynG6pizO1hrcUOy2nQFLSzxJGwQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762946AbgJ0QbS (ORCPT ); Tue, 27 Oct 2020 12:31:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1802599AbgJ0Pu1 (ORCPT ); Tue, 27 Oct 2020 11:50:27 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4602D204EF; Tue, 27 Oct 2020 15:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813827; bh=A37e4dVHhc52u326Jau40fDQWp8Wy/f8qd4T3PclcYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aNZII14HDk0HqUwNumeBmFm3bO88QbchI4Exz01mh9IVfAov9qcNh2w3IGY6MuECA Lh7dL3LIj90gIhK/enheF3zD0sJT3U/E30FpAPJFhV3SZdZO9dL3i5S/vXkIqu1S4H /m4e3qBGYkxqkRf29oBiHY7LqX9FenY2/h4KdA84= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= , Sasha Levin Subject: [PATCH 5.9 676/757] staging: wfx: fix handling of MMIC error Date: Tue, 27 Oct 2020 14:55:26 +0100 Message-Id: <20201027135522.244534084@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jérôme Pouiller [ Upstream commit 8d350c14ee5eb62ecd40b0991248bfbce511954d ] 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 Link: https://lore.kernel.org/r/20201007101943.749898-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/wfx/data_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 33b715b7b94bb..ef0cc1e474ae6 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -44,7 +44,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, memset(hdr, 0, sizeof(*hdr)); 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;