From patchwork Tue Dec 15 17:30:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youghandhar Chintala X-Patchwork-Id: 11975383 X-Patchwork-Delegate: kuba@kernel.org 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 83A35C2BB9A for ; Tue, 15 Dec 2020 17:31:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 396BA22B2C for ; Tue, 15 Dec 2020 17:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730455AbgLORbJ (ORCPT ); Tue, 15 Dec 2020 12:31:09 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:12901 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbgLORbJ (ORCPT ); Tue, 15 Dec 2020 12:31:09 -0500 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 15 Dec 2020 09:30:29 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 15 Dec 2020 09:30:27 -0800 X-QCInternal: smtphost Received: from youghand-linux.qualcomm.com ([10.206.66.115]) by ironmsg02-blr.qualcomm.com with ESMTP; 15 Dec 2020 23:00:24 +0530 Received: by youghand-linux.qualcomm.com (Postfix, from userid 2370257) id C911E20F17; Tue, 15 Dec 2020 23:00:23 +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 23:00:21 +0530 Message-Id: <20201215173021.5884-1-youghand@codeaurora.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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 Reviewed-by: Abhishek Kumar --- 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), }; /**