Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3547193pxu; Tue, 15 Dec 2020 09:26:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0GrktlPP+nllRAMRDOZHUWTzDF4jNAWagqvK5MxmTRHsA8pxmR4cFm50NIzA3qpGhItrU X-Received: by 2002:a17:906:94c5:: with SMTP id d5mr14044831ejy.427.1608053166367; Tue, 15 Dec 2020 09:26:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608053166; cv=none; d=google.com; s=arc-20160816; b=XC/tPd6JHRVh1IHrvnWSYVce2sD54kPZhMbynVEwT9251nZ+IAO9AQBDZpUJS/6jQv aoHMHQEeVprTQrKiR4xYZjEvtbmJrNCZQn33jnmcCy0UYBaomYdWuLUS7WqQbS7KU21E I3qaqZjtF5GrgKid6kz3fcL7Jfg1Iku2o8O/HdHsFEC2KsEIBSGW4AEuHszXXYoKHcwS wOA4zV1YECuc3lW48/z6xINzsBw0uZtLDl+K43JviVWa9as4mIs3JRiggFh4t0wnmE4S M+oriDsR9gW2iwBVnBWDTLhSyv54jKKy+Y95dFVuyoC87Dv+AOkeDWxJ/J0GCsiG709/ KD+Q== 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=kAi7/ptEteLwhLt8p2k8e8Pi7ny4GYYKy3SeciS/nAo=; b=WgG7sVfKnCui1pCUd9SR/93etu3aGjw5Lf7LJPE6ImOcJob15eQuURiaBlgzbTrhe4 u2x8lgywl9RjB/QMoPtsNWs62apq+Ikpp+eVy/cgfGUxRZPk0Si6ZErVVhqzIzvJ7S+v IWKex9Q001wGhn7HTnv/85y9YbzOx9g7eBn+ipKZOw9jYCW4FdmqXs1A7W8iU5oG9ANq LXwZv/NJLB7bbxMKvjCQemqu7G8HUcLbG0ljYP+MxOQHUZhWI/zdwK7czDyFpn6UmHlt NynMQ4Nvsr4ne+X5J8ma1OD+XPYtlYEleU3rAJUzI++FTKiWipKMF9QolXT0k5V7O7j7 n8Sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y26si1209405edo.273.2020.12.15.09.25.42; Tue, 15 Dec 2020 09:26:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729694AbgLORWn (ORCPT + 99 others); Tue, 15 Dec 2020 12:22:43 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:38699 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbgLORW3 (ORCPT ); Tue, 15 Dec 2020 12:22:29 -0500 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 15 Dec 2020 09:21:44 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 15 Dec 2020 09:21:41 -0800 X-QCInternal: smtphost Received: from youghand-linux.qualcomm.com ([10.206.66.115]) by ironmsg02-blr.qualcomm.com with ESMTP; 15 Dec 2020 22:51:36 +0530 Received: by youghand-linux.qualcomm.com (Postfix, from userid 2370257) id A8DB820F17; Tue, 15 Dec 2020 22:51:35 +0530 (IST) From: Youghandhar Chintala To: johannes@sipsolutions.net Cc: davem@davemloft.net, kuba@kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuabhs@chromium.org, dianders@chromium.org, briannorris@chromium.org, pillair@codeaurora.org, Youghandhar Chintala Subject: [PATCH 1/3] cfg80211: Add wiphy flag to trigger STA disconnect after hardware restart Date: Tue, 15 Dec 2020 22:51:33 +0530 Message-Id: <20201215172133.5111-1-youghand@codeaurora.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many wifi drivers (e.g. ath10k using qualcomm wifi chipsets) support silent target hardware restart/recovery. Out of these drivers which support target hw restart, certain chipsets have the wifi mac sequence number addition for transmitted frames done by the firmware. For such chipsets, a silent target hardware restart breaks the continuity of the wifi mac sequence number, since the wifi mac sequence number restarts from 0 after the restart, which in-turn leads to the peer access point dropping all the frames from device until it receives the frame with the mac sequence which was expected by the AP. Add a wiphy flag for the driver to indicate that it needs a trigger for STA disconnect after hardware restart. Tested on ath10k using WCN3990, QCA6174. Signed-off-by: Youghandhar Chintala --- include/net/cfg80211.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index ab249ca..7fba6f6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4311,6 +4311,9 @@ struct cfg80211_ops { * @WIPHY_FLAG_HAS_STATIC_WEP: The device supports static WEP key installation * before connection. * @WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK: The device supports bigger kek and kck keys + * @WIPHY_FLAG_STA_DISCONNECT_ON_HW_RESTART: The device needs a trigger to + * disconnect STA after target hardware restart. This flag should be + * exposed by drivers which support target recovery. */ enum wiphy_flags { WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK = BIT(0), @@ -4337,6 +4340,7 @@ enum wiphy_flags { WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23), WIPHY_FLAG_HAS_STATIC_WEP = BIT(24), + WIPHY_FLAG_STA_DISCONNECT_ON_HW_RESTART = BIT(25), }; /** -- 2.7.4