From nobody Sat Sep 30 15:28:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyWMZ0fWrz4vTQL; Sat, 30 Sep 2023 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RyWMZ06RMz4Q9L; Sat, 30 Sep 2023 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=eyOST6QXJUd424bXgXTodyudXqyJkxpM7KhUIJl2EKIweNLWweV6/1jmaGlgDwHlNRs8AG eGQJ8ZaifN4PfzC94m0f9ngDQD38Omr05VS/NZWPf4I9h3aDNjrJQtr8I0mTX2nUFJbc/M cmSlhtwHVlNxyy0/5LtkNvzJnBeNgiRdjvXI5EptB5VcMSGRPF4oop3N0NugDfJ5pk41Nj w2Sqnv1t4C2bdNuoKT9900mZwvRFjxmcHRds5PFQQpBHzCbGr/xANqPvlh/xFJBpGk5ypH DFgZUraXVb7lpQWPmHo+DS1Ta+TVT2vFfzyf76VvTYJqYQJzWFH+K9DUfaxCmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696087722; a=rsa-sha256; cv=none; b=IByu5/IjLjry9V9PesR5kE7Jk1M7gLie/ggxHzfgTR/v8YLF4Ek+z9SD78JH/B4iUnvqKG a8xgdv8u7nZVE502dhculFpGcvF1m5ruS9Qyn8WpSN97fCmaLGWUpeDMKlBSLQngSWkbOO xYbQEromtADXyDNi6dS5le2ywTNnle6Ekd41TGu7toKD1GPfZ4gvSsUtlhOmIpUxqJPapN oEseGAtOBg/56J/cfcT3A/cxs7WeNWaqhCIJLRiJymJyDsf4nuDTRN864MuUA5y7IMqC8h pUhDLUlKal2SaqRGqD/P6blOJ4FvLdoHKyjRkrUf2qYGgXFmeRdz8Ir2RVbwJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=jb4iNBTuwza9ISGCz3MqR4oMxg7nDrmiEyn0tWWZDJaA2Tw0IkmaczESHItsj3LKUOMj6W 3eu71YyjRsueZTT9DiHxKV+TKk7r2DoCGitlY5qPauK93NnMARrSJdbreS+MQmB7yoxDI4 1ar7yCdsh7vOGIxvuRujedp4Fcg1mrt/kGDEsqstULQnWMqvixd4PcRXJYcHyoFi+GA/WD QP/+4W8wHeur5/TXIchbsCQQ3xT3aIeom6FbCKaq0+cfsUQ4KrlF2VCOqhObLbesdMhhGr O5FHHaBknxj9xmKhm7oZGW70VztrBGTKObA+CLMKJCnCV+ptoHsMJMSM60VsjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyWMY6GP0zsl6; Sat, 30 Sep 2023 15:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38UFSfRJ095045; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38UFSfLw095042; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git) Date: Sat, 30 Sep 2023 15:28:41 GMT Message-Id: <202309301528.38UFSfLw095042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dbf7691999ab - main - LinuxKPI: 802.11: improve lkpi_ic_vap_delete() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dbf7691999abe501e0ebc0fe4d8d9e97718d3890 commit dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:20:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-30 15:27:05 +0000 LinuxKPI: 802.11: improve lkpi_ic_vap_delete() Changing the order of cleanup in lkpi_ic_vap_delete() will avoid firmware crashes or a direct panic as observed as ieee80211_vap_detach() will do most cleanup for us and get us into the correct state. The solution is not fully developed yet and one may not be able to create a new vap (lkpi_ic_vap_create may fail with error 17) afterwards. It is supposed to be a step towards more stability for now. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 269842 --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 229c73732ee4..7565f491606b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2473,10 +2473,14 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); - lkpi_80211_mo_remove_interface(hw, vif); ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); + + IMPROVE("clear up other bits in this state"); + + lkpi_80211_mo_remove_interface(hw, vif); + mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); }