From patchwork Mon Feb 3 21:44:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 861782 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 8BBFD20F09A for ; Mon, 3 Feb 2025 21:44:53 +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=1738619096; cv=none; b=roxAaQ7D0d9jSW2ZZxaXviCisoJ9I28KZs5Tt7tazcDXQeswfaFyZtAaCBpTU0wTBBsjHDBkbsUCo9eP36GDTntkS/FrQpEP2z0FdxMlfyMlZ+2i9PG4f2yuB9/FfjZOuf1x1Qlc2AxowF9e+H5kAutyqzX1+Tu+w/S8tNblpM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619096; c=relaxed/simple; bh=2GHjavYXML4ZttJ1rmAyHdv9oiaeQE56/XYeIgxWeMk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AqoPmfqMALScMHxNcUBoamKXbfh56I7CNqFJUYg9yvLwV3azGKamH3eavIhlC9eSQWY/UZUOcAerniUSh1G6O7g+nFUF/JiG2p9RGCFG7oLeTmGGiFYlEqf0nyqVpr7ECkkRycawrcwvpH5uwqxKroLHxQ1beenMQW4koFCapJA= 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=aIMWNip4; 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="aIMWNip4" 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 513KQm77027045 for ; Mon, 3 Feb 2025 21:44:53 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=QzgQ7WEzKjk qJTUuDP5NT6Dy6EKSLNgaW54nzToTabM=; b=aIMWNip4kHAyANI0oKXlo3cMZMA 4/69cCR4V+4B5fzJEY1m01rGB33giUufw3NNLTiGqE0FqaJjsu0ZSzDENyvYXgv5 u2ML4TxAmpQQ+VWj66vGXtBIrOFM944XQCbvWqA2ZqAZiKflxw+uKZojErsmMojm x6FiQy0ItyedNHefQkeyshcf4t5PW/H3/9cDeBgM3J9z6WHmgHXmrj0T3KWrvLT6 ArzAF0piulH5obOWvQlKiSvBJxCEFtCyPqlLvqifPigXVQqeLJgQugiS1sY/XUJj XYncyUtiC2+D2T8N3CmBXhFAEW9Vwz0az5CiclvFRKXUBOK8HlrBeL/l6Wg== 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 44k4ufr4wt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 03 Feb 2025 21:44:52 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2ef9e4c5343so13671141a91.0 for ; Mon, 03 Feb 2025 13:44:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738619092; x=1739223892; 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=QzgQ7WEzKjkqJTUuDP5NT6Dy6EKSLNgaW54nzToTabM=; b=ELgJ8X3PcO9MVAHsQ64pZs59frvrJZgm+5USq7siUZzfEgQ5YboMOgASW6a2/5hYE/ An6SwAOiFK7NwBtmH51+33TWyfNkx+UOuqGiBXaqB7Z7uNlxW6lH0yYTL7sTTm8IleKf JN76CHAx+VPHKz7hFXnUbQQVcUWOAP4NqkyGL+lgN+yt+Rj7/oitCWevVlDhGLWTyVZP iq9j9SETzS1nJOPsex4tIoG8D4rWkGINOXvnoGxYWSEYb+HGNdpeGscUk+Ke4w7RL3aU oBAGnbwIr4EDIfi+Z96HETLR0pqH4gi3gRj0FYs9n+8pgJ0aGvD93Qvt2fF9NbK1hvMO K+Ug== X-Forwarded-Encrypted: i=1; AJvYcCX4doPIw0pDOcdqWCIANAwbZMis8mMcgFu/sT32sUPLHw0S3lxcNGC3vkINGCb7+Vw7Fwxg+3r2xmxUW2LEyA==@vger.kernel.org X-Gm-Message-State: AOJu0YwSyTy/Q31djpFpOuetGqZVoyWWiZu/0rgimzbheKBqNaxSXAvV oG37G4eT7TJM48aq+eHR6SWK355Fi69tPRYSSQlIR/vVkET8AjjwnehXSiP9kTDMzBbE06GZzaE 6+YHlcUZ+FsuGi8aco9ktA2NT4nTVt9bC9WT+3GSsIg0/Uo1Ztiv9q3bNvsng8BpdTBOrt6kHHA == X-Gm-Gg: ASbGncvIMHdRChEMSEYxCXaDhsm4xe1Nym5+++uv9/uyymzJE5lR06G6PrHshp5rwRT zLe3Q2xHbmcHG7avbmVuGQ6x4nkojSPtyrAEXjXXMdTF10gIQper/UhMhGlDjdQjliIz+NBIk6q yLKMvh74DPHG0PiTbfxsFoG79NmzwS19VNDsKRYeAGkaK4I5TWtZwez7FzYs3uQuLfc/wqxyA/d WBflahoUCVbvd1IPRwGFfVfV9SEqrWmVKnJFEK3i08MXaBhmDDG6V7x4bON7qkRfk3HQMJnlB/o cwsDLH742IMAatdiBMTqF23IjOMS2sfDUzrbTGLMFbCMreAzje1tBYtsh9TS X-Received: by 2002:a17:90b:520d:b0:2f6:f107:fae4 with SMTP id 98e67ed59e1d1-2f83abd7cdamr33973424a91.8.1738619091722; Mon, 03 Feb 2025 13:44:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfncbyH+z3ef2HHy3M5k7kIczzJ+qP6vF0ACkktpzZsvaYdcrXOgcKU4O7yZ/PVgow0po8QA== X-Received: by 2002:a17:90b:520d:b0:2f6:f107:fae4 with SMTP id 98e67ed59e1d1-2f83abd7cdamr33973402a91.8.1738619091341; Mon, 03 Feb 2025 13:44:51 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de331ce6asm82357895ad.209.2025.02.03.13.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:44:51 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v3 1/5] wifi: ath11k: refactor transmitted arvif retrieval Date: Mon, 3 Feb 2025 13:44:44 -0800 Message-Id: <20250203214448.1978156-2-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203214448.1978156-1-aloka.dixit@oss.qualcomm.com> References: <20250203214448.1978156-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: KlHdLZcYb23JjiEZQnuOG-ByniabKkPB X-Proofpoint-ORIG-GUID: KlHdLZcYb23JjiEZQnuOG-ByniabKkPB 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-02-03_09,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=950 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030157 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 | 55 +++++++++++++-------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 1556392f7ad4..8b81f450a216 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); @@ -1589,21 +1597,21 @@ static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif) { struct ath11k *ar = arvif->ar; struct ath11k_base *ab = ar->ab; - struct ath11k_vif *tx_arvif = arvif; + struct ath11k_vif *tx_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_vif_to_arvif(vif->mbssid_tx_vif); - if (tx_arvif != arvif) { - ar = tx_arvif->ar; - ab = ar->ab; - hw = ar->hw; - vif = tx_arvif->vif; - } + tx_arvif = ath11k_mac_get_tx_arvif(arvif); + if (tx_arvif && tx_arvif != arvif) { + ar = tx_arvif->ar; + ab = ar->ab; + hw = ar->hw; + vif = tx_arvif->vif; + } else { + tx_arvif = arvif; } bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0); @@ -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 Mon Feb 3 21:44:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 862139 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 8BB9220F094 for ; Mon, 3 Feb 2025 21:44:54 +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=1738619096; cv=none; b=qZhmL95eoA2cLarot+Ld/pyWaGhIcuSqBKREfBA4vxwHQQjAgZCzQfRRXuoHdwIEx3ooe+YGxHJOCNIvLO9Iue7GU+2atokftZrqXIrQeuG7jarcxJesTDROFO1ypcRqA6vGK7/txAWnEOHJVWskRc/sDd0GfMycKgoODb8g/CU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619096; c=relaxed/simple; bh=qHyY+9pcaUEj1r52V7z9DH38erNPx9sa0W9IU6A8F8g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Hrqz9dv78f4OjxQRaMsFdsEO/g2xCj/NgdcCHATU8NJdCL2upXQM9Xm8Y2/eakaTShKqVSyjdwTXfKvss+YrwOZ/i7WMbErHe8OJkfpZpiMT3HBWjIEuolCBPFPb89BVxqDc5A67LnSZ+Uwq0VtRcgXp9BlViT9zUcVLAwDw8/E= 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=DN/amMK9; 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="DN/amMK9" 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 513KQoRF027105 for ; Mon, 3 Feb 2025 21:44:53 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=Gkn/KbsZrRP P00bPrOxcPIgQ5D81kLJKQ+TUyRg86pk=; b=DN/amMK9/cGuFUb6GUzlMJJ5jg+ wbZsE/VyRFd/vxMuDZn7pEW5qBIrYJ35/z846wx2zHdHCW0UoTzw6XzXRmXTofs2 W4/P6msdDsqNpPjS14j4FCQJst2o7bg/cYUbtsoWT9EyuATG0sVd7orwVT/f91B2 JYJGIEoVziVPmfaM4Sr0Eq2s6EMvtl2hsGrwmXPkFfCLCkEDxDAwGTVrDEtgaUNG taY5WkbT6ENYvJbnjmaQHq5w/oI9t4Mhoceri2rCu2p2XN90aGFhe3fJ4YQqVtco RFJah+eUPBO2LIiSH7BETGLKQgcoJsLYfPMU1M3y5gQG8sMLR36H1jSf43Q== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44k4ufr4wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 03 Feb 2025 21:44:53 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-21681a2c0d5so92921845ad.2 for ; Mon, 03 Feb 2025 13:44:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738619092; x=1739223892; 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=Gkn/KbsZrRPP00bPrOxcPIgQ5D81kLJKQ+TUyRg86pk=; b=pzKHRAu3ppQ84ZKRXRjgglNXpkv8YzSUTgCb7J2U9SlDcJN0HwN59atkGx/CQtI4Kr 32xTSie25B4T866uWUHDCw1goIdwSx5ZxSNrfnbmIC6W/t6+Nl1K3hQEa9ug61T9qAbs wR9VVdeHcQYyKTMM4QSxBChB22ar9z7yInoP4bZ0GfRubHq38UHvS6TjNJU5/6T2jgBY 863U5w6tXv/QsT3phX3XOjWj9DrWP3oD6xqCo3iQuXlCyLmxadlq+2A/zDW+84akOwkT 0f2v8pvWNx4bDCIbQ0PLvHKEN9g0BauVuyBK5ZQh1C31+TcWV7Cng8JcwnTuMLnfNQad rBoA== X-Forwarded-Encrypted: i=1; AJvYcCXowLfOeQ/5INojQ/Td9+0Y/menNDciJPFKu18gk7oEDNQ4GRGvF29vvWo0U06DKm0e3t3JB/0MGsfNOTR8tw==@vger.kernel.org X-Gm-Message-State: AOJu0YwE8XTJU0s/z2Qy5sZO2ULJ4woVgj8S7HzdykneQ6kmu3Zauhj1 XwHfRLLTSES+ody2yuESmj8kWavll60ZBeGN+aesZH0WvaF+YWFXuU4InuNQ8OPw1ZbudffvMTr 0GVrqkXe729smQc8axyaRKRkDgq+50++8yduCqjZG/xcCAEYdW1S2cPYi/9EFqbKOTtv+rW/aXQ == X-Gm-Gg: ASbGncuPVl+oRJPrfEfY5P/la8tTp/Mqm9AcFEFiL+EcublFsqkQTC26nRAaZ0C0PUa y0WalLzhEYMLD43hZ1e0Zda8y4n2152WM21wGUsP1FP5CC4JGqI9TqLFpVn9PPzsYBayOswbe/7 pFEQkdhADWLz/ez64KTXNWfEFi/U5RwU6ElKnpJTnlZfHc4zCpuIGf/pAfFBAWCJAJFXslBlscE ke9/rIMAZ8wLcFk05LthN3lub5I8g++Q4ODMjfrLZoyaq9h3RE9bZnLTNk28hC18LJyaYPkI1pJ GaRbOk6Y+iBc8eYH9DQb4Z3dMteW36J/Pe0DFNPKW0G2nADq8mclFnx3vKkM X-Received: by 2002:a17:902:ccc8:b0:215:9894:5679 with SMTP id d9443c01a7336-21dd7b71973mr384991165ad.0.1738619092477; Mon, 03 Feb 2025 13:44:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEskV29JE4JQGNqDGNQyNuMsPsH38/NHc5F5JRg6DoAdqV7uysCzJlpYZd14A/hsIMpF95Blg== X-Received: by 2002:a17:902:ccc8:b0:215:9894:5679 with SMTP id d9443c01a7336-21dd7b71973mr384990895ad.0.1738619092128; Mon, 03 Feb 2025 13:44:52 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de331ce6asm82357895ad.209.2025.02.03.13.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:44:51 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v3 2/5] wifi: ath11k: pass tx arvif for MBSSID and EMA beacon generation Date: Mon, 3 Feb 2025 13:44:45 -0800 Message-Id: <20250203214448.1978156-3-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203214448.1978156-1-aloka.dixit@oss.qualcomm.com> References: <20250203214448.1978156-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: SGAlCq0V4lOeSOBg8-0cUaiDw35X1ZWu X-Proofpoint-ORIG-GUID: SGAlCq0V4lOeSOBg8-0cUaiDw35X1ZWu 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-02-03_09,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030157 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 | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 8b81f450a216..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; struct ieee80211_hw *hw = ar->hw; struct ieee80211_vif *vif = arvif->vif; struct ieee80211_mutable_offsets offs = {}; struct sk_buff *bcn; int ret; - tx_arvif = ath11k_mac_get_tx_arvif(arvif); - if (tx_arvif && tx_arvif != arvif) { + if (tx_arvif != arvif) { ar = tx_arvif->ar; ab = ar->ab; hw = ar->hw; vif = tx_arvif->vif; - } else { - tx_arvif = arvif; } 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 Mon Feb 3 21:44:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 862137 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 ADBB6210F76 for ; Mon, 3 Feb 2025 21:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619100; cv=none; b=ooIBepdqIAmpzYZAFm/I98wkS/XIWgN5oEUzOxDdxEOqHD9rFbBeAm6JZ9++AqU9Rz6DoVOblygSiucduJ+YQM/BJ2gjzJR9tVAXCiAJj1M/aXz0Obnlulgj+2NgZgvKyzDVhcJrSUNaeHDlA16Ia1vEwZNA1a7jqZUWVAxr4Vk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619100; c=relaxed/simple; bh=8/3Y1ezaMkICdwteNoN53d/H/jahvo18dpTSfkup16A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LfFpkhZ2Ht3ZxqIWagRAtTpys7SfFcQ5PAXXH8qp8htf3q7XSonNcF1WNQDK9wn++GN0sw/uhYAwtZRVWkMTF0jqBYfFMmG8prPeLCTCbskRpwaLLNfcQ/blMiwCiZnTE4UWwX2toJKVJ16mH3yJP6LqY+2p91p6qnOiXlijNfQ= 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=DuJy5I9Y; arc=none smtp.client-ip=205.220.180.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="DuJy5I9Y" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 513IpdPl005920 for ; Mon, 3 Feb 2025 21:44: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=o/NOJiLGgX+ K66BZwbw+Ol/19603T6IJWbf/Z2BMZNA=; b=DuJy5I9YwsJHWfZxgEl/O6s+xkj ZxhVg/uxsOQh4zMnS0XuVE3zU1gDU7dJa5el05TSgU62abEozJDzBZCGqbiZo3AG hutiILoZRZM5a/bHjo5Gjj5Qvf7TM2P7J9rrw32n/UeywdncSvLFpXAWkzBSAl1V f78uDgKwtpC7IYOclEQ7KVY9eSFNyfGDq+Gix9QgFNPG2ecudEWQeF3FXPC+s8bw dBinwCYOJEDNlKQhZvR+LyMaIV62R+l9mrd7D0XcoHpq9a3xARjS4X6cXKjALAWX xMH8hRXuO6meXe+BpC471dhxvh1M+kgqrt8+nG8PGp7X2rsBDNcDsx2dR8A== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44k3ex0b3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 03 Feb 2025 21:44:56 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2efa0eb9cfeso9639348a91.0 for ; Mon, 03 Feb 2025 13:44:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738619095; x=1739223895; 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=o/NOJiLGgX+K66BZwbw+Ol/19603T6IJWbf/Z2BMZNA=; b=sPqq9iOd0HzxvX2ImChECy7X7Sh8g7BNnVm9MSx+ZsasnlrALok31QnsBPXCjgAXN3 d74gLaVurPBrFuDcAMZGzW3F1JX/5DauXAQ/ih4ctHPGCSB9LxctqfzbBD4HFZYcvTRb oiAfNSvKb0qjAHUkkW1Ic56MbQb8XYnI1/XPJ8/NAnanMkacyAvISpQ0TCngtbx2cexW GiKsQMR5hf263oyLsu1qwHkmC3VnAIq0S5lYHnXgKdEfSOcYEgdbvEufj9dMwX7VR2Re caZQbgBVixjnJSYfWa6xYEC9ZVheRWmFBeJMP/62ksqAfSlIY/Gll8ey3FSJzZat1ViZ qZ5A== X-Forwarded-Encrypted: i=1; AJvYcCXQMpa2PIbPffh+v2/kMsfSIxSMDOskk+cjK+QZ9xr45CgbsPxR1mA76Rr0pdijFHAhF4os2I06QDqv+6+iHg==@vger.kernel.org X-Gm-Message-State: AOJu0YydQhiIlCjnPgXAzSfBkY+sQFuigA26t9JteXncaLUIdjpqgRvQ 1x8xPQdlR0XLGmoVX0MR8ha9c2fskDIhXCo8HRJ5UKyosdLE59Fcq+i+Uzh9fyyCWNzOaZ/2gV3 S/LYmiCtFcQDh1CxmS6XJygAuhuuaPKqbqLNK9hBE3/6tSqrdW/EyP/C3Pb68SztAslioz4HmLA == X-Gm-Gg: ASbGncs04WcpAQKxaaHGJbPBlF/hTmcFlLzLUejh/v/GCuXK+ngarIFZK4Gv/b/BQw8 9IX10pVQI6aYXSfWDg0MO4qYj9A4mK5yhdVVxF9ntWwaw2eNaFkokXOB75NqO7agF7b3vSWEc3a MoaGHQsXzMZcaTlEi7dOcvXkru4fjT+IBz1Xs3OzqWiy94jcnYgNkto4SiZN7SfrhiGLJmKr4w/ O5Iz3IziZA0Pm4IA5Mnmk6a8p6XQIRs6wUWrcm4kIT8VB1Ns8wcOwGWnMzAWkfLcQxywsnPEwBD O8SK9K3ALSjW1w5kQOOOy9lMkghwiNfIXeAy16KNW4vBLGsnv7Bq4/35bjWk X-Received: by 2002:a17:90b:264e:b0:2ef:2980:4411 with SMTP id 98e67ed59e1d1-2f9ba26b850mr1294629a91.9.1738619093404; Mon, 03 Feb 2025 13:44:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvvw9gKRxtbE+OTiyqQ5MXN4t+jAbJiFCRohnw3OPyEk4EXFoSxh4aNnCnAzM+P8mNlyM4Mw== X-Received: by 2002:a17:90b:264e:b0:2ef:2980:4411 with SMTP id 98e67ed59e1d1-2f9ba26b850mr1294610a91.9.1738619092950; Mon, 03 Feb 2025 13:44:52 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de331ce6asm82357895ad.209.2025.02.03.13.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:44:52 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v3 3/5] wifi: ath12k: refactor transmitted arvif retrieval Date: Mon, 3 Feb 2025 13:44:46 -0800 Message-Id: <20250203214448.1978156-4-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203214448.1978156-1-aloka.dixit@oss.qualcomm.com> References: <20250203214448.1978156-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: MhOVMX-d_-V6d5pKlqhBCgZ8fG310iHA X-Proofpoint-GUID: MhOVMX-d_-V6d5pKlqhBCgZ8fG310iHA 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-02-03_09,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 adultscore=0 malwarescore=0 phishscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030156 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 e9663c6ac72c..efd155031feb 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -579,6 +579,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) { @@ -1637,7 +1650,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; @@ -1649,10 +1661,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, @@ -1696,11 +1707,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; @@ -1715,17 +1725,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"); @@ -1782,6 +1794,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; @@ -1812,11 +1825,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; @@ -7676,14 +7687,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) { @@ -7692,11 +7698,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; @@ -9074,9 +9082,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; @@ -9144,11 +9152,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 Mon Feb 3 21:44:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 862138 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 E97DE20FA9A for ; Mon, 3 Feb 2025 21:44:55 +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=1738619097; cv=none; b=cmLhRmBzco3jFidS5AHtnOMPkXKxI0o5w4QnZZhZ8tpI6gsu6ztRw5HndSp9gpnynv5C0p0Y/TUr8e0RU28xkrR+TbHJNtD7TpqNvpBk6sMQJON0XkisE89lEikZ87wIkWYSjcGnPi8vpepXCBPL/jGrJANgNBpoe4Eo4eylRf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619097; c=relaxed/simple; bh=EjuqOb/9hB4bp/U7/qA25LxXmhs63vZTHQfODXH8Kvg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tMnLB4OJfJUbOMSMQN3dq4qL0Bp47z6IT7864vDsfJNPVnhGbaSCkPJ8RkTkNmfweUCLZC3lkNBbk8IaK1q8x1UJEO+cDr28NvcruM1HjS3IPzNAZIoMadSMwBGzCdPLcwSRUrc6r2mV4bVFl7tsaQ815ly6ThmrslzdvKriKc4= 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=Qc5fHFvb; 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="Qc5fHFvb" 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 513JlUOs028499 for ; Mon, 3 Feb 2025 21:44:55 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=LDahZQj7Tg4 JSWeS/TSyZQmgNDpEbC9fI2EuhqXABCs=; b=Qc5fHFvbD4IzSjCyHMpT4Zb2KrY S/XjFG+R1ZbZXZWY/AKK/eKlOE+zurBGMKBoZcqumlFB4rKv/nrUCBkEXVOJCTwu D8zSXffjCPBQxbQjE50cbNUIh+1WbtD7ORiAM1b62GvyQGwNqFVif8JmdhxXDnrP KX/IdSWstsxqnmPigFLmSSM3L9+pTTJtuCkWe2S3/LlbAatTKWjTbUb7U9yqPPil LraUnDl7BYa0LMGazOeoOdta9plGRhgyoDNZWcRbhsXNxo8B8xFhI7/RqX4qwh/i yxrj4+BiKyAs9wdQ9zoUa6bR/HM0a3+8OYQC9EhWh0AUSyAjWEYru9h817w== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44k492g741-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 03 Feb 2025 21:44:54 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2167141e00eso115746555ad.2 for ; Mon, 03 Feb 2025 13:44:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738619094; x=1739223894; 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=LDahZQj7Tg4JSWeS/TSyZQmgNDpEbC9fI2EuhqXABCs=; b=K3gA5bYqKdTXnPgzo1yl71JlqWKo7zMMmRFvy5KY6feeNoPatB8usUldVp+VsMyzKd J4V3Qt0WoLdZxznrPPUDQ8humB3hTf9RDVVdBUDW2gMXocYDSZn70Os+dgwxiGptJgP1 B3XEILQi2k7KpoXFaUwD1TGKlCfx+IUN7/c1kGRz7xDraZf53X0BeuagYG2vTmxW3m8j ihIzC7tvxGkXLLpzNokQMRu+gGtzCLykVyJ4DzB8E2BWZs2WPbwXP2l09RJGDTZbKQHi 7AFQ8ZmJrfVhZcaYwFPJ9i9mNvbJSd9meJsSN1Kd/1Jw6dNQHU62+ffFIEo/M8Kj7JcP aBOQ== X-Forwarded-Encrypted: i=1; AJvYcCWhzYHrhjsSp350VXIYq2ExMty5PC/t5GNnUJ4bA7VL29cc93DYBcRy2jLyWyXflN133Lhmyr6GVowOFi8HfA==@vger.kernel.org X-Gm-Message-State: AOJu0YxrquR9lv58S7pXC4y4jjkbrd5ISAVWF9qFY4ZaH3viufQ59z+c uIc0MuWmQz+BOslcqUv1aXKCqYqH6/MzhwhA5LQoLxoeZHaew2jou2O/N6ZPc5r5GKVCQE25QA5 234SEatOnnQVxlJi1bJHOauErN0o37gnZWJEdRMwHQaCnat3kKXNzN+g832yTjfB0eg== X-Gm-Gg: ASbGncvT3BTX+uczyK2ujoGOYT3+XsPMuVQXvo5kpmwRiaxDt5gMJcylwJKJxiSibHm sPdcvninax2aR/AFkFie7GsicWJoU5MHbCdhbavfV8gHWTK1aTxIXGKQU9hNbAbyOLDGhjRf1lQ AjLnybQMEWPxZGdQrBDReGNkhFbC9OrMoIhjjvyR88i/zb10RrPMGWH7dlrJoiPmdPxIIYjHruA C5SKa25ytAK9UMqRuIgeKBUPCWhTzSST2OGS3mrEbBfDGqMOoZpAmq8VkDdWLZe6X4U19zZgODQ HNJPXqKSyKGsJaOM05QxS8vKzdeoBQqa6zUvITPr668JGIR0Bwv4/8ZIe+ug X-Received: by 2002:a17:903:247:b0:216:3dc5:1240 with SMTP id d9443c01a7336-21dd7dd5339mr372681395ad.45.1738619094105; Mon, 03 Feb 2025 13:44:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGigjZfzxDKHl/nhSzaApNAcEsschatItTybiToZ1tQxWCU7pGocBtA+MUgi/U6h/Pr0vkLbQ== X-Received: by 2002:a17:903:247:b0:216:3dc5:1240 with SMTP id d9443c01a7336-21dd7dd5339mr372681155ad.45.1738619093749; Mon, 03 Feb 2025 13:44:53 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de331ce6asm82357895ad.209.2025.02.03.13.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:44:53 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v3 4/5] wifi: ath12k: pass tx arvif for MBSSID and EMA beacon generation Date: Mon, 3 Feb 2025 13:44:47 -0800 Message-Id: <20250203214448.1978156-5-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203214448.1978156-1-aloka.dixit@oss.qualcomm.com> References: <20250203214448.1978156-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: Tb4WNBwpI_4Ww9rI6m1csd-1KsSHjhb1 X-Proofpoint-ORIG-GUID: Tb4WNBwpI_4Ww9rI6m1csd-1KsSHjhb1 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-02-03_09,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030157 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 efd155031feb..90823b85b714 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1642,13 +1642,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; @@ -1661,7 +1661,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); @@ -1731,7 +1730,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 Mon Feb 3 21:44:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 861781 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 ADC18211269 for ; Mon, 3 Feb 2025 21:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619099; cv=none; b=vBmizOGWFLJi//oltXlVfOYsu/c4xnuz7hl7RSDYqwxsOdNpMMZgvqw97Gpj5LG6xTNj6iEJhFk8IOqykPPvL7uMRObN8kPakhnKdyhWjAtrhTBvlxZ8pqvsu7P2itlmLsAcgbHChAXUHQnhQp8PM4Jdl/xaVWZKFekVKqOiSfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738619099; c=relaxed/simple; bh=FEYjzaKspZJqKJcOJL4Ipsjys/joHP1FW+MSJETQDUw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NvB80A2Xvx6MsbPZN8jjFvdYxCX78ecvV9pmjBPNCmy7qx3Gt7o12HX3sHe+RKwHcpTgZ7D6MrKkBz1P75IyE0MtDEkFRgDBcDReMg7bMAA4JSyj8pU0MriSK5UjiObggvnT596q4EKjxTcHGv5LFEgwXiQowJIoUHdLuOcYBJY= 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=Y5DEUB5w; arc=none smtp.client-ip=205.220.180.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="Y5DEUB5w" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 513HfVi3017325 for ; Mon, 3 Feb 2025 21:44: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=jW6HwO/qyQ8 ldqkF8vmg7N3AHYrGXs/JkvKQvxQSsz8=; b=Y5DEUB5wxzU/ErLzIpcWu03BLp0 +BGR2FhT7SYgex4bcSADug7Wm1iSjs0C1tGD6oH/ozx4AyP30PhWLaTm/6ky+5WC cL47sPJxSAnZuayo6873UPjJZqwVvquQbuSpPkfp5LMw8uVEZkP+4FkAvQTsEkyo 7cYcsNL+OPtlCAUzdlY8se0AR+QRm0D3RrL/v2RH7mREkbMG9TeR4P0JkP0+Gn78 gyp1/GAa6VAxCTAC3WmF5UUqb3tDba27xJxSAiSLk1Gv9YlRE4VPaDdGjDKOqjun /utwRy8HmHhXRYiX3LHaBnUFy0HCFrjD6vFirJDYxnZAAOl+YkghmP3gYmQ== 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 44k2e1gghb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 03 Feb 2025 21:44:56 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2ef9b9981f1so13623286a91.3 for ; Mon, 03 Feb 2025 13:44:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738619095; x=1739223895; 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=jW6HwO/qyQ8ldqkF8vmg7N3AHYrGXs/JkvKQvxQSsz8=; b=PNpPB4145IGGA1xKpCCQwmZjtzGPpg21uCtpyKNp0xayUFjyxtefCKoaBW1vo3/ttV jGJgO4GBiV+3jbczUWtrt2y13q6fLmzCFdKXr9zRnor76zlpMPlscRRLYl9IP6RP6jya oGE53pXs5ml9oJfn8ozZVod0fZ6+7WhUwJ2ngmpRYvfIjhDrKTh5zzZr4e5EgWvGUryq NB+YGy4eNiyrX4kYRzV7apR/xn42jEJqSkoH1VXUXH+Ojbosr7AsR+LNUbbUV+sVmSPN khzbJUPI33dSNHzK974hcgzaPahKYsmrv1fH2UnuOOykC8KMhfkYl75dgV2b1U/xoTRO C9uQ== X-Forwarded-Encrypted: i=1; AJvYcCWmkJdWURXGPpAEHKpUcEmA0RCk5mByicI9LjOMpIPHA9P6LJT3pBAtUPKwaw97L3kRNUVZ1d6/JHLsx6UQhQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yz3xogGzQaZWqTm5rQo7rZvYDsJCvuRgE2BAgMU/pMDSAm04Hle lkeZOia1FIXmVSvrfr78ZMJtoUyoFtpI+xgNCytmJySS6i8KNrEhH8DRqvtZCHfWhytSM8iCSLe vfhaS1LayC5x6jejavpIx89sGi7BcMnG/I3brGIo8WgDCgp51dWMp+KyxfVdGyGmvKQ== X-Gm-Gg: ASbGncv9EprXClnJKkBqU+NEHbnMoAH/VK32eMlSa6O981nqIPPZh6slNNopxvjawdo NcHE2NmnDYKnIe/6GBS+z3jQUIkTDWEgdU69eEeEy1IJYuZN9tKMKiF3rKYXoDWUboQ6hSAxkwG atdyVUzcoxPGzxEnKrgQ1DBqqy8So4isLjylB358ugTHkak7J4t5+mDoeHRNweJI9SQT1FYjAbb U1DsOEeHoCw5p7NI/bRJxNZlmotJCw5M2+xvwEyLhtxrr+5HT2RJ9vfh9ao/7aXewQXBZWJyRXs Wtxf1GegUufVw1WxCEq5a/ICTXqCcVYYeIk1dw0F/Vawp/wIUt79VKNHG1wn X-Received: by 2002:a17:90b:53c4:b0:2ee:d63f:d77 with SMTP id 98e67ed59e1d1-2f83abd7ccfmr36001574a91.9.1738619095121; Mon, 03 Feb 2025 13:44:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwJd39vaZmazZzFpg8uh7/VVetZSQp/x673t3NGMiSgjrhKf3+jKS8K40tSAFiD6P8umYlEw== X-Received: by 2002:a17:90b:53c4:b0:2ee:d63f:d77 with SMTP id 98e67ed59e1d1-2f83abd7ccfmr36001555a91.9.1738619094789; Mon, 03 Feb 2025 13:44:54 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de331ce6asm82357895ad.209.2025.02.03.13.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:44:54 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v3 5/5] wifi: ath12k: pass BSSID index as input for EMA Date: Mon, 3 Feb 2025 13:44:48 -0800 Message-Id: <20250203214448.1978156-6-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203214448.1978156-1-aloka.dixit@oss.qualcomm.com> References: <20250203214448.1978156-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: U3iqyR2K_PlgcJSnRV5I6QIapFb8zCIL X-Proofpoint-ORIG-GUID: U3iqyR2K_PlgcJSnRV5I6QIapFb8zCIL 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-02-03_09,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 adultscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030157 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 90823b85b714..5ec82c881b3e 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1643,24 +1643,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); @@ -1676,7 +1667,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; @@ -1695,7 +1686,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; @@ -1730,7 +1721,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; }