From patchwork Sun Jan 19 05:22:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aloka.dixit@oss.qualcomm.com X-Patchwork-Id: 13944350 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 980F72905 for ; Sun, 19 Jan 2025 05:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264179; cv=none; b=iOjgJUn2uSsrJWH1fnBy5eqR1E7iGqPs+BgRrLUPUoWSOJ87dcs3T49cGdCx7Q9Hxs5a/KXTSv1+JIcd51QlKjWuVrpGE/I6DLJiI3IEu6YVn6GYb/CC8fDSuIXfDNbS4IWkWMXSSlhU4j8uv/2pac7sKrsSl4l1SOwcfeCUsiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264179; c=relaxed/simple; bh=GnWuwrHDBaKV7ALVmgOXEhw/7MZePdrhZviI1AXuE90=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z5x67nd55Xi7U/bI6QO3gyD8y8IJmR2mCBtN9+Dlj1nzxXTpkR4PhdKyzjANg67S9s5E8Bupvj56bWucDo582/6MihTxBzrYdAQoc7gwyy08sMZjcsewwn/Vr2Bwch3fRar1ih3iGWwMS0Fy4Xry3V61oMr6tZrlktov8Bl5tiU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=JB0WqZvr; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="JB0WqZvr" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50J4gVjV012830 for ; Sun, 19 Jan 2025 05:22:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=eq02/ijFMWZ ugmb5HSORKGMnBvWo5mBSnxxuMX0U0Pk=; b=JB0WqZvrBZTyOqjR6GwMRSTRIcJ 39QDbyplr7swQf5INcaVs4bRFwJEp72SvUBYkXTlkpF5Ps9Jx8yaT4BO/vt9Wka9 8lNED0IIfirdFUL2TxLQck+iTkw+YYYEzNE+tE4f1B4EA9hFApcn+CnU9lvh5i5/ 7/yHJY1wNN+cNRi//EBBsHZVw+uK5naB13VC8rl7IQHKBEESe1PcfHq2kuXOxNym Pr1++Fm92A7CaziAuqpYBJcx2LKPGxZn5a2HyGdJq2eNmX/BdsTf3MaVNggW3DPP iuIPHb5HRFJfDLrF6F2sz841/4yZ9+6f0bnytuuzfOiQDMCpLvaBlw14fGg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4485fhsg1q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 19 Jan 2025 05:22:56 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2ef9864e006so9520850a91.2 for ; Sat, 18 Jan 2025 21:22:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737264176; x=1737868976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eq02/ijFMWZugmb5HSORKGMnBvWo5mBSnxxuMX0U0Pk=; b=B6NAe1+knlkBy/CjK8OOFBZqQKOwDxZIpEXsNCSv2kQW856pBl4M1bXnNeAr7wt/84 0B2T8/NfU6D3Do8ZVEOydSs1ay3d8exgmPG67vVTU42j424vb9T03zTqQc6csIPjON7p v1DtVLd2YXco2ahEgw5Hd5nwPYk6tlW9k6EgCKiQAA6V1FYon+/U9Q7ZaPhhZ9/bs0YG NT6j72TxifxKOUU18yUjgBia37EP1AMZ8tHT2A9DSG3CGLs+hjs51t9mSH9Awb65Fk8p LQNrWl6w8Iat6E3o/a3qzdqI/fZbm8Znl2MJyk9awVrPF/c3y+tzR8TMxSlmekrpWp30 6fqw== X-Forwarded-Encrypted: i=1; AJvYcCUJYjl9vPFEdmrH71Bqid4VGjzo7gxOV6ayU+N3CiQ8xZZrYY0zQKMoI+/TgEyzMUUmBllaSw0gphwqrU77cQ==@vger.kernel.org X-Gm-Message-State: AOJu0YyOpzPjgYhVUrTnpmZpewxW6X9Tn15yZHuewzMY12c60i2zL+Np qYrP2v8uRxRKmREkXs8S5XCuX4rIM/XKeWJCdp57ZuGYTXc73P7LlOXJXFF1v8qACQfuCX5p2O1 pIQpUVOs998ybG6dSft+DvffLXBdNhWflMxDgnH50cKmqq8Tsk7yg/b63/bfUH+iOXg== X-Gm-Gg: ASbGncuSLOi65KpEM00IyZcLX0ZBk7cEfuyiIF6+qwtFl3ldwil6atSZ/U0lOpW+xoe /y86nDljrAuWBrgqYatd3KwXLj3BwG0FGWqNVQviTtjEotAvS6nvIqKh9PL+Qlwqghc7r9/WgmI A3y0jYvFfETXW190BVplZMPUfwQaYP/UNWv+O7ZDpFUYVSA7oqCKj7jucYT2Ybz1+77eR7fqX12 SnItLdQxahxLlOMwa/lkVgii7A29R/C9kTfe4cOdU0gbwbsd/sJOO4CH+fb3q6Q5PTo4P926Pge qR8FW86C4jVDBmb1EM5TPQo8socCytplOnyNvYdi5en9B0gjOA== X-Received: by 2002:a17:90b:4d05:b0:2ee:5958:828 with SMTP id 98e67ed59e1d1-2f782c70176mr12864087a91.9.1737264175657; Sat, 18 Jan 2025 21:22:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqaegLKQh6AuDwvNiGMCJoINOQ4iJBDckVegsrHB2UM7kNeaA7ZnWUzO4ERyNj64vvODTPwA== X-Received: by 2002:a17:90b:4d05:b0:2ee:5958:828 with SMTP id 98e67ed59e1d1-2f782c70176mr12864063a91.9.1737264175242; Sat, 18 Jan 2025 21:22:55 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77611a295sm5062553a91.7.2025.01.18.21.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 21:22:54 -0800 (PST) From: aloka.dixit@oss.qualcomm.com To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v2 1/5] wifi: ath11k: refactor transmitted arvif retrieval Date: Sat, 18 Jan 2025 21:22:46 -0800 Message-Id: <20250119052250.3488343-2-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> References: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: rDEjZO8BOA97861FKXYb8ALtzlEoeeQv X-Proofpoint-ORIG-GUID: rDEjZO8BOA97861FKXYb8ALtzlEoeeQv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-18_10,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 impostorscore=0 malwarescore=0 mlxlogscore=902 adultscore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190042 From: Aloka Dixit Create a new function ath11k_mac_get_tx_arvif() to retrieve 'arvif' for the transmitted interface of the MBSSID set. This will help modifying the same code path to reflect mac80211 data structure changes to support MLO. This also fixes an issue in ath11k_mac_update_vif_chan() where tx_arvif is not reset to NULL inside for loop during each iteration. Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath11k/mac.c | 39 +++++++++++++-------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 1556392f7ad4..b1a79d8f980e 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1529,6 +1529,14 @@ static int ath11k_mac_set_vif_params(struct ath11k_vif *arvif, return ret; } +static struct ath11k_vif *ath11k_mac_get_tx_arvif(struct ath11k_vif *arvif) +{ + if (arvif->vif->mbssid_tx_vif) + return ath11k_vif_to_arvif(arvif->vif->mbssid_tx_vif); + + return NULL; +} + static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif) { struct ath11k_vif *tx_arvif; @@ -1538,7 +1546,7 @@ static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif) u32 params = 0; u8 i = 0; - tx_arvif = ath11k_vif_to_arvif(arvif->vif->mbssid_tx_vif); + tx_arvif = ath11k_mac_get_tx_arvif(arvif); beacons = ieee80211_beacon_get_template_ema_list(tx_arvif->ar->hw, tx_arvif->vif, 0); @@ -1597,7 +1605,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif) int ret; if (vif->mbssid_tx_vif) { - tx_arvif = ath11k_vif_to_arvif(vif->mbssid_tx_vif); + tx_arvif = ath11k_mac_get_tx_arvif(arvif); if (tx_arvif != arvif) { ar = tx_arvif->ar; ab = ar->ab; @@ -1674,7 +1682,7 @@ static void ath11k_control_beaconing(struct ath11k_vif *arvif, struct ieee80211_bss_conf *info) { struct ath11k *ar = arvif->ar; - struct ath11k_vif *tx_arvif = NULL; + struct ath11k_vif *tx_arvif; int ret = 0; lockdep_assert_held(&arvif->ar->conf_mutex); @@ -1701,9 +1709,7 @@ static void ath11k_control_beaconing(struct ath11k_vif *arvif, ether_addr_copy(arvif->bssid, info->bssid); - if (arvif->vif->mbssid_tx_vif) - tx_arvif = ath11k_vif_to_arvif(arvif->vif->mbssid_tx_vif); - + tx_arvif = ath11k_mac_get_tx_arvif(arvif); ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid, arvif->bssid, tx_arvif ? tx_arvif->bssid : NULL, @@ -6330,23 +6336,20 @@ static int ath11k_mac_setup_vdev_params_mbssid(struct ath11k_vif *arvif, { struct ath11k *ar = arvif->ar; struct ath11k_vif *tx_arvif; - struct ieee80211_vif *tx_vif; *tx_vdev_id = 0; - tx_vif = arvif->vif->mbssid_tx_vif; - if (!tx_vif) { + tx_arvif = ath11k_mac_get_tx_arvif(arvif); + if (!tx_arvif) { *flags = WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP; return 0; } - tx_arvif = ath11k_vif_to_arvif(tx_vif); - if (arvif->vif->bss_conf.nontransmitted) { - if (ar->hw->wiphy != ieee80211_vif_to_wdev(tx_vif)->wiphy) + if (ar->hw->wiphy != tx_arvif->ar->hw->wiphy) return -EINVAL; *flags = WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP; - *tx_vdev_id = ath11k_vif_to_arvif(tx_vif)->vdev_id; + *tx_vdev_id = tx_arvif->vdev_id; } else if (tx_arvif == arvif) { *flags = WMI_HOST_VDEV_FLAGS_TRANSMIT_AP; } else { @@ -7306,8 +7309,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar, int n_vifs) { struct ath11k_base *ab = ar->ab; - struct ath11k_vif *arvif, *tx_arvif = NULL; - struct ieee80211_vif *mbssid_tx_vif; + struct ath11k_vif *arvif, *tx_arvif; int ret; int i; bool monitor_vif = false; @@ -7361,10 +7363,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar, ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n", ret); - mbssid_tx_vif = arvif->vif->mbssid_tx_vif; - if (mbssid_tx_vif) - tx_arvif = ath11k_vif_to_arvif(mbssid_tx_vif); - + tx_arvif = ath11k_mac_get_tx_arvif(arvif); ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid, arvif->bssid, tx_arvif ? tx_arvif->bssid : NULL, From patchwork Sun Jan 19 05:22:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aloka.dixit@oss.qualcomm.com X-Patchwork-Id: 13944351 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 B5AD76BB5B for ; Sun, 19 Jan 2025 05:22:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264180; cv=none; b=FkWPFprmLhTXED3HG6nOc4q5+cg8wsI1tzo8qgwaWW9YoBm/iv7wPPMujA63XBce80YfR/VV1AWiWomuktvDVnKl03iQlpqBk9VxuCarKP1Dhnj/s/omlLlXvyWYDI1/IrbQwSooFkMVUqzA/TRCWoPjvM2yqwGbelLgMKkf2cQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264180; c=relaxed/simple; bh=QCzfzgIm1rTzeY0+jZli5MvB+vT0jB5SAKiIWTWWJm4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oiZkUp1cU3PYJljGfTjkrth6aBZr/NYatK7hDLKUnRH3f+2U76wg28BLlcRV2nUYlt6L7AQQB69EgwrxMfjkVRYwr6oqWeuIsdQLCRsAET4pPfwGeH8EDG2L1DfA8rdHrwdkevpGoYmLt7b3ktw0uzCcVSuTPHnyaCfkaqtCCgM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=oImtoWZb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="oImtoWZb" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50J5Hlp2012884 for ; Sun, 19 Jan 2025 05:22:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=ZtwpAc6bTYO Zp2y9MNdtJ/nCT7pbm01eyDD9XK50KFQ=; b=oImtoWZbx2aaHYXVfYmKDe+mh1F fs0UTXyhmpUxdCk+T1F6mBLKFmF6iOMyTKUmOuayAhV3X38eTTiGvLqNkwo9LDPG Qh8hkTaZHGwPn4438MKCmAr/yJcaf/4PdHN7ae611rG23usgRD30i9wu5YP3vdwA B50gNauxKByw9nW9hVJw6+lgw2b+FDjY8fkWWPAlre8iEm0Ge3B5gl6cVr6DEIcQ h5N5AI4NIqBzWQnCmiEATwE3+99j3ymlW/VpnoUhan3DpT3git2chquEWcHMBApt 2sEZEjpI7CxYbmFM2DgSZZ/wrcaopCQLCC9gTaw3vy9clbTVYMhfBTfG4MQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44852d1gv0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 19 Jan 2025 05:22:57 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2ef9da03117so9838021a91.1 for ; Sat, 18 Jan 2025 21:22:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737264177; x=1737868977; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZtwpAc6bTYOZp2y9MNdtJ/nCT7pbm01eyDD9XK50KFQ=; b=jgxVRzCCtdvN6zdGZHrf4EgThZYQUfXiL6YmgexbE26/Dldv4VcfT+hLpODnaoXHr3 3PZ8EabB1hwj2MovhQJAUzIYhJ0SZWlz6LHvjMJpyPjCRp7YIR6YoYVbwczKKgdj6FSJ AmemOBEAJd/0409AYpiLfiXTU7MxAnysIJU4DawHTb71PeF/ryrBBSHgiDJWoyZbTc5D TBjqePgW+MGdCqGQV37lEOfTuRlmEVQHxHGh5aq+t+JVKoxq/afC8Z3jsoqOe4J+k85i r7rhfI7e8hNNu78uYymw/I2UI4k2QO0M4ofn97358ziwdp0xfMoYPYGbIenCccOYI5di ZinQ== X-Forwarded-Encrypted: i=1; AJvYcCUgDk/jfRkS8fckNkbdXcvwbmqmOq6G3zYfVU7XBXHQRpn5ipGC+p4eyMQLlcHkqbzZdvYxjRPfmIabCZx4Vg==@vger.kernel.org X-Gm-Message-State: AOJu0YyuhkH1TNXtpbtGlTGuks+J2rjzek7FR8u7cGfOE9WWhTlYr1ZK q0C+LFy/uUa2rbGSZDjpF31QwTUpiy1zGw4o079iFcu6F6HMLsp1toBurLduabj3fypiHfh0yLk qlInVORYdcbGrjvIy0Jpneujg0aIsHERHumS8zEG31IOn3fT9YmShpllXTQttAm/+aA== X-Gm-Gg: ASbGncvNhaik5SPjMnPHarFeSo9LN+aHPHgeZeKrNTNBM3JgeR6ASZVtzK/IUgmKhVg 70hTc57bP2y0lrCceZP6Zhx13RakSDWjsx7ofHxG8chsZIn/9GORcE9vsf4qacjTuvOhR0VkGRJ o3YdKH0SmmUWmWrQM+sU4W6siuIfAkQUO53+LbxCsFZUG1arRU6I3pHrn7hbsHwE07O9tGBX7Ot 81ddj/Q4ubn3cPmaqym01Ka5YLyQzUNT6zoK4G9tuLbIlJyR8DEIhRIb8ZN9glzvHKrforPpN43 d1ByRHeqftXgrz+9EDhQqN5zARgCLRhIebljCxy8OX0GIq+IlQ== X-Received: by 2002:a17:90b:258b:b0:2ee:48bf:7dc9 with SMTP id 98e67ed59e1d1-2f782cb092dmr13280283a91.15.1737264176974; Sat, 18 Jan 2025 21:22:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6SYzua+L9zOXH7ZMjBP2BXe/Zm+CgoCUSMQWNJge1vtZEYocFxke10dX6xubn0KCvA3fnFw== X-Received: by 2002:a17:90b:258b:b0:2ee:48bf:7dc9 with SMTP id 98e67ed59e1d1-2f782cb092dmr13280265a91.15.1737264176605; Sat, 18 Jan 2025 21:22:56 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77611a295sm5062553a91.7.2025.01.18.21.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 21:22:55 -0800 (PST) From: aloka.dixit@oss.qualcomm.com To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v2 2/5] wifi: ath11k: pass tx arvif for MBSSID and EMA beacon generation Date: Sat, 18 Jan 2025 21:22:47 -0800 Message-Id: <20250119052250.3488343-3-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> References: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: PIVxeh767IoHKR85bvxSK-sQOF6DwhSF X-Proofpoint-GUID: PIVxeh767IoHKR85bvxSK-sQOF6DwhSF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-18_10,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 clxscore=1011 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190042 From: Aloka Dixit Function ath11k_mac_setup_bcn_tmpl() retrieves tx_arvif only for a sanity check and then calls ath11k_mac_setup_bcn_tmpl_mbssid() or ath11k_mac_setup_bcn_tmpl_ema() both of which again retrieve the same pointer. Instead store the pointer and pass it to the latter two functions. Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath11k/mac.c | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index b1a79d8f980e..67f733aac759 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1537,17 +1537,15 @@ static struct ath11k_vif *ath11k_mac_get_tx_arvif(struct ath11k_vif *arvif) return NULL; } -static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif) +static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif, + struct ath11k_vif *tx_arvif) { - struct ath11k_vif *tx_arvif; struct ieee80211_ema_beacons *beacons; int ret = 0; bool nontx_vif_params_set = false; u32 params = 0; u8 i = 0; - tx_arvif = ath11k_mac_get_tx_arvif(arvif); - beacons = ieee80211_beacon_get_template_ema_list(tx_arvif->ar->hw, tx_arvif->vif, 0); if (!beacons || !beacons->cnt) { @@ -1593,25 +1591,22 @@ static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif) return ret; } -static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif) +static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif, + struct ath11k_vif *tx_arvif) { struct ath11k *ar = arvif->ar; struct ath11k_base *ab = ar->ab; - struct ath11k_vif *tx_arvif = arvif; struct ieee80211_hw *hw = ar->hw; struct ieee80211_vif *vif = arvif->vif; struct ieee80211_mutable_offsets offs = {}; struct sk_buff *bcn; int ret; - if (vif->mbssid_tx_vif) { - tx_arvif = ath11k_mac_get_tx_arvif(arvif); - if (tx_arvif != arvif) { - ar = tx_arvif->ar; - ab = ar->ab; - hw = ar->hw; - vif = tx_arvif->vif; - } + if (tx_arvif != arvif) { + ar = tx_arvif->ar; + ab = ar->ab; + hw = ar->hw; + vif = tx_arvif->vif; } bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0); @@ -1640,6 +1635,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif) static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) { struct ieee80211_vif *vif = arvif->vif; + struct ath11k_vif *tx_arvif; if (arvif->vdev_type != WMI_VDEV_TYPE_AP) return 0; @@ -1647,14 +1643,18 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) /* Target does not expect beacon templates for the already up * non-transmitting interfaces, and results in a crash if sent. */ - if (vif->mbssid_tx_vif && - arvif != ath11k_vif_to_arvif(vif->mbssid_tx_vif) && arvif->is_up) - return 0; + tx_arvif = ath11k_mac_get_tx_arvif(arvif); + if (tx_arvif) { + if (arvif != tx_arvif && arvif->is_up) + return 0; - if (vif->bss_conf.ema_ap && vif->mbssid_tx_vif) - return ath11k_mac_setup_bcn_tmpl_ema(arvif); + if (vif->bss_conf.ema_ap) + return ath11k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif); + } else { + tx_arvif = arvif; + } - return ath11k_mac_setup_bcn_tmpl_mbssid(arvif); + return ath11k_mac_setup_bcn_tmpl_mbssid(arvif, tx_arvif); } void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif) From patchwork Sun Jan 19 05:22:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aloka.dixit@oss.qualcomm.com X-Patchwork-Id: 13944352 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 ADA1718A6AB for ; Sun, 19 Jan 2025 05:23:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264182; cv=none; b=pKNWFkWqlH0LsF5OSwv73oYyf2EY0J9rdWIIBp0MLm2JvPAn9FBQQiQhfnp4e3Hqpb1JNdRWzQb2DqyjQvHyw0KlKbx6Jf14ndsoiLLw9rfpIx3ZoqLqxR47jU/TIECWaTSltRmmzIztFkiWxOlYRN8npCX7T1d5ogO1Fss/ZI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264182; c=relaxed/simple; bh=4BZ++bHcf9DnP1mC9j5YH3EidhhkXGrvSThT+Xj8ssU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PXRRLSZTMW3u4K204GJvBbWHXeC/cG339iwIXlc+QkejoCdxORP3F5WOWxdpoBkY9cYW2HzZjsv9kZ+TdH7rXGma6HywO3qEBvV0lL/I/5dk+x2tNegUeE+bU5s7DzVyCpRmg69bnQVP1rZsnLSftgLcdksErzDyKJUuNEOOCYY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QdfXgp97; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QdfXgp97" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50J4F6on016745 for ; Sun, 19 Jan 2025 05:23:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=N7GyAD+vCSG m60Mo83UiwkZrzF+LzppL5JloceOQESw=; b=QdfXgp97iUcJ6+1jU6mjC4QXlne qsFPjvsjcXppP9hbdaPcQR9h0hSfoCszDU8MVdIP3FrVCClyZYZhMlDIQ2tDR/xU yRDAj2cwHcZQioIfJTc2iBC25WAO2YVxjpx8eemjk0OavLqu19QZdHR/QL65dMJo OJ4I36R4OPsFZ3pUo8CCI3R32iK/mfrsVjCckkYG3x5aGGzv31wih3EChJVV3g4h 1wW+9fBtzcEULDNk7WOnI3fJjK5Nzf7k9XFdn3Sr4SUnu2+gXXrvS4IuZrkLfnxh n1W0kXOSOZE898L6z/1BGXE4ua7sIxblZZ512Nmv5Jjs4eozhfCl3zVMPQA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4485k7sgh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 19 Jan 2025 05:22:59 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2ee46799961so9807306a91.2 for ; Sat, 18 Jan 2025 21:22:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737264178; x=1737868978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N7GyAD+vCSGm60Mo83UiwkZrzF+LzppL5JloceOQESw=; b=kAi36/AuIK0oyRSNvtd2zamYrQ/+lDAkE/4PFswoHgyBHRSKKorXdYqfrV3xkC5Jih VNFgs+38Gp1NTlwESkzjv0CGW0ixApt17ptSV/8H6WLPbIjx7oqiOf34Z73E5J2OwidU b9YZ7vZ63EPXels5JdTUwb/AL+E03JZFigWJm6wS6dF19PgnWIB2lybQlsuAthaYfb/u /ot/H7pDRdzDnQW8ArkRGO1UKvyN7NF3Evmj4M0XU1bpXX+EPkL7PXmYdj/XXbinnKjU olNYeKyrR3SM/zbdejo0EFenNm3ywV2pFuLU44gcZ2Zx30apPwi9LkxeGOBwKCIerHFT N4UQ== X-Forwarded-Encrypted: i=1; AJvYcCVpoy4PAXKFSwvVQIxe3YIVoLVMGd/qX99LAH/f60NCRaxh1vLJcg88M6hBox5co8rQv2zFNAS7cdDQdCh3Lg==@vger.kernel.org X-Gm-Message-State: AOJu0YxFbCHjrZshUHkexO7FTuS4B1cwC5mUs3IC2gPEU+ROIb3BWc4h RZ1QP21wzA+G6C23rNl56fXop69jKPoQdcnjSxM8kPg956v6Kw7aPjAHRgnbD19anfVQYUNe6Mx OMvIMq7yjyMQeKEW0+zpjzX9Z+FditVw+jWai24IfOtpBT9CFFhaJjMS8gaAc0oKQ8w== X-Gm-Gg: ASbGnctV0UmaNRC769mfHVKYuejpm24EDHXz6LeO+emgWsSv6UBVP8+iAdKh5JJXlOQ sUpRUWTh9oHgDyvmMAOw1VrI8NDQsHehbkEV4WZo49ZxDDz+2Rkm3dJJiTWJUmFNMsx/oIVgH/t MFPn0yHSjrppmFoRBy+TlOqs6Jlu7WZlhIGs9mS4SDpPqUQOM8apTDKc1fNwKj3PjrBjVXDThwe GbPvMwD/EekZT0nvKfAy3hVDRL1k5/d5DyvIQ2EFoajjcm8JWFeqU4mUgDqC3bCoymfxWDkyLqa IRNeibUodf+wua1pdW4rwoAa3QOlo2G4QfDtiAP8FNHamyBBNg== X-Received: by 2002:a17:90b:2d88:b0:2f2:a664:df1a with SMTP id 98e67ed59e1d1-2f782c628bbmr13479377a91.2.1737264178323; Sat, 18 Jan 2025 21:22:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IExsbmTylEtID6b8ELRkciz1dg3uqWpIv6JoKs+D7h0yiRGLjbKP8ugf7sOsWSJ36M7pOe9yw== X-Received: by 2002:a17:90b:2d88:b0:2f2:a664:df1a with SMTP id 98e67ed59e1d1-2f782c628bbmr13479359a91.2.1737264177978; Sat, 18 Jan 2025 21:22:57 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77611a295sm5062553a91.7.2025.01.18.21.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 21:22:57 -0800 (PST) From: aloka.dixit@oss.qualcomm.com To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v2 3/5] wifi: ath12k: refactor transmitted arvif retrieval Date: Sat, 18 Jan 2025 21:22:48 -0800 Message-Id: <20250119052250.3488343-4-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> References: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: hNpSmpSApWdrqe_dqUnWVljjGHJgD3zg X-Proofpoint-GUID: hNpSmpSApWdrqe_dqUnWVljjGHJgD3zg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-18_10,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190042 From: Aloka Dixit Create a new function ath12k_mac_get_tx_arvif() to retrieve 'arvif' for the transmitted interface of the MBSSID set. This clean up will help modifying the same code path for MLO changes. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath12k/mac.c | 60 +++++++++++++++------------ 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 2d062b5904a8..f189ee008226 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -502,6 +502,19 @@ static int ath12k_mac_vif_link_chan(struct ieee80211_vif *vif, u8 link_id, return 0; } +static struct ath12k_link_vif *ath12k_mac_get_tx_arvif(struct ath12k_link_vif *arvif) +{ + struct ath12k_vif *tx_ahvif; + + if (arvif->ahvif->vif->mbssid_tx_vif) { + tx_ahvif = ath12k_vif_to_ahvif(arvif->ahvif->vif->mbssid_tx_vif); + if (tx_ahvif) + return &tx_ahvif->deflink; + } + + return NULL; +} + static struct ieee80211_bss_conf * ath12k_mac_get_link_bss_conf(struct ath12k_link_vif *arvif) { @@ -1557,7 +1570,6 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif) struct ieee80211_ema_beacons *beacons; struct ath12k_link_vif *tx_arvif; bool nontx_profile_found = false; - struct ath12k_vif *tx_ahvif; int ret = 0; u8 i; @@ -1569,10 +1581,9 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif) return -ENOLINK; } - tx_ahvif = ath12k_vif_to_ahvif(ahvif->vif->mbssid_tx_vif); - tx_arvif = &tx_ahvif->deflink; + tx_arvif = ath12k_mac_get_tx_arvif(arvif); beacons = ieee80211_beacon_get_template_ema_list(ath12k_ar_to_hw(tx_arvif->ar), - tx_ahvif->vif, + tx_arvif->ahvif->vif, tx_arvif->link_id); if (!beacons || !beacons->cnt) { ath12k_warn(arvif->ar->ab, @@ -1616,11 +1627,10 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif) struct ath12k_vif *ahvif = arvif->ahvif; struct ieee80211_vif *vif = ath12k_ahvif_to_vif(ahvif); struct ieee80211_bss_conf *link_conf; - struct ath12k_link_vif *tx_arvif = arvif; + struct ath12k_link_vif *tx_arvif; struct ath12k *ar = arvif->ar; struct ath12k_base *ab = ar->ab; struct ieee80211_mutable_offsets offs = {}; - struct ath12k_vif *tx_ahvif = ahvif; bool nontx_profile_found = false; struct sk_buff *bcn; int ret; @@ -1635,17 +1645,19 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif) return -ENOLINK; } - if (vif->mbssid_tx_vif) { - tx_ahvif = ath12k_vif_to_ahvif(vif->mbssid_tx_vif); - tx_arvif = &tx_ahvif->deflink; + tx_arvif = ath12k_mac_get_tx_arvif(arvif); + if (tx_arvif) { if (tx_arvif != arvif && arvif->is_up) return 0; if (link_conf->ema_ap) return ath12k_mac_setup_bcn_tmpl_ema(arvif); + } else { + tx_arvif = arvif; } - bcn = ieee80211_beacon_get_template(ath12k_ar_to_hw(tx_arvif->ar), tx_ahvif->vif, + bcn = ieee80211_beacon_get_template(ath12k_ar_to_hw(tx_arvif->ar), + tx_arvif->ahvif->vif, &offs, tx_arvif->link_id); if (!bcn) { ath12k_warn(ab, "failed to get beacon template from mac80211\n"); @@ -1702,6 +1714,7 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif, { struct ath12k_wmi_vdev_up_params params = {}; struct ath12k_vif *ahvif = arvif->ahvif; + struct ath12k_link_vif *tx_arvif; struct ath12k *ar = arvif->ar; int ret; @@ -1732,11 +1745,9 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif, params.vdev_id = arvif->vdev_id; params.aid = ahvif->aid; params.bssid = arvif->bssid; - if (ahvif->vif->mbssid_tx_vif) { - struct ath12k_vif *tx_ahvif = - ath12k_vif_to_ahvif(ahvif->vif->mbssid_tx_vif); - struct ath12k_link_vif *tx_arvif = &tx_ahvif->deflink; + tx_arvif = ath12k_mac_get_tx_arvif(arvif); + if (tx_arvif) { params.tx_bssid = tx_arvif->bssid; params.nontx_profile_idx = info->bssid_index; params.nontx_profile_cnt = 1 << info->bssid_indicator; @@ -7561,14 +7572,9 @@ static int ath12k_mac_setup_vdev_params_mbssid(struct ath12k_link_vif *arvif, u32 *flags, u32 *tx_vdev_id) { struct ath12k_vif *ahvif = arvif->ahvif; - struct ieee80211_vif *tx_vif = ahvif->vif->mbssid_tx_vif; struct ieee80211_bss_conf *link_conf; struct ath12k *ar = arvif->ar; struct ath12k_link_vif *tx_arvif; - struct ath12k_vif *tx_ahvif; - - if (!tx_vif) - return 0; link_conf = ath12k_mac_get_link_bss_conf(arvif); if (!link_conf) { @@ -7577,11 +7583,13 @@ static int ath12k_mac_setup_vdev_params_mbssid(struct ath12k_link_vif *arvif, return -ENOLINK; } - tx_ahvif = ath12k_vif_to_ahvif(tx_vif); - tx_arvif = &tx_ahvif->deflink; + tx_arvif = ath12k_mac_get_tx_arvif(arvif); + if (!tx_arvif) + return 0; if (link_conf->nontransmitted) { - if (ar->ah->hw->wiphy != ieee80211_vif_to_wdev(tx_vif)->wiphy) + if (ath12k_ar_to_hw(ar)->wiphy != + ath12k_ar_to_hw(tx_arvif->ar)->wiphy) return -EINVAL; *flags = WMI_VDEV_MBSSID_FLAGS_NON_TRANSMIT_AP; @@ -8982,9 +8990,9 @@ ath12k_mac_update_vif_chan(struct ath12k *ar, int n_vifs) { struct ath12k_wmi_vdev_up_params params = {}; + struct ath12k_link_vif *arvif, *tx_arvif; struct ieee80211_bss_conf *link_conf; struct ath12k_base *ab = ar->ab; - struct ath12k_link_vif *arvif; struct ieee80211_vif *vif; struct ath12k_vif *ahvif; u8 link_id; @@ -9052,11 +9060,9 @@ ath12k_mac_update_vif_chan(struct ath12k *ar, params.vdev_id = arvif->vdev_id; params.aid = ahvif->aid; params.bssid = arvif->bssid; - if (vif->mbssid_tx_vif) { - struct ath12k_vif *tx_ahvif = - ath12k_vif_to_ahvif(vif->mbssid_tx_vif); - struct ath12k_link_vif *tx_arvif = &tx_ahvif->deflink; + tx_arvif = ath12k_mac_get_tx_arvif(arvif); + if (tx_arvif) { params.tx_bssid = tx_arvif->bssid; params.nontx_profile_idx = link_conf->bssid_index; params.nontx_profile_cnt = 1 << link_conf->bssid_indicator; From patchwork Sun Jan 19 05:22:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aloka.dixit@oss.qualcomm.com X-Patchwork-Id: 13944353 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 55B816BB5B for ; Sun, 19 Jan 2025 05:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264183; cv=none; b=NL6JvhmpI0Lt8aOiXUe9ZYkIYGPYlsoSdxaC5BfHCyF6NPLAv9xGZQy/I7DKFMT564UgQbK5xQlbRVryfAp/Cn7IxmC1jJUo+Ipwu3Q6MpNkaPcBnSDiMp0nnKnGUkWVNZg8EV9k4w9XvtWCoBRu6GbgHh5vOLbudbCEta08pWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264183; c=relaxed/simple; bh=O3tnDvlY3NiiItXFBAMbsFNx69UGr7VCwswyYBS8InU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mpoDGud8NQ2aKvH/NpCbIpvvX1C4aThIH39u/YyGdWcauEx2kfzn69WlTnVc/PugUiD40jpbJnNNav64yLvURrXwRs3JhI4HP84hUb13HQCvwy4hruS9Zt2hxy9mnbhkRMUtXwrrn1VCu0luMUTVTGi/GBQyPw106FqDgzptb2c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=EI6FwcuI; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="EI6FwcuI" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50J5Cj35015894 for ; Sun, 19 Jan 2025 05:23:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=8C0b7AYRgqc Y96BugJgxG5W46OpAEDFb3MbuCSajnwM=; b=EI6FwcuIjMhG8eWZ+ALgxOOKK0I tdSpDWmnVGhIxFm18D5sAZY5qYa0JgIPSXuauYlfrIuCVbUZJlw2n7vfNg+sEFSV +ncKcEWKD9brIkhJhUblSxWbSve27TFRVezU4egAUmY6kplkmSWfPPikB8/a6uKO olcslWz+glHsgvi5xVPGd6cx55oZP0QaVgS23kHpXIkoF/uMSFaWSr7v/0uaZqwx lu0gVyXCXbAmZ++0e2hcy9mj6GhM2dB9K+y51ilSNEacAC9MU47fI3KWINFKJsbH Z5GoQoMqw9KcgSx0oKLEYKhiuqdKwv4T8DmFKKh1MFv7U/QEA2HD+fLqYFA== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4484h19juy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 19 Jan 2025 05:23:01 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2ef9e4c5343so9592800a91.0 for ; Sat, 18 Jan 2025 21:23:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737264180; x=1737868980; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8C0b7AYRgqcY96BugJgxG5W46OpAEDFb3MbuCSajnwM=; b=Hr98wgmgA0e6szz1nP5OdfP6UFA8cT8rQlEKkYeridJBAu8GxYwVJZ1PpFSeftR4BR RPnoa/0dP43tnxFxNqPROyD7VVWu57ibK3e/hFY/A+z0ZqtKkMnVOLOkf9Sd7kfCq4S5 WLN5AsSrhZXUgACBWIO1jPqqaQsaJlYO7q/GNBrGzApJeFEToIAHoBt9v2yOVp1LhN0s e2sV1LxPKbhXelj5J4Wwi+tSvruTCo9txUyWMixOxLukV015PZwTZj0yXoCa0KSX2Q1i Tifpgcb1RRUdPir4IQifGgdKiJXyOpWZXrmMz2+MxyNqRz5LIPyWCQs2f3qy/7KbXDDK q57w== X-Forwarded-Encrypted: i=1; AJvYcCVa9bLqotsanfM0QI4h5NPMhP4hOGC+NL+BWpgSQG71bileZ4IMqVmIPVCh6kxEig7vLa6Fxz2B3oDXY5t22g==@vger.kernel.org X-Gm-Message-State: AOJu0YzIy3qDmBU7UlzZWpcB+mkODVuf/bSgWftI0Xp7ERfF4zhW5L7d iHt5fdOaDtAZS37DB6OyB1glHmgLTbMKTmRRaDaXb0uoHT/lT7T88tw/zD/1zypu/k1wUb82Q6b +5zbBk5KRyM2XoyUvRYIi422jbQSxbYp3ElSLgoX+9A6ElwwclpGNNwKVlp3ey0UPxA== X-Gm-Gg: ASbGncuuPpSUtprVxyHH0gF0kRla5hBhXawDW9fzhy7X1hoeyAQh4rruNtZ17rzXqcE FOj0pK0eiVy8kzgHduvB97eCLKoDtEBCgiMgCwvadtV305+utcu+JrCpVAbNnOYWzAw7C44/uBe cCWk94DziJPUohJFdP7fa1LqCAmhHEv7er75lK0VEiA/4+e195++VQ6s4JOW/QKriYC4MCEmkvU NrObx07MBPzuWefyGJXKJE1ngNgRYfwrrApXuDYo5xyOocEHEgC7BBqKFPeqfofdpkDBuZ59P8O vb03I4YhbwwXwXYLudoZ02BegDPrOJozIMaaKvIxBB9fFPlDgA== X-Received: by 2002:a17:90b:4c06:b0:2ee:b2e6:4276 with SMTP id 98e67ed59e1d1-2f782d4ed29mr11908733a91.27.1737264179968; Sat, 18 Jan 2025 21:22:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IENc7B+HoPGEEKk4Pd69z1iWgwP551nWnln3SXSfO2+MqehG3HMf2oVBJ1VJ8o/QYexWRI+pA== X-Received: by 2002:a17:90b:4c06:b0:2ee:b2e6:4276 with SMTP id 98e67ed59e1d1-2f782d4ed29mr11908713a91.27.1737264179645; Sat, 18 Jan 2025 21:22:59 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77611a295sm5062553a91.7.2025.01.18.21.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 21:22:58 -0800 (PST) From: aloka.dixit@oss.qualcomm.com To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v2 4/5] wifi: ath12k: pass tx arvif for MBSSID and EMA beacon generation Date: Sat, 18 Jan 2025 21:22:49 -0800 Message-Id: <20250119052250.3488343-5-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> References: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: xUAopQGM3bH_1FrUabciJtv5KYRweets X-Proofpoint-GUID: xUAopQGM3bH_1FrUabciJtv5KYRweets X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-18_10,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190042 From: Aloka Dixit Add new input parameter to ath12k_mac_setup_bcn_tmpl_ema() for 'tx_arvif' as the caller ath12k_mac_setup_bcn_tmpl() already stores it locally. Avoid duplicate retrieval. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath12k/mac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index f189ee008226..8a856cc1d801 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1562,13 +1562,13 @@ static void ath12k_mac_set_arvif_ies(struct ath12k_link_vif *arvif, struct sk_bu } } -static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif) +static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif, + struct ath12k_link_vif *tx_arvif) { struct ath12k_vif *ahvif = arvif->ahvif; struct ieee80211_bss_conf *bss_conf; struct ath12k_wmi_bcn_tmpl_ema_arg ema_args; struct ieee80211_ema_beacons *beacons; - struct ath12k_link_vif *tx_arvif; bool nontx_profile_found = false; int ret = 0; u8 i; @@ -1581,7 +1581,6 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif) return -ENOLINK; } - tx_arvif = ath12k_mac_get_tx_arvif(arvif); beacons = ieee80211_beacon_get_template_ema_list(ath12k_ar_to_hw(tx_arvif->ar), tx_arvif->ahvif->vif, tx_arvif->link_id); @@ -1651,7 +1650,7 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif) return 0; if (link_conf->ema_ap) - return ath12k_mac_setup_bcn_tmpl_ema(arvif); + return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif); } else { tx_arvif = arvif; } From patchwork Sun Jan 19 05:22:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aloka.dixit@oss.qualcomm.com X-Patchwork-Id: 13944354 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 D118318A6AB for ; Sun, 19 Jan 2025 05:23:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264185; cv=none; b=rwt3bW38EgsBEqa0r6PfvoLMY2220F+xC+eucKk77bSb9AFQ376Lxf6uQJgH6KsNiMR6hOdnEztg58UUM0VCxIrciGF7aseTRlYJYHlmijnqaaFpKAzDWzSlBbNG+YVU9OFdXVnIPuDs3J2rzwW7UNAL86E8rt9TZ4nOxMf3QMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737264185; c=relaxed/simple; bh=bk9qEEoPMlF+79agH2HZ7adS0CDmzxcpcwx7UALwfoM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Vx8aH4/yNaNKNqL00DuaWW/SJbf4J4ds+NCoKHsu6Wnux+1Xu5L1lTlW/8nddYc1e3YzoIVSzJpdea0R2EfgEkVuuEl3ajHIfw9ZqAC4K8plooR7V2j9aR6lL04f5RYqJ1zvIZSwmKddiTuhLARy0BMS8uZ9HDm6yDWA1+1m/tQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=UYUuPU9Q; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="UYUuPU9Q" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50J5BndD013509 for ; Sun, 19 Jan 2025 05:23:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=bWF2AYasCMg 5uCMhaNoiBso1sId8vJR61mxzZj14q9M=; b=UYUuPU9Q3OofOf9goAdh2P9CoAz uZFsEGS2pXWC22tfMDg/HDLjj4+iLS5bVCmU76w8PZDazM8XJjsgb56wH3BgeMQi kuJfCloOxeh48Ixjj54SfocvIu4r+xNNEpYwV5CAvmCMKM7tPZ019wlw8hvuKZzA F1A3Fi0sfn9TVCHbt0ZQSw1gkOYOYpSpkp47j1JMHGkIIXLgIwzGCpxh8EwrnP2E +oJiUlOcNlYC36h+4CggBKUg2JFKKrpZ3c/1UIlwfFA9w/lRKEot2noaR0tQFKjI 0YC8m1huvlfQku21M3wQHhYa9rrd80HDQnWkwUWWgcvTRaqyEyKqsvdD4xA== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4485k7sgh6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 19 Jan 2025 05:23:02 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2ef35de8901so6341838a91.3 for ; Sat, 18 Jan 2025 21:23:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737264182; x=1737868982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bWF2AYasCMg5uCMhaNoiBso1sId8vJR61mxzZj14q9M=; b=Cv+D3Nw4w6vaSglE5/kjss0vBLRgjF9D4Dn4YCHvhf++QuN1zrJ/rJPtUU+Dy6T7hz okvmihLR1T8+DaeHEtxgr0AxCdW7hyPeXo90bH8t3iPmoRz1vUkrjXUoTPlsvCZy/IQp Ov2uPwGm0ChnbVYz4lSEYf4uI1++40Ok2E/17/j9id208z/MNl3ZHEIro4x8eKA45cBb pJqiVV3au0vmjgidovHTMbHyW5lv0EvYyvhIBT8pCT7y6gXxAXWYN8YjpWsDpQ5rTWYK 1h/rho87zCMYYmI9H0DsLOf4jZHBcOaepHIto1+EqgfUiLe4ETkynBpfvSGLvvikrPHC 3KPw== X-Forwarded-Encrypted: i=1; AJvYcCU0bnKKAs3Nob3AdOnG4gG3YFN7Q2ZyLOo0MbvTul6/D2DSqH3Kttf0YRmgs1JYUKuvzy+rnIf39PzgnFaBfQ==@vger.kernel.org X-Gm-Message-State: AOJu0Ywhy+CE3FnQU+vp8Pd4e3JBug8s4eAKzUYjcixiLwwNWpG3I241 SELleEv0dM8i61m8bejj71uAn8tj1hUAEZNolzRpZYsnn6QBgiNjZ36JMvHrLOiBDPVvP+uIvWB r85uUjZz1f4PZ+KrT54BO5IhTVCkdLO2YpkTzIQeaeKkn9Nz8Pjpx6nXZDnmWvxBjwuTLeWsawA == X-Gm-Gg: ASbGnctm/GEv5/MmYNSf2uv3Ob+3rdHkDMMLQCpvtzX8VHQA8X3pZryDbxlCouM9Op5 68uFvCBNpYA8+aXj8ny+XJFQQL2+ib6AcpjCPqB+7kHxi31gHSQO8YtsbKTnda3fm3MqooMoosa x8WtI5u2g82Ek9sQxs+L4gbdBHzxLHQ1rJsdIrT2n9iQH6WRXlQ/vnj2xQ1oj02otiojuiBWkz4 e39IvJbFO73d21XUp4tkXPpTh7AxvffZF4QXyfaTSgaIrK490qTjF+W4FzI44FP9V7QOXFDeDv1 J/bF0PcQsVXKfr0/0BByKmMk6SrwwC3H1cqSChXLDk99ww1WoQ== X-Received: by 2002:a17:90b:3d47:b0:2ee:cdea:ad91 with SMTP id 98e67ed59e1d1-2f782c9cb29mr12805279a91.15.1737264181684; Sat, 18 Jan 2025 21:23:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF46jJvNdu6YUYpU2g2VsKnzXDiiDvWlUcaQ9i4OcqEH1lgmDFUeIsxaU2CLgHGUCdIzvTh5A== X-Received: by 2002:a17:90b:3d47:b0:2ee:cdea:ad91 with SMTP id 98e67ed59e1d1-2f782c9cb29mr12805259a91.15.1737264181270; Sat, 18 Jan 2025 21:23:01 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77611a295sm5062553a91.7.2025.01.18.21.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 21:23:00 -0800 (PST) From: aloka.dixit@oss.qualcomm.com To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v2 5/5] wifi: ath12k: pass BSSID index as input for EMA Date: Sat, 18 Jan 2025 21:22:50 -0800 Message-Id: <20250119052250.3488343-6-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> References: <20250119052250.3488343-1-aloka.dixit@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: xdo3ohdDnVGF7m742-pXttu2vUL8Skha X-Proofpoint-GUID: xdo3ohdDnVGF7m742-pXttu2vUL8Skha X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-18_10,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190042 From: Aloka Dixit Function ath12k_mac_setup_bcn_tmpl_ema() retrieves 'bss_conf' only to get BSSID index which is an overhead because the caller ath12k_mac_setup_bcn_tmpl() has already stored this locally. Pass the index as an input instead. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath12k/mac.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 8a856cc1d801..05a0a6f0dc9b 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1563,24 +1563,15 @@ static void ath12k_mac_set_arvif_ies(struct ath12k_link_vif *arvif, struct sk_bu } static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif, - struct ath12k_link_vif *tx_arvif) + struct ath12k_link_vif *tx_arvif, + u8 bssid_index) { - struct ath12k_vif *ahvif = arvif->ahvif; - struct ieee80211_bss_conf *bss_conf; struct ath12k_wmi_bcn_tmpl_ema_arg ema_args; struct ieee80211_ema_beacons *beacons; bool nontx_profile_found = false; int ret = 0; u8 i; - bss_conf = ath12k_mac_get_link_bss_conf(arvif); - if (!bss_conf) { - ath12k_warn(arvif->ar->ab, - "failed to get link bss conf to update bcn tmpl for vif %pM link %u\n", - ahvif->vif->addr, arvif->link_id); - return -ENOLINK; - } - beacons = ieee80211_beacon_get_template_ema_list(ath12k_ar_to_hw(tx_arvif->ar), tx_arvif->ahvif->vif, tx_arvif->link_id); @@ -1596,7 +1587,7 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif, for (i = 0; i < beacons->cnt; i++) { if (tx_arvif != arvif && !nontx_profile_found) ath12k_mac_set_arvif_ies(arvif, beacons->bcn[i].skb, - bss_conf->bssid_index, + bssid_index, &nontx_profile_found); ema_args.bcn_cnt = beacons->cnt; @@ -1615,7 +1606,7 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif, if (tx_arvif != arvif && !nontx_profile_found) ath12k_warn(arvif->ar->ab, "nontransmitted bssid index %u not found in beacon template\n", - bss_conf->bssid_index); + bssid_index); ieee80211_beacon_free_ema_list(beacons); return ret; @@ -1650,7 +1641,8 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif) return 0; if (link_conf->ema_ap) - return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif); + return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif, + link_conf->bssid_index); } else { tx_arvif = arvif; }