Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1169826pxm; Thu, 3 Mar 2022 11:42:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhOTKfTpZtD1CVAzHFWbkFeDkeAbNrVsukvalJqnAT08/Xw/IEiPuIuJZYB+PoXwpI+Fj7 X-Received: by 2002:a50:f0d0:0:b0:413:362a:1563 with SMTP id a16-20020a50f0d0000000b00413362a1563mr35832800edm.393.1646336540637; Thu, 03 Mar 2022 11:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646336540; cv=none; d=google.com; s=arc-20160816; b=OZj/w/nvKcRp/Km/ufeoVBmXPIjoJ9BguXTPhRLwCcYLHL8JLjCPgiuBYKtRAqVJnj VEy9CIXsVvgCXrqPKkfHbczmGXbeK0hs8BYHZf4AVkaX3yZ4gE0rcyp8dXmwXO+Edu37 S5GNxDOLnlbPkloy4JXpPahRpgyuPeL0kyIffucwjAjoMCall11s21BRl9jvWsVe9TpE LKuL8vd0GpBzxyOZEBybgpjmqwFqWg9dPXOVjeK/i+8mX//UttRUDncTvHhrHMF0Seya t6VmFEZQil/bAmnTjaT7LL2g8mKTCrap3f9xBJfz43supbg7oK23+Ok89HH8LtgAlPjD Ev2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=+iDGKFAulchRj34sfVomUgUNOfHoOIb3JB/8WAHfFTs=; b=s2TlH2VB7beOmZ4PlWLDfXetsyo/wtLJL/GqNIFkORGCVMZkGpNEJcfhFR3pRdw3Uh +LGzhl5H9C7mUjELyq7U83t4JdC09NVTbEHCy4XPN5pfuuxYPjV84Io4ZmQGc9TgHOAW Ucz6ds57ZBuHS7V+kQqXdE16IdJfrZjS2VJEU1RGw7ivgX/31M/P2lqwjBMi+w5W5Ycs xqyRZ7Km8Tqn+Aryj7S9CMaccIczrEf9LTD5RDEJjBnsoSGGE0fl9ig/19Vg9yxc2c4m jI/piE5dlI/ldIck9SMW6eLm9e+gTPgk0RCUdhCXohwVoJgJ71fW6nTpq4oxKjnZCp0d KGmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ujoppl2n; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a50d6cb000000b00410d2767811si1826083edj.254.2022.03.03.11.41.56; Thu, 03 Mar 2022 11:42:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ujoppl2n; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231869AbiCCQpk (ORCPT + 72 others); Thu, 3 Mar 2022 11:45:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbiCCQpj (ORCPT ); Thu, 3 Mar 2022 11:45:39 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41EC144F54; Thu, 3 Mar 2022 08:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646325894; x=1677861894; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=+iDGKFAulchRj34sfVomUgUNOfHoOIb3JB/8WAHfFTs=; b=ujoppl2nu8/UyuXESWxwBH4/5C3BHnrW2Lfu+iEqZSl9663N7JWgei5j WZaUpaSnyiWy0g9OOhcsD7W+LIOxTmACAFj6N738VolimkTJADvZyX7it 9atShLyM10aP8o1hU3/hFeqlg11dOzIdhDLTJIxJk3FLHAFQetaCsOvGi I=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 03 Mar 2022 08:44:53 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 08:44:53 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 3 Mar 2022 08:44:52 -0800 Received: from [10.111.177.132] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 3 Mar 2022 08:44:52 -0800 Message-ID: <7ac0be6d-35f1-cab3-0ab3-c06367a28ed1@quicinc.com> Date: Thu, 3 Mar 2022 08:44:51 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v4 1/2] mac80211: Add support to trigger sta disconnect on hardware restart Content-Language: en-US To: Youghandhar Chintala , CC: , , , , , , References: <20220303115541.15892-1-youghand@codeaurora.org> <20220303115541.15892-2-youghand@codeaurora.org> From: Jeff Johnson In-Reply-To: <20220303115541.15892-2-youghand@codeaurora.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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-wireless@vger.kernel.org On 3/3/2022 3:55 AM, Youghandhar Chintala wrote: > 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 sta disconnect, in case of target > hw 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 changes and > will still be inefficient. > > Tested on ath10k using WCN3990, QCA6174 > > Signed-off-by: Youghandhar Chintala > --- > include/net/mac80211.h | 11 +++++++++++ > net/mac80211/ieee80211_i.h | 3 +++ > net/mac80211/mlme.c | 12 ++++++++++++ > net/mac80211/util.c | 33 ++++++++++++++++++++++++++++++--- > 4 files changed, 56 insertions(+), 3 deletions(-) > > diff --git a/include/net/mac80211.h b/include/net/mac80211.h > index bd6912d0292b..0773c50fa182 100644 > --- a/include/net/mac80211.h > +++ b/include/net/mac80211.h > @@ -6064,6 +6064,17 @@ void ieee80211_disconnect(struct ieee80211_vif *vif, bool reconnect); > */ > void ieee80211_resume_disconnect(struct ieee80211_vif *vif); > > +/** > + * ieee80211_hw_restart_disconnect - disconnect from AP after > + * hardware restart nits: remove excess space in "hardware restart" "Do not leave a blank line between the function description and the arguments" per (I see that there is quite a mixture of compliant and non-compliant kernel-doc in this file)