From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9C5E13ADB; Sat, 3 Feb 2024 04:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933788; cv=none; b=PGrn0qeRVvXi3qgqx4B4lmkRKvH49G55Pk0RjoUwYA3yhcmOjRmJEQU73lnVZkdzCKQuAz2I++2Y3LcC18kSTFa9I1IcJwlZdAXDjy65R6eLhkPPb2EYSK5VEnB1TR4OCbi0RUTwySJIYO//6l+reG2aQM5r/bat+k4bZ0OhKC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933788; c=relaxed/simple; bh=EUd7gAB3KrdNAt6YUsJLwj2KV+la1bVKwWBzUPSG++Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PVmPACzTpxofBCF4oA2wt9ZKyjZ6jGMT5+5aCx7Vt1m8ZAflZS2Cr8RoilqGwTUxAh1uz8A71WNYt4b0g07g4B+DW+1EIuKCXve/EIvYw4iW0dhgh+kALBDIlHKcoypbWht+XGLL3TSfnZHGw6UecdjMwEqSTXXz9liig2GRHEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f1I2DqXx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="f1I2DqXx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90DEFC43394; Sat, 3 Feb 2024 04:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933788; bh=EUd7gAB3KrdNAt6YUsJLwj2KV+la1bVKwWBzUPSG++Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1I2DqXxCEKHwKxNHDST244P/c04eLQpRIFGxs65u6cX9dphtRmD0CXzxD6AMDveS dwae+ffo+cmfIrXoSkVbscsdr1+bajydosbiVaaXt1gZzi8qC1Oy0+YNLMgn6/753D w7wof56mMNXiTlp0A0MwjtuGWJXPpeoAMZbIXzbg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kang Yang , Jeff Johnson , Kalle Valo , Sasha Levin Subject: [PATCH 6.7 097/353] wifi: ath12k: fix and enable AP mode for WCN7850 Date: Fri, 2 Feb 2024 20:03:35 -0800 Message-ID: <20240203035406.862895600@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035403.657508530@linuxfoundation.org> References: <20240203035403.657508530@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kang Yang [ Upstream commit ed7e818a7b501012038d6bc6fedadaf7375a380a ] For AP mode, the peer is created earlier in ath12k_mac_op_add_interface() but ath12k_mac_op_assign_vif_chanctx() will try to create peer again. Then an error will return which makes AP mode startup fail. Kernel log: [ 5017.665006] ath12k_pci 0000:04:00.0: failed to create peer after vdev start delay: -22 wpa_supplicant log: Failed to set beacon parameters Interface initialization failed wls1: interface state UNINITIALIZED->DISABLED wls1: AP-DISABLED wls1: Unable to setup interface. Failed to initialize AP interface wls1: interface state DISABLED->DISABLED wls1: AP-DISABLED So fix this check and enable AP mode for WCN7850, as now AP mode works normally. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121022459.17209-1-quic_kangyang@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/hw.c | 3 ++- drivers/net/wireless/ath/ath12k/mac.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index 2245fb510ba2..b55cf33e37bd 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -949,7 +949,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .rx_mac_buf_ring = true, .vdev_start_delay = true, - .interface_modes = BIT(NL80211_IFTYPE_STATION), + .interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP), .supports_monitor = false, .idle_ps = true, diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index fc0d14ea328e..b698e55a5b7b 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -6380,8 +6380,8 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, } if (ab->hw_params->vdev_start_delay && - (arvif->vdev_type == WMI_VDEV_TYPE_AP || - arvif->vdev_type == WMI_VDEV_TYPE_MONITOR)) { + arvif->vdev_type != WMI_VDEV_TYPE_AP && + arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) { param.vdev_id = arvif->vdev_id; param.peer_type = WMI_PEER_TYPE_DEFAULT; param.peer_addr = ar->mac_addr; -- 2.43.0