Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3553309pxu; Tue, 15 Dec 2020 09:34:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1EKPE5WHPo3927nNAmO0XTAllmejIeOm7J4xV/71SI7JjBlhSEnVSUeGbwO5IIGwZgcCS X-Received: by 2002:a17:906:c289:: with SMTP id r9mr26849549ejz.311.1608053661583; Tue, 15 Dec 2020 09:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608053661; cv=none; d=google.com; s=arc-20160816; b=WsHH9+Ij06XmgsnuwyIvHSGyoJroWNE6evH64AqALhCxBgMW+F4oUGuZClUjkV/n8c 4XByWhZaISGUWbCGfeKwR0jQDRv/EH2h3s8t8v9WIS7zu3jNOkIRZkCaKVXvotQzfBxI ajwi0Y2VBufKu6x5n4YIH1yT2acui7TtSg1czJ3+nG/GF3cNJZtYYb9f5oK46O1zU+1+ WG0SzW8S/dlqtGqt9/Imr5W25KLGC+6Mf2Cf7FCL3uPMWkcsnv1pX+tKnGJC0nKAcS3C ir/UfqjU65T13KdjB4X/7MCAlPJK1C7SDwcVjwR3SsdBbRwRdM9fSjWpoDYlMZPF0e/Z pBBg== 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=tvtO2KA5nhRPlmIiAtssJFU9Akib4mg+tGupV5ZXOa+jaoRt5Fvu3bzWBMvnM/jIme 8A9bQmdRQVL32r1LdpAdG4Hs6MfiHJ6PuBG8PmRMF0/LNvhusETttYdTfwx4R6zA29Ka AkRR63pFknWgKr5JEYmzzDZMlrNxT2X2BtajMLdxfDXImHZ2QTw6XKz4uI6wPJjEUjIf 8Diy4ohn5If2IiYjmOSZre3TRIo5GLSrRyQFxvf0uYnjE9k32QAoEDJBnljggZd2+k3N YZez8ZC/7Z5y8Opfbu0IgZENu3KQvz1FbpfB/4t3kFfUgwtXr0iV3s4XGR/Zts98aeLb juHQ== 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 11si1350938edv.53.2020.12.15.09.33.56; Tue, 15 Dec 2020 09:34:21 -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 S1730346AbgLORbJ (ORCPT + 99 others); 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 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