Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp157081lqo; Thu, 9 May 2024 16:11:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpRl0cc5ATlGapdKxHn/nkBvro2GafjJnCvwIhwdeYewbcngK8FZ9NV0dLroU9ykaPJ1PbnJvfnu3e/YNc+GZ4tAglo7QoihnwE9j8qQ== X-Google-Smtp-Source: AGHT+IGSnMhaqJK3d8ejrYfSM07sPGVYzTVD+4YDlkXF3Ax7xqrbSQ97PbrBkadDpgaJRqwaf4eP X-Received: by 2002:a05:6358:7248:b0:17c:308e:2154 with SMTP id e5c5f4694b2df-193bb638be1mr92878255d.18.1715296262102; Thu, 09 May 2024 16:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715296262; cv=pass; d=google.com; s=arc-20160816; b=PJkxRLHiGb1k6/R5g5ku6A74EIQWStlWLEYl4uweRhiRJ7vCwU5VJVpmoX2U2VDlmE KbeENkCmGyR378a2nXNy8aiRrPOCZ3eOdawzR4c1BtbMtX04YaGC3rsD2Xdui15mlB3D M+Nl6enX4yK1dm7SsTAcz1+u5auUrjm9Od4McMz9KLUP0yL8TMjeuKKZ1VJdtdFVxl09 LEJdm2Mst15hb6DYlL9XR6poUDbwcAn/GnGbCdMrmuWDfANj1mkRcvZFmkosyMuia/x7 Jb97FSvksHFnhPGCKeWl+53oAGvw798DHfujHF5MIBuRisE2EqtbQhmaYOK2y37SpiKn mOWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5v5N2alp1uQ+XfrIsjkwlYXZpmD1A8HGfjvSSrOvhEs=; fh=fwD13UwzsOjA03XStjURC0qvxgSqwLweFGrpkIx9YUQ=; b=t6ozVw0F2kRNdpXvEsKeoBBHtQBvvs6kx0UEE9XARrWeokTe2yelyteFLKE2fIMUIU S7gCrWzvYkeHeZAWHIg/8TdsiJSw6KqED+Bw4UmigtjJZva8wGFWea7LQzASEfPI09as uaHIVc/3QYWYbEwZWhI74HNDcxK0L8Q5fn2ulxg4Rzr5LwSngiVdPR32SrkSnqDCbU3L bezWtBE0KHHU0N4NNnZvtMJJSr1gLgUJ9k/HK5sM/5V2GyqYG9b0k+rbjKFV0YmzDaVq 2sar1ZtLcxR0BE51HWRnCcQDmg3b8i5KCkxhdQc+V/ZiO5NyTDzweqFrC8DLEBh/bnBT Jhbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b="Rj/eRXeP"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-wireless+bounces-7402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7402-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412a4daa5si2260981a12.645.2024.05.09.16.11.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 16:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b="Rj/eRXeP"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-wireless+bounces-7402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7402-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 73319285BB1 for ; Thu, 9 May 2024 23:11:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84E7A1292E6; Thu, 9 May 2024 23:10:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Rj/eRXeP" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 796A912D770 for ; Thu, 9 May 2024 23:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715296249; cv=none; b=foYNHqfpyDi5posWFQc9//yJSibcOLQ+EWLwpNsDTjVJXL/eQout8zYoayTCR4VqkAr1513KIGdJkVM7L7mfw+9haDfAgGP8v1A+pTjLLS+cRTZbmK+9DSBVqNhTfa9udqn1wy87QUJkoXE13tveHcrrAWZLBOUbs8C3U81EI18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715296249; c=relaxed/simple; bh=8W1Pgbd9hlq4tUcJqp3aK1ED9kkp6gcOD2FCLcyf6Qg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TFpvr3tDEfZEB22n9jTbZwFgDXlosW/VKEx/z6S/d8oBisy36/aSdNQnhufFXoi9Ws1/ml9xHZh2z9+AYO5XFEG4Bym4iwj0ufnufFpYRhExvRYBKFwIZM3qTDj883K4cQLSVb4f1BkI0ATpkUCPGGcDxOpQG/WU59PVYQ71YG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Rj/eRXeP; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 449MgFfU007889; Thu, 9 May 2024 23:10:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=5v5N2alp1uQ+XfrIsjkwlYXZpmD1A8HGfjvSSrOvhEs=; b=Rj/eRXePYmiiXKRBwvGDHprCW6kCVO/pOifwJY/EVpOhbLl9oA1BWP5rtgGu0gJuVXqz AcWohLwwWu0B1wzr5sjor1R8iIq8aRMqzSIG7LYSu181O7RJuYSsg5+T+BxMlDYzx21O oJNeKehNXLcaAW73iOdAxQ0M2mraqb/JvXZnpDgOyFmlj2lTK0EbV8W4+Otn+IuwuahF 9fRa0jnOUAT3mHwDyKva2J1moRXpvtfpZCu4Wdohio42rrt2roTcUKui7XcGV+Cw+s35 PTMM0w6L45aUfWTYXVV5Oe7t8ETs3RCFkGXU54isFyofEBg9PPySjRxWAVa66D/6L6J3 Ag== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y17gp00tx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 May 2024 23:10:40 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 449KdbfP020240; Thu, 9 May 2024 23:10:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xysfp7ebp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 May 2024 23:10:39 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 449NAcwv013046; Thu, 9 May 2024 23:10:38 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3xysfp7eb9-1; Thu, 09 May 2024 23:10:38 +0000 From: Samasth Norway Ananda To: arend.vanspriel@broadcom.com Cc: linux-wireless@vger.kernel.org, samasth.norway.ananda@oracle.com Subject: [PATCH] brcmsmac: LCN PHY code is used for BCM4313 2G-only device Date: Thu, 9 May 2024 16:10:37 -0700 Message-ID: <20240509231037.2014109-1-samasth.norway.ananda@oracle.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-09_12,2024-05-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405090165 X-Proofpoint-ORIG-GUID: dbEYbYSHMRmtiw5xuUiKoDuCCFXrSNqV X-Proofpoint-GUID: dbEYbYSHMRmtiw5xuUiKoDuCCFXrSNqV The band_idx variable in the function wlc_lcnphy_tx_iqlo_cal() will never be set to 1 as BCM4313 is the only device for which the LCN PHY code is used. This is a 2G-only device. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Signed-off-by: Samasth Norway Ananda --- .../broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c index aae2cf95fe95..e472591f321b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c @@ -2567,7 +2567,6 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, struct lcnphy_txgains cal_gains, temp_gains; u16 hash; - u8 band_idx; int j; u16 ncorr_override[5]; u16 syst_coeffs[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -2599,6 +2598,9 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, u16 *values_to_save; struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; + if (WARN_ON(CHSPEC_IS5G(pi->radio_chanspec))) + return; + values_to_save = kmalloc_array(20, sizeof(u16), GFP_ATOMIC); if (NULL == values_to_save) return; @@ -2662,20 +2664,18 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, hash = (target_gains->gm_gain << 8) | (target_gains->pga_gain << 4) | (target_gains->pad_gain); - band_idx = (CHSPEC_IS5G(pi->radio_chanspec) ? 1 : 0); - cal_gains = *target_gains; memset(ncorr_override, 0, sizeof(ncorr_override)); - for (j = 0; j < iqcal_gainparams_numgains_lcnphy[band_idx]; j++) { - if (hash == tbl_iqcal_gainparams_lcnphy[band_idx][j][0]) { + for (j = 0; j < iqcal_gainparams_numgains_lcnphy[0]; j++) { + if (hash == tbl_iqcal_gainparams_lcnphy[0][j][0]) { cal_gains.gm_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][1]; + tbl_iqcal_gainparams_lcnphy[0][j][1]; cal_gains.pga_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][2]; + tbl_iqcal_gainparams_lcnphy[0][j][2]; cal_gains.pad_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][3]; + tbl_iqcal_gainparams_lcnphy[0][j][3]; memcpy(ncorr_override, - &tbl_iqcal_gainparams_lcnphy[band_idx][j][3], + &tbl_iqcal_gainparams_lcnphy[0][j][3], sizeof(ncorr_override)); break; } -- 2.43.0