From patchwork Thu Sep 10 15:07:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 249655 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827206ilk; Thu, 10 Sep 2020 08:07:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH+XsIbtHPzD5ljYRo77pZjFftNekTQTheSKKB855ehf0VQZtuAM93L8alW+x/8OgIqTxo X-Received: by 2002:a05:6638:611:: with SMTP id g17mr8959124jar.40.1599750429555; Thu, 10 Sep 2020 08:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750429; cv=none; d=google.com; s=arc-20160816; b=eMpj20hXabvZvhDTO1eNeReN0VNwk2pJwKhHlE8fpAk24ygDjfgiDnGJICzaAV4L8s hr3dME8xW2PrDuIEnCxlbO0eVmaU6FQtFsyDLk3ugERIwOY0u8vgWu+AHq67BXhrgmG7 0I775R4YnvgOYQv7BH78FpYomStLKym+cAVW7j3Cg9pMSZLichN1/IA+Ciyltxa7hbqw FV1IIBAFPcuJyjLRBwzw/kkO7Aszb+wskMOhg5Btc4n63bN0OAF0LYTcMnANW3Dqg00q Nk/hVEv77yw8GqH+LPS9Z/Q4z28V2gC/sSiutFOrkUcG6+UOCr+SYbGaQ/3Q/0LD76x5 TP2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=u83V2fxJ0gfvnjiCUm0/cnRFfkgr/mBMelXRxHRoU/E=; b=HzuIT4qp7WEI6ODYTS/JbLxnkrBCQ6w4d606dncq0xeRZ7sfXvaIVoO60tbiHDkrO0 vtYwCzjiG4mBQqBogIssfMCEg8Rdm9gcMGEke6OywuQ9YBGEEkDyj7rktpjwpoB6EYQq SYrxqpH4YxmB+5d0kmwPZ4VF9gas0BNaDbADTiCmYy4lbzRIoHQHSQgRrpJ82EO5MfFJ ttngQpmG6bF+aH+ZgITGVfFRgKQCTu+xyAMXDwnXebqQBzziKuJzk9aTqB6264v6drZF 43giMbROT32sd683yaen6GkOlkWWEVb+jQTRJ5iPYy4JFKc4E9tqz+kSM1YqktD7m4HH cCMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DF1sbeku; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=uxa8g2AS; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id z20si4978077ioq.21.2020.09.10.08.07.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DF1sbeku; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=uxa8g2AS; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u83V2fxJ0gfvnjiCUm0/cnRFfkgr/mBMelXRxHRoU/E=; b=DF1sbekujE+Dw+yWVDqloXvR3 xpm2mv4NY6srHjFe/qXSr7iIm/JCP8Lrj1mfyZQeWoVolL76dqf0fJfzw6N1pCZGVf3YZaaT6ajhx yex8eLjuy+27cekVIem0BI9g5YXooggtaSWGfGU0FmGLTj2pA02Ju//91q1DCVqzhaHisppjya2+8 d4S5Z+vzrBB3HCMIJNTFc7FTD6miVlUOgpPR/plsdOsHRIGQES0612muOzQEGSPuu1g1aTyn0pdzJ wlOGP08wpUk+7EWVUoKGigcsQ3cZOT2BPcJ3Eq3ymf1XVvigyAkUKlsDVHepyDjh9a/Oj/9tMbg7N yQHmUOSyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAE-000818-9f; Thu, 10 Sep 2020 15:07:06 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAC-0007zF-0o for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:04 +0000 Received: by mail-wm1-x344.google.com with SMTP id e11so2101096wme.0 for ; Thu, 10 Sep 2020 08:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bt7q4WuJS1fLYjS1vUbuAcQqhXMPVcrVhmoeIcbszdE=; b=uxa8g2ASp9ohHLOccxMhBkdBhNNBA1F6uHZa74fFwBnkZBfhlAxduUXqitKC8pSiNk HrCLYU2LWpN4D2Xf7vNjpg6dySri49048PKbtdwlp0m89Zfr/L8lORklj++AiL0yKr8i H+6201nHBopNlkjJ4Ca5mtBOQM+Zz+2qc4PubB5wTqfRt1PyemYw9J07eqekucZUQuau PLngadCdrI/8knfV2bIJK8c0xh8D3nOuus7HPrNgHsv7RHjEIvfd4wT7ojxAx2GuX8Df kPZPCKYuKgT5tD07qW2L3mVzPx0dilx6VSozy1qWKWqn5YH/EQFMUh20G/rSVYL+KzHA hLzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bt7q4WuJS1fLYjS1vUbuAcQqhXMPVcrVhmoeIcbszdE=; b=FthBJRgJZymieMHWU4WgWFGq3r0cSL93gjZU/3ps+BUG+scSzHrYBjTfpwn+3NayiR sKuEqpLvI4eegIdLwRqe5NBOJf/LX/3I8r/xF075jSrr13sJVJjxLwgdwcqnsWJeHl6n TjsYSplrOKsL0JDQK27vXnMLgzDtvKBECNDIlll4Y/S7XXRTu8fVCFOi/iHcdSUkx3+I rjIQOz1iXp99CBdTHLOCIigbIcSjqkTPpklDMKmVr1DiKDGSNwThB9odkSx//IafnDbM U7VC2MSrSXqeaHcrJQkR619gzjrnlz9yUq8RN2HiiR5Swjk4w05dFX3vLYrrLG3f5/NN M3Ag== X-Gm-Message-State: AOAM532EW3MZZ1m1SlZBeipvkHbOTyWjePvOpuHeCV51R3V8pgHQw3tu OpkmTMqX/wyXSSZ5JHlqPGwnZA== X-Received: by 2002:a1c:f008:: with SMTP id a8mr427580wmb.155.1599750423104; Thu, 10 Sep 2020 08:07:03 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id m3sm7597315wrs.83.2020.09.10.08.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:02 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 3/4] wcn36xx: Add ability to download wcn3680 specific firmware parameters Date: Thu, 10 Sep 2020 16:07:46 +0100 Message-Id: <20200910150747.2179122-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150747.2179122-1-bryan.odonoghue@linaro.org> References: <20200910150747.2179122-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_110704_101251_30A6D215 X-CRM114-Status: GOOD ( 13.69 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit modifies wcn36xx_smd_start() so that it can download wcn3680 specific firmware parameters if we are talking to the wcn3680. If not the original generic firmware parameter table should continue to be used for wcn3620 and wcn3660. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 242112ce102a..57523a66a8ee 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -625,6 +625,8 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) int ret; int i; size_t len; + int cfg_elements; + static struct wcn36xx_cfg_val *cfg_vals; mutex_lock(&wcn->hal_mutex); INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ); @@ -637,9 +639,17 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) body = (struct wcn36xx_hal_mac_start_req_msg *)wcn->hal_buf; len = body->header.len; - for (i = 0; i < ARRAY_SIZE(wcn36xx_cfg_vals); i++) { - ret = put_cfg_tlv_u32(wcn, &len, wcn36xx_cfg_vals[i].cfg_id, - wcn36xx_cfg_vals[i].value); + if (wcn->rf_id == RF_IRIS_WCN3680) { + cfg_vals = wcn3680_cfg_vals; + cfg_elements = ARRAY_SIZE(wcn3680_cfg_vals); + } else { + cfg_vals = wcn36xx_cfg_vals; + cfg_elements = ARRAY_SIZE(wcn36xx_cfg_vals); + } + + for (i = 0; i < cfg_elements; i++) { + ret = put_cfg_tlv_u32(wcn, &len, cfg_vals[i].cfg_id, + cfg_vals[i].value); if (ret) goto out; }