From patchwork Mon Feb 10 18:27:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 13968684 X-Patchwork-Delegate: quic_jjohnson@quicinc.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 F40D420487F for ; Mon, 10 Feb 2025 18:27:23 +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=1739212045; cv=none; b=axN6dzVOicpGX1hF9+xFkNaviLkXsDgLldRoqdHTLeij6gljOpCfoHPeuH+matWAeNsV/zbgQGbmRpkuWHZUndAnmBDZs5GYJJKrU+GDKWDVt0JuJEA2pn/FxN6otLlit6FOQSESqMbRsJqit0TivsQq2HpEUyT4fr3MqLegw24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739212045; c=relaxed/simple; bh=dD0f2L69r4lbNnT1O9ztNGnNGcxMHFEl6sZEUfN1vx0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uqxhwqmNADkGcoPK9Q37mRGpfwugZchTa80sZgJ54UFAj4kkUXpsuyMxofa+X1Mr9RzH+IP4T3nha5cwNvcxfcPbXJoQN2Id35EDntnOs3o0KpuFkGxLko8lsWRZIvNrXGjyObq/zhzphR6BfyYaPVK2MGT2xXMPSnTB2EIR3dw= 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=ngL4R8SX; 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="ngL4R8SX" 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 51AFq10j015701 for ; Mon, 10 Feb 2025 18:27:23 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=YS0ZCnpU003 2ewMQjAnzpro93E+rCTYfGMOjixjaM4E=; b=ngL4R8SX4Hox42L9fRtmpEBk7Pw ew3bMpKK8K42VXh8+t766HoAtis1WN2ZDsWG7YwWLzWpWO9Btq9jQJA1jwgEAk5U cczpLuh+KHbdI0qoTUDgMdjc8v6n1ak8n/0AcbhwtvRWoMjUpYutmgfLyGN/9XEW /QAMKtQQiTyp6a07ze6ptDBjsk2P5nfSPBCHjrOfTy68RO3ALPHEGwSLI87YDquW TXxaRNT+a4gdX+W9Yf6fjI0mgqSO53D+igzOydHy2aXEITKYFV7Dj8a7Pao+Z1st 9JEuTVIJODOfSfraZxAUtqNsTY3baGWZ8BtBK70QM/5mRsrqvXUAO9A58Sg== 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 44qe6nskc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 18:27:23 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2f816a85facso10100397a91.3 for ; Mon, 10 Feb 2025 10:27:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739212042; x=1739816842; 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=YS0ZCnpU0032ewMQjAnzpro93E+rCTYfGMOjixjaM4E=; b=vscXE35Ar/BBRZVI2AIoC/yUSU0+hMXF9OSGlvqzl/uZEFeyzSrHF4P1R+FHt/ivmO 4Fc2B+C3beqRFdw5xWXsPOEVnhDFC7Z5rPx6644n8S0y+i6jFXatczxMzOka4Fe0t75x m/9QKl+OkksSxZZedtF5b+FnxsY1kaNSNTAnNkWkpfshN1+uSlEmlLwAdG53YKx5Gn3x ue8gVI+jmCNyHtvpHpQ6UDHyLZF+AmjD2EXTF0gGOcCE+C5003SJqNgCOZGpz01x0gIz Hj6RD9Mp85Xudlz+eaLcD2xnpXaWa2vxKnw7txkSexszQjklee7oGotCW4Z+g75Dycut AHNw== X-Forwarded-Encrypted: i=1; AJvYcCX8fJ7S1Ie9FRqXYx4oi1/RTMOth7TUWs+LyK5zBYc2pOcCyi7CcH6+4NC5Kr9ArFds5n2OV7Bpzh/ulN68YQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxK5VhEeIquZk3FeJbyIBdyqJdtnaaCY1aPEgd3u2d493aXrhUt zqmI1zS6qeVrQvuse63N3hsz3vTBtJsCVWAOVDuO5npe09gkcptELGDO9xuaiFS8vKW9fOSiSb9 i1qT5KnahBWcba0PfDKKCiIbYeckfzHr9CZMAa6GvVugT8x+pMCZDPw8vrbiWbq36sbP4LGqD3A == X-Gm-Gg: ASbGnctoFJOTcLv4GEF7wtf3PFbZmGSLgLL7RS06W/jFgeGk7Ld6f5XEKhbhXNGOeRj EJH+9nlCur4pD1wNc8Se9otTuww5atAunc8bX3T5oJk/NS4NV7iAfMZMu7DdTGMAwIHHsFPCVgz B9zWSBnX/MjcgBQVTPtLwfolOUuLt82lVloNDq/5OML0c1u4hpNs8tqFg+vgWPl8pAe7v99nf6u BxzOXUb0rA57Q+ISkAFQn8JOjLdEnTJbO/0lxQdtY9ojrK152vF79jGsnXiC9duE6U6Fmx3k8oC ubVWGj01ox5sl2E2Ws5sdvYmc9YSOH68cU88lndE/BCrLoliQ+y6NSWinLaO X-Received: by 2002:a05:6a21:1394:b0:1ed:a4ae:3b80 with SMTP id adf61e73a8af0-1ee03a23e9dmr24386868637.6.1739212042046; Mon, 10 Feb 2025 10:27:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjy5laiiBdq36IQJpPuZtXJaWXF9jBvHkUSZ40R6JY7aV8/MptL4xA8ZePCFex81rCp7YnZw== X-Received: by 2002:a05:6a21:1394:b0:1ed:a4ae:3b80 with SMTP id adf61e73a8af0-1ee03a23e9dmr24386805637.6.1739212041491; Mon, 10 Feb 2025 10:27:21 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73048ae8e83sm7948372b3a.84.2025.02.10.10.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 10:27:21 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v4 1/5] wifi: ath11k: refactor transmitted arvif retrieval Date: Mon, 10 Feb 2025 10:27:14 -0800 Message-Id: <20250210182718.408891-2-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250210182718.408891-1-aloka.dixit@oss.qualcomm.com> References: <20250210182718.408891-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: rfSZqdbnvPxHgwRTZW3B1HCTEimm0qNF X-Proofpoint-ORIG-GUID: rfSZqdbnvPxHgwRTZW3B1HCTEimm0qNF 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-10_10,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=939 impostorscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502100149 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. Compile tested only. Signed-off-by: Aloka Dixit --- drivers/net/wireless/ath/ath11k/mac.c | 53 +++++++++++++-------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 14ed53836589..466a314b938b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -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, @@ -6385,23 +6391,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 { @@ -7361,8 +7364,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; @@ -7416,10 +7418,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 10 18:27:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 13968685 X-Patchwork-Delegate: quic_jjohnson@quicinc.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 C8CCD255E34 for ; Mon, 10 Feb 2025 18:27:24 +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=1739212046; cv=none; b=g3E7E/+cVHL9pddJhqX5QsQmFhJiqx2K8SJRjb5Ay3tymmoMBs3JuVW87MHEb0qSTweOiMChVva/p74uasEwZiwwBMbCK35eIca044n/IbF0H3kWujxBxr3w1BD+XSt4YJrZZt0TFAT7sKt1hr0k9CAgBMbEIGQ5matoYXubR4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739212046; c=relaxed/simple; bh=PDoSmfSy/Tg7p5saV5k0b981LVBGMsD9PYdNd9oEhrc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=At7TLd4PoHTu7U45d6EuBlRGntFV7Uu6KGdMdSzk3j0kUnF6CgPCd1P2ZUvr1lPtZVgae9nB3fCfYXs3Ifm3fUkF/v008otX68wS6Q8exeQQqkMPHEg4CMADziUnhnSRRVlEpJ2vfgEyrWUzaMTBeJ3Pr4l2KC4Uby2/ES10gns= 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=dP1oZgKA; 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="dP1oZgKA" 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 51A9Vtv5008337 for ; Mon, 10 Feb 2025 18:27:24 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=fAbeSvzzDSR fK4FglCkwrWyMnTvLJKDNWwTPCreQNEk=; b=dP1oZgKAZtmQiVKlHICG2oUIMXp WRX97QuVLKEujuszqVVLSnLdlGcTq+IBmvaCIHFnhvQqdnnjabp8IOX8/EtcFwis NsJQX5iOr4TFPLqQmrk53kHzLm6vI6NijI3VDY0IOR13t6TOg9c8YPXglCKV5tLO vD39FZxejQiXwpEHwEFudFmjnkc6d5cIKijpqzs5CFFqfrdht+5jFrPUe5qvVhLJ fO1dcbEoR3TEaDWARctqODix+WKpcnfks6vua1Yt9f+50lBRBXTFoaqz/JtjUWEf h9AS60rCHAm/iFZWSYe93+F0qlIi5FdTXCJh/gX9pjfYj7kZ0zJKS8c1pyw== 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 44qewh1f7f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 18:27:23 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2fa9bfea46aso660242a91.3 for ; Mon, 10 Feb 2025 10:27:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739212043; x=1739816843; 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=fAbeSvzzDSRfK4FglCkwrWyMnTvLJKDNWwTPCreQNEk=; b=m5TICZ5wPryHEaSObKJs9dChpekp97OqA6lB8+owHiOiU+1/lP+XNmX/WpEvHmu9RD HejO6nT1d+jSsKqb0bf3xbC7GT+C1NQNYJAPU33DG8LnRaL2NTtxbJwOx2XB1WZiQsLD O8AWBNoIh+sDel5Vg4l1mI7zeeG5e7mWoV0lfDFXJTKE9B5iEGGJtJQ2Y5sgHePyd0Mx qYFISscaVtd1dfx1Nbz1tgbKgXTsqnjfpeCwfv5HNuIrs+M7Djex9i1u1ib9/8B9TvYf fttyr8an+kdWajdC8zzoSCnAFYuLWMAgHUIjoys2AQCSIarsPKSRUjx814rxi0xMIt4T Qhwg== X-Forwarded-Encrypted: i=1; AJvYcCX14x2leQBFp9Wyhyrd6yY6Rtj+ZYo4ElBIcH4d952cGOBiok/2I+URcYVxrZTv/fgeehLiYJ1L/MgLQKaiWA==@vger.kernel.org X-Gm-Message-State: AOJu0YylNcZmPLKZTyNOUqwuYY4xbSpmv/MPfdLfS6poWEmPJpKSsmtp /jvibbO78i3e1hSNHe05aAZ/fpaMDZEIk5PETRXRVEXWVb6H7R9Sv+wpC/S+gsoMJ1gjAc74iAg PCNVtRndftorzhhc3dz0aK6UUvQ+I/r+gz4N5B7Rjfge+HK5Ed1OzaHGv1smJ1jsiApzwbxTorA == X-Gm-Gg: ASbGncu96iHkMXpcCfpIQB6THJf3CZ0qAOBWpLaQ32Fmv/To8k1Z+k+CzBX9A8EMaBM p6W8zEND8VQBGkds75uZCScvBoydfEUxcex9T3y+jbWSq3vYJ3uJer3Ahau0ZQL3NJSIMEcTnW6 /z+fgx0G3XsNItRMqSD7tYsiUmeRiq41c75Yu+sLpVmIsw4PR4gZ1gxVnn97M77GWq67B3dc8Mn cKl9QkuLukdYhpTrxD0LMNOrl1UY7TqpKbQuFTjZn8kQLE2g7X+8F5NmkXUaV+jmruAocolGfWs wh3DMCywJJbj4gs3lquUHMRQ2DYnLFOg6FC1whgjPi1VTzROOlt/zdenZdJe X-Received: by 2002:a05:6a00:f07:b0:730:8e2c:e53b with SMTP id d2e1a72fcca58-7308e2cff04mr7494879b3a.5.1739212042797; Mon, 10 Feb 2025 10:27:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IEl6HApPA5o/SXwLPe8SFpai7AOw0KUzZ5vMElwGSGjqDBkSWO7oTOcmETRxasiZPyDWmGWUQ== X-Received: by 2002:a05:6a00:f07:b0:730:8e2c:e53b with SMTP id d2e1a72fcca58-7308e2cff04mr7494841b3a.5.1739212042353; Mon, 10 Feb 2025 10:27:22 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73048ae8e83sm7948372b3a.84.2025.02.10.10.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 10:27:22 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v4 2/5] wifi: ath11k: pass tx arvif for MBSSID and EMA beacon generation Date: Mon, 10 Feb 2025 10:27:15 -0800 Message-Id: <20250210182718.408891-3-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250210182718.408891-1-aloka.dixit@oss.qualcomm.com> References: <20250210182718.408891-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: NMUgCSNcLB9_EedIw5BgJG7E_2N-8gSp X-Proofpoint-GUID: NMUgCSNcLB9_EedIw5BgJG7E_2N-8gSp 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-10_10,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502100149 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. Compile tested only. 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 466a314b938b..97816916abac 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 10 18:27:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 13968686 X-Patchwork-Delegate: quic_jjohnson@quicinc.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 B9CED2566C4 for ; Mon, 10 Feb 2025 18:27:25 +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=1739212047; cv=none; b=KcgWmLTSxnZU0lSuPJPGgoQcS8bxvBhNJYX8Jqtr+tJdJIMcEqPUuoUMIGXef43s8NTj3eG3JsZt7aR6EhaKa8OVH1QWwOynycJauXMcAxHdtAvE+Rzh5j7a24WPdZP4XzXoQIUSJQb2WoNuqtC/RTxe+SqapqhgfEOXsrVZ01Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739212047; c=relaxed/simple; bh=W1/XQcNCOAbLvz7JqeCuxh0SdJ9H8MjPDVqhBacqeRk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=l7w5OWY6xel22lmKGMAXSO7BxUNVMpSeKXWFPr5QGSjRJe9Fy3JmZ7P05gvoygS+NMeI5QvnU1PX6RN7poM3+WovWUOi2aGM3h37Tz/ZMXF2GNWo6v4ADzxVJW04FsDvOWgkEL0zuE7L7Ikd5disn2wD634GQCGM9d95MTofvig= 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=Pvt+3jv2; 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="Pvt+3jv2" 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 51A9VqQ4008278 for ; Mon, 10 Feb 2025 18:27:25 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=Yp2/DibRsBy Ma+EuVeyCQ+AgsGVeDKcUvGXcO4trUWo=; b=Pvt+3jv2kS1sZP1AiSC7O1I2U34 TJzFpNEomiQFwOQF67y/ZaTmzSGvPjjKaYnqFAwwRM4Jb66eEdaCFe/3k+Z1Yvpq EVx0QA5jGlCLIw9qU+b966vKt3kpabmmBCKZZmwBrFGo2nW8KsrjCfLLGclCGdVZ b+qmGrCZZXlneyn3LupBC+8FW3wv2GsewihoHM0h//XxShia0hUCHXYP6m0mULQc XK6ZCH8iWMeegZDAOPDDAAfvPj46TSh2cCMY9O4gOzY2cCEYMIwS+ynUGn2galsu ocXKAHt2kn2Q0yj0mOsh7Lq2OMVuEEaZr/B/u0VMxdcylnOkbkFO/punh2g== 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 44qewh1f7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 18:27:24 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2fa6610fe70so3269341a91.1 for ; Mon, 10 Feb 2025 10:27:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739212044; x=1739816844; 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=Yp2/DibRsByMa+EuVeyCQ+AgsGVeDKcUvGXcO4trUWo=; b=pnE2Vbam2LiHq+P64WjapHccU1wH5JoOG7hdcTauqvT6mw0wcDfcHugcAe7wlLZLcW ezT9jbjw0JTIhN7F4+XEd0q6p7Gm0Ws4HudsgmJEbim6TV4+n8511kzusLO0TvFXFLC9 YtFIlEzrPTUh6zJDY8blKEbWeO1kaj04awiIOW0w2952BIUduLXLxrk7KwJP1vnJtyhr PGgW5s0qqjtS6nUNf8s2C4SJC+Vfz6syCjuYoKm1S0AoMuSl5np4JxUBub29P0bIXNnF ppB+hSyKYv6ba2SeMu8pgopt0ltsy9npRqr9veL1SWNW2zjWUJphSstmXgifmAwu9gcV Y5Xw== X-Forwarded-Encrypted: i=1; AJvYcCVyBuNo9YpkvpcJwrSNKt/HvcCESiBjsTZvMJdaXg+93NU0KwVe7izP3BUlnfmfJIe7tcW2cQEpBezbBVo6/Q==@vger.kernel.org X-Gm-Message-State: AOJu0YxmXvR/JMuHvO+1NZU6h+Eo3yU4hHZ/ZROIFPoHKv2L4yWd9cOZ avystDrmlmUsP0ajfMk8mlVZeaNXyADSlLpps1QHzauEWeDkjm0fv6YZQffayYCylHnyFjBkdSz eSwkgwCsL16ssNB0M1mPuzBGfsiZ32NZZg3YP5UjXtQPCco9SBWl5rKVJkkGpk6rgMQ== X-Gm-Gg: ASbGncumuXioI6m3HaIZSJNtN7gnfsGOrKH9PQurIyZzh6viy6Qqv06CrERJTHu/375 iamRpOhBiJJs8KPE1wgUvuEWXJOKZEMHO06OoMidgB76ncYsxYuyWkRhq8rU8hPJHyP2ynTFPjs DyDE8jCevz5t6e4e6rn1FhcYt49Jkc3VU2D2QV+M/k+Isg71LFho3xb9lPGHXfqrNmgsZmnmMl8 XLap6dFYBcET7oCyTJJUUvqK6vULDsYneiMhqfhaa5nbOahJsuWhcEfdJxHKOmDcBhWA1rgGJGz xPU+yYuhjBQ+FPLGaXs0gVlWlHUYKw4NNKGsmX+JGf9CGuV8Xz1rUhLyl8mf X-Received: by 2002:a05:6a00:7491:b0:730:75b1:7218 with SMTP id d2e1a72fcca58-73075b17593mr10741976b3a.16.1739212043789; Mon, 10 Feb 2025 10:27:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE91sQYwrJPLIU/e6nitruwQTHgHylPVSviUYoGaKIF8VGT7OcasBjhnPeYpHaknDQwBYfSvw== X-Received: by 2002:a05:6a00:7491:b0:730:75b1:7218 with SMTP id d2e1a72fcca58-73075b17593mr10741931b3a.16.1739212043231; Mon, 10 Feb 2025 10:27:23 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73048ae8e83sm7948372b3a.84.2025.02.10.10.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 10:27:22 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v4 3/5] wifi: ath12k: refactor transmitted arvif retrieval Date: Mon, 10 Feb 2025 10:27:16 -0800 Message-Id: <20250210182718.408891-4-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250210182718.408891-1-aloka.dixit@oss.qualcomm.com> References: <20250210182718.408891-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: 7Menk_L8xNm7eNGWRM7QHvvXl6vBryDV X-Proofpoint-GUID: 7Menk_L8xNm7eNGWRM7QHvvXl6vBryDV 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-10_10,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 mlxlogscore=998 phishscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502100149 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 16e6f2fae943..e642fba2843e 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; +} + 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, @@ -1695,11 +1706,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; @@ -1714,17 +1724,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"); @@ -1781,6 +1793,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; @@ -1811,11 +1824,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; @@ -7673,14 +7684,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) { @@ -7689,11 +7695,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; @@ -9071,9 +9079,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; @@ -9141,11 +9149,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 10 18:27:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 13968687 X-Patchwork-Delegate: quic_jjohnson@quicinc.com 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 160812566F3 for ; Mon, 10 Feb 2025 18:27:26 +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=1739212048; cv=none; b=qqFbLBjD7mBNQj2FpwCbsi8ewEhhpp2EIEIXEoHNGIuD0neXmnTu6/zhrhEWrdHAqyNcVlW81iw1guc51mDQJbNNWDbuTLVeX+Au3bh43noxTzMzurW7dT62eylF6JF6mx0Gvhp89b4MsNiD8/gpEfSMCtr/fNAT9aMnDaqvCtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739212048; c=relaxed/simple; bh=eNRBWR8T0387RjnoH0yuhYdQrvfgL24CjDXXhNwzmFg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vEKw4CuJ275qX9RWpqvG5G/GWGPxGeQyfhsDIXD3yRnop/zre+j8qIdrNk9HVqfRzPkHdTaZY4NdMksDm6QsV9v16rEbjFLHqZMBdRTmX2q7Q6SOGWoriRnbF4XXdCE10hgrI1BXQmViw8vOHDRkwvyz4v802tzKn8VKvhQ7q+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=RqKcs9bF; 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="RqKcs9bF" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 51A9UfVb017425 for ; Mon, 10 Feb 2025 18:27:26 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=B0+YrNUgIbC dXYFJgnwFHdYOJYWa1zgH2LNCJBsZAp0=; b=RqKcs9bF4q+qPQKJRPwh8AeFIYq PeZSqo8vxHoRao9eVgd+MvxTvdKUXnbgVNgf5nrrM6k/Cjqp7tFjgLejFRmeRr3Y TNzie9mbSjUqEnjtE3b8kNuMVvEzPZlhqGeM3oLonGUGDvsaG/5LKRpHAyrUM3OF ch+zXwYokBOrFVPWD7rJkFEApgZauDPJz7qwYo3y4yLuy/nrZj8Ld4JIzh0wgEog dc3w5d9j41q01nYw3xbTu99CBdiHFprUXObJp8UAiBoZxmWINPXQFq3JftBiBflb uunU0qWsDVWmCLmoXcQKpAVZMZJukXddukehqtyV2d5mql1uZEUsG2Bzb7w== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44p0guw83d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 18:27:25 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-21f6b2d49e3so59255805ad.3 for ; Mon, 10 Feb 2025 10:27:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739212044; x=1739816844; 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=B0+YrNUgIbCdXYFJgnwFHdYOJYWa1zgH2LNCJBsZAp0=; b=jbrGciIk+or5VZs+Xf9A9A6vY3Ba1PR5JJ7eroMgxGT3L0X9k0zvR2/0D2I/5u4YnZ moE/F6nfXuIiesrQiyqonE6cCFWfyT4eX59XwZNPxA8u5uMSQpiVCOG0IxEYBlWV3AHB 5eANF7GYaA0eivnO/jW2Bvw0AWsV1xl6d/ntdncGcHka3FkQIEMbeIh1GHx7C8vSVNs/ vbNWhJwY/JRlbo3uHCxO/9IGzAkJAF3Isjbly7N5HsUeVqcjt22TdmVG3NfhObRlB78U yfpheACTQAQ8AWbEKjPmuRYNcS/m/e5a+j7jVr5T4BOE1aO97kAu5uKpfCt7O7t7dELG /C4A== X-Forwarded-Encrypted: i=1; AJvYcCULaW8V9FLtdx3RPnz1MZcRZ0hfDTT0HkxgfIcbZ3NKECSYQYlwJU4fp8T9rnfqYyr6KiLSUqnx7c0jC2vRlg==@vger.kernel.org X-Gm-Message-State: AOJu0Yyy5YYjYoAsm36QRU3/jfugGyCPmsr9hGoG+LYniflW5hA8+86F SZPIHA0eiIGmzBvZUnM8WDwuWBPOzZ+5SbIpf/BqQhtBnYEN9+0PnOmgELlUXXMi/dFXbQcKSft OyjE817ciD8cIZTg5vbkl4ZpmwEJroCgF37Mio7V+AKZo7RCpRGEc+XFhdyBfj6KaIg== X-Gm-Gg: ASbGncuIvqbrvCn1COQLWrcn0WfssxuIntMRIy6P0B4jxLtQC1nSYwSnZQmBsHgG2Px KtBUGCph63mCuSrGSxMkYt+4MTL0npIwBqVDH0adb/qVusJlxjwVy2fLTCxu+vJwa/kv6U6M/WM iUiBgNd1rkeWIKcsYTbKiSlgORWYl58Z7hJxgOUUMPNMqQqoghvjXsbNHKWFXoXQLj7qR+VPhr0 c7i+IMIfnQR4462+MZGhOjpC2AnWBrGh8tgxZa4xPPc7Gi4brQbHuld4CJ26Zw2SCYj959xb6kv HYfMIsyoKavga9hgybgX9emJMuh+LQRvz71I6w9L6tHES9J69hMEhTqUZBrt X-Received: by 2002:a05:6a21:3386:b0:1e1:c4e4:8898 with SMTP id adf61e73a8af0-1ee038c3d44mr27478646637.0.1739212044464; Mon, 10 Feb 2025 10:27:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSzHNPPGnNpkh5hpz0y25jL3Bxofc4K0jGt+mLpYgHZb/NDRO6OjyaDbQpQ9N1Iq+XgaRHMw== X-Received: by 2002:a05:6a21:3386:b0:1e1:c4e4:8898 with SMTP id adf61e73a8af0-1ee038c3d44mr27478611637.0.1739212044068; Mon, 10 Feb 2025 10:27:24 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73048ae8e83sm7948372b3a.84.2025.02.10.10.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 10:27:23 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v4 4/5] wifi: ath12k: pass tx arvif for MBSSID and EMA beacon generation Date: Mon, 10 Feb 2025 10:27:17 -0800 Message-Id: <20250210182718.408891-5-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250210182718.408891-1-aloka.dixit@oss.qualcomm.com> References: <20250210182718.408891-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: gmNINCvw6_DKzHr6c9VM-UpzqzYuh2Gl X-Proofpoint-GUID: gmNINCvw6_DKzHr6c9VM-UpzqzYuh2Gl 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-10_10,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502100149 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 e642fba2843e..7d9975db5f47 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); @@ -1730,7 +1729,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 10 18:27:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 13968688 X-Patchwork-Delegate: quic_jjohnson@quicinc.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 62C702566F9 for ; Mon, 10 Feb 2025 18:27:27 +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=1739212048; cv=none; b=FGTjrBGz9Ct2RDRHDGmjcnffv44uAjfoHgbO6a0sPw1J70kKEx8P2mJ6wktCkfIKJ17Spg6y/Do451jx0xt1kIjqtCfdITJAXEEzaFCNIhgPd4apaZPyPdpZH1iUX9uiuydkCLX7tQXWlJKwqKBP6MUwRviBzPAMLP18MFiMbx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739212048; c=relaxed/simple; bh=hIsS3Ehx5jTmk+3BGaJcqL9j81kadTIhUmUYlM2o3M8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=THSt1+eNipcE2V+xJGWlc/hHhfXVxJuU4Yn2cz59FCXiAd3cvO6Sw7fpV52UbA4SSCCU0+EuY3IsXF7zTFuPzHDQUppGPRWMsEx91PtkhVjdNAace9InUgpgGLBHHqJD4m+n3V6eFk9pRp35xcWPXgzyMmMtUatVDQm6CxlnvR0= 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=CVu0v+lM; 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="CVu0v+lM" 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 51AHvYjT015777 for ; Mon, 10 Feb 2025 18:27:26 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=TRldpQYUQvD 9jkKM217c1U/kKH2mifVb0NoATjuLbvg=; b=CVu0v+lMOXT5Qnw64tY2EIj4Lbb jNNYt8dWibWDblAP8tBsqVKvAm1heu5r3V03Wc27zm8N/A1QCFM9jra5wn9dJVge AUpx/Lu55SYo7mRL//QWjO/H/tvjMXPHSPgF1jcQGiyBeAJ+EPPXA7M5rclav4f/ +7aAj4SLxNF4XVaIscdbJZP5coPtZ4rkgkjkUeQmnNJUw41neA1CsHE6KREkijhK 0akPRfFdlcKE1aGgblsgixFwPNMejMGSqo4smNYgHJqDa7tiAQMYIx73cquXTmdn 4CwbsQsZmOtlc0PpPaXzcDezGQi3LWVuUiNCEg+I8mMcj8xCL0FjhA7rWlQ== 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 44qe6nskc6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 18:27:26 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2f816a85facso10100546a91.3 for ; Mon, 10 Feb 2025 10:27:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739212045; x=1739816845; 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=TRldpQYUQvD9jkKM217c1U/kKH2mifVb0NoATjuLbvg=; b=qNt3v5o64NO0RwZdp9/YF3HZhWnz0+tDohOOlifwmucwLqd8zvJWQPOzVlkAiEVpAB 9YQGBfgb4Lr2XXpoSuaysKvPicAl/smvSkSLigDgJv8gNCjF7/mEWMKOXIil8NUb/gwM FdksVWTQY34vscoqLbdWLZ6n+dKQpc5BZGd22yQEExZJ+gDzrn3xOYauZJuOAUL6n9Zh aTObXEvTPnUJuXec5xC2CwW8AqmcKf9l3sk2Y2l2XS6ukumQkIJoHE67whKH0+6uv4k1 wbSwODHEQMSDsglmJ591znIKSzt5KLSIfVuHS0OX/DJ8QC2l8gNWZv0NoLPuP4RB7y92 uoCA== X-Forwarded-Encrypted: i=1; AJvYcCXS0h2bkc3xO9G8gdKYsVu+UEgEbZvPi48zvPnsn9+sLJoK/5Y02jYt1wAayaDKEsaL7MnwGHeEMkcnyW1Wvw==@vger.kernel.org X-Gm-Message-State: AOJu0Yz7isEt6AkOQIKQ8wcdwbt0+76+cmOa6UYT5iy4SgGd3JGuYrUl K8bB7e9q5in0XoGA8WIcxB3/7lHjAtcUqsgK193Xj49U1kU6SVeiIcnh8wFavTwlOwN3Mv23UB/ 4XpPxG8Ix6p85WV7lROdrUJuV2vufo+EAFibV5SW3ce6dLz2Roha5fvSJeLu2B+HS6fctPZYzhw == X-Gm-Gg: ASbGnct9AuYuTC/ZmXWvqdeajAB2vzmViiJyM61Qo2V6SgWpxSbFzBc67clE32J81Bp 35au0Lq+egAIGl9lIuR5ud/Kmhq4RQu0FuaAf4r1UZNaq2dAVNV3UKLjK4dyxAVBTPbgdnkrXNU TnFysYbluviMge93y2DJnLY9U8O70mQY9wRmcLAhxbbFVnlWZC9TDYUEkbxbPyUQfamB3oQCOUl 2kbJeq1wDIJB5rRvehTnZYNLFdE1p6B2JrNu43+zFMPPa1ek6rBL6rmqi8B+zspS2mR+JTc/JhC VzyqrPNAf43qLJUI0Wa3R1n2vh3OfDwIXC1T2alZEa3i9+92Ab+Dtgl0ZX3V X-Received: by 2002:a05:6a00:9a0:b0:730:937f:e838 with SMTP id d2e1a72fcca58-730937fea2amr6447012b3a.22.1739212045339; Mon, 10 Feb 2025 10:27:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeBK/mItKMGA0ZEn/2StC1+xoy1tpmMDTSchldtUYmYaQRFa7Vr5lyV+4W3tx9mXCEgZ4diA== X-Received: by 2002:a05:6a00:9a0:b0:730:937f:e838 with SMTP id d2e1a72fcca58-730937fea2amr6446972b3a.22.1739212044924; Mon, 10 Feb 2025 10:27:24 -0800 (PST) Received: from alokad-linux.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73048ae8e83sm7948372b3a.84.2025.02.10.10.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 10:27:24 -0800 (PST) From: Aloka Dixit To: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Aloka Dixit Subject: [PATCH v4 5/5] wifi: ath12k: pass BSSID index as input for EMA Date: Mon, 10 Feb 2025 10:27:18 -0800 Message-Id: <20250210182718.408891-6-aloka.dixit@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250210182718.408891-1-aloka.dixit@oss.qualcomm.com> References: <20250210182718.408891-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: PqLVPNg4QtJXJXSqvIlaSQNa2bvAvh8D X-Proofpoint-ORIG-GUID: PqLVPNg4QtJXJXSqvIlaSQNa2bvAvh8D 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-10_10,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502100149 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 7d9975db5f47..67a4f555f30b 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; @@ -1694,7 +1685,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; @@ -1729,7 +1720,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; }