Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp766062pxm; Thu, 3 Mar 2022 04:19:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIv9qxOtrjSTyVWsNIFqfyMnSNBMN9svTBMeyqWIYm8HMtCceTq46+mJTSIKqPKYs+PQbD X-Received: by 2002:a05:6402:1342:b0:413:4bf6:9877 with SMTP id y2-20020a056402134200b004134bf69877mr33879859edw.212.1646309957031; Thu, 03 Mar 2022 04:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646309957; cv=none; d=google.com; s=arc-20160816; b=ytEnVMjK5oeePO9c/b0AqM5lUIJxBNzmRsOGPvFnLZCsDLbS4U0zbGq5E2Ost+7Dxq LynAb/4bTKCcK49b/AmfBn9FpcK/petqYTH1mdUveazCQ1/AqpFXNT9AzKG7Fjyddufy P6fR+zo22IONz6nvQPR93MYjtIkql4ux3I6nxGJezRZBD6SjwHJ/vcirZP8rAJeShWGb hVwbsZMvwJHdzElHRy8rcHWMLAEB6JKoMyNObAeJu3qXXSEKHtmLknA+n0IdRvJtKCc5 hlH7w24LvMTnOe/n6tj4RbFXNp3iMtZ8+s2/UYBct9qWOFioaVYN9zb0Nbg5orao03/A U08A== 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=z9sBmaJYeR1fELjWn99LnaRNMgvmBdoOpMnE62oD4Eo=; b=SBU9PX1vb5kPB6/QDoJCkH4qGe9sK94eZannjnhwxKbHGTu9ABeT1i2lgKP3B53GHr lX/jjQbGDJMsguEykoeRz3jq6aWp4GYiTelBrY24IfMdZ81hBTjqG4okNI+MxzN7azwj Xnbgw09wuDOza4q245yZgeNv3Btv6bX+q2VjaXrrg49bX9fEH6lPFQk1PZghDEZMRuit hubRkUSNBhEcM1YZU49wFgzrCzr1c7OBvbKWrSoH4jgNGzKPWQDXqoohb2+ZR6rxra8l rrRZlzCPlEIxtWLBAOeMnmZbpEC2pS0e20BN8LbOWAaARKFlWsuonw7R44fVJltPXU3G SmFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a170906171200b006d033a130fcsi1179965eje.728.2022.03.03.04.18.52; Thu, 03 Mar 2022 04:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233034AbiCCL4p (ORCPT + 99 others); Thu, 3 Mar 2022 06:56:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233008AbiCCL4m (ORCPT ); Thu, 3 Mar 2022 06:56:42 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ED74F7465; Thu, 3 Mar 2022 03:55:57 -0800 (PST) Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 03 Mar 2022 03:55:57 -0800 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 03 Mar 2022 03:55:56 -0800 X-QCInternal: smtphost Received: from unknown (HELO youghand-linux.qualcomm.com) ([10.206.66.115]) by ironmsg01-blr.qualcomm.com with ESMTP; 03 Mar 2022 17:25:45 +0530 Received: by youghand-linux.qualcomm.com (Postfix, from userid 2370257) id 32DFD22770; Thu, 3 Mar 2022 17:25:44 +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 v4 0/2] mac80211: Trigger disconnect for STA during target hardware restart Date: Thu, 3 Mar 2022 17:25:39 +0530 Message-Id: <20220303115541.15892-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=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@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: - Added common API to trigger disconnect. 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 | 27 ++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 2 ++ include/net/mac80211.h | 23 +++++++++++++++++ net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/mlme.c | 12 +++++++++ net/mac80211/util.c | 34 +++++++++++++++++++++++--- 6 files changed, 98 insertions(+), 3 deletions(-) -- 2.29.0