From patchwork Tue Oct 27 13:50:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312239 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=unavailable 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 D8D37C5DF9E for ; Tue, 27 Oct 2020 16:46:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E0122225E for ; Tue, 27 Oct 2020 16:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603817193; bh=l7550WL8V7HrHeDV9MOX337k1Jz9qcvopLUQ/QNR858=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=LcuDZeW3apGVt2Z58jgIWaVTVgfFNA54DBcai9K4oruepCnjFoeNJQ4PMuGPqNWZX JKNuWgQAWxZv/R87Q+FTGymJXljPXQU38d18qLmAtQe+mG2V7Nq9bk0eIQT3uY0Dje 9eM/w/fy0cHpl4gfOmRuegBX0JrX+CgJ+WLxWkbM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1799561AbgJ0Pm3 (ORCPT ); Tue, 27 Oct 2020 11:42:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:55880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1800851AbgJ0Pg6 (ORCPT ); Tue, 27 Oct 2020 11:36:58 -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 E2BCF22264; Tue, 27 Oct 2020 15:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813017; bh=l7550WL8V7HrHeDV9MOX337k1Jz9qcvopLUQ/QNR858=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=14B0cFA1eIPRWVbVCBk9QVtcqi9SCLWMnYqyqXR6zegLSrm25X4A1VXLamaxF9sol XTefYrl9Bp6WFM12dRqJ4E+cIvNMPn5n9TEdcsyAT+qqBmq3A46jjduSPpeYIIT+mw OWlUmyxNiMLNR1t06xiLmv0IMP3JBCuq5piarOhM= 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 379/757] staging: wfx: fix BA sessions for older firmwares Date: Tue, 27 Oct 2020 14:50:29 +0100 Message-Id: <20201027135508.330298911@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 4fd1241778b08129f196605c62636a4d6d71c2c7 ] Firmwares with API < 3.6 do not forward DELBA requests. Thus, when a Block Ack session is restarted, the reordering buffer is not flushed and the received sequence number is not contiguous. Therefore, mac80211 starts to wait some missing frames that it will never receive. This patch disables the reordering buffer for old firmware. It is harmless when the network is unencrypted. When the network is encrypted, the non-contiguous frames will be thrown away by the TKIP/CCMP replay protection. So, the user will observe some packet loss with UDP and performance drop with TCP. Fixes: e5da5fbd7741 ("staging: wfx: fix CCMP/TKIP replay protection") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/wfx/data_rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 6fb0788807426..33b715b7b94bb 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -17,6 +17,9 @@ static void wfx_rx_handle_ba(struct wfx_vif *wvif, struct ieee80211_mgmt *mgmt) { int params, tid; + if (wfx_api_older_than(wvif->wdev, 3, 6)) + return; + switch (mgmt->u.action.u.addba_req.action_code) { case WLAN_ACTION_ADDBA_REQ: params = le16_to_cpu(mgmt->u.action.u.addba_req.capab);