Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3523636pxf; Mon, 15 Mar 2021 11:27:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlCCbca6mNFESvK6kFA5nw9gyibd42Shkp+mifsy/lMhTBRFYluaTQ44dHS45XJJeftRs5 X-Received: by 2002:aa7:dc49:: with SMTP id g9mr30641826edu.60.1615832861489; Mon, 15 Mar 2021 11:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832861; cv=none; d=google.com; s=arc-20160816; b=nWGUCBjiwzei7l8WIApGY8jJ1v+9Q5XhE4E6RcEvrdlc/xfdG69SqO+igvc4y4zzu6 DEgV/9bMEZp0b33KeGPhHV2JFOd3LpYrN1mLHvoepAtNPvnM+1d5TFWWTVUsheqbO5Dg H/PTWSUU2g3uhgGCjtrNnQf5fN1abBarEPy8eoPYeWwiMbovE8O0ZON1SWPIElb/I02G RCu5l3MkvLTerj+nsEbdKh+b4vGCPLVJI9funNJl5aYF2ggvbwjHnFebY8Gi94DASPjW sJNUq/AO9wvgwMjA3J0MM9awB4Tr12ZdAa+C+V6GMn6HJI+zFyiyNsQWjwuPr1mid3NP h1NA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jTrnJQmdfDFPc0iiZlQrjaJxfiNBukKooBGsosa9hvs=; b=z83KMxp0SoBEhcercPN7qvMCjyZ/DP9jon8xwZwgLaImTRsHRTgR0PNqTkTjx8e9mG pog4LGbd1VInEnH9VdQWRecHvAOOVnpS0t0+P1ye/i1ywt2TbGJbUeTEzro9HvPsUlac LwQCe3DQ/kqBduFv1l2XPeiDXV7FpUVMEycFnS9SUjX8BQIs8AJldOs3PXW5RUd4eK9i gtNArZ6HMva6OG7TyubwFtLSq+1c1+g4tccl93QqwxdTmNWS2jZBGLKsKjIgz2eNVogn +YU7MRTKp21f131edFtXybzGEYZkOHY5GSNAqj8E9gsFcORwrMKSeq9R3ykyEpZNi62P Vakg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hsJ9iTTZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si11170691edq.326.2021.03.15.11.27.14; Mon, 15 Mar 2021 11:27:41 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hsJ9iTTZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234516AbhCOO04 (ORCPT + 99 others); Mon, 15 Mar 2021 10:26:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:37612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbhCOOAe (ORCPT ); Mon, 15 Mar 2021 10:00:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A738E64F72; Mon, 15 Mar 2021 14:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816816; bh=Gas6jNwe4RZf/YuPzedLbOaoOR2AJwngDVXRdb0fRHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hsJ9iTTZBn5c6dS9w0P4IR1zFqYgDsUcDPJa4TqVmfIobM6vY0NcL34L0X72/GOrX 0cgVEw50GISQYIaqJSIZaLEtn3ZQB/Pj8LgwOedoSPduwbuCQK4DqNZ7PP+FSwCI7/ szv0l2ub6vDYzIkoayt+TB847bRxjDTy4Z+dFcsA= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kalle Valo , Sasha Levin Subject: [PATCH 5.10 130/290] ath11k: fix AP mode for QCA6390 Date: Mon, 15 Mar 2021 14:53:43 +0100 Message-Id: <20210315135546.296784144@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Kalle Valo [ Upstream commit 77d7e87128d4dfb400df4208b2812160e999c165 ] Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely broke AP mode on QCA6390: kernel: [ 151.230734] ath11k_pci 0000:06:00.0: failed to create peer after vdev start delay: -22 wpa_supplicant[2307]: Failed to set beacon parameters wpa_supplicant[2307]: Interface initialization failed wpa_supplicant[2307]: wlan0: interface state UNINITIALIZED->DISABLED wpa_supplicant[2307]: wlan0: AP-DISABLED wpa_supplicant[2307]: wlan0: Unable to setup interface. wpa_supplicant[2307]: Failed to initialize AP interface This was because commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") added error handling for ath11k_peer_create(), which had been failing all along but was unnoticed due to the missing error handling. The actual bug was introduced already in commit aa44b2f3ecd4 ("ath11k: start vdev if a bss peer is already created"). ath11k_peer_create() was failing because for AP mode the peer is created already earlier op_add_interface() and we should skip creation here, but the check for modes was wrong. Fixing that makes AP mode work again. This shouldn't affect IPQ8074 nor QCN9074 as they have hw_params.vdev_start_delay disabled. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Fixes: c134d1f8c436 ("ath11k: Handle errors if peer creation fails") Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1614006849-25764-1-git-send-email-kvalo@codeaurora.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index f3c5023f8a45..ee0edd918560 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5262,8 +5262,8 @@ ath11k_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.30.1