Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3469304pxp; Tue, 8 Mar 2022 15:16:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3+iNo3pij0vSyI3t/C8hF5YHY1T+m2POUg6lJVrqHJJsMhxjcMgQvhP1Voxh8mt8hGuYa X-Received: by 2002:a17:902:9348:b0:14d:8ee9:329f with SMTP id g8-20020a170902934800b0014d8ee9329fmr19866905plp.80.1646781378016; Tue, 08 Mar 2022 15:16:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646781378; cv=none; d=google.com; s=arc-20160816; b=KPQRCcWDWOMQ94jn7tWXFvC/mMa5TfMr6rd19I6LqfNF/Ss/+WO0QTTmdSY+1Ogg0k vWy6r/KStYEOjdT5dTmBIsGVbvhIi7eFomG666RG066hHhs+Az5/Tye+Y8BhrpJINGKu l788Dohy2ZYVamx6SBMPEk5Gb7yRCOO20tt36JZz8Vp5PnxpQZP2tH1MBUt7kRkr85CE pgzeEY/PLo9ffApXqaYjJiOOl+6pDFLKt/bzodutY00+5MplPwmHaotQYGwFlEoLhuxY 7KGuP0WghpRhl1HJFvm9lgQwbBEKaswMVxSDr45qeysDf32XWaWVWZNsVdiPUAKx9hkS Uh7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=4I0xvyDGIcI8qepShHizwCi/vroxs/PgmbRwsrK/6bA=; b=hljJiOMD6Smi5WNONpT9+AZcd80KcwSJ4A2WWGeSX7EVBjYE0MLb79qa/L1QH10bBy MSR0Az1aHiEFQiXkuc1fnRiCEY63+pJxhMaacnNzlZhn7a5ByeL1jHn4maQVnVUeFMcR or+ZlepgckbjdV8MXDJg6KAGFM+vC1/g5Yovctvwybo0x6SQ5YoaKErPfsR+0+Iz6dqF hkjYfZ/g5CvwNORSOiIhzUKcdnb8uyFriEdVQKH5ZzMrBSl/d8YgDtDhAxaZvbPtK1nE Dg+P9LlksTOShIys5/BsCr3xzoXwc4EY3ZeOn/u6gBMukfa9x0hE8EMAPPQzOO/s2umL MRTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u7-20020a17090341c700b00151cf88afb6si264805ple.557.2022.03.08.15.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:16:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A2E4B79C5B; Tue, 8 Mar 2022 15:11:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244322AbiCHLyi (ORCPT + 70 others); Tue, 8 Mar 2022 06:54:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231753AbiCHLyh (ORCPT ); Tue, 8 Mar 2022 06:54:37 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFD833899; Tue, 8 Mar 2022 03:53:41 -0800 (PST) Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 08 Mar 2022 03:53:41 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 08 Mar 2022 03:53:40 -0800 X-QCInternal: smtphost Received: from unknown (HELO youghand-linux.qualcomm.com) ([10.206.66.115]) by ironmsg02-blr.qualcomm.com with ESMTP; 08 Mar 2022 17:23:28 +0530 Received: by youghand-linux.qualcomm.com (Postfix, from userid 2370257) id 3728622681; Tue, 8 Mar 2022 17:23:27 +0530 (IST) From: Youghandhar Chintala To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, pillair@codeaurora.org, dianders@chromium.org, kuabhs@chromium.org, briannorris@chromium.org, mpubbise@codeaurora.org, Youghandhar Chintala Subject: [PATCH v5 0/2] mac80211: Trigger disconnect for STA during target hardware restart Date: Tue, 8 Mar 2022 17:23:23 +0530 Message-Id: <20220308115325.5246-1-youghand@codeaurora.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Currently in case of target hardware restart ,we just reconfig and re-enable the security keys and enable the network queues to start data traffic back from where it was interrupted. Many ath10k wifi chipsets have sequence numbers for the data packets assigned by firmware and the mac sequence number will restart from zero after target hardware restart leading to mismatch in the sequence number expected by the remote peer vs the sequence number of the frame sent by the target firmware. This mismatch in sequence number will cause out-of-order packets on the remote peer and all the frames sent by the device are dropped until we reach the sequence number which was sent before we restarted the target hardware In order to fix this, we trigger a disconnect in case of hardware restart. After this there will be a fresh connection and thereby avoiding the dropping of frames by remote peer. The right fix would be to pull the entire data path into the host which is not feasible or would need lots of complex/inefficient datapath changes. --- Changes from v3: - Fixed commit text errors - Remove excess space in "hardware restart" - Removed blank line between the function description and the arguments Youghandhar Chintala (2): mac80211: Add support to trigger sta disconnect on hardware restart ath10k: Trigger sta disconnect on hardware restart drivers/net/wireless/ath/ath10k/core.c | 25 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 2 ++ include/net/mac80211.h | 10 ++++++++ net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/mlme.c | 12 ++++++++++ net/mac80211/util.c | 33 +++++++++++++++++++++++--- 6 files changed, 82 insertions(+), 3 deletions(-) -- 2.29.0