From patchwork Thu Sep 10 15:08:20 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: 249661 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827712ilk; Thu, 10 Sep 2020 08:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCaX+Gg9NZaZhNX4rdBNsuR1Z4ssyZu7CO4n8PyyTWTenzkGqtTTdIZpffracfo58d6Mff X-Received: by 2002:a02:cdcd:: with SMTP id m13mr9146300jap.69.1599750463438; Thu, 10 Sep 2020 08:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750463; cv=none; d=google.com; s=arc-20160816; b=mJis6YZ9G8AJmINt/XtxBAYjVLYPyPRcEFfMwPO/bZOavSoRHmlWPRsSMzhcHOf/2i JRdCTrUxmuPm3ssjhq97WMG+kh0P7UTj2Ng8UwQMlFgnzpiYSGXrBEJpl7Grfj4LmejI q7+iYv2gPmSj45+bdvyuiwKdG6QJCTRTfPIfyKVhRnLS3hm4/UBifhtK6/XBHE7aacvG t+gUqlwUm5uYLcVGRO1fj1+WTAYd0o/VGxKDuIxM1G4e+bC//4xwEVTAYRDnGGV9HziH 81faQwsUsPNNUa8yQ+VPd8yRUxEu3mkTjwVH/40HZw9OtwhkxfvjfnNgdUMgorns0SM5 wa9g== 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=93WCedrZqVe9lPNMowtHbqy+aXVteclcGeIjLy1mOI0=; b=qJdIIcD+IPS22oB0JtRaDzMuiMSjuxO+tumrekLhFLYSSH5bR6GabVhO+H8k6OsjFr nnZMgplU4zEdn3mCeO8Uf0u6Iu72MWAbiLFCEtVH2gaMzCgzfAFGiNSzFEl37gPZ89Q4 8fwpylgVJCPuCaIb5V5lKiRpvDcLjwuh4JSwN7MSbBkITvhOyOvmXEwb/WYCsnDkeARn 33onxdXa4r9DvRf46VSoVlQ9WEytdgARyGDB0jd5Ii39RkpAzayUTdLI34J+0oz29SLZ tuV6FeBzPNLXcALBq/PQM0kVBN65tW8k/ytxeB2Kyh9KZ0KdFrsgmShfg4Sr75tcHmQ+ rgsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=viWBJ2Cp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8ULLRfh; 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 u1si4302514iln.148.2020.09.10.08.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:43 -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=viWBJ2Cp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8ULLRfh; 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=93WCedrZqVe9lPNMowtHbqy+aXVteclcGeIjLy1mOI0=; b=viWBJ2CpTEkmekcyuZY9rhsj6 81tVdhA5RSy9aX75Sbw0rhTZigfNkU27E0z74Ow+3hYxd61zzTITq0z8TEmpiA79rCA6J07HyjtXn QtXo8FOFv57PSHJ+aQAo4JSkxWkalyCj3S1PYCkiC/KgYKoeoyJ30kChvlL69K99mBDce08IcJd3X xygGsI+jYfGQWSRtZL/4WPc+tQqeE8mElRpN4sWCiZxw0SNU5RY7im2EaLeVEi/+hFrvUuk2g9aiM TKuwFhZbhhu2DJTo4dyeOB6CGjScMwgenAqGsoc3bWlrqbA9WPNhMe5+mBd5b6tfzb9pWbPMVEEWm 6HHxjmAwQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAm-0008BX-9q; Thu, 10 Sep 2020 15:07:40 +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 1kGOAi-00089R-Vd for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:37 +0000 Received: by mail-wm1-x344.google.com with SMTP id s13so372289wmh.4 for ; Thu, 10 Sep 2020 08:07:36 -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=47YTP3hiYkA8vkH+lzBNX2aS1DpgYw/pF0C+zzRdrmk=; b=T8ULLRfhHaaMLBkLNhFX2NT9iPeqyReXcGhPzz4nEnpuRXHkqk02HObL09XPP9CDW/ oP2tP3txY0B73E+E/JIvGXlvDH1UL9mYkAUahQEu3KNoz4adbg1F++gQiDKH6Scu4h0w PVmn2uUhroMKitN+0u1DPK9KgnVWGqdtd1jKp2LQVWHGk3wHJH54X8M3nA0Ld0bxmL2L m/JoKqGPikkdEAcvKJutj4jTLmMlRrM6uDBqbnyTBK5Jw8lT1A3aBxO4r4ityJDlAmEG O1x55g0FgqSd7UEWTlST8cFIHlY4naPchJ5uyGoOXHAITB3S1NgY5QXMBu7IbFwVTXUB Qv8Q== 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=47YTP3hiYkA8vkH+lzBNX2aS1DpgYw/pF0C+zzRdrmk=; b=UspN+Qy23on1CQvZ+QyUKTp9VN7U3mx3WJdL4A7pODg3OdhNpWpRhCYRkM3qsWU0rK wRIf/R+DxEYRFhaMzDMDOZlOCy/InBisYCCboPpZW2mFmJv0QA+cd9YrBSQNK+g7GcwH Ltpya6aV7IuxdiWA3XRI8ruumPSJIAIBhSbd61o0RrfcwebtmfW02jOvd+7KPthaggkP 67ovFtrHDDQDIrzBJYK99CTiExe41uqgMyH7ABbxXGeMRXPSoJ+qQR5HCBHWSUvIiczO 7Sot34QRJ1EDj4NIuNdPwXbPWXfv4UV+j8KYaiMoBn+sYn+cnDxv8Giw9P0KRLf47MWa ppnQ== X-Gm-Message-State: AOAM532Ykyrm75aPe8VwB0CO2+//RFBFFpYSor5B0iHs6IfnMXYcQfi6 k7G6wvA1Ti/7WfeKXXuL/r1/rQ== X-Received: by 2002:a1c:9883:: with SMTP id a125mr442728wme.133.1599750456072; Thu, 10 Sep 2020 08:07:36 -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 o128sm3895678wmo.39.2020.09.10.08.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:35 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 2/4] wcn36xx: Convert to VHT parameter structure on wcn3680 Date: Thu, 10 Sep 2020 16:08:20 +0100 Message-Id: <20200910150822.2179261-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150822.2179261-1-bryan.odonoghue@linaro.org> References: <20200910150822.2179261-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_110737_058330_D46622CF X-CRM114-Status: GOOD ( 14.13 ) 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 In order to send VHT parameters to wcn3680 we need to pass the extended V1 parameter structures to the firmware. These commands need to have the version number set to 1. This patch makes the conversion. The conversion consists of 1. Setting the version number for wcn3680 or leaving it at 0 otherwise 2. Setting the size of the packet header lower for wcn3620 and wcn3660 Once done all three chips can continue to use the same code to pass parameters to their respective firmware. In the case of the wcn3680 the passed structures will be slightly larger to accommodate communication of VHT descriptors. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 0f5952003fff..e74abc153153 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1446,8 +1446,12 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_req_msg_v1 msg_body; struct wcn36xx_hal_config_sta_params_v1 *sta_params; - INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); - msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; + if (wcn->rf_id == RF_IRIS_WCN3680) { + INIT_HAL_MSG_V1(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + } else { + INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; + } sta_params = &msg_body.sta_params; @@ -1627,8 +1631,12 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, if (!msg_body) return -ENOMEM; - INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); - msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; + if (wcn->rf_id == RF_IRIS_WCN3680) { + INIT_HAL_MSG_V1((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + } else { + INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; + } bss = &msg_body->bss_params; sta = &bss->sta;