From patchwork Mon Aug 3 03:10:57 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: 247306 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860406ilo; Sun, 2 Aug 2020 20:10:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIVNSsZOqIM6NoaLH5wBesQuhzVb5P6ZGMMu7aB1FFKJpeMG1neLErhVrGGNhRfj+/eHJK X-Received: by 2002:a50:d75e:: with SMTP id i30mr14404865edj.246.1596424251581; Sun, 02 Aug 2020 20:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424251; cv=none; d=google.com; s=arc-20160816; b=U779hY0qc5+dmAd+kMDK4SozF/ypOLny8L2Cm+puFIan8jp0Ll+rao3cd4A3B52Dpt l8JZhkAf0umRhcCWCNTOnoKtqUBMXwOmVOyFtgm90zbuJy0JUy0tw2LcVtIr2IQLWNZV OSxIDR8/est9FOW1OetyMuT4g+2QXdH1sXvd32j9rVbILqU0Nc0H0wrvy9PdrxwSOBYX 0KOPaIdB4NVAHWITgWTPeDrEzK2MXNAncWg/ypJu1GGQPZA63i4obPxlFGLl/wTskiXc p7WZokHm9KZ4S37FGBSc0sD0q9VWK3h1QrNCwskxUBBRwejSWIH7W+vbCHYsEiBpYI34 La6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7sW+j/XKYMsqDf8PANCMztexlMqz8lIFr2FXWlhrblQ=; b=hFvzvNTfahVVWslxjHYD7ujmVnbJNACInooZWFcN19WSts6I10w4pdReFs+97P+x6P z+d7iMy4T2b7I0vYoDqbnd82Klnkb9EbZjAoKPxJ9HcRlm7RFew3dtXt7vVFcbdZMXTc 38rlP0y6OZeF5lHFTn3v7cBfxmLxpwUzomAHF9QBkvBiWqc5RpxtQ8jLDfSPwvTG664J BDgKGtkbFAEYSb5u/6SQrD6Usms8M3Ut67u5lHPT4ayWKemTk5Z5VtDIbrER1K/qUGQF 6zsg9y7bD7C5pC7KCAt77P7UUqj07mvv8fkQp6wVJWmyLLXZhsnIWBpnUCQT1euxY5d1 llEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SRIYC5YP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.51; Sun, 02 Aug 2020 20:10:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SRIYC5YP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726785AbgHCDKu (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726757AbgHCDKt (ORCPT ); Sun, 2 Aug 2020 23:10:49 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C9FC061756 for ; Sun, 2 Aug 2020 20:10:49 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id k8so14104551wma.2 for ; Sun, 02 Aug 2020 20:10:49 -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=7sW+j/XKYMsqDf8PANCMztexlMqz8lIFr2FXWlhrblQ=; b=SRIYC5YPQwH5A0WChBwU4DDJiNlPaS9OqnQduz6N14oYn0aPPzSy+Ec54lMITV4WWU gAkF+RzJK9135qQz7Wd9o8Xu20TXdm1UxtjOKvOvD5GiqbdOAzqqh+GO9+gFoDEmbaDS cX/luOGJ+jmQvmfXf3Rad+66Wi7b3Gw98ryZ8wHy1/sht7OLXfodh3zVUcFtqGan5Bjt Y0JCUgVJN61dOuTPBMQCc9pgAmaBQjTsk5E4vXh+1d26U/Gc2rZfveANyXOw6mpw0azm 4ldtldVqM9Lq5pHKQwhuIGeH/gCjfJwCojZ3wm6rBI2xMJc12C1Il7+w2z8CJIl29XXD jp9A== 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=7sW+j/XKYMsqDf8PANCMztexlMqz8lIFr2FXWlhrblQ=; b=IIYFWwprdf7EWijRjnrg0YaS+3ZQrmMSmEEeLY8A2zXWCORA12wSdMgyBnMP8fKIgE 5m5vOSKHESIDYVP4oGHVEOEyX7g/XvueGkOORZuvaCZTuOgvoVx5t3dONOOgj3WEYmyY XhsA0qdud3Fhf3lyQjaWoB3z/J9qT9iWTq4lRsrJq5fZkY1nPuq9HDl14PbfbWtRMHvm DANx6rjrs1kKLrDWziytksP77bkmW811fPevoSeHiyP0Q1bFV6k39df80s/ZXTCVBi2f v2cajA19B//ulpi2XfHk42lOTt9flInV4e7Ofy+XuKmk1OroizeVh/xO2zuxiNlhCt6J tlLw== X-Gm-Message-State: AOAM531zFBS5u9m8BCHIA5P9xPFup/OsW0qbTnlMYYTg7yKr1nv7tZ14 K8cfhKSfst957pWAKjhK91r+vg== X-Received: by 2002:a1c:9d53:: with SMTP id g80mr13691413wme.70.1596424247984; Sun, 02 Aug 2020 20:10:47 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:47 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 01/36] wcn36xx: Add ability to identify WCN3680 Date: Mon, 3 Aug 2020 04:10:57 +0100 Message-Id: <20200803031132.1427063-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The WCN3680 has some specific behaviours that we want to capture to distinguish it from the WCN3620 and WCN3660 respectively. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 2 ++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 2 files changed, 3 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index f389cd4676e3..73ba30a4d727 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1298,6 +1298,8 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn, if (iris_node) { if (of_device_is_compatible(iris_node, "qcom,wcn3620")) wcn->rf_id = RF_IRIS_WCN3620; + if (of_device_is_compatible(iris_node, "qcom,wcn3680")) + wcn->rf_id = RF_IRIS_WCN3680; of_node_put(iris_node); } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 3221fed15620..821c4ce61afd 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -92,6 +92,7 @@ enum wcn36xx_ampdu_state { #define RF_UNKNOWN 0x0000 #define RF_IRIS_WCN3620 0x3620 +#define RF_IRIS_WCN3680 0x3680 static inline void buff_to_be(u32 *buf, size_t len) { From patchwork Mon Aug 3 03:10:58 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: 247308 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860411ilo; Sun, 2 Aug 2020 20:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9g4GiYNv88xhS+jUgoSFvv2Kv1NL4G6lP5kdeukBuWM+mobugvKxu1GfPixDapBju+MRw X-Received: by 2002:a17:906:348a:: with SMTP id g10mr1680591ejb.551.1596424252080; Sun, 02 Aug 2020 20:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424252; cv=none; d=google.com; s=arc-20160816; b=Du9p9m4B/25cTyygWWsoHJrr+cAIzDMIdkQJrzF03f0wjIHTRgDOnZ9izC1NdZxWFT hqtsHZ4tjQIo6iFRIqeZx2gn0E54Lc23e7Q4BMnp3JjUbBUB7ocFtxiz7WXT/C7xTAlo wVMFyB6K3xLqaPSqqSqwXZBfwK/0yONsT5oc3qK/426K2/2e02y5Jo37fdFeQWUJjZB7 v0FZuKD7dmg6yomgZqXA+LVNYhXFpjJuxydmd/lYW3OPDRYt1poCOLcv/Z8IGg/tmYf+ nokI8BnD83fGRsJh9SGKtWQXtS4DabGil5j+LzzaTm8el51Hd5Q5wbfDdmNHrm8D1Ugp GfOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cnyL/56H0ZY1bZCWnMx8pvkwuKGz4kOf8WM2bIlPthw=; b=Kf2yZvHDci2O8dYYuSBJ4supntRDmY1ran0feHKaSto12Z1ijEfWcDga1xboyv6FG6 0kW1q78sJSinu+cRqHHQl7YV/3g9DoL30vzCSwFPYWlXwqXwmq/CuaYD5PgPgAltC8ZV PPbj70pA2GcNrpFUU/QxoxOePb5yaIKXOV8Rg3y+7lgRWXXkcnMBpZM8eWxuaNbv9pP4 VI9vvLPm6njrp3eyfE82yNan6klDS9FY/ZcfHVRhDLXgmSITwK1r6aDpFcbfcxmVWpnI jzq4wAD0mitxOw94MEYvhkdPsbVCPIKgZhSkZ73OzQGBvG/KO9ln49oSXmK9l2OZMT9Y YTtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FCpFudld; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.51; Sun, 02 Aug 2020 20:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FCpFudld; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726804AbgHCDKv (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726757AbgHCDKu (ORCPT ); Sun, 2 Aug 2020 23:10:50 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41CD5C06174A for ; Sun, 2 Aug 2020 20:10:50 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id p14so13026542wmg.1 for ; Sun, 02 Aug 2020 20:10:50 -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=cnyL/56H0ZY1bZCWnMx8pvkwuKGz4kOf8WM2bIlPthw=; b=FCpFudldTNINYGShwafjOQr1RJCRYvZdS1qEPhVcfW2PGS/ZdS/ucEkj4A3vaGOaZv AyGM5of5vVH2ydv4s6du+CJqot5dIt3q8Dzcrf8IomfrdNrkYbX33DLW77ucYgS7s/PC C56BnAKWfCQLxISSZt32xKs0pWhdPqs5dAl5Y1TCSLNSkicLRfB9tENlKf1bcsxDOaBJ QjQK5SzdQLWAYG6ZmwgCqqiwRuDZ7BmIkkY5Gyh4Mwou9GtahvXa8A7LJWC+CjCfzYkA reM/jWpDvOrMog4YeMUgxmoX987K5BqTf+IkIyCViGIt3hC5d+/lpo+MlocMYCtzmJab B2yg== 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=cnyL/56H0ZY1bZCWnMx8pvkwuKGz4kOf8WM2bIlPthw=; b=kCE1rK3P9GLs7JY6em7YircqTlulj8yNT+DOXI3YD7vjMzE6t/NTHeiP6eLxeQLfuC +pWjsqsDAdQwFv/FP35zpUdAUFyLYVfnaCy5rjcb1CPXgEC8kp80Fswgs/J6W8PoSERX lJ5R63b2aB/NjoEoW2gG5nL7505e9T+EFAnIESF+cY6Kv1TnXd60MavEy7/RwpomIyQF v/+hyfJcPyXCL7Lao8hkfDUBFASd4cyLvHZmTLbV7jKvr6yTj+h5++PFxVIsVbQYBReX WDE+CCeRyOGpCNYXTrg/VBtFbdeF+4YSnbn4kpVP895RUuT4rXwCPN4H6smdInu1r9kI 54Ow== X-Gm-Message-State: AOAM532Kd8nvObkV//z2isIsqiRvlXCNV3voosjvj3ZEF4nZFrdXLgVp oBbF8hlxIXt/6SM8GhR41rjJB8CbSCw= X-Received: by 2002:a05:600c:2904:: with SMTP id i4mr13253780wmd.126.1596424249054; Sun, 02 Aug 2020 20:10:49 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:48 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 02/36] wcn36xx: Add ieee802.11 VHT flags Date: Mon, 3 Aug 2020 04:10:58 +0100 Message-Id: <20200803031132.1427063-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch adds ieee802.11 VHT flags for the wcn3680b. - RX_STBC1 - SU Beamformee - VHT80 SGI - Single spatial stream RX LDPC is declared as supported in the datasheet but not enabled at this time. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 73ba30a4d727..3b27ff6f6dac 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1175,6 +1175,34 @@ static const struct ieee80211_ops wcn36xx_ops = { CFG80211_TESTMODE_CMD(wcn36xx_tm_cmd) }; +static void +wcn36xx_set_ieee80211_vht_caps(struct ieee80211_sta_vht_cap *vht_cap) +{ + vht_cap->vht_supported = true; + + vht_cap->cap = (IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | + IEEE80211_VHT_CAP_SHORT_GI_80 | + IEEE80211_VHT_CAP_RXSTBC_1 | + IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | + 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT | + 7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT); + + vht_cap->vht_mcs.rx_mcs_map = + cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_9 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 2 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 14); + + vht_cap->vht_mcs.rx_highest = cpu_to_le16(433); + vht_cap->vht_mcs.tx_highest = vht_cap->vht_mcs.rx_highest; + + vht_cap->vht_mcs.tx_mcs_map = vht_cap->vht_mcs.rx_mcs_map; +} + static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) { static const u32 cipher_suites[] = { @@ -1201,6 +1229,9 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) if (wcn->rf_id != RF_IRIS_WCN3620) wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz; + if (wcn->rf_id == RF_IRIS_WCN3680) + wcn36xx_set_ieee80211_vht_caps(&wcn_band_5ghz.vht_cap); + wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS; wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN; From patchwork Mon Aug 3 03:10:59 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: 247309 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860428ilo; Sun, 2 Aug 2020 20:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBQkuNj+yfJqxWOTq2pJ+Gy/Mb5fir198R2l7STeX+Dk5ScPb225c8J4rdoGo6hYbXqFwa X-Received: by 2002:a17:906:38da:: with SMTP id r26mr14418059ejd.120.1596424253203; Sun, 02 Aug 2020 20:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424253; cv=none; d=google.com; s=arc-20160816; b=GUFtAGdZBaThNjvaklnwSqZAKN9b9ZvMJ5vj2WNuehUv1X1IsJTRtpHhqXBlAZEjQ0 u6SlSjMpkP2r/cvZlqt5kOjI5vLd3wDDbVAxVAaImZR6rN0iFgyRrMxNjoqdcA5362yj hQDzU/qhFiI/pZ5Sh4xD/v0OfpN10SkHmC9Bmu+iIofYOz+eRQWJXJICyFiE4eTMQsrG 1A4gPh6X6GgNFgAzft1msY/VYHa2CZN/aYt+cjFDaznjWP2Kzz8cLbjhKsFJv89FcCRb Gnn9dm4uhR4sWyKtZOJiuDqpSUX3i54vNaOcLZVn2S32VaUeO1zuPvqwcxmexP6GOSNJ lfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rkrUdfDvYsiZC6pLeKL7GcoMXiECZnaO2mZKUo9/A9Q=; b=FXUQyFHMJu+MLyRLQGVKBID5UXLlQAme9PLQoqbPbO18WRMzRSCOQIOl74UTMSJMFS EG+L5Mbb5ufvZF5PZl2Bv3qH1cptMhNK4agn2Qc159khY/oSeyrW+f5xONCkyKg2xgD3 GUFWCujHlVrj4oJlm0N97TXZsW9J7qqp19I4kupL/B0veAzCY17WyRNyugN8Cy+t8Jai O71BuRByHuLyXMiZ1XOafjS2Y+OkKhVtyj4oVbP4KmIQzq/07tEefHPQO4mnehnbNTKb 8MLbuKBrywtZPs7ObpKbDKiaf10IhkaOib/X+FWPreG2sEbxWRDn6Rj2PevTWg0p5x1B 4UyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KOxLmaSt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.53; Sun, 02 Aug 2020 20:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KOxLmaSt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726846AbgHCDKw (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgHCDKv (ORCPT ); Sun, 2 Aug 2020 23:10:51 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF44C06174A for ; Sun, 2 Aug 2020 20:10:51 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id q76so12875415wme.4 for ; Sun, 02 Aug 2020 20:10:51 -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=rkrUdfDvYsiZC6pLeKL7GcoMXiECZnaO2mZKUo9/A9Q=; b=KOxLmaStr2tx9QXivlWnBrnTFBehDtBsfnwhgzaCtWNb8qyMDXMzt7E2qB2iE1uzwW d4uqo6ISy/id003byB+MOG+mrn5zUk253p5b9CacQOqpsimOM4JPHaNLD/K2BYn4u7ot VGXc/pJR/SXBnh/qZDZm68kp+DskrEFkBvLoBd0r5Kjvl/RMW2eAsPbEyV4F/KfkM4xA 6+eqHsCUmgfTwX4kI4v332/Cr1xOQN5BiBiYJ9s2XjDXN1cLs2sEPzVPdqdwxW+N0Mi1 ebxfs9WFtO0mbXEV9EVg4e70dWg6WM7Eocq/QYYg0IC6fGsd4rtw/+PvNG8MDpmq384d sY7g== 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=rkrUdfDvYsiZC6pLeKL7GcoMXiECZnaO2mZKUo9/A9Q=; b=HSpiC6KpznLglnJxiF6XIDWRPTGU+L0QMbKBbAbeJ38Urhc/DAmiTp35d6ye1ps7wp oi+QkzRr2t8gGBWtAy4sF8jmIc6BrYwFCl5W1hzfw5w9RXru7u6+J8rIjq/SKsXgxCzy jUDAmnfLNbAJHl73oxxonlvdAaxEYG6vt/Fbbb37g6u4FXMx1JBKeFP4ro9Eje+6QZLa 8U1Z5tGGM4KO/D//EeLbwhDoDc5k/FVZHluPGsYXNkYv+F0Vp4pssMJohjDHqLjYhvL6 G8HGJ/bWpP1KQ3WMF/LsnLX5hLQPLJHFuPHi8U9lp4X5roex8Ql8lVZ4IqaEmKQqnAWk 772w== X-Gm-Message-State: AOAM531tcnnxcb1Uq3Prgs9UBU52IicaRYRnj5WMQS5/c3QJLpyoml7q i5zAYSlaKxBAMUp82vNJ2rA71w== X-Received: by 2002:a7b:ca4b:: with SMTP id m11mr13445313wml.120.1596424250015; Sun, 02 Aug 2020 20:10:50 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:49 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 03/36] wcn36xx: Add 802.11ac MCS rates Date: Mon, 3 Aug 2020 04:10:59 +0100 Message-Id: <20200803031132.1427063-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit incorporates the 802.11ac table defined in downstream into upstream wcn36xx. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/txrx.c | 109 +++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index e20dbe0271f8..05a84f82584c 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -114,7 +114,114 @@ static const struct wcn36xx_rate wcn36xx_rate_table[] = { { 1215, 6, RX_ENC_HT, RX_ENC_FLAG_HT_GF, RATE_INFO_BW_40 }, { 1350, 7, RX_ENC_HT, RX_ENC_FLAG_HT_GF, RATE_INFO_BW_40 }, - /* TODO: AC rates */ + /* 11ac reserved indices */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 20 MHz 800ns GI MCS 0-8 */ + { 65, 0, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 130, 1, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 195, 2, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 260, 3, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 390, 4, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 520, 5, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 585, 6, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 650, 7, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + { 780, 8, RX_ENC_HT, 0, RATE_INFO_BW_20 }, + + /* 11ac reserved indices */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 20 MHz 400ns SGI MCS 6-8 */ + { 655, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_20 }, + { 722, 7, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_20 }, + { 866, 8, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_20 }, + + /* 11ac reserved indices */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 40 MHz 800ns GI MCS 0-9 */ + { 135, 0, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 270, 1, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 405, 2, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 540, 3, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 810, 4, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1080, 5, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1215, 6, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1350, 7, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1350, 7, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1620, 8, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + { 1800, 9, RX_ENC_HT, 0, RATE_INFO_BW_40 }, + + /* 11ac reserved indices */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 40 MHz 400ns SGI MCS 5-7 */ + { 1200, 5, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1500, 7, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac reserved index */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 40 MHz 400ns SGI MCS 5-7 */ + { 1800, 8, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 2000, 9, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac reserved index */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 80 MHz 800ns GI MCS 0-7 */ + { 292, 0, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 585, 1, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 877, 2, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 1170, 3, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 1755, 4, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 2340, 5, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 2632, 6, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 2925, 7, RX_ENC_HT, 0, RATE_INFO_BW_80}, + + /* 11 ac reserved index */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 80 MHz 800 ns GI MCS 8-9 */ + { 3510, 8, RX_ENC_HT, 0, RATE_INFO_BW_80}, + { 3900, 9, RX_ENC_HT, 0, RATE_INFO_BW_80}, + + /* 11 ac reserved indices */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 80 MHz 400 ns SGI MCS 6-7 */ + { 2925, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_80 }, + { 3250, 7, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_80 }, + + /* 11ac reserved index */ + { 1350, 6, RX_ENC_HT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_40 }, + + /* 11ac 80 MHz 400ns SGI MCS 8-9 */ + { 3900, 8, RX_ENC_VHT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_80 }, + { 4333, 9, RX_ENC_VHT, RX_ENC_FLAG_SHORT_GI, RATE_INFO_BW_80 }, }; int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) From patchwork Mon Aug 3 03:11:00 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: 247310 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860451ilo; Sun, 2 Aug 2020 20:10:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPS2xZhxWPWZDBt5bTtcBIXGpIM+3RBu/FW1WYmTjUPJHzmKPZmkhtu7h693XFQiAWmLwy X-Received: by 2002:a17:906:5c52:: with SMTP id c18mr14663776ejr.168.1596424254634; Sun, 02 Aug 2020 20:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424254; cv=none; d=google.com; s=arc-20160816; b=Aj+LSRxj5YFN2GjwfodDO/Vjr/NbSq/mKA2EVyfNV1tycdQQUof0vwTCN/8NWfCHAh /AfBDjUznQcRBs/DEqL2WkClwbLB4p2OQAUQPFF3O7iuSRCe+kXHcOyHN4x2w3V+XApd 4uLYzTBDhsZ0lKJXCet6vXVAVbdFn7vDVKfe753H03a6D7gKShIViNkKMLYFrgdW/VhI m6rq0kehNeMqSxhGDHgPmJwV/2o8+y+fVOD8V+dRX0knB/0vwuxv1pLmt5y/ORZji5uG auiA/uuxSJAcNvNzv7XSavegkhoXgpMqQ1qZrniRge2cHQoJy9DpQsJgRHgBnAISh6jh OZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3ombPAKmNa4Z6zut9RJcKKY/F0yxtyCaqxLuyUzdePk=; b=i8Yr2glisufwsuVZ5LBsgLOz9uNoThbeNA9RGBL6lbGqLImtnYsL+58J4mfH06Uf46 XoGqTRMUTuNMhZHK0ycTpdubLL4xNx62Cb4Q7zUEisNFBiD7YT88Quy3NE5nl8sneRhb 7skvO8xEm9MCX1L/2pOkhcBDtIRgKS1bigDq8o4KTYvcipokPYI3vqo1VwxX4FGwRcHu FoRmZAaDHDFf7Pb2krfAYJu7eZR01F+cbq/dUzIG80r5/wSIz80/PuB1CMiwsDzKQryW KKTy9hanAcOL7qGjTqk1S/T+H/8Olal7ZhHAB5qZIYsYvMsblvYS3MSFrCZ2PKQGTjcr Zglg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OP5OGP19; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.54; Sun, 02 Aug 2020 20:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OP5OGP19; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726935AbgHCDKx (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbgHCDKw (ORCPT ); Sun, 2 Aug 2020 23:10:52 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28B72C06174A for ; Sun, 2 Aug 2020 20:10:52 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id x5so13013369wmi.2 for ; Sun, 02 Aug 2020 20:10:52 -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=3ombPAKmNa4Z6zut9RJcKKY/F0yxtyCaqxLuyUzdePk=; b=OP5OGP19qXV8Cyz+haelcC1eEkNq5GNBL8bAKpUhU5sCxJR5+00alX+tv8q9OdTjFv Qf960R9R6IO6gFfQVp4fsRNtHvmBXVFhSsNWj8i+BDX2TcoYCv52czsFdzDwsT9HYaaH du/4iE/CUEJTCxcwpOUgqhTopcbpiWR1fs1hVgag1oJAmZAh3dZJQGFKXc28g2rIcc9I f5b0jk/vpLfVoXuEQLPED1v2uKUScnymTM4IH5M8O9cSilvJOh88ul7BYEgQlclLt/wU zwuUW85ecC+U6VeQnGGWVhNNURDazagimWOKtVuaBsuB/U0iAfQj9pGVssAPx8o9JzPk FI9Q== 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=3ombPAKmNa4Z6zut9RJcKKY/F0yxtyCaqxLuyUzdePk=; b=M9gSxjkYI62TKyWh7AEsIduLRetkR0q8w4hSaN3RNDP2rzTb0NZqRycaMeJUmaIJ5L h6ohmhh6dVZ8yxDDGmP6VBEudKDWGuC2W5pyvptH2przLCV90P44bW7tGTZyn5rwZcUZ cvP3kzS7VCAT0LYz0jyxy3o+yhWXUSXLmTk69D92SKin2JhvqG53wzG/tUm/Yl6C5bHR GxVNQSlsQM47ssggFwmHAzxQBkeslozFfr0C4LxYh/ABaABX6oc0KQ7KGB7B+xkJXfpu 76DMizWLzQgLn2+Tg0JUXofVWRdQRB9ZxXE5VqcSCCRGQkWP/oJ/Jj/2Hpfj1lr2cyPs epzA== X-Gm-Message-State: AOAM5318ldGEAnwKH2u95ZndeSKnwqgLs2w/91bNhPep3EB8ZoUzHU8A HooQ9uS2ikBMfvmGdh9vlwuXyg== X-Received: by 2002:a1c:6106:: with SMTP id v6mr13576442wmb.178.1596424250947; Sun, 02 Aug 2020 20:10:50 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:50 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 04/36] wcn36xx: Specify ieee80211_rx_status.nss Date: Mon, 3 Aug 2020 04:11:00 +0100 Message-Id: <20200803031132.1427063-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Specify the number of spatial streams in ieee80211_rx_status. For non VHT data-rates the wireless core doesn't care about this field, however for VHT data-rates it does. Every version of wcn36xx has one spatial stream, so specify nss for wcn3620, wcn3660 and wcn3680 now. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/txrx.c | 1 + 1 file changed, 1 insertion(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index 05a84f82584c..903b47b55728 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -272,6 +272,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) status.bw = rate->bw; status.rate_idx = rate->mcs_or_legacy_index; sband = wcn->hw->wiphy->bands[status.band]; + status.nss = 1; if (status.band == NL80211_BAND_5GHZ && status.encoding == RX_ENC_LEGACY && From patchwork Mon Aug 3 03:11:01 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: 247311 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860466ilo; Sun, 2 Aug 2020 20:10:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQuzgXYT1Ce9dht3r8auXQxsxJgAMP61U3V1hy7eqLBYq5rZkowBSLnxwuSqoNBXn0qU8O X-Received: by 2002:a50:b285:: with SMTP id p5mr5095442edd.139.1596424256244; Sun, 02 Aug 2020 20:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424256; cv=none; d=google.com; s=arc-20160816; b=YpNTvwwuKZj1pzQIF+t6dF+RZ1cvrtTO2IbE74WYgGJEtwFJDaGQasU62VK7ohzp3t K5KIulwYtImodET33AyPmcNTNsVU96wvw1Oq+IyD9lwVZg12sv5ZPzJ6mtip0zS/iAXN Ss0+T/pBFe22IqE7g3J+IZ8lIkub999I6SLORAWLoiLDXem/sS3KmRK+k6wE24AZxA/6 T9fbiFnYRCx9z4L6bVcWdEilA6wHlPMBTtKXg4ejqyZLF2lLBdEWcWzla0C2lpUbqONZ OQ2l+1QSxk4VqupnGLazZmt2UVqq+HcZGqJWr0wm5mvhCThjuSC4KoGdJSnVzlcFqMIQ mXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B5DLtbiyK3rd9edQe5gM8jvZmZ4OmlENPvYbGbm0j2Q=; b=0PyjfQHcM4lcLtk/fDm4o90WQl1SFhDvHvm3ccO/l94dGTjVPifTeDN9E1Zr+Y2u3n O38tSEZ5EGOdODoC6YeM2tHGawDnBrAtMQAKrGsnVR5C6Obpl0wJKpM0zhBBvVcLXd53 gGRDcrAMlrxLGxshPEx6dDEb3IYHLVJy/fdTJO7cijpHreojELVDfPDBn9Ncb8rteymY 2nsO6PZjUgC5ysQNC3cboS07qYv3UMmgF+iz0Mm6McIx/UavgRi5RflpfE4KsPedAx3p 0Vzw5ylih1+zABrP9dROPUjhRpoSiqgNf30ryHwW7baFOjqDGuayriBG+oeY0cRpvfja HNSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/c/7AYv"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.56; Sun, 02 Aug 2020 20:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/c/7AYv"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbgHCDKz (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgHCDKx (ORCPT ); Sun, 2 Aug 2020 23:10:53 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36067C06174A for ; Sun, 2 Aug 2020 20:10:53 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id k8so14104625wma.2 for ; Sun, 02 Aug 2020 20:10:53 -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=B5DLtbiyK3rd9edQe5gM8jvZmZ4OmlENPvYbGbm0j2Q=; b=K/c/7AYv8jxtEAqw4NRJLB9gp9r9K4vxkKvVMKLn3DAtS/TJMlAR5TgaZp8GpXhWCE I7ySMzZoM0eCF2G+K7PpRdTIUey55nTdPHtHVNJ218ahfD2tS9C7v1QlZYUPOdq4vnkT T19gY0G89Ww9F4XVNP/6JtC0K12nueY8Mi+Yg7OXG/RMk1joU4tU6DjhkD7cHG2Sorx4 EAQ4xUm2GwWbi3gSVnZ86c7FVyydp2XG4n2mr3LHoyTHAgk3qCqqqZY4chzYBEoNFpcm jz69nnR/Njp5jbcHSOJavQIRpZp9d/ac1Ljhp6ZxB7Pw+jbBoohDNQvgm1U9HxNJNPu2 zuJA== 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=B5DLtbiyK3rd9edQe5gM8jvZmZ4OmlENPvYbGbm0j2Q=; b=lwGjqGjTEwr1dEHkZB/iBipiZPnPW2nY1XnbHO2ofOcrX/0Ht+FEcVpRSbhwPCfVbH UdKFyinCPkE4yAPWhZaSOF5Lfnk4MzAynodFd2psVx0Qb238i4BEyhsXOF9+NjE1ov4f XFC7Jb8B4NINlQmzpTUQoQ7gTveFoj/5p+rpvPojXs2Db2bf2EfBNWa2QpjGxrSLPk8m kiMz2vxcubEiPfBxM49EyOTHer1tCKwQ+xeSK/xBJ09cQiggPnOQu5mf8mZco45oVAk+ CcQbd7WfKCaZ5/92Uc4gQUSYB4l8ebjACFUoC+iOjfmEf4Nw8Ivi2Hz61chTcUkiEEaF mGJA== X-Gm-Message-State: AOAM531gj7jsb8TjrslGbnL9lUM1ngSyWNFYcJ3sB6P9flejHyK4OFX/ qjan9XtSSUurMFIG5ppWdltztg== X-Received: by 2002:a7b:c38e:: with SMTP id s14mr13683939wmj.124.1596424251970; Sun, 02 Aug 2020 20:10:51 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:51 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 05/36] wcn36xx: Add 802.11ac HAL param bitfields Date: Mon, 3 Aug 2020 04:11:01 +0100 Message-Id: <20200803031132.1427063-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch enumerates four previously unused bits in wcn36xx_hal_config_sta_params_v1 describing - HT LDPC enable - VHT LDPC enable - VHT TX BF enable - VHT MU Beamformee enable Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index aab5a58616fc..8df3184a348d 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1507,7 +1507,11 @@ struct wcn36xx_hal_config_sta_params_v1 { u8 p2p; /* Reserved to align next field on a dword boundary */ - u8 reserved; + u8 ht_ldpc_enabled:1; + u8 vht_ldpc_enabled:1; + u8 vht_tx_bf_enabled:1; + u8 vht_tx_mu_beamformee_capable:1; + u8 reserved:4; /* These rates are the intersection of peer and self capabilities. */ struct wcn36xx_hal_supported_rates supported_rates; From patchwork Mon Aug 3 03:11:02 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: 247312 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860479ilo; Sun, 2 Aug 2020 20:10:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCxFXMANfHVzTFyMvDJDFlzaS2NHxjxZX1Sj/MmRSdm8uZasLWXxXW2CQgptqPgG8dORwO X-Received: by 2002:a17:906:38da:: with SMTP id r26mr14418214ejd.120.1596424256835; Sun, 02 Aug 2020 20:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424256; cv=none; d=google.com; s=arc-20160816; b=BfatO79ZA71Q4Y7vi3bP1X+VH35jO9wDeSeLtaoGkNBa/Aa5BCO/YEnRIv1u9FW9vV 4KbdQ+b/EGFeWHZneEzzSD8hiDU/2l7WAvGvEPE8WRlgBywB15jS+WJlBWve7XnyWxSR kWL8/T25Uevka23KlnAgiRCqzEbEmM/W3WWg/BLIVddOq69RA7QIHkLAbivrFdpPX76l 4jHEOMv9e5rgbJ/zoGPtPVZ3cZMZQB/ZUT+neqZijxWpcFVLJFMuIfWj45sx8RMUyRCJ 3eaD0aV4G/HIgYuvZ5WZdmj8JlNBV7oNbNgpF3xLWWr0ZPfiWQup/PNiwTpQVIbNOKeE 99Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kqKg5fMNYtu+7rDsvVA0MaJs3YtAp5XzgNcl5s+4fd4=; b=JVcYCsJ8vSrY2c4t71N4TPbuMDmGQpva3CV8iJ5hMMeNLB0jYhR+3xZtBSVjJPySe7 xp6/EXEfQCGgCQ647QmhW8ojyIHEwjrNFcxkKei6xfvs/Jm9W+U2izOq8fOjBxKdkRCc nhg0Hgxkp1wjH+L5zVmctGp8ecKxlWLfpRQYI6XO87q4LlNML0/+MwGIHA/vxBP6G7S3 mMJQJwRPEZQVJy/WlYxMJ0KTremLMmFzlKhnorgvHe26FT6X4OawPclJBwQlz1K61jEJ yUro1t5nQoF5vzjWkJ3n5FIVCZKv5nI5YHXkIwpgfE0apgr/sF604hYpeYaGEBO7o/Pp eV8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Saycvz9M; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.56; Sun, 02 Aug 2020 20:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Saycvz9M; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbgHCDKz (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbgHCDKy (ORCPT ); Sun, 2 Aug 2020 23:10:54 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DEC1C06174A for ; Sun, 2 Aug 2020 20:10:54 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id a14so32806684wra.5 for ; Sun, 02 Aug 2020 20:10:54 -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=kqKg5fMNYtu+7rDsvVA0MaJs3YtAp5XzgNcl5s+4fd4=; b=Saycvz9MQ9Ohv0fJwdZdL/qyjUexJZnwD+Jrd/rK+5zUNqDDjy08AThpekjcgt5BuN 4D2EllRjUNbN5nh7iSUc9B7T71SRu5tzAbMyTMUs6IYJQRc67bOaBgwLMa6fX5iJzBvU LomJCMpSRXLHqK+YDCXXhozAPPR5ZkDtw1UC0H2oMAKsDh+FTeI8ThyUa3RSMBz/o3/a j+HOlWwhP4Nfj2PWP01tNP+jEA+Bavh1TU8/7e6ca4OHRl1+CZE31jr64yeYLVnACcSk ha8ew0Pj0Dj/97Vkd+wbGt48XimpsAipAS70CMMFhpsE6dJAosw4GL9h3EvbutQeP7da n7GA== 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=kqKg5fMNYtu+7rDsvVA0MaJs3YtAp5XzgNcl5s+4fd4=; b=buk1tptq8n8j6XdVXZZ6kwhz7TJ/WVl1wODOOXPjCRiCqEE8XHVw6sJOgue+tNlJfc vMDqgfJiFLyoi/j27awOsIokx4tTxzZtlsZGml3gVaoSZfbAf5+s4B32aF8Qh/KkGmdX EIYqhkLCQYSUKIXl7rj/jXhrhK9Ia9I6Mz0sa4NXWLTFqJpETna6yvmUoZvI8vb6ENRx K7hnaQ06fjO7mji1NrKSO4E5+YkAw7l7hfGYsydGz4DeVaPClLtsPDaREa7KcrcuK/cj Sd0TiHOXZJyOfCk9DvaKOfcLVDNqsKF5iSV3g5Elu7MWj1xYprIpfz95xuj6gYFFYEWJ S+yg== X-Gm-Message-State: AOAM530NBUtC1czRJOqjaqDaXtmaTqQUl1pgGxjvEqUxtmekuiAqnOL5 mkluxDAJpRuVyvu5KIQLvv5Yvw== X-Received: by 2002:adf:aa9e:: with SMTP id h30mr12550541wrc.377.1596424253092; Sun, 02 Aug 2020 20:10:53 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:52 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 06/36] wcn36xx: Add Supported rates V1 structure Date: Mon, 3 Aug 2020 04:11:02 +0100 Message-Id: <20200803031132.1427063-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds the supported rates V1 structure as defined in Prima riva/inc/wlan_hal_msg.h Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 8df3184a348d..5daac448d4e2 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1405,6 +1405,76 @@ struct wcn36xx_hal_config_sta_req_msg { struct wcn36xx_hal_config_sta_params sta_params; } __packed; +struct wcn36xx_hal_supported_rates_v1 { + /* For Self STA Entry: this represents Self Mode. + * For Peer Stations, this represents the mode of the peer. + * On Station: + * + * --this mode is updated when PE adds the Self Entry. + * + * -- OR when PE sends 'ADD_BSS' message and station context in BSS + * is used to indicate the mode of the AP. + * + * ON AP: + * + * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry + * for that BSS is used to indicate the self mode of the AP. + * + * -- OR when a station is associated, PE sends 'ADD_STA' message + * with this mode updated. + */ + + enum sta_rate_mode op_rate_mode; + + /* 11b, 11a and aniLegacyRates are IE rates which gives rate in + * unit of 500Kbps + */ + u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES]; + u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES]; + u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES]; + u16 reserved; + + /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be + * supported) First 26 bits are reserved for those Titan rates and + * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are + * reserved + * Titan and Taurus Rates + */ + u32 enhanced_rate_bitmap; + + /* 0-76 bits used, remaining reserved + * bits 0-15 and 32 should be set. + */ + u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET]; + + /* RX Highest Supported Data Rate defines the highest data + * rate that the STA is able to receive, in unites of 1Mbps. + * This value is derived from "Supported MCS Set field" inside + * the HT capability element. + */ + u16 rx_highest_data_rate; + + /* Indicates the Maximum MCS that can be received for each spatial + * stream. + */ + u16 vht_rx_mcs_map; + + /* Indicates the highest VHT data rate that the STA is able to + * receive. + */ + u16 vht_rx_highest_data_rate; + + /* Indicates the Maximum MCS that can be transmitted for each spatial + * stream. + */ + u16 vht_tx_mcs_map; + + /* Indicates the highest VHT data rate that the STA is able to + * transmit. + */ + u16 vht_tx_highest_data_rate; +} __packed; + struct wcn36xx_hal_config_sta_params_v1 { /* BSSID of STA */ u8 bssid[ETH_ALEN]; From patchwork Mon Aug 3 03:11:03 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: 247333 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861326ilo; Sun, 2 Aug 2020 20:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg4zmQ2EzxPxDmP/2yFmFzYkoMsSn7E92eUHY87FJzao7E9Vxt/5ifg0kWUZEf0PL+4wMp X-Received: by 2002:a50:a187:: with SMTP id 7mr14067544edk.71.1596424257679; Sun, 02 Aug 2020 20:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424257; cv=none; d=google.com; s=arc-20160816; b=gPWQm+TcFHSaAvYD2jZh3/f7vKBo+GrBq0h+9WijU7EvUYBwQNB/CAGK9g6fxOROOI 0Sg+T27zqPIIYkxarpC4Ec69QT06OMGsbDdf/GmK5wGwq+fGQ6+lgolRhteMXIPGKqLZ t7RvPDEKtRP8QUA/39xNjeYI2LoHsH4QKlizFldnkGFEEg5mCahvBQyg3sfVEA5nNVKS yFQY+Cyg78uYKJm8HGvjflWnmVyWW+UQbTs5Fub/Nc6V1RoddyCfsWl2W+pYPPPnCMpi yrBc+WSp5jBotKjHs2SoKbnfp/NI3vJnei4EtZVU561ZmPaWRfpAEx+q77e2eXixS6Kg 3ANQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sikUkIrUUUYDQIfnByPU/LmcIZ12zwkI3UVYfyuDjzw=; b=lwId09B8++vy+qrVHAw+ZewijVgn0R9HPfULV/8Lp40npWloaS7Ap1MXVuYzxvPcL5 BrzDKzSutP8JwHHKT9aFNAbGU081PrqnhKSWCTe2EVIWzzX+nLuKUA89OAwojvo736dx PMDMMwqvmrbPTrU5V/3q6RnLkcfXS5zfXLVr11DT7sCxrkRlPlgQWjjVYVPN7aW8MO2h QCVu9sdvcBeZ9NUyCpIao2rVbrhDChpb/JrhuIJfsYBziBi+JkO9ZmzljWT6HF+sSJLE SKhTsiVVxw3pDYgvVBM8Z888DuaA7oRZEhs0rGCV+vL4yc79VflI6lSRVpOKrGe65djC yLnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gBWc2vip; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.57; Sun, 02 Aug 2020 20:10:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gBWc2vip; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbgHCDK4 (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbgHCDKz (ORCPT ); Sun, 2 Aug 2020 23:10:55 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54AEBC06174A for ; Sun, 2 Aug 2020 20:10:55 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id q76so12875486wme.4 for ; Sun, 02 Aug 2020 20:10:55 -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=sikUkIrUUUYDQIfnByPU/LmcIZ12zwkI3UVYfyuDjzw=; b=gBWc2vipv4uQatf9GMbAMQLNdYm/SL7Ww1x5Lk66em5Dg2oV6JKFhYKm4fU5SEHXi/ 5HVlmy5e32zZzLFnzPs5OjOZuIFc7TXRzRl2C63y5oV6Aouq6cheTPSvR0W0jgMzYXwA lzLu7oTrhqkW6h0jJhVVTTcirabTnKmFvPfSTkMn2eFt1NRD3Ht4kqjkLNj1Vrwl92XM F5Gr12zzg+TY5GrsOBBIgjS4A02HaGwCG4ZSukUHSKGo9/IH0Bo/6nLxEcofuf8IaDbm gUwPnPhEQlqoLYDmHTOGoGAgeuFBYTEryjURp8viFo3D6RO2Gx295Sx1eAajXDoTuA8w daXA== 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=sikUkIrUUUYDQIfnByPU/LmcIZ12zwkI3UVYfyuDjzw=; b=UN/jxggtxc4b/kFmYuzFvxaKNhLaatky+ln9wCYQnGVJTBT9Jkzc3gbArwSZBkQ/zO pYzjwtxkZ0eqa86Y+Ka+WjurwfnMryK+VkvLdRP4+jYybuUMuzO9eXsn9gbinA4lClPG Ehu9IZgqpA6WiduU+b4tkupMOW0QdGBLtiy/e11ua4BAaRxbefsMNRXyoiE9SmVzCzu9 Tb9dhJebQ07KpQ36iG20JQMxLfLUI2uwnMvIOWsaEHrLY61UKkIBYPklQezVJs1LpulW Yum6lWqL+J45vfww8EMC2mXRFQ0zEFPrBQC1KURjIm/N2N8J7F4Mh1siaSMBxnSvhr3O Gevw== X-Gm-Message-State: AOAM530VX6AbsZWDFy9ppeYbqVKA/fHGjRNfQBraE8MItGpAKEUcVmor Dj7sYF+4s+t5y31OMhTZopdx8h8xP7Q= X-Received: by 2002:a1c:2485:: with SMTP id k127mr13333234wmk.138.1596424254074; Sun, 02 Aug 2020 20:10:54 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:53 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 07/36] wcn36xx: Use existing pointers in wcn36xx_smd_config_bss_v1 Date: Mon, 3 Aug 2020 04:11:03 +0100 Message-Id: <20200803031132.1427063-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Two pointers are already defined in this function "bss" and "sta" which point to fields within msg_body->bss_params. We can substantially reduce the amount of extraneous text in this function by making use of those pointers. This change makes the code easier to read and modify. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 110 +++++++++++-------------- 1 file changed, 47 insertions(+), 63 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 218f70283809..05835cf6e409 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1298,87 +1298,71 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, sta = &bss->sta; /* convert orig to v1 */ - memcpy(&msg_body->bss_params.bssid, - &orig->bss_params.bssid, ETH_ALEN); - memcpy(&msg_body->bss_params.self_mac_addr, - &orig->bss_params.self_mac_addr, ETH_ALEN); + memcpy(bss->bssid, &orig->bss_params.bssid, ETH_ALEN); + memcpy(bss->self_mac_addr, &orig->bss_params.self_mac_addr, ETH_ALEN); - msg_body->bss_params.bss_type = orig->bss_params.bss_type; - msg_body->bss_params.oper_mode = orig->bss_params.oper_mode; - msg_body->bss_params.nw_type = orig->bss_params.nw_type; + bss->bss_type = orig->bss_params.bss_type; + bss->oper_mode = orig->bss_params.oper_mode; + bss->nw_type = orig->bss_params.nw_type; - msg_body->bss_params.short_slot_time_supported = + bss->short_slot_time_supported = orig->bss_params.short_slot_time_supported; - msg_body->bss_params.lla_coexist = orig->bss_params.lla_coexist; - msg_body->bss_params.llb_coexist = orig->bss_params.llb_coexist; - msg_body->bss_params.llg_coexist = orig->bss_params.llg_coexist; - msg_body->bss_params.ht20_coexist = orig->bss_params.ht20_coexist; - msg_body->bss_params.lln_non_gf_coexist = - orig->bss_params.lln_non_gf_coexist; - - msg_body->bss_params.lsig_tx_op_protection_full_support = + bss->lla_coexist = orig->bss_params.lla_coexist; + bss->llb_coexist = orig->bss_params.llb_coexist; + bss->llg_coexist = orig->bss_params.llg_coexist; + bss->ht20_coexist = orig->bss_params.ht20_coexist; + bss->lln_non_gf_coexist = orig->bss_params.lln_non_gf_coexist; + + bss->lsig_tx_op_protection_full_support = orig->bss_params.lsig_tx_op_protection_full_support; - msg_body->bss_params.rifs_mode = orig->bss_params.rifs_mode; - msg_body->bss_params.beacon_interval = orig->bss_params.beacon_interval; - msg_body->bss_params.dtim_period = orig->bss_params.dtim_period; - msg_body->bss_params.tx_channel_width_set = - orig->bss_params.tx_channel_width_set; - msg_body->bss_params.oper_channel = orig->bss_params.oper_channel; - msg_body->bss_params.ext_channel = orig->bss_params.ext_channel; - - msg_body->bss_params.reserved = orig->bss_params.reserved; - - memcpy(&msg_body->bss_params.ssid, - &orig->bss_params.ssid, + bss->rifs_mode = orig->bss_params.rifs_mode; + bss->beacon_interval = orig->bss_params.beacon_interval; + bss->dtim_period = orig->bss_params.dtim_period; + bss->tx_channel_width_set = orig->bss_params.tx_channel_width_set; + bss->oper_channel = orig->bss_params.oper_channel; + bss->ext_channel = orig->bss_params.ext_channel; + + bss->reserved = orig->bss_params.reserved; + + memcpy(&bss->ssid, &orig->bss_params.ssid, sizeof(orig->bss_params.ssid)); - msg_body->bss_params.action = orig->bss_params.action; - msg_body->bss_params.rateset = orig->bss_params.rateset; - msg_body->bss_params.ht = orig->bss_params.ht; - msg_body->bss_params.obss_prot_enabled = - orig->bss_params.obss_prot_enabled; - msg_body->bss_params.rmf = orig->bss_params.rmf; - msg_body->bss_params.ht_oper_mode = orig->bss_params.ht_oper_mode; - msg_body->bss_params.dual_cts_protection = - orig->bss_params.dual_cts_protection; - - msg_body->bss_params.max_probe_resp_retry_limit = + bss->action = orig->bss_params.action; + bss->rateset = orig->bss_params.rateset; + bss->ht = orig->bss_params.ht; + bss->obss_prot_enabled = orig->bss_params.obss_prot_enabled; + bss->rmf = orig->bss_params.rmf; + bss->ht_oper_mode = orig->bss_params.ht_oper_mode; + bss->dual_cts_protection = orig->bss_params.dual_cts_protection; + + bss->max_probe_resp_retry_limit = orig->bss_params.max_probe_resp_retry_limit; - msg_body->bss_params.hidden_ssid = orig->bss_params.hidden_ssid; - msg_body->bss_params.proxy_probe_resp = - orig->bss_params.proxy_probe_resp; - msg_body->bss_params.edca_params_valid = - orig->bss_params.edca_params_valid; - - memcpy(&msg_body->bss_params.acbe, - &orig->bss_params.acbe, + bss->hidden_ssid = orig->bss_params.hidden_ssid; + bss->proxy_probe_resp = orig->bss_params.proxy_probe_resp; + bss->edca_params_valid = orig->bss_params.edca_params_valid; + + memcpy(&bss->acbe, &orig->bss_params.acbe, sizeof(orig->bss_params.acbe)); - memcpy(&msg_body->bss_params.acbk, - &orig->bss_params.acbk, + memcpy(&bss->acbk, &orig->bss_params.acbk, sizeof(orig->bss_params.acbk)); - memcpy(&msg_body->bss_params.acvi, - &orig->bss_params.acvi, + memcpy(&bss->acvi, &orig->bss_params.acvi, sizeof(orig->bss_params.acvi)); - memcpy(&msg_body->bss_params.acvo, - &orig->bss_params.acvo, + memcpy(&bss->acvo, &orig->bss_params.acvo, sizeof(orig->bss_params.acvo)); - msg_body->bss_params.ext_set_sta_key_param_valid = + bss->ext_set_sta_key_param_valid = orig->bss_params.ext_set_sta_key_param_valid; - memcpy(&msg_body->bss_params.ext_set_sta_key_param, + memcpy(&bss->ext_set_sta_key_param, &orig->bss_params.ext_set_sta_key_param, sizeof(orig->bss_params.acvo)); - msg_body->bss_params.wcn36xx_hal_persona = - orig->bss_params.wcn36xx_hal_persona; - msg_body->bss_params.spectrum_mgt_enable = - orig->bss_params.spectrum_mgt_enable; - msg_body->bss_params.tx_mgmt_power = orig->bss_params.tx_mgmt_power; - msg_body->bss_params.max_tx_power = orig->bss_params.max_tx_power; + bss->wcn36xx_hal_persona = orig->bss_params.wcn36xx_hal_persona; + bss->spectrum_mgt_enable = orig->bss_params.spectrum_mgt_enable; + bss->tx_mgmt_power = orig->bss_params.tx_mgmt_power; + bss->max_tx_power = orig->bss_params.max_tx_power; - wcn36xx_smd_convert_sta_to_v1(wcn, &orig->bss_params.sta, - &msg_body->bss_params.sta); + wcn36xx_smd_convert_sta_to_v1(wcn, &orig->bss_params.sta, sta); PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); From patchwork Mon Aug 3 03:11:04 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: 247313 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860500ilo; Sun, 2 Aug 2020 20:10:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiO5cBczL+aENHHhJ0tKsCBTYn39bhUZosKwgzCIB61uYLJd53ndtmmHev1o24gJiesdEM X-Received: by 2002:a50:ef0a:: with SMTP id m10mr14162825eds.226.1596424258895; Sun, 02 Aug 2020 20:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424258; cv=none; d=google.com; s=arc-20160816; b=Frkyk3ZKbTjhT0WdQBigyxyzR1/bLI9G5LA9GwgWAC81/JfnUDvRLTWge/u9TgJqeG TPKfUxFTzEI/9b+bcUAqQqj/roqq9iAtFJXg5fmocBqItaA3D4FUq5JTzIue3DLt9Mvz zScS6dSE/D7lapZWOomiztEN9nICrQo3VbyV93W+DrYFj9V0i9vfMWQULHujNZsoZtrk 8hvs6hxfTKZIYdmA/MR4jF3Z35iJ0VpTjFsLM/DM4LwOgt/NZ07GYkkSSOychv5w/vVA a+100mrt0IbYkv+3Q7if5UpA4MkFsWnh8xlEwn6kD/mJCgf+gFJGA2x40fg2TkBUlq4X 3M9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=knVm+8FLghu9qeE3O2LdjPgoZ5rDzBCB84wEr1o4m5c=; b=Lk+O8EYr4BcQ0kKRMF/OuvZmlceoCo+i0Qf50xn1zcpFNI+g295axSgl2uVtgp5g8Y 7wr+zlx4ZwzlB/C4n0EMf2TM8GHEvPBwZrILcWDEGGnhuSE+I6Md1QEVfT8M9+FESMB/ 6Mnd1c79BPQQUrorS4ocecKfJvgoeEDzwXtUdA2L5TPTAXf/qaahZc8ONAqKB7kZevMr tW7Oo84k4oyQVNqOur22GzdnjgRYPwLqg+42/4nYMAwSVHgluif7j7+SfyXQA9j+UJib gdZ4PhlkOKofxN4tqyfVpOqpw20oBvgTiCwCxqBZuigUQ74Z2TwP5O5ep+uX7tmoepb2 RSwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BZ+f6ng/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.10.58; Sun, 02 Aug 2020 20:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BZ+f6ng/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbgHCDK5 (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbgHCDK4 (ORCPT ); Sun, 2 Aug 2020 23:10:56 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D567C06174A for ; Sun, 2 Aug 2020 20:10:56 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id a15so32763733wrh.10 for ; Sun, 02 Aug 2020 20:10:56 -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=knVm+8FLghu9qeE3O2LdjPgoZ5rDzBCB84wEr1o4m5c=; b=BZ+f6ng/a4OZA97iEXzb6sErO+K8D1XjsxYz6Vwqipe0V42i5almhxdR+UfaCG21F9 0syUoyZsxS+YMpN1MuKUYI5cNrreBcHHLB6mzFQ6YpjfsscGAGYRPhRzkQjW/9So8OQo agL1h4SbS7FAi8Ueq31B2oSe9kg9b20e1p4rwuQkYhhydSk9J6nmQ05cR9pKkl1Iun/2 eli5fgSo4d7Xj49Dy1LzkSN0asTbYbDfcs+ghsY0wApR5Uw6z1OtSLCCdc3BVg364F7e OQi1inVlU4P+JnDvFE8EoU8O2myjtzFll8EiU2XZ8/vj8scThYyWObbF+ynxOOn3x4Oq XJvQ== 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=knVm+8FLghu9qeE3O2LdjPgoZ5rDzBCB84wEr1o4m5c=; b=C6loVpiDEYCrz4rQPM7eqo9+FQUkEyOrrr2/tv4H/F06x1o3+QLF/LzmX2UKG/HCYz +1Z6wo4c5JWmLGJDbEDTEIS6NtDoJtuo+0HCyAHrWk49KOei2hNl2PmVjHRyWAP45f2N jLk9aa+kFUXnTFRQsBTY66uI13WKL5LBYrB0VLREquGGRhAd36IaveROZJxfJ6Lo7Kq9 Sga3CJdBp30yTerXI7WWgTKLIcuyvpn1dsj5NPYqwTtPcIh8DyyzGIZxeeqKHD85gN5c 3TD9i25rN/c1Yus8LoJkazCF0guHWwHcXJeEQG1tDU6rN6zEyLRr/wi4UwDf1TtIpF1T tZ/w== X-Gm-Message-State: AOAM532049kY+yfZHAIiv9rQPHSjEOnx1o80q2khbTKzNvamIzbI0SWq k4qnmJXiwT5MKyVanMFgbw52tA== X-Received: by 2002:adf:f590:: with SMTP id f16mr12302790wro.98.1596424254997; Sun, 02 Aug 2020 20:10:54 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:54 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 08/36] wcn36xx: Set feature DOT11AC for wcn3680 Date: Mon, 3 Aug 2020 04:11:04 +0100 Message-Id: <20200803031132.1427063-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In order for the firmware to process extended V1 parameters with the addtional VHT fields added we need to first enable the feature bit DOT11AC. Once done the version number in the HAL message header will be acted upon by the firmware. Extended V1 parameters are a prerequisite for 802.11ac speeds since we cannot communicate VHT parameters to the firmware absent the extended data structures. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 05835cf6e409..661742cba1c0 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2083,6 +2083,8 @@ int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn) INIT_HAL_MSG(msg_body, WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ); set_feat_caps(msg_body.feat_caps, STA_POWERSAVE); + if (wcn->rf_id == RF_IRIS_WCN3680) + set_feat_caps(msg_body.feat_caps, DOT11AC); PREPARE_HAL_BUF(wcn->hal_buf, msg_body); From patchwork Mon Aug 3 03:11:05 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: 247314 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860516ilo; Sun, 2 Aug 2020 20:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKOkYgSl7xeSf8/uXqk2oGVcL19pIxShc+tItl2LQefZ7H3vXmR4pjD/viYP3RFPwHzoFk X-Received: by 2002:a50:a2e6:: with SMTP id 93mr13324413edm.147.1596424260281; Sun, 02 Aug 2020 20:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424260; cv=none; d=google.com; s=arc-20160816; b=yxAQbisG+7EeGsrQgdCXTclvl7DSUB0aHGActXw3oIsYKzachwyXuXyVbAFUdRdVOg Zm+niOpIPkEb6gHjncXxLNDDs+qPKWxKcsW7wuttRV91go0lqYrWCedovK83tkQz+dAx HoZN1QDCcGOuc98SJBkzyuKSx25gAVhKVd5qa785DUFiz4+xGVbWK+0RHKNak0fkR7rX CMz+RXTm0qzEHLPIVw5UwVkGbRhev1yumWR/50dJoJ0GEUbsLw7nS1sGa7vCGzqZGH61 V8iisdShxNks56pgK+oVWXTv7C8gTIi/m4WDx8ef1RZgEXvO86OR05DJrPqFYgxKohtv f5GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EwoIz5oOPNTb/qL6RMRIh7345sC6Mi9TvhmWF2vaLCY=; b=Eo/9DkBlsL3lw/GTXmk2bPAIf+JrnxMnKS+pnnueoObMoCqguT57Z+i0OHAmottNfH bmpHinHhquEKnCY843ujGl80xZuoDAwY7VVDrpRV4Qk7cjLwzh6BJqKHNMs3Ft6xwJ4s Ong2wCfLAscV5icj6EqS89BPwDTsVtke/o5GBTn5du23U8Jul6Antqzjv/suf0rVnABM jOf9Br/Z5BKBnLYDNNv2CBj9Ks1V5qSP4gnFJo+la1tbuHIwx+Yw5hpYG3S8Q3g/fGi3 THiEpJe6glvuq6KXOuhhe7gX78QitH8cY2X5bSVLll86+CqKnm/amEgCwosFdUuwA+GD 7Gqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r/GbBanJ"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.00; Sun, 02 Aug 2020 20:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r/GbBanJ"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbgHCDK7 (ORCPT + 2 others); Sun, 2 Aug 2020 23:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgHCDK5 (ORCPT ); Sun, 2 Aug 2020 23:10:57 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47FF1C06174A for ; Sun, 2 Aug 2020 20:10:57 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id t14so8892836wmi.3 for ; Sun, 02 Aug 2020 20:10:57 -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=EwoIz5oOPNTb/qL6RMRIh7345sC6Mi9TvhmWF2vaLCY=; b=r/GbBanJDIYmUaGBv2/7j0+m5rftzO54eXf+YGA8Zw1wyD7pFx7ZQrD1oTH3FyW6gl JVelB3Kk/Xcbu0/3oKcpZBnssbGf/PeAjheFU1/mI0C1nTvNv7+MSogwMKq7BKHdApeR pYZhAhUbPPU8bXN3vLULG23+WuPncJjD72NzqZ7ntFq6kuDIC+tKpIDIAHgp/4lwQIup itnQkYpbKN50O2oaecvUZcuxNEHzoeH0Ams/xUfg2LYfiaUj4Q6+NOfoUbCAe1RM9P9v J4kH7vXzEbSI9qB9IoIqbDTvnJa8zEvCQtANqw5YCBiz1clifXBn55AUgdAUimd/z1eM lNyw== 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=EwoIz5oOPNTb/qL6RMRIh7345sC6Mi9TvhmWF2vaLCY=; b=AG7hgvsKbB4qL+z0NSXd7YXFWcjqiPpVmQ20/TrDH+lV1lxdZQNIHaA2yeraFEGjr/ tpOjlN1XG5hajY43BDaQX0XNCRbyDLY92QjRQrkj1KXnDDClmaf9dhmASklQF/QEqizD uwy/gvPhxuWvQKDGjR4a/NA8zkGRDgq7jVWvJSlx8yZXOekZNd7Euy8fThWpueIKw18H 2GoNebbRET5Tm4Ls/iARKpf648sqS0e0bSizfI5D0TJz9eVyXMGCspjlBrMicyZ6KZ+m uapsK1g8KZTxtE3+/fv+J81cdAgCqsATekXZHKs5zDu3UldGPoO36mesv55XPhNKdpUV XBlg== X-Gm-Message-State: AOAM531ACdwhPcnm3xgqUijfDNFI0efhzKOny4fvOF2D/gCYk1RlL5BW Lhbq7v02ZsnfRBoFYI92YRvpjDl6FcA= X-Received: by 2002:a1c:a9c6:: with SMTP id s189mr13009919wme.166.1596424256086; Sun, 02 Aug 2020 20:10:56 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:55 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 09/36] wcn36xx: Add VHT fields to parameter data structures Date: Mon, 3 Aug 2020 04:11:05 +0100 Message-Id: <20200803031132.1427063-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In order to pass VHT parameters to wcn3680 we need to use a super-set of the V1 data-structures with additional VHT parameters tacked on. This patch adds the additional fields to the STA and BSS parameter structures with some utility macros to make calculation of the structure size easier. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 5daac448d4e2..10ce05110d11 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1584,9 +1584,15 @@ struct wcn36xx_hal_config_sta_params_v1 { u8 reserved:4; /* These rates are the intersection of peer and self capabilities. */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10 + struct wcn36xx_hal_config_sta_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_sta_params_v1 sta_params; @@ -2007,8 +2013,14 @@ struct wcn36xx_hal_config_bss_params_v1 { * "STA context" */ struct wcn36xx_hal_config_sta_params_v1 sta; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2) + struct wcn36xx_hal_config_bss_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_bss_params_v1 bss_params; From patchwork Mon Aug 3 03:11:06 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: 247315 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860528ilo; Sun, 2 Aug 2020 20:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydHoLJDp/z+s/ZBk6EwsC1HcC8lg79vyRBjiSeARqcJX5MZMcBvTtsCPqBW4KnHrgPNv9n X-Received: by 2002:a17:906:6446:: with SMTP id l6mr15419663ejn.184.1596424261308; Sun, 02 Aug 2020 20:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424261; cv=none; d=google.com; s=arc-20160816; b=Qt1TJZAP3Ewc/82Qmhrq3ms38pK8RLo/SeSNsytWCEZh7cw3bl38BwAQSmGhNywS45 Bop5MTfIW17kw52fDQ2QqbwfGq4MflFetL4PYX1DbOmTCsV8OPkOPqcyB9NG63Ga5WnW cIKdB9jkKTRfQwrnp0yhcPUIPZ/R5G3qnPmHMYZ6qafyvdryAfU9E3V20Q6zU5u/wQs9 YbK4tNFB7vrRlnOxhcB4iBJzuv64KPZxN6y5cYg/5SEqtm4WX4jsRED2M5H1TYzLytVS O4aGuaUYrXSFVjMZmpntCmTMWWaw7f4ago8+/zyFfSgCLJZdVDMbyik64QOQv+tMtgIk St7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=TFxzrqAs3M6H/8/PEYdeEYmlaLmO3lw2QUq2youoeeFu74dDGtXRJuGjmvqCrHvlFw Vrv7k6xVNk2TIiaXJo+FODA0jTxmvf5Us03h78WGM4KTATuJ7NtfSm0RDorT86AMG8bx Xa3AiqZpZXZqUDdd3cvChcKf9rEtUZaTMc1BgZ+z2HCGdD635dJL7SAFYcnD+ZG7YKU4 HW8GpVN888pti+676889//addSJIdyn6nJ/onYW+1UmPyFdS4N223bv00UuqmoWpGZK5 NZFEEAvWvFhDPef/pphqP17RbG7Rd/vTfFdF65s4BrdkpEI+RYqvhdSfRTXd5lS0VEkx 4LDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lSTTisHe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.01; Sun, 02 Aug 2020 20:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lSTTisHe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgHCDLA (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgHCDK7 (ORCPT ); Sun, 2 Aug 2020 23:10:59 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC6D7C06174A for ; Sun, 2 Aug 2020 20:10:58 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id l2so22235851wrc.7 for ; Sun, 02 Aug 2020 20:10:58 -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=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=lSTTisHejqVgyFob6lCGtFivdaianmepW5eZaT6gi1E2MbVZQaOGuCmFzmbLabm/Z5 1ppcUw3IuXK7aV4iKRD/Oka64Wa8H3Hxi/U77Y6gVD/gLXouuRd8Wdb/5I6BeC8c3gFI pFRK0ev/7k5fvfuytKklk5PkQNPm8l9d9LijrosGuEHkmizSOlMr1rxWBj2cP43QE7YG m966+jQ7qB4kCwImb0WLvzCJfkt1MhwVNrpodoeSLgptg51aURO/xsU5OT8kktkIbv++ yANVItMY57yfKJ8oRrax9bHJEMwo+GRdK+1lBxIptez9WfYEyj/i761zCtkQ2e0zHUdJ edcw== 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=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=oVF9vEq07nTr5KxRySH5Ck8O7PzcSoW8NmBXfMB+VYy3bA1kfjMh/xFQBKvMB2fVMN HafuEaL0/+6yB9neswO8+rsyBOgbZZPUv59avjIi+mtk4YSZyY9H8u0Pt8f2mlP64zy7 eE7vTOMX5cJwZ1DnyRbKUbXYRJMX146bNPID9qX1VbnoG2cMbn7U5OUbq6bl+2yGRdlf 2HkJqKBsLwcDspChdDHQhoTTZp9T8WrCsWcU+f4Gcs2PxCTGPA5KLRMxC0LJtzMndara 1yFiTx+sfVW4OPLSSKFI0RGKemB3rWI5vZFqt+MbiiDTt6Efrce4KaxAd4pUDgssShx+ jYdw== X-Gm-Message-State: AOAM533sgAV9aW3dzOlPKOLUUKiLL3SJ+Ale0Po+E9jJqX5W9UAVE+bW nYW3exWIYqZn25w6T2I0/cOK/w== X-Received: by 2002:adf:a15c:: with SMTP id r28mr12968808wrr.151.1596424257705; Sun, 02 Aug 2020 20:10:57 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:56 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 10/36] wcn36xx: Use V1 data structure to store supported rates Date: Mon, 3 Aug 2020 04:11:06 +0100 Message-Id: <20200803031132.1427063-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch converts the internal data structure used to store data-rates from version 0 to version 1. This allows us to extend out the internal storage to represent VHT parameters. Using the extended version 1 data-structure allows us to avoid a whole raft of version 1 specific fixup functions. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++-- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 661742cba1c0..a4e45114991b 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -241,9 +241,10 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, sta_params->aid = sta_priv->aid; wcn36xx_smd_set_sta_ht_params(sta, sta_params); memcpy(&sta_params->supported_rates, &sta_priv->supported_rates, - sizeof(sta_priv->supported_rates)); + sizeof(struct wcn36xx_hal_supported_rates)); } else { - wcn36xx_set_default_rates(&sta_params->supported_rates); + wcn36xx_set_default_rates((struct wcn36xx_hal_supported_rates *) + &sta_params->supported_rates); wcn36xx_smd_set_sta_default_ht_params(sta_params); } } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 821c4ce61afd..c3615704b543 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -168,7 +168,7 @@ struct wcn36xx_sta { u8 bss_dpu_desc_index; bool is_data_encrypted; /* Rates */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; spinlock_t ampdu_lock; /* protects next two fields */ enum wcn36xx_ampdu_state ampdu_state[16]; From patchwork Mon Aug 3 03:11:07 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: 247316 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860549ilo; Sun, 2 Aug 2020 20:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd2zrQkQ3KW3qPR6moDfpWqNgEt2qR3Z3XlRt40pf9ObJqajNL5Km4gBPv3F/es7/xnIc9 X-Received: by 2002:a17:906:1447:: with SMTP id q7mr13912030ejc.363.1596424263103; Sun, 02 Aug 2020 20:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424263; cv=none; d=google.com; s=arc-20160816; b=wzhk7i+JtpDE8VC6Me7lm+72/HoyvUWibY2TI9yOMx9HxemBlyw8OVbakGiP/FXZ0C ZTkz4u9FLQbUnWzLzVpVOwzd8xYJT4vFnKTtOLCsFgxWBxio5/naS/WMEx6JrYlAQFJ6 m9eBE+GL3vHPdiUTldmCSIkrYeeXuDQyBxZQTiHeoCFIkkxePPyqSQkkYl50WhgYtvOF 7p6gRe5RtF4jEvVHqvMJQ0wiXN7iZj/+YCrhzM2yJli8RW4JZXsK1yGCpD1s7TNUBBPF hm7f31B2waD/YkHG4+Ga+YNcwLFoYvVawvRgMdo9Kp+eN11b0wPpUPLCWuqWxKiZSmnz EXQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vpNpHP9Fx27y3i+wK1ZfXMYtkK+cRyUpKFw3O+d/HP8=; b=d9khzy0LLzjUhVW62FUjckPuwYiZTqO4bFArYnkzlGP8ixS0W7690pkygbxeyupPqp nYhU968xnCRpfREVjTIjnavpdAC7dgK5ryGU1BpY4H/Gt+z/+seJJm/ZWe6TMp42lkmH MY00SzDHZavwuiD/d7uzeDp6C5G1ingibm0UZUB4hTfwX7SuaXM19x6mNtIY3Pw/5SBm Yc2oC+Oc0vwDjChEKjcq++Kx/98zWaPbDQyyhnWN9pdDU1Kp9dLg01pf1TB/l/4stxkE 7lsHiGOPZD5jJHU9G+7O0Ww+CtoT4B1NR9B/34SmYv6mVJpPkfPVMwunOwh6a3zW2ecW iKSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qxf5+W96; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.02; Sun, 02 Aug 2020 20:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qxf5+W96; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726750AbgHCDLB (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgHCDLA (ORCPT ); Sun, 2 Aug 2020 23:11:00 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05F2BC06174A for ; Sun, 2 Aug 2020 20:11:00 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id z18so29222143wrm.12 for ; Sun, 02 Aug 2020 20:10:59 -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=vpNpHP9Fx27y3i+wK1ZfXMYtkK+cRyUpKFw3O+d/HP8=; b=Qxf5+W96Bx8CUdhG4VS8+T8paauRAgfFd2x8vEoOraaos5DudYtH2nT1ivpKhucGMT vY4Ew43dYwHt9PO8eKzuzzBxABKMg5P32XfK7korWZ4DqTRkHNjvBjhyrCrXBBIuYd4A zjKOdHQM2gsU3nsq4/cCXsDI+XX94LD68tTGAPGw/YXHNsPWq2MPSeXh/xgRbgye2tQj H8jBjhtqvvDETpNFJrB0+h3QiWYviHnXsPmuk3okU1jljTf3tj3LxorQXZ8YhdDfbGiq E+rKaeai3mOKML0KeskEZ1c9F04O25tVGKDBV+isCAOSBIgeroOAHp35pmznu+69hoOX Nqlw== 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=vpNpHP9Fx27y3i+wK1ZfXMYtkK+cRyUpKFw3O+d/HP8=; b=B5DGRnXv7cstrkJmpJdDuBVRLkvEu5vsIWYY3rkKBTZQHNPsJrMlb+vWcgWyxv+K6l ZXRwz/FA0bTBvk1ELGu66JuENTYk6qIyXibdJQUKgplnrB2YuXPX8/OONo7Hqv2OK1gq pC4q8rYuWCWH7lTqhxqB9zaUPJx2/yaQJ0aUIeSheJwzvgvW91ftwq5ouFiAX141SXdP d+K3wKxMRqABpt/w3cxZ3aznw5e8dLVR2rY3V+D8HeEet3hlh63XTqqJussRqtArdjV2 hMZNRp8PZbrLrSScBk3a6syaMt8ZXauEvztRsK6FboeAEiVv8dFoBHeHCqRMjrLPX26T XOOw== X-Gm-Message-State: AOAM5301DCKHAAla6MlMKjgY4Q22+G3gDSpAjuxqM7mEG+mt3mRL4DJ5 golptMvtFt1EmkbFndYD4Lp2bA== X-Received: by 2002:a5d:526d:: with SMTP id l13mr12419614wrc.279.1596424258806; Sun, 02 Aug 2020 20:10:58 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:58 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 11/36] wcn36xx: Add wcn36xx_set_default_rates_v1 Date: Mon, 3 Aug 2020 04:11:07 +0100 Message-Id: <20200803031132.1427063-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add a routine to set some additional default parameters associated with the V1 data structure. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 8 ++++++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 2 files changed, 9 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 3b27ff6f6dac..9f56f1af6dc4 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -785,6 +785,14 @@ void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) sizeof(*ofdm_rates) * WCN36XX_HAL_NUM_OFDM_RATES); rates->supported_mcs_set[0] = 0xFF; } + +void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates) +{ + rates->op_rate_mode = STA_11ac; + rates->vht_rx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9; + rates->vht_tx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9; +} + static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index c3615704b543..18ccc6c31a38 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -270,6 +270,7 @@ static inline bool wcn36xx_is_fw_version(struct wcn36xx *wcn, wcn->fw_revision == revision); } void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates); +void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates); static inline struct ieee80211_sta *wcn36xx_priv_to_sta(struct wcn36xx_sta *sta_priv) From patchwork Mon Aug 3 03:11:08 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: 247317 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860560ilo; Sun, 2 Aug 2020 20:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKRMMCb04SxM7HFOpC7J4ceWKuF1s6uKSqNXUfc2dRcUA9GetrylRdtV3Ej2IQmhXlksGU X-Received: by 2002:a17:907:4303:: with SMTP id nh3mr15216015ejb.520.1596424263830; Sun, 02 Aug 2020 20:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424263; cv=none; d=google.com; s=arc-20160816; b=ZSR9syn+O5lyDh7bN33o4QHaXr4uB/GhDotNFLYWTMzKUSIsl/GHJQ5il+u/2Lqe7w rQxAwJDgkA57DwCRfIRHYuYM7VV/vNCoupmVWF35PEZD8m7TAlRp4G9TFEk7UdIL+06G PjN6QkASKO6LOn5lDn1gfZqc92kNTE0C5LCjZnqVub0OBxswbSVdZh3erp8qLV7qBXoe WCpO27pVLCAZZvtUTm8T7rtAIZKrYefa9u2o/7aTpIRWVhejVig/jDSgdELET/xW1bWW YMMSiCBg5hRdqyjTKBm20YXt/KfqMIzpeiQ+ifGXp4+03MH2E/I0Wlm5xH4j0XxRB++J VYSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HtHey7iAsoGrNcBMQl/5w9ghs+hy8e9VJSTGAKv138U=; b=Y4c5CIqAWYC5gGhDke/H5bOCnsv503ZFHYPyB04tJQw97rDfMxNHM8ZG4PyNgO7Y2V Q+FRCM3wy1MSORNqV6XajeXIOCvS3X3uaDCs0X/yY4CmYJV4stKgtTzP4jDbqf498s4s RgTZtnduXB6Ga6vPuc9eQGyTqXJoPWGnXXW4PnBUaS0JODrYZXwMUvyqK77+psGuypge 7H5xvFm4d2gvNifa8lNMMo8Bhk9afkE62i/lKhibct7mQRsumhQtEbkqK4uUOmsVsLfy CGetBErC3XpM1hn0Ws4LFd5xOmBUh+x0kCXCeqcY98NSK+euNpT/MZuB5ic7Exp7q4fI vqSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sHbU4lid; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.03; Sun, 02 Aug 2020 20:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sHbU4lid; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbgHCDLC (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgHCDLB (ORCPT ); Sun, 2 Aug 2020 23:11:01 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 806B5C06174A for ; Sun, 2 Aug 2020 20:11:01 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id 9so12987120wmj.5 for ; Sun, 02 Aug 2020 20:11:01 -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=HtHey7iAsoGrNcBMQl/5w9ghs+hy8e9VJSTGAKv138U=; b=sHbU4lidjcxZEGX9NBT70jWaIgwINlY8OFLsSCYKwoflkizeLRilTZFlI74xFu2mNh 84goftO4U82tK1bmEAQQigC7qJrKut7NH0yRPpnykug/zvTYk62onVcMFYYkfo/ZE+05 Qsy8LxX3r3JrcBSVcm4ELAwrZR7+XVLnZjn7bYB21Ai+oGigY9/DLE3UFxkKusl8vBvz 9ebf1bvnZuMqNwdZitvh1sxXeg+uk1GD7xUBbl9SAYeSVlTQF3/ufVGRrGSAgjhoBQBF E2jB6LHpedJwNMuMgh2+/9x8HAniqWkuMIiB7eUfTbjyI7bmBBcA3U7vxNz4GPjHkWVM rrWA== 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=HtHey7iAsoGrNcBMQl/5w9ghs+hy8e9VJSTGAKv138U=; b=DINmKMYnZkQL1xcqebNDxLcYQ8HJfQQGMYv7m6phNdUIw6UA0LPMkSfTC9kqzJHiad OPV8I7X0QwNtU7+cZalxfiYirb1Kvn12NJJrkWslQj5Vr35rde+MQMLpwAM/5+4afX7K Hoy/YKOgJCwGpAUWTmBn6EtlwYvL1FVIyHm1KS8PSdigWjmq23xkHinRs2WwngiJeHQJ L/GndAvHJ68XFitp6xNluWkv+eXzXJlX92KI3wcePyaPqMHOR3pGN5OGDHIld00zCsCr YVST+PmDomtIshiEWuT04Ut6TD3Ajxk9ZaW0NGSjjZiP/HJduYDX8uV5VSJRlg4yYz/g zN+w== X-Gm-Message-State: AOAM531J7GWQLxvg+ZHDehhcCym+oyPZ0U2SnxS5ALSC1y0Y3gA/9zFv fvBIe7H7YiuSbKS1zzsXop/rFA== X-Received: by 2002:a1c:9942:: with SMTP id b63mr4632698wme.12.1596424260000; Sun, 02 Aug 2020 20:11:00 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:59 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 12/36] wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates() Date: Mon, 3 Aug 2020 04:11:08 +0100 Message-Id: <20200803031132.1427063-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds VHT rates to the wcn36xx_update_allowed_rates() routine. Thus allowing the driver to latch the declared rates and transmit them to the firmware in the same way as other 80211.n rates are. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 9f56f1af6dc4..6a85bb699d10 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -758,6 +758,14 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, sta->ht_cap.mcs.rx_mask, sizeof(sta->ht_cap.mcs.rx_mask)); } + + if (sta->vht_cap.vht_supported) { + sta_priv->supported_rates.op_rate_mode = STA_11ac; + sta_priv->supported_rates.vht_rx_mcs_map = + sta->vht_cap.vht_mcs.rx_mcs_map; + sta_priv->supported_rates.vht_tx_mcs_map = + sta->vht_cap.vht_mcs.tx_mcs_map; + } } void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) { From patchwork Mon Aug 3 03:11:09 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: 247318 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860563ilo; Sun, 2 Aug 2020 20:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzf6V2L3duNZPA5p25R0h7ZFWo92rcJMiJZDR5O+/vObTriaiMeHCSBnfycxDh/FYU4nyG X-Received: by 2002:a50:a2e6:: with SMTP id 93mr13324576edm.147.1596424264554; Sun, 02 Aug 2020 20:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424264; cv=none; d=google.com; s=arc-20160816; b=i4f5nj2R9V1+rIOkXD6u2gd0iRGcYpD+h/wxkhekSI7PoFE+C8z/aV8jMN/kvceEiJ 64hJzdoo/FFWD9rsNeCWKZOE4EI21Mhkf4vovIhvO2Niwg3xUeaXvY4C2weeNcMuTzYm U/eXIXfkqwJYX6uzB5DSE4wWCmCwKEbh/aS6USC1Fz1uKXisXA5DyKRNpgXe2XkbblHV JZdC1LJ+jnn7KV04CID/vA6vjvJ1vreyfzPgVfRmdUY+hRWnU5JHB4bBm1ok33mjBSVB 3uShWj9bMrJEyuNm4BW9o4ssn0r3m2vSyDBJEQKgYgT7MjJA9W8UynuSj4RSsDAMxQaZ JCqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D0xU/dOb+LnLns/kX1ZtFyu9J+wVoP3941KcJL2LnEo=; b=jf1IsM65ea30hd9mfKvuN1Pw//uIaNJkrATEY/aWZk51CGt3/QNUB6PpmXWjn7w8O/ k/+/L20U6UqULb9lWlsPR+9GU7Cm4QNw7B8GiyzTZ9MSBW3qKBkzKuIHv+m3Ko/rz1/P CI2QPPi+O7q5qR1ERDapVkIDckAQlGEadlQECYjKTPvKzuZa4YijQAVcnNDiifDqh897 aY21doLLhUwMNsND8RCpqFxIhT9s1bfFXyuYXMoaTuGuVId+Frz0QR+m5IeOxYCMa0Bj tYqwwVdsh3dA2bHnDtGNkTG0/DVgayQDFycvz5qVpOeBWN2FVZ4zm5p54FaiNtAiTKh5 pq4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UkGqSwyU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.04; Sun, 02 Aug 2020 20:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UkGqSwyU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgHCDLD (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgHCDLC (ORCPT ); Sun, 2 Aug 2020 23:11:02 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49399C061756 for ; Sun, 2 Aug 2020 20:11:02 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id 88so32762264wrh.3 for ; Sun, 02 Aug 2020 20:11:02 -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=D0xU/dOb+LnLns/kX1ZtFyu9J+wVoP3941KcJL2LnEo=; b=UkGqSwyUC7NcETveDjLdMlQ7VI2NnUqmZvtN2Y4GXUD4mSChmF0z9utMz8Wl522Iub 0bNS1CduO9tCT0lS8+xKCSj6bJG/fkpd2QGuO+u4Bf/5EoCAwKmq/Nwb3QmpVZssTCbx Qe8oF0aFiW8Q0U1nN83X3ExRdsrYUt+sljBnur5VKSCZaL28kUeCZsoeTJo29OCS6G0P h1+xhZcvmKnG1c8ZXykKWufHX7AG3XLcM9/NUuiAKd3/VSUJ+7peHeaAp1WUfeTrDLsp za6a/EZUrOazQUHA1qPI/Plc2SlwRgiB+jJaHRt7sOjzxDAbC1xePilw0e8091oapoxQ MZ0Q== 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=D0xU/dOb+LnLns/kX1ZtFyu9J+wVoP3941KcJL2LnEo=; b=BfI1taTIGc2jkAAMUKNA20jeHDNJS4CAm+4Sp4uEcRl3suxxPmHGvkBv+/xi6Qsl3k L60fM9MGE8/pADuW/cgREkmZcrKV3DD72D7gtNqm/pHBjmDef7X3GJucW1TyQFBL7e6M n+bXu9N34Aj3TRLZYrEDgj3u6s1sksReSDLMhm385pcMT0o2MrnvTZTu0i3tMJYvZEDs cvJQmOHa8kldz/92AEla6rWAfLRp5lzECoA0B1Fp2gHWQHtlFris9Gws+6WTd6lLC+Fj J1K9VFpFH3xIAM79E9uLwGlOtsJ5rIAX9qmK/a+F0KwsM19kfwfOMy1bpPXuuY18vKpp XDGg== X-Gm-Message-State: AOAM530EnnEZq4l46p2xLk0IQteDy9Dit5gsLJ2H0jLiXpnvAol+wIm7 PnrEzRaTaKwgXpqkxD2NkL179A== X-Received: by 2002:adf:ea0f:: with SMTP id q15mr12756722wrm.113.1596424261097; Sun, 02 Aug 2020 20:11:01 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:00 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 13/36] wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() Date: Mon, 3 Aug 2020 04:11:09 +0100 Message-Id: <20200803031132.1427063-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds support for setting default VHT parameters, which are exposed by the extended version 1 STA parameter type. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index a4e45114991b..df7e2125b503 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -189,6 +189,22 @@ static void wcn36xx_smd_set_sta_default_ht_params( sta_params->dsss_cck_mode_40mhz = 1; } +static void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (wcn->rf_id == RF_IRIS_WCN3680) { + sta_params->vht_capable = 1; + sta_params->vht_tx_mu_beamformee_capable = 1; + } else { + sta_params->vht_capable = 0; + sta_params->vht_tx_mu_beamformee_capable = 0; + } + + sta_params->vht_ldpc_enabled = 0; + sta_params->vht_tx_channel_width_set = 0; + sta_params->vht_tx_bf_enabled = 0; +} + static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, From patchwork Mon Aug 3 03:11:10 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: 247339 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861462ilo; Sun, 2 Aug 2020 20:12:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWU82N5g1oSpXLzTMJXVpSEL9JRG2egDAT3JqsEusso3ceb2VjjhIBZsw9UCuhHIEe5OSQ X-Received: by 2002:ac8:b4c:: with SMTP id m12mr13828105qti.321.1596424269685; Sun, 02 Aug 2020 20:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424269; cv=none; d=google.com; s=arc-20160816; b=dhyA/8HdoXsKtQ+TDlZeXfHVgS79zO8Lq9v4ZTz7nY/QXAjhrk1MRORsfvMziKiXC1 BsgDzdHR5kNyKttl6djOI8+9W9X5K15uZlhyychePsmowwwxbtmqDop7j61EsbUOHu4S szfB3cBHFokow0ejbnUa/0NpExSEslJi8Y4BJVH7QVeJzvDCOPpZddba59cZN7hvey0e Xo4f9o/45SFDBiPaV28nxWjAuCQ50A4Vw56SvNABiq+gBUzNYhSAmO0bvVhmvdDIbGVb l5XGZF+fne8oC7xIGqMW4ghESQ3pGZDl8TWXkUXMFEBOGOsHVyl+7MpKopbqojMgjJp/ Z8cQ== 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=IGYVYuTGzdELZNcH7ePDJKmKCjYjEHL/fmXQXn933Ok=; b=gtukoLbp8dT0aMpmg6SoFjvZ46X2H1r5vjhKnNiG2zIffPbfQ5y05bSBKBUJZFro2U QxcjqUe8xWgBfRJ/SFX3qmPtun70Kx0OX6YwS/w8E4YJ1gRa0ri0E0Mg5tP5Ol5Bm67B vFYwJrjk2O1N8Laqf3WQ7xrHaZacgKbAl86/nbhPunHqo7BVD8BbUdbco7aWl+4J6i/G au7qf5U8dSUW/fQcneLmG5WhrKsY+AqHfAVy2hvVia3fM4+1wGVNXBGDaAT+ZhA9HQIw hEJNoZhy7YX0HZof+hWp3b2RdyaymfGPW/aoPUSWs86RLivQmJGz0g5nQlH9khzrZE7k 1AOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=EExjEg5a; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CrNG9EZk; 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 r8si8497142qvz.122.2020.08.02.20.11.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11: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=EExjEg5a; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CrNG9EZk; 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=IGYVYuTGzdELZNcH7ePDJKmKCjYjEHL/fmXQXn933Ok=; b=EExjEg5aKu+/paZra6xfQ7ifB JPaT6jagiAC5zQFARw0N909Y3cH4PKHmXq25Z5JUgJMvfb9bd1x/35OHYq7BKhwTMbB762sBvE+IK S1ZLZOyHqRfeaYgNooPOYPKSMPX555I7462Bp7uNEK5t1jLVGRIi8EZ/tBJIll4ZVCUmy3zV9kk9R 7x8i3zCwOqrlqvcBFXj5B8cYGgci014b9q9tD1KbSw/iPuez1zUWVc32793xyj0P3Em4D3b5MsNMp mrB4j8K++jzgHgcxBE06BNGEfXTSpjxz5ppAQPr9Y66ZB5qiVp3hWH3cka+x4+b5vprao+FCC8dQz DP5qILNwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsU-0002Wa-7N; Mon, 03 Aug 2020 03:11:06 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsQ-0002UR-Tm for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:04 +0000 Received: by mail-wr1-x441.google.com with SMTP id a5so22815977wrm.6 for ; Sun, 02 Aug 2020 20:11:02 -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=IsN/Tm5UUbnXfV08uwv1LnbG1GnG/9PP7eJ2Z/tnej0=; b=CrNG9EZkmha+mhtxCrzJFNWjl18boOBTZ24XTJFK5vskKYM488wv2t0kVKuEuqE4R8 2HI/6ttCevYELidGsrqeiHTA+aNsYablniD0PrYvmFS/pW0jFijkjvn+J2RoCK9mojAx HzfwJKMH0gjx3fc56xzaXrNMel7pWfgPk+qoFM7L3ezaNqvB2VcgOgLtRMQgy2T5GbkY 4fUZmwV/mbQ7wcsX+oMxWWhLsBeydL3QK3oCkl62xWqdeHZD/oLnLW0GEHdHjsYTaiGY bQOX7O8er1DWxhuiYBReTE7QVJ/97Q4zWVBrbw6uhoHHUmOxIWhjT8sxJzEUod24X1mR +NBw== 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=IsN/Tm5UUbnXfV08uwv1LnbG1GnG/9PP7eJ2Z/tnej0=; b=DRN8+W0UrgryK6e/xwuaxnaIVvM6CtOE6qE9qFgzZTGyYbAzAIYgHozOD+ZGdQxHvf BSjRtLcKNFPKJ0LtAHRLnP0jas5CTzFUAt74QWfMvKuSPp9XaQCTGfGO7gI9/OPmhBVr 8eF1lKn/okmVY48LCfOfQwk0Reou80Fa8Qj3mp/KTv2z0Z6w/LDozhMulrMqd3rQ8AFs fRLy2NfEAkuEzFJGrVBHkynnuWudeO0DgpzGTPzT939c0oMx+Z80FNJ3dqFxUrDxhPea KnfvkFUUuJsYH0+gs9EMbe4rQx6g0doSIRUpoe/qv4wIzdVbcNPxVU2DblC1O3M8Cg5E RhbA== X-Gm-Message-State: AOAM531kSJkfAdAwnserSZOw1JrjljssnC7JJ0nq4s7fvS6bpfw383XY /jx8SQ7T26IhdnCNfjSfBPFPpQ== X-Received: by 2002:adf:ea0c:: with SMTP id q12mr12658098wrm.382.1596424262105; Sun, 02 Aug 2020 20:11:02 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:01 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 14/36] wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Date: Mon, 3 Aug 2020 04:11:10 +0100 Message-Id: <20200803031132.1427063-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231103_520407_1C131322 X-CRM114-Status: GOOD ( 11.83 ) 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:441 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Toggling the LDPC enabled bit is possible only via the extended V1 data-structure. This function provides a means of setting the default depending on chip-type. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 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 df7e2125b503..88fb4b7f1356 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -205,6 +205,15 @@ static void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, sta_params->vht_tx_bf_enabled = 0; } +static void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (wcn->rf_id == RF_IRIS_WCN3680) + sta_params->ht_ldpc_enabled = 1; + else + sta_params->ht_ldpc_enabled = 0; +} + static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, From patchwork Mon Aug 3 03:11:11 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: 247337 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861416ilo; Sun, 2 Aug 2020 20:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVyeNsuJEKaqKIM+pyuaIdfVyfSJK2mrAhMkfkwSRCvUJ11wEwx79yiLClpukWVw3GZ8CW X-Received: by 2002:a17:906:4157:: with SMTP id l23mr14447011ejk.491.1596424270671; Sun, 02 Aug 2020 20:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424270; cv=none; d=google.com; s=arc-20160816; b=IChFktnNqsmFjHUHjIAx9SY9KkfphkDOBJIwJkQOUOY2DHYaS5+UfVTkIU/by6P+53 LYGFA1uCj+tEA/KSyHmU80B+Jb/deAjq5XwJBhIDS424abiDGhM9vl7EHnCe7vhtkMaf vy6mz3Y6st5kPlYnUr4N3Z0jJykiAEom+uYKJtb77iobNulS3lBAaxQbz0L9bKElq93+ 8wDV01djVT+s9FLHuoqPEnjiw6lvHaRgyrb8MfjfbnwnchtOJWGOzGz2yzLvxVjWxpAi NXnsvmTVMrH9/MsE6wBwlXFGvUPhz9kl/mTfY+8Arl4PjONlT+UBhnIfGBWKeeSxcl42 aZJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KouWK8WECSEN05fvf0840cgRztNjkH3BZYdSGFVlz4M=; b=rG4ndK0GPmYFrUUkhuuBRjr2uMOyAMSn7Sf2ePbmU05SesMfUKgK4Vp9UeIC1Or7uw YFbWaZ8SdREt9EA84sUdmmXHSp1KL/AZT40emmsOfaK/+VWgS57Ub79+1g5pghepPKPW 519SdfS0MPA/0ZRaQOxRPyqi7W0qiVVndnZBFb4DBBnwuOJsmMKK4so9OUBsR2yGTd81 7TwkrumhSrF4veumvtkWW0TKTUw2/zFM1NhRCAiX0+h81x30OjYnBgbR8iWSEQqxjO1g mGIpSJcJOnsxC1Ijek6mYSGO9+TzRF0rZJQcGTjxuMp4JI/PXMfOXcmqBDA0gyJ2sccJ vSkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yh6JHZpU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.10; Sun, 02 Aug 2020 20:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yh6JHZpU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727785AbgHCDLJ (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbgHCDLI (ORCPT ); Sun, 2 Aug 2020 23:11:08 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9700DC06174A for ; Sun, 2 Aug 2020 20:11:08 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id k8so14104915wma.2 for ; Sun, 02 Aug 2020 20:11:08 -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=KouWK8WECSEN05fvf0840cgRztNjkH3BZYdSGFVlz4M=; b=Yh6JHZpUZHFpNMw4crydqKnCrTDn0LIZ1lQLiwLxzxqXYxfyGNVdErNj4/iayJjR+B I+SejTDrx05Z1bsi/qil7Y3iPnRCNVNeA/OACr+P/TsTjNJaBV1JnsUMTZWr4Kx8Anqy HVetXfy+ggXJs2UoFWLR0/oUlV7PfRh/nJ5s3eoMWdFzVehs0sCUzLthDJKl2VUpx0sA mN5uYuYR0Ki0PGBNREsSH48EYeYLqKHCX9tRSaQC2cb7WDI1QEqVqt3y/gHAm34vJ+Zh qAVLTkIXwpg0QvSr/6i8SonFOzr65peday6NQgHAen6QDJBZMRtpJ/MPrmNMjuGOjHY4 cNiQ== 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=KouWK8WECSEN05fvf0840cgRztNjkH3BZYdSGFVlz4M=; b=AgMoHlH62lBDi6dk3a/u2U+wnGvPVf/NOqqC5X846MHI+RarsE1zxrwEQA316pj9Ro rncfLQjq9RALIf2gIMDb8NuH4IYbRUg4uzNv57C/qn/VEPBgodj+kejiige64cpK+4mp qUix347hQYxuvxHjiVVrBy8wngVy/YqgOvlE5/ACb+aRaQSXuz0VTL3F2FHh/xCxiSXO DrpgzK+I3LRvpzf2Vu1WRjtV7SeHD0LKLt5USbYf3Fgb8AkaAxVRfQliMf39l4/wK8y6 mizZfGEr1vu+t4nAdSivmyXlV8rOlQjcSNHJ0BuDPxJb7r2wSv+ImPX4SIvBWNPKbTrM zF4Q== X-Gm-Message-State: AOAM530OMIli9cKI2xJvz8UPz3Wqd/PeIu70yZQ43iGCyI1gf2/kskal 1kEMoCwIZuzfleFEGPVw4bpKMQ== X-Received: by 2002:a1c:cc0c:: with SMTP id h12mr667020wmb.57.1596424263363; Sun, 02 Aug 2020 20:11:03 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:02 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 15/36] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Mon, 3 Aug 2020 04:11:11 +0100 Message-Id: <20200803031132.1427063-16-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds support for setting VHT parameters based on the declared VHT capability bits in the VHT capability structure. The bit-field TX-BF is purposefully left out since wcn3680 is the only wcn36xx that can do VHT/80211.ac and is not TX beamformer capable. TX-BF is a dead bit. Similarly we cannot do 160MHz so VHT Channel width set should be zero. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 88fb4b7f1356..2632ea2ad9fa 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -173,6 +173,21 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +static void wcn36xx_smd_set_sta_vht_params(struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (sta->vht_cap.vht_supported) { + unsigned long caps = sta->vht_cap.cap; + + sta_params->vht_capable = sta->vht_cap.vht_supported; + sta_params->vht_ldpc_enabled = + is_cap_supported(caps, IEEE80211_VHT_CAP_RXLDPC); + sta_params->vht_tx_mu_beamformee_capable = + is_cap_supported(caps, IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); + sta_params->vht_tx_channel_width_set = 0; + } +} + static void wcn36xx_smd_set_sta_default_ht_params( struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Mon Aug 3 03:11:12 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: 247319 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860581ilo; Sun, 2 Aug 2020 20:11:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg19MOBrj7rd965tuxuAiJoxthn2xsds5TYsCEZJ3+lPaO48pWht06FNeiYwcf00ZO1LOA X-Received: by 2002:a17:906:5c52:: with SMTP id c18mr14664358ejr.168.1596424267434; Sun, 02 Aug 2020 20:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424267; cv=none; d=google.com; s=arc-20160816; b=PZTphdQ2mYOdOSHPF19LfZyHV1c57s3eKSaDKD+eDfzQjL/+4Ov6SpMDN5MPEdX6J2 u1ojsqnR1t7NlaI1zGwF5u80Q/fh6r7xG2lfkVfxJa0hY61mt+1tJx6ZFrkNVItZZ0GE uTUVNDVLPddd61xdME9XEh7LP+i0+VRxOesb9F9OWgrgnb6OdKB0XcPPsnQlnm81aPc7 0I/D0mZ135+T7fzlhJ4gbotzRoOede2LW8vnlnZUHtY+6QhHkFczjms9ZQL4A05O905q SjA0YKqdA1wqWNTqczpk/UZQRyf+0MqczkqGV+8MiZtvf9OIc6xj91RfHr2FblMvUXcU PCEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VtjPUnCQUJ2Xqmf1HBNfL/7o3eTpGJ7VqulMTNQ/Ev0=; b=UlkbX7C8dmgurInZP64YQ+/WvTTULnVCslhzFrjgM4qcUy5rlAdPCb9PIO374fzL+Q fxhEu5/rY4TAH9caWP7zj18uKUkQWuvrN96vHjAuGft2pyTGyMvETkmWZ35MALDtIRiO id11yg0/g5xPZj4vHExGPkwlzjrd083ss4XrwWKp++zD0k6aeHxS3MnC+u3GQg+A1P1K 8q2GRzK9KloHPvdGEEYQn+AicfFm1g+e1DN9S46dBjHS1i0DfgmLTw1C73i3jNDGDBB8 59FmxJzZeaBMElee6ov4Xj/YtLlzLbOAqxaypjmnLMDG36RYMuAm/q+/X2dv1cYoZ/Iy /SgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KC6bgnUX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.07; Sun, 02 Aug 2020 20:11:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KC6bgnUX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgHCDLG (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgHCDLF (ORCPT ); Sun, 2 Aug 2020 23:11:05 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86452C06174A for ; Sun, 2 Aug 2020 20:11:05 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id 88so32762332wrh.3 for ; Sun, 02 Aug 2020 20:11:05 -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=VtjPUnCQUJ2Xqmf1HBNfL/7o3eTpGJ7VqulMTNQ/Ev0=; b=KC6bgnUX94nR12VYj/AbBBrbijB1bxi+D66PsiUbvfpTkrjg4Hhe7I1Pg20yJQvE5g 55oSJ8HXXp0zG/Jso1ZfJf233vNTiHX+Sl6MqGfGhHGFTl84gUpk9ve3n72ZRhEEarr8 Cm9mQV86Q6/NE9ZdAH5WyOHtEzVOeFGEsiijHiKSwh8hK8EL6Mwh067fJ9u3IiSRv9Cs bBxEQW4b0CDETjtCYsku7a8laxPT64EKI982qdvxoSmtcYA/p1/0DGI2gpqCLJsu0L4x yVLce1lf1Ebuv+lGvnx16th/cOwc7NatSWcSe4JbHGCiYWCBZQZxSypTA9v4i6I/Nvvd WF/Q== 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=VtjPUnCQUJ2Xqmf1HBNfL/7o3eTpGJ7VqulMTNQ/Ev0=; b=t+fQlC3wqsXguFeZ64WAtCVSWYxiJ48Webg91B545eD6ENvLaqGYWgYz0mCupsylVy 8J/Jannovvof17V3AnEUASz3HYNnlE39/hMeWMu5xj1I4YdJ+Xb1pxPX6E/q5jSasFzK FuNs7E++79R6/Nn6EYBmggp8FUc+GLAvmLHCb0EQCqZwv6WahFC0Z7GHniBxf6co0+wJ daDEbDOIOhigXGP8XSK9r7LSOhYRhIhCSGUP7MYIJq4gEdjbI/sPC3NxI4LsrpLfCGmI KfUVTrLskXzn6Pjn605niXiIKc4YGs+aG+oNBzbwAztKAemg2G7GDf/vtTKbZW6Y7UIa Hsig== X-Gm-Message-State: AOAM533kOh//51rIgiD57JTjM2mZek8lQFRyUwCPSMVQWnNrQYYi/o9s hnEBCm0zvFbNoIv6ODZ2yCIjkA== X-Received: by 2002:a05:6000:118c:: with SMTP id g12mr12882764wrx.212.1596424264279; Sun, 02 Aug 2020 20:11:04 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:03 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 16/36] wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Date: Mon, 3 Aug 2020 04:11:12 +0100 Message-Id: <20200803031132.1427063-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Adds a routine to allow setting the LDPC bit for HT parameter passing inside the version 1 STA parameters data structure. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 2632ea2ad9fa..8bb24fe9bde3 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -188,6 +188,15 @@ static void wcn36xx_smd_set_sta_vht_params(struct ieee80211_sta *sta, } } +static void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (sta->ht_cap.ht_supported) { + sta_params->ht_ldpc_enabled = + is_cap_supported(sta->ht_cap.cap, IEEE80211_HT_CAP_LDPC_CODING); + } +} + static void wcn36xx_smd_set_sta_default_ht_params( struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Mon Aug 3 03:11:13 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: 247320 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860602ilo; Sun, 2 Aug 2020 20:11:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSI8oOfujBpn4wSPzRinYLMXx9t2SSlUZx76smRVWISal+IRayLXuaQxozKOkILuslNpP3 X-Received: by 2002:a17:906:198e:: with SMTP id g14mr14442930ejd.266.1596424268856; Sun, 02 Aug 2020 20:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424268; cv=none; d=google.com; s=arc-20160816; b=e+QQFpvEM5VzyQHBiPmbI1Mfq66zzPVg+vOB8165ZoB0u/hV/QrUtWGH/pKf9ok1mM GTcuKtyMHhIs/jRw8FDgdBkdUQtN3zh9hIuWZEZydlUwT6aZLHJECaKSWDFojYaqss+r LGmPRGLJ7R3bahcikYazRZLIW8tUmOyuefg05HDzAjzS3zKrguy7Qp3Tg/Rzxs0mNIRj /FqIBSz5FXIxwNhPJZN6diBkdKV6qT3CIzvIfMfEHk8Go4RkGbApkuGWxfL6OW/cDj5F Sed0g6j2GXEYt/S2JHsf5E719BHgZtGCp05udkUX3+XbLoUvm5pcnvcZ0drih6cLAgH5 75Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vrOV8j+dZUEpzVBAQmMgPqqjv//xk+FxMjpzH66IHaA=; b=dVAR7OQeoskch9RaOLrp00XpNhyBwKKe2nnTQs1TqZVAmyw2JtfowGSFoDTXyUoFR/ 24iYV2F243u8tiN31/SPjEfi04OnON0uQX6Fn/dpOxt9n0SF0ctJeC7GZidAl0LjT/Wb 3QDi3qFTbEMtefr/VM47A5qUKq2mJBQhaFp7dMUUKAV7eyhxsUpaDWkALKkNbT1vSGQo jO7LlxBIX+CwipghjTBj1G/BEIJtKEaaM0KUS7xh5roYNrfNpSCijc3qmaB+cBXPrgzH O3qRa+l2V/TjRq9QopQ63LYeidm0kbuzD3VLjRm8Qp3wOBII2G9PIHjnO5L4gcxsBvMh 18mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qUj2SUbT; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.08; Sun, 02 Aug 2020 20:11:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qUj2SUbT; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgHCDLH (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgHCDLG (ORCPT ); Sun, 2 Aug 2020 23:11:06 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7388AC06174A for ; Sun, 2 Aug 2020 20:11:06 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id t14so8893017wmi.3 for ; Sun, 02 Aug 2020 20:11:06 -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=vrOV8j+dZUEpzVBAQmMgPqqjv//xk+FxMjpzH66IHaA=; b=qUj2SUbTycO2jZzjVCBEYnhjccDnQvme9JfD/u6FXYbQp54kMGQxwwDayznHIwgYzR GwZd/1dn3WUyz0p3t0ivQXEg/hXv1VGLx27U3TSPQlWaLV95GU+iGiwKyvQhamX1mG6B ggLI7wMIfq2ui19PrGUoO09V1daNJ4Fs6mzST1nL/wmT7VxCp9i6Plthac3X89I8cegE bWviszeCgHO94OUQFoVM9n95/WlpMv2BX6ejjhdN+Da2lPVAe9szLjRjA1dx1U/Xg4NZ DFUaI+E+kkO3TuSBnm9F8qExsD6GU+R2exmhgKWLfCFo4yoAFYR2zezJgdJ9XheHLjV+ Kuqw== 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=vrOV8j+dZUEpzVBAQmMgPqqjv//xk+FxMjpzH66IHaA=; b=YM47gzNng1bdqeSn2KJJjRwf5xk9lqog7cRuQik6BfSLrijkKpXYoJZIMgPdC7sr7G 9fxOnGiN8v8UUG3LCwNJSwUpQphEgFj3Upq5lN/iOa5hDNV1j+WggP1fasnItZcDpNfA uAMdVhEyq7XTjbnGcLkpOCcXvBIGy4bW22fhV8zO+s2QhTwoTk2P3vRTzPHOXD330oD8 CEo/HSz6+nof7flJTCUHzUuhMq6NQeSEbkCo8SF5+U/KxMfR+C/AB66uI2Sl7/bYWWqd Wzy+zQe1uZTFNe+UvY4EsrG5oSpxSjBvG40sbU+s7cW6htjds2CygJwovsLySNcoE3NZ POBg== X-Gm-Message-State: AOAM530v1B4fYtpfaNYHfp0Lpdjll+DepyZiO+mAzM67AgAwILROJ4U+ PnTaJI+OTl1+jHXsG6HMWwPbY95wX/c= X-Received: by 2002:a05:600c:220b:: with SMTP id z11mr13516636wml.48.1596424265268; Sun, 02 Aug 2020 20:11:05 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:04 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 17/36] wcn36xx: Add wcn36xx_smd_set_bss_vht_params() Date: Mon, 3 Aug 2020 04:11:13 +0100 Message-Id: <20200803031132.1427063-18-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds wcn36xx_smd_set_bss_vht_params(). The job of this function is to decide if the BSS is VHT capable and if so set the appropriate bit in the BSS parameter structure for passing to the firmware. VHT Channel width set is not set since we don't support 160MHz. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 8bb24fe9bde3..ab9f0361aec4 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -145,6 +145,15 @@ static void wcn36xx_smd_set_bss_ht_params(struct ieee80211_vif *vif, } } +static void +wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_bss_params_v1 *bss) +{ + if (sta && sta->vht_cap.vht_supported) + bss->vht_capable = 1; +} + static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Mon Aug 3 03:11:14 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: 247322 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860658ilo; Sun, 2 Aug 2020 20:11:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCKH87RdjaLeyhZ+K6u6pN43jKoTmScLpLAjtUUaJJBCxNbN8VsvSwZGIO/T7bv+uBvJKc X-Received: by 2002:ac8:4514:: with SMTP id q20mr15074667qtn.122.1596424274224; Sun, 02 Aug 2020 20:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424274; cv=none; d=google.com; s=arc-20160816; b=MkmGumPdi+qmC+AR0PXRBGy+ChwdomChmVL+gOn48ip1UafVsHApmYyBWIrxssUSaz ySS5GrQbUC/OJNGMiQ6JyeOw4a61uMt5It9LFuedfFfsrOD/BUfO1wuUmLniqOnGhumq D23Hd4GMkJ2mK0ocIdUP8UXe5GFwLDil3Vm5cwN7h0YBddBjt4HZLorb5JIYvdoegZdo JTW6oM7ICKJBPGd8MEZdsV2jsYmDWODawUVWsyUG6RuRzLq6huFZEn3FUKt+O8nZXo2f 9JEMsjpmla7HZGUEjHyOCXRTY6xlatitE3OrHabuUGXux347qvAmLqurIp4FvsZoGMkl 3AUw== 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=Mz5qNcjf+j4r8zgc5CpKvDNUHdFoeuwRrRZds37YxrI=; b=jnrRwyOe2gBY/jwIsDuHKAg8voszUsm88HfxuTWOoriRZwWCMEvGVMDkQGr5dne8ul uU0mcG4zfY3e7eoKgpwoYS9ZlXa2F91zzTpHORAaY0+sNI+TRDkDTKir1tESGxIhdaIr qyaUldW2oZ98xHdB6udgTPH039U9wc6omDJOo+UYRlN0Rm7jVDgQasbcvYM024Q3rbKA E4DjAJvHFfXrHBjY2nXJBwYytTNyIeyBhPi6Wt6AZj5Uuk55feHiDb+m5qMIQZgEWva5 3LPfi6PyzZ3NdjNEQHFt8IZxlcGfGeYPSAS6pGUBqCQl4ljfaL8qiyPp3E7ncPN9i+gX z0rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=SVR0zrgv; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ft/Q1CIU"; 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 i20si11206833qkn.228.2020.08.02.20.11.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:14 -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=SVR0zrgv; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ft/Q1CIU"; 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=Mz5qNcjf+j4r8zgc5CpKvDNUHdFoeuwRrRZds37YxrI=; b=SVR0zrgv8eGTp1yPLzZgBNeEp 0fzik06LC19bQIgMYDWA4Cy7lHh/SDGbliTW7f7o8T3A4RL8ARwFUVwCdh7g7TluVS1U8TiLMOrj0 tTKu6qC8vWJHXzcHAu5HXUyuTbdyag45oaLd1xYNKqlKtREYh6IvDxnl4VNp49j/am9l5k82e6sZA 4HmOlkAeWf6gE9PxuUHo4a0MzD6roMLVB4fcl6bQ3V5IgnSFEYTqts42ughM2TvBuW79P5VgjWM+7 +x+z0bASfHBVfdsBLEffr+4Vg05F8/zFBAdUhGo3Eyew1x+WFbsNMFRkbHO8QZN6Nic1ZSwigFPuH w+bnUxx3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsY-0002aT-Hg; Mon, 03 Aug 2020 03:11:10 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsV-0002X3-6y for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:08 +0000 Received: by mail-wm1-x342.google.com with SMTP id c80so13012335wme.0 for ; Sun, 02 Aug 2020 20:11:07 -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=Dc68vpe0LVXUulWOmw+HiZxgDJO28qrPNtD0WWyi8Tc=; b=ft/Q1CIUiqx6ryiWMvkYWb2I/kUTLpSuMimOKZM2WxAdtJUdmOTc0RTQXr2EkgsS4J MP9Jk50dnN6r8AOvlzinkC2vPPGN7Rgx2aUCXxIIqP2AiYR2/UWHdQZu30for3XlpmA+ VD1d5jTP4/Pbz/lgx6HgvgeSaZm23VH3Rk7QDQp4e+4/S1OgAouMsmIQhcozXqKTPrNQ QIq7hcqQNMBjvQVhBTP1KIHG5Ko3NQzxT/qflnM1wgM/nyjgO+uBA2QuoJUeN81xgVeL m+Ke7ZGHk3w1aKfkBvoECjAxg1V6vwt+EYxmj5ZfCshPHk8aoH9zqNPeAqDaxMFuQ7SC mDKQ== 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=Dc68vpe0LVXUulWOmw+HiZxgDJO28qrPNtD0WWyi8Tc=; b=hEKxb2wBlfllgMuCdjlK1NvLqibDwSRCfQJQY26dwCnVOgyuUsxLovkDCGK5qqxpaP df/FNkLC6mxT4O+mPV2SqlZHunLJ8YTKi/vyUlzcNO597/2md9P9+sd9IvoEs8kWZtUa /cHeCsA0R6B63PWgNdA8nnhsJzGyJ4tMfqjoXlM8z/HiVvRySMJ8cv7Pd89zpUpfD7Kg 78e2MCWp8ZHTb568XdTgXzP2r3lIgqK0EJeD32dN4xHOj6HX6ysOKOb+VlCKTNWuXxlL Ziw1kPqJ/ROIIdIDzachP6Efxc4DunHXfBilyHxbUfd2GfGKiOzt1IE4tvGjRQsWab9l tGCg== X-Gm-Message-State: AOAM53058B38Gt/3wjpLMHlFJOujZ7l++Pyh2+mwngg9OC9Xxs/PnN34 srPmNNpXEPjncbyb5bQtOInVqlP5uXM= X-Received: by 2002:a1c:740e:: with SMTP id p14mr13437098wmc.179.1596424266273; Sun, 02 Aug 2020 20:11:06 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:05 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 18/36] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Mon, 3 Aug 2020 04:11:14 +0100 Message-Id: <20200803031132.1427063-19-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231107_341695_850325DF X-CRM114-Status: GOOD ( 12.92 ) 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:342 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit adds a wrapper function wcn36xx_smd_set_sta_params_v1() which calls into wcn36xx_smd_set_sta_params() and then subsequently sets version-1 specific parameters. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- 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 ab9f0361aec4..f61516988953 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1241,6 +1241,31 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } +static void +wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_par) +{ + struct wcn36xx_sta *sta_priv = NULL; + struct wcn36xx_hal_config_sta_params sta_par_v0; + + wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0); + wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par); + + if (sta) { + sta_priv = wcn36xx_sta_to_priv(sta); + wcn36xx_smd_set_sta_vht_params(sta, sta_par); + wcn36xx_smd_set_sta_ht_ldpc_params(sta, sta_par); + memcpy(&sta_par->supported_rates, &sta_priv->supported_rates, + sizeof(sta_par->supported_rates)); + } else { + wcn36xx_set_default_rates_v1(&sta_par->supported_rates); + wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par); + wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par); + } +} + static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn, struct ieee80211_sta *sta, void *buf, From patchwork Mon Aug 3 03:11:15 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: 247340 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861493ilo; Sun, 2 Aug 2020 20:12:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjd3z6QMf3spjwlduwzO9arJMIMP1JlyGpYVs4spoTJYmoSY9KgBTSe036hTjbYUp8nlAw X-Received: by 2002:aed:238d:: with SMTP id j13mr15110531qtc.220.1596424274766; Sun, 02 Aug 2020 20:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424274; cv=none; d=google.com; s=arc-20160816; b=ezXaxT4wR9pkf+3l3p2vOpLZD03PrrZTK3VsjqEHRTf910+aRqaHhigCDvLd0t7izt XOhFNHZqgCRzrfUtknBkCfg5YSnZjvlStnPZrwf5x8K1YfMeQcDvW10LEQi1od3AQb8R usVgJxQL2vasNS/v9lB+JRYsFtBbZnc+lL546D2eTtzc0TtHh8vsHmaeOwqIRFamoFQ9 ueBZT9wLNSUmOejIV2mGNFKWGsvBukB2aOmnoQbDJsu7bfYesSeIUWLUwjoee19Nq+Ev 4WgO27CWrH3kQw32u4tNABZ93VtgN2O5ptEZe8Pt7lAl9g3PqRpk1VQna6pDVv9JYspe k8oQ== 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=+3FndZgg7v4+NCNTZhPNZqpYaxUzdyQP8aKBFbpTXQY=; b=gQY/oDI4ti7hK+2I7LwJWrs/CW4AO+rIXTywNWhX0lHImT19jKtSUhcFY7Y/WZ5tW/ H+hjA3+sVPudNmGDH5gR1XtFnVd9/dudK7XS3zIyM0YUsr070T2YHXsZz1S82HF3INnC G2ubKnmMJoZ1aA90vc4whPxHA5mJv1RO5Q/yjuAWEpLGNMrq+HOtkydCEsSoYKghHZG0 CzYcFN4W9mUKAlneMXexnm9TtpI7mpH9mREJ8pah2KMmxWUww1oPMNVC5QhSNITT6R8v K0vHQsdrKIbQd4gyuSzQh2ylvw5oofGem2aYmzBV55RWBg4vKqXlXav8hYQwchwiwr3G nxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Vb7kZFV1; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I9ASwBhw; 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 i13si4924455qkg.317.2020.08.02.20.11.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:14 -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=Vb7kZFV1; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I9ASwBhw; 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=+3FndZgg7v4+NCNTZhPNZqpYaxUzdyQP8aKBFbpTXQY=; b=Vb7kZFV1kWwFPxYVaIBjq7mIp ycZOL4Uj4neGIWkzzKY6J38Kkg+CQFDVEfHJkBRpcTOdqqiJuOr511B7cEZGjydCFqafi3PL4kvWm FcnnwXR2vekXwgDzSuxZD//nZ86kP06bMDrw2zd0/DlXbMr+MWAUHjwSu7N9TRc8ZQp7QK9QMYGUw jAYw/Rfn4IJyvX/YsMU0YSCiOrLYauH4TnwYDinZiyhUfhkAMN2TYfXPlx9obSN+jvhAOR/SnKf9U asn0xuYrK0EPcpJUXSYAeCsNnnJEgddl7O3mNAqXU+3Z06l2KusTUwdf82b3H673NsAoy0pom5Hjf UiMmK8+7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsZ-0002bH-Dj; Mon, 03 Aug 2020 03:11:11 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsW-0002YG-Ef for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:09 +0000 Received: by mail-wr1-x444.google.com with SMTP id r4so29813998wrx.9 for ; Sun, 02 Aug 2020 20:11:08 -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=tYD10FZO8KhccbIhk1uqysdR2q5fPg1Yg+7P+eySpwo=; b=I9ASwBhwfZb3DoiFraFPtPwchqSItIhD79zECvHvQTdoVCkO8EwPvAXUmK9/KGGAtg jTXHThmWJXorf/ar5noQYN2/L5bvzKq/pXQqiDMZ+1hbzHA5+ZCU5kpEPR7gInQEuB5i JzFbcxOCpuNsUi6cQa8ABQYM/5Qc8Po9ntduUTg7kveLycm9eC+lbeFbv1hxZcDAhl1a mB2SyDxYBibgjEPofx/lcaVRG4SIN4zgm8xnH9GTIN4qVbRprhNcqb4pxrYgOjPHWSjM jJre9aZF2ldPMFbMUStMGv1n/RFFr5OXLd4+mcJxaiRcXSRL5g6VfYBXeH6kf9acBpCU Kmxw== 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=tYD10FZO8KhccbIhk1uqysdR2q5fPg1Yg+7P+eySpwo=; b=ZUfuxFPMU/8kjRYipbD0BAnpyMkI9dux8+fBSxm1jqAetQzFaEYPgkhhtVN8erE7Y1 u9FtwdK0yuBV0mefRqW7MVlQ0oECiORh7ncwYd19E/uCliw6jz1Vt/aSZ24QNwYarDkt tKFk7ywFS7eXQqX5CrwDackAOr1u7AsY8Hm6+hZ1PXdAykcHaDFgr0VGcyZwR9EqMWpU nJc7qi6ysBHv3BTnBPJOea33/ThAFyadBwX9DRZs2RiiuNeft69QnYSKd3A5HQR8IScF 5NaxCk/lROHVzxBNeVe3A9TM9ujLOwAxw57DxeQOSrKBpavfO8yTHQh4nEaD3amoV3VW T8ng== X-Gm-Message-State: AOAM532sTy66jqjpAdwWzeJx5mx57VQkiJctlmfR+HCn3fE+AideXhrI 4f/OfNwDS82hUK/6oTHhH1Ogsg== X-Received: by 2002:adf:fe0a:: with SMTP id n10mr12660332wrr.125.1596424267660; Sun, 02 Aug 2020 20:11:07 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:06 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 19/36] wcn36xx: Define INIT_HAL_MSG_V1() Date: Mon, 3 Aug 2020 04:11:15 +0100 Message-Id: <20200803031132.1427063-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231108_594225_F6FDB292 X-CRM114-Status: GOOD ( 13.19 ) 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:444 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org In order to pass 802.11ac VHT parameters from the SoC to wcn36xx we need to use the V1 data structures associated with BSS and STA parameters. The means of identifying a V1 data-structure is via the SMD version field. This patch defines a INIT_HAL_MSG_V1() which operates the same way as INIT_HAL_MSG() with the exception that it defines VERSION1 as opposed to VERSION0. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 f61516988953..6a03d5956fc2 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -349,14 +349,20 @@ static void init_hal_msg(struct wcn36xx_hal_msg_header *hdr, hdr->len = msg_size + sizeof(*hdr); } -#define INIT_HAL_MSG(msg_body, type) \ +#define __INIT_HAL_MSG(msg_body, type, version) \ do { \ memset(&msg_body, 0, sizeof(msg_body)); \ msg_body.header.msg_type = type; \ - msg_body.header.msg_version = WCN36XX_HAL_MSG_VERSION0; \ + msg_body.header.msg_version = version; \ msg_body.header.len = sizeof(msg_body); \ } while (0) \ +#define INIT_HAL_MSG(msg_body, type) \ + __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION0) + +#define INIT_HAL_MSG_V1(msg_body, type) \ + __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION1) + #define INIT_HAL_PTT_MSG(p_msg_body, ppt_msg_len) \ do { \ memset(p_msg_body, 0, sizeof(*p_msg_body) + ppt_msg_len); \ From patchwork Mon Aug 3 03:11:16 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: 247332 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861320ilo; Sun, 2 Aug 2020 20:12:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyha6YNa2nhICJTQuF3yvidKMGJk4/8bONm1kI3Z6sAd6YoNPWBMjQqugF+rFq6nnrXArpl X-Received: by 2002:a17:907:4303:: with SMTP id nh3mr15216431ejb.520.1596424272671; Sun, 02 Aug 2020 20:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424272; cv=none; d=google.com; s=arc-20160816; b=Zf3yj8ZPuK9LXEzTUfCSopYsysuHcVBRUj26O5U7RdY++rG5PzGOfx66SZVKdPw9h2 iTu76z7ygVH4j68EpiZN0h8hZ3+jSlvlR/eXC+/4B7oBcOIK0wH2Y4sQ/izDZ2oUlPt0 wL7KfQBA8DiOmnbS0I+2lou3VH1CrVYrP0zIxlhRc6JPfz89oOKoZ1ZW0kU65bpFAniu TOiwqSPeov/zPJP1iVNs7OOmkDQP2pD+GGTiyQnD7cP2gqfaKx/Un7IFjiPKHu91xucM +WrCnAkau9o4dT/snyM1dRy9pIComx8tXUYVkGGafiHOObx6aSmUSiwbGZecwfagfthA UKXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KS5+23voL9WeTjkQBGek/Gfs7r3fmKSdew4Fk01OQj4=; b=O/tY8mdHEeTrlR4YAMuznIJrCL9oWjxOi8HXeDAv6ATowUFUaNJWHRuNUkSw7XIXaY Ic1Dvo4kiZPo/3smAy4bY1PiXDMRvXaj//fP7XAf/sMjGdr08n5D82uMXCMe0K8ddI2X 2BbCsSpJKSxLoO4f3V57ukI94JcNufjYnU8YASBCkf0q9tDsSsbFrctXDy2uOM6CsP7o P5TEDPo0lFA6MjnumVNX0AP4KO3YTIdcNssV9ac3lfeOIQZIgTRS/hMB1VY3vyMEqUSO RzGisuF9dQZ/X1q4mEiOG6bTCkjyR8gHYQJKoPkS8z8jjQVFFA+hZe3RJe3Z7E29b801 SZIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r8Kq4HnY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.12; Sun, 02 Aug 2020 20:11:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r8Kq4HnY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727793AbgHCDLL (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727788AbgHCDLK (ORCPT ); Sun, 2 Aug 2020 23:11:10 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAB12C06174A for ; Sun, 2 Aug 2020 20:11:09 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id y3so32789172wrl.4 for ; Sun, 02 Aug 2020 20:11:09 -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=KS5+23voL9WeTjkQBGek/Gfs7r3fmKSdew4Fk01OQj4=; b=r8Kq4HnYWyrKPARy+4a/zfw2tt0NKlmEV3VpnxQWmTDyVRN72NJdFs/1NhDwDUqIMi T7ZviP+AEwWZc9Em52VEIhAJ7t+Q4kQAn+mFffHpBB4YQnqTnnxF66cW0UD2S/0iCcC6 tWLmkRXkPHGVX9P+iSXH1nnIbnqidRgxl+/pMbUvfDCfpCy46zMCMzz83NSXViKlEULZ 1eOax+tr65lBBl/Q+MjD6SXUFdPv9Y4NeRZ6sQ0DgOocd4KWneSYiaRpB0+Ot/vcms3m MKrZ/FIlBxjuyZp2+3P5p7xVeBl9tnbE6fQKi+SUB3E1o1SPry55Mh9Kb+wtPvv6K5mc bMBg== 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=KS5+23voL9WeTjkQBGek/Gfs7r3fmKSdew4Fk01OQj4=; b=nrYuabqrYSrk6m7YK7A6diohPXxBs6+wlOFgGYseBH4rBuamEZOqlqVbKj3Ax6UIPu OJMwcBRhqENjoHVxc9EacVdSYpfWNkkpxppMY/LRY6zY/sfDGl88SyBTmSnSE6JAakRA pocy16GUH5yCpAzZFJJJNItdsv1oXoxdd1+bZHt4GltZTRsdz9cX9mdQ650Nq/a3PMDw 66Cytjq7/Kh/v2tm07UnNvxpNjBooOdW0Y0f/m0fewBcmj9fhaFnETRxHAixCjB1DCh5 xpEk6x8RTMAcMDOvxiEWrAlbEH+lND9iQ0dEicaVVXdc8m5az/UPUGGlRGpkrNbF8D2D wZnA== X-Gm-Message-State: AOAM531Go9+CKaYhFoJQB+5YY5CjFqwxDNPy1NiV4IQsKlhYSY+tzKXS qtf21JRLVHrbBEjEU8Y2piFAyQ== X-Received: by 2002:adf:ab05:: with SMTP id q5mr12495357wrc.46.1596424268620; Sun, 02 Aug 2020 20:11:08 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:08 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 20/36] wcn36xx: Convert to VHT parameter structure on wcn3680 Date: Mon, 3 Aug 2020 04:11:16 +0100 Message-Id: <20200803031132.1427063-21-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 sizeo 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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 6a03d5956fc2..2d6779cfa59c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1311,7 +1311,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 = &msg_body.sta_params; - INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + 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; + } wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params, &msg_body.sta_params); @@ -1382,7 +1387,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); + 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; From patchwork Mon Aug 3 03:11:17 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: 247321 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860655ilo; Sun, 2 Aug 2020 20:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxknGigzK3ZVvlEo+KhjCF1OcqHRxtiCKrk9CpZrAyzLwF5FleOzmCZTRQUKe0U2mwhEnUm X-Received: by 2002:aa7:cc10:: with SMTP id q16mr1571258edt.298.1596424273730; Sun, 02 Aug 2020 20:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424273; cv=none; d=google.com; s=arc-20160816; b=1AHYLHFVM5pKeU2AFgnDgIl4AhkzVhC+zRUEbyzZPRlnN0B39mmqP5azf4uHg9bgA2 9McS/VoZ5XkJ34jzE7l1ySrfGUKhxbGk5FmpkTFzcxGJjZ5d2CRIvbzhtCtoS9dJTIyP B/lZ3pFb4fJAyd4tjNTwrXiigDuhu1BIs6xzhQnO3nRJUYtkiyb6WOlY8TXXtTpa2427 u5QAhf70Z+WQCPWi8o0hiVv9ZavZo4fxNv7rWyMlsY/zFFPq1QbcaI626ILDExhZ+KEy DOe0b7nsGkujBmkhvS/p4sV1BzFWsgZFwNZaznkrcfQZQI77mv/xf9cX+IibRjNgTEXu OTqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ax8SuSrL7632ouEAOv3sobptqn91JzKWsmm/Phaehw8=; b=bhPKzFxeNKba3cZvDUJxXP+9U6sq236MA7a0ukvsZxWL+KKkhT9WX7EQ/aGwrYmogh Tkscp+VqdYSBRUCrTcfemFUYd1W3DA4tFCkmkMVI6IRij38GZmOuw84ugmEE4El4Twjo DAx7xK32Zfwu+Kv8aqV/hCyph9WNZJUCFhiW4YhEP2pobx0qTLwnz+OnI9fOHLditmlS U37pk1fhxXRJ3dePu14cZTrtTSNHwQlAD7WZflGgEwqtWtBhSApXwoLoD+V0TUYZ8ssb ebzgqHzsjcASc95WG3CFrgvsjClaezq+FLckhVfuHiJZqAC5VfSgx2VBor1WBJtX7pBq HfDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EjsU4MRG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.13; Sun, 02 Aug 2020 20:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EjsU4MRG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727806AbgHCDLM (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbgHCDLL (ORCPT ); Sun, 2 Aug 2020 23:11:11 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7B0FC06174A for ; Sun, 2 Aug 2020 20:11:10 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id f1so32234483wro.2 for ; Sun, 02 Aug 2020 20:11:10 -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=ax8SuSrL7632ouEAOv3sobptqn91JzKWsmm/Phaehw8=; b=EjsU4MRG2d7kjpTDDuIlyGLFVnyAVEUpcVS6Bf3qSVhleBvh7etYy/HmQfNwCPqV+V GSHkLwEwx3jnylTW8m3hdQUhQvMffYM70zvTXwtODWKcyXTC8pwvDVuvsGet0qDGo2CS 6hANX6h5LROc8VDsqoBX6Qm8bfetQhy+N3zSKdB37kxmUxToMqGlRV+D44x15u/gRZBT zHCsBDG5QJk1C3dcFZ7LYP5iNxC3DDL71mcOcrbqvBL+PRTLbGTeISHjv5liMy/HYVgT 5ikcn5cmcGvSdQJXvgWBo36QxYxaH8ny4OJsoKBALKrQU1Zu18Q+2lGLT+R3PW5zjLhD NCUA== 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=ax8SuSrL7632ouEAOv3sobptqn91JzKWsmm/Phaehw8=; b=CZPdtqsHeDgwQ7YKqKMkF48CY/EeQRQYzHbSzViiMBTwh468sLlxIJ+7OirqMHmbis u+XwNH244d8rH7KaxaXhhhgca81shmePfdDxbXx/nc6s7eQkAcA1RRjSyzHZHqSr0MMF Wtgxy0p6nWMm4Gk7u/VW05akvrAqKPo5Jp04V9WY5h//nRuAqKdmX60rsw/EL7SqCewH bglSFwtf7+YrtfMSvtCofXKLXJFO3XnPukWSWia6vrikYlpW1UJ47AaAhuDAlfbrAUDf xYRe1ny714vAuzud2vT09wIUC0besQ9Q4Q5z8Toge1iMRHMSgRWPGAWvW+uBsx3nQ+Ua icxQ== X-Gm-Message-State: AOAM532eqIMvA1iR3DyUkFRBTWW5pZSO+scuZXw03C4pgN22hX4Hx7tJ bNI/e62vWZUKhBtB5aaRFVHwMxqFW04= X-Received: by 2002:adf:a3d0:: with SMTP id m16mr12424041wrb.232.1596424269609; Sun, 02 Aug 2020 20:11:09 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:09 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 21/36] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Date: Mon, 3 Aug 2020 04:11:17 +0100 Message-Id: <20200803031132.1427063-22-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit functionally decomposes wcn36xx_smd_config_sta into a clearly defined wcn36xx_smd_config_sta_v0 and wcn36xx_smd_config_sta_v1 path. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 53 ++++++++++++++++---------- 1 file changed, 32 insertions(+), 21 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 2d6779cfa59c..7ad75faf8c4b 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1306,10 +1306,11 @@ static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn, } static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, - const struct wcn36xx_hal_config_sta_req_msg *orig) + struct ieee80211_vif *vif, + struct ieee80211_sta *sta) { struct wcn36xx_hal_config_sta_req_msg_v1 msg_body; - struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params; + struct wcn36xx_hal_config_sta_params_v1 *sta_params; if (wcn->rf_id == RF_IRIS_WCN3680) { INIT_HAL_MSG_V1(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); @@ -1318,46 +1319,56 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; } - wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params, - &msg_body.sta_params); + sta_params = &msg_body.sta_params; + + wcn36xx_smd_set_sta_params_v1(wcn, vif, sta, sta_params); PREPARE_HAL_BUF(wcn->hal_buf, msg_body); wcn36xx_dbg(WCN36XX_DBG_HAL, "hal config sta v1 action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n", - sta->action, sta->sta_index, sta->bssid_index, - sta->bssid, sta->type, sta->mac, sta->aid); + sta_params->action, sta_params->sta_index, sta_params->bssid_index, + sta_params->bssid, sta_params->type, sta_params->mac, sta_params->aid); return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); } -int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif, - struct ieee80211_sta *sta) +static int wcn36xx_smd_config_sta_v0(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta) { struct wcn36xx_hal_config_sta_req_msg msg; struct wcn36xx_hal_config_sta_params *sta_params; - int ret; - mutex_lock(&wcn->hal_mutex); INIT_HAL_MSG(msg, WCN36XX_HAL_CONFIG_STA_REQ); sta_params = &msg.sta_params; wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); - if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { - ret = wcn36xx_smd_config_sta_v1(wcn, &msg); - } else { - PREPARE_HAL_BUF(wcn->hal_buf, msg); + PREPARE_HAL_BUF(wcn->hal_buf, msg); - wcn36xx_dbg(WCN36XX_DBG_HAL, - "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n", - sta_params->action, sta_params->sta_index, - sta_params->bssid_index, sta_params->bssid, - sta_params->type, sta_params->mac, sta_params->aid); + wcn36xx_dbg(WCN36XX_DBG_HAL, + "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n", + sta_params->action, sta_params->sta_index, + sta_params->bssid_index, sta_params->bssid, + sta_params->type, sta_params->mac, sta_params->aid); + + return wcn36xx_smd_send_and_wait(wcn, msg.header.len); +} + +int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif, + struct ieee80211_sta *sta) +{ + int ret; + + mutex_lock(&wcn->hal_mutex); + + if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) + ret = wcn36xx_smd_config_sta_v1(wcn, vif, sta); + else + ret = wcn36xx_smd_config_sta_v0(wcn, vif, sta); - ret = wcn36xx_smd_send_and_wait(wcn, msg.header.len); - } if (ret) { wcn36xx_err("Sending hal_config_sta failed\n"); goto out; From patchwork Mon Aug 3 03:11:18 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: 247335 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861370ilo; Sun, 2 Aug 2020 20:12:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTBXZbnf1Zgqq60Q9oNwsxuOmlvcFN84SEQQDoUzMVSvoWUw1wx6yundqQId62t0cvVSVi X-Received: by 2002:a05:620a:1595:: with SMTP id d21mr14392321qkk.203.1596424278617; Sun, 02 Aug 2020 20:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424278; cv=none; d=google.com; s=arc-20160816; b=Vx1oopesThSo6tTLXwKnzOVE9ynFmPMGReTaXNBALJaco5FlDsscDPG6T11k5W7ium cxEUi2wiB1PKDrP67TCzCGydiCIgzu5dKfQBkjytuAZR4LyYnlaC/hRCQ2OW7xFsU3lN GQTshY54rNyddmbgOLMImVqTCFtqIIGxcRxpL717SlnBuL3tkYJVdeDLCK1Fk3lDQuic ekOevU4kc8lHxsCC5bxeRbCg117WtVKTiDgctcPMzI87VYumKzxiYgdPh9xsm96qLAMp AqEPhKCPKjG47JVb8MZ8ucoX40nasZO4l/yvGuEU0VYQ+6CQlZ3ppemI97Sbls9pqJtu Ie0A== 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=g0HdvRhuV4G18nLrdsZESI0j7y/hVX2Da49McYuPcRs=; b=U07x9mBB6aqmutDHSeBK0NifZNy+fDHUWGKB/V1lWHcanmCUnWPNV24xNgJJJCaJ+O Nrl386/hbjyr6MA0fQ59D0+YHwxwpTp4Zyd7J6grPY6g9U5qq2fNaxqwtTIV6Nlq1F/S oEON3frTBMnK80obmYmmeqKcJtZ93TgH6OQEYU5fuiwK4aCQFZSjDfSt1fWFGOs1SSgi hdHN1+dFnjml78Sk9jbkyRXM9CSsGWlSKKTCS09Bs9nqpjvISkDEaseP9R0snclSuZ2n +B//GqRXZItSgRxWlAkJ08pvWSLLcNf7WwRbAk1qfkbfighMFKeGJ0k2aZ/BbmPuckvd kafA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=dLuRgE99; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L1rhFRsE; 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 r6si8171935qtn.308.2020.08.02.20.11.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:18 -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=dLuRgE99; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L1rhFRsE; 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=g0HdvRhuV4G18nLrdsZESI0j7y/hVX2Da49McYuPcRs=; b=dLuRgE99Qir6dMVNfpWUM2fIX XIBA+RzOPjKJ/Ec+joVGp8sxp3LtpMHu3anDaSKQEHMsOnVkzxmRzb5YPpurHru9gm1YxZQKWqbWx +m08rEnzs/zK0wUMSw4eKmrzPk/ITwJKTfYndNG71LYo2EQrDZfGMZM0iYmh/5J5HuJstMfQYXuoO NP1SSF/ZhjsLAMCy5tN1EIXINbTQ+lS5Ep2E+LNp69snC+UmRj+oZVUhBNJSasHp1Y3SnSG5H/N8o T+L+uEQ+u9ysuQIqDnX3mCS3hoQMvyUKAz74yfxOxbunKI9vulXsbf/BTzFqJi9HQ3VEqWBMBmzzF J+uYVusHQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsd-0002eS-3A; Mon, 03 Aug 2020 03:11:15 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsZ-0002ar-EU for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:12 +0000 Received: by mail-wr1-x443.google.com with SMTP id a14so32807013wra.5 for ; Sun, 02 Aug 2020 20:11:11 -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=8EodbAD856JPjKx6stA7m96iT9XaLUX9CNtoPFY/hAs=; b=L1rhFRsEfHLjnSsHVVaEBIxtc9NzrVr56RXmtApGJVLIyBuc/hoXN0d53Z0S/kfb0S I7vAIDHZZKsC1gTAc89oWpxfTMF9gDVZ8kX4cuJXHhhV3s6H3j7Jag5v/CMX1rG2DM1b HGByol3odBt5m5ujJbJjIGspKtYQkvqYa3KYytc/09zyv9+08/XA7Mv51D+kkBwYjBLx TwA1uPYRl6jH6V0rW+LQTSFwDztNdLYm547GlzVwR2cfydfw0qbpmd9UisMefBkp5gz9 dwe/X6Ra+Gf1r5WwyuQfmyPppydl4yKqBNVQfZ8Wpvw4quyPWHmav8xhb1aYrwE4Tzs5 BeRg== 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=8EodbAD856JPjKx6stA7m96iT9XaLUX9CNtoPFY/hAs=; b=tFQbrNj3xf0XzN0gp1KCDHYI4+gRPRwJScycINQTu+bJZbhIi3P99x5s1mEGicmGrY laF2WbAE7S9wYW71ZlAfo0ePOlybStzyMJKrQBJMfeI9BINFSUNigfc1IrQfSEcuQRs4 npaPoBY0Mze1WJ9RH7XXOm15sRVxhGvkHpB0vMY/rdRtm3TWCK2FI2BFlUG1ICxhXPJ3 FKOgKL7tRwCms7v01eYzWM3jex9rTcHc1ypHg/IXJIpIscHJZ8eepn9eXXqa1o4ZQ+4q MdRiMKhWSLQ6kXPxQ2LsF21bNKVLeb07ez7pO7hn5UYI7KIyEByRGX62ybw5/mMFR5BJ aOYg== X-Gm-Message-State: AOAM530LzLTecmYM+CaOfiiibh2OQFya78yF6Keu1VgVhn82dnTsh6jX H1+BxcA63qUdBJFMZzRSzID2Pw== X-Received: by 2002:a5d:6a8b:: with SMTP id s11mr12993677wru.222.1596424270640; Sun, 02 Aug 2020 20:11:10 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:10 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 22/36] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Date: Mon, 3 Aug 2020 04:11:18 +0100 Message-Id: <20200803031132.1427063-23-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231111_575204_4A43D19B X-CRM114-Status: GOOD ( 11.49 ) 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:443 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org In order to facilitate functional decomposition of wcn36xx_smd_config_bss() we need to move wcn36xx_smd_set_sta_params() later in function. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 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 7ad75faf8c4b..6232e64fb298 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1612,7 +1612,6 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE; bss->reserved = 0; - wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); /* wcn->ssid is only valid in AP and IBSS mode */ bss->ssid.length = vif_priv->ssid.length; @@ -1638,6 +1637,8 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, vif_priv->bss_type = bss->bss_type; + wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); + wcn36xx_dbg(WCN36XX_DBG_HAL, "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n", bss->bssid, bss->self_mac_addr, bss->bss_type, From patchwork Mon Aug 3 03:11:19 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: 247334 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861341ilo; Sun, 2 Aug 2020 20:12:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx1HsJErWq5oDiyuBAX81d2nORQYwywkyH/RifyXjpzfSAabXjEdL9gf5sVybu1M/fHSwx X-Received: by 2002:aa7:cc10:: with SMTP id q16mr1571311edt.298.1596424275353; Sun, 02 Aug 2020 20:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424275; cv=none; d=google.com; s=arc-20160816; b=HOk/lrlXLSzHe5caqJKZpUZIZPNOGweq3rH1m04m6pxCZFYd/p1w05Ab9UnT6fpZyZ G9VprJZCiRaVWPn70OpDCwfgCQ4xjioEX8GHStkuoIjqk4PDL+2lVu6mHzl/4IVw+T3g AkVfc805AwEUXq3abQQL/pX9Jw/jDnN6J2HS4Sn+S3dqFS331ue6wR1KjPgSaWeen5FP gWAb2CBA6E2cjE7Z1hpQSb/Yvgiqr5IAe47KWwH+MXg7DXFXIrFsYfmTZX4+gMVOWdBr y9GpLwJ7xvFCTDut+hrbbK7aFy6TFcsfRwTVHt8WmstBn2En9zaeT3n/eC35SL+mRdtV 6d3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MEUWUJFP24hT9x0knHQlZkJe347puz4cw8J1YAVzn7s=; b=tjnQhkn7+Psaova/yXPBsYCtTS9rwQQ54fXdQpRPhgl+csXlVSE2ezb8EpN0C9dZHB rAOpfrSBLLUNBkbX6pqRvGBZPJXHZk/XIHAVwdYmNH2lOn+ngIuODLxnUg3wlBQQ2oEb XOnG87vicPEMRB2uR0ILIbwe+5sMPktwfh+L2h/Zom0xzr22iEgykapytCoywLgFU+H3 QDR022HqMuNJbkJwYkYSbTYClYJJE+HMIH+perX7seo/pQgQmpLOx+mv3b1GSqIba95G UYJx/OlghwQBm8pJMkied3CX+9o+UlAQwOGjp6qUAIer7utnNyVBk676N10O7HoDoDNB iGmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tKG17mtp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.15; Sun, 02 Aug 2020 20:11:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tKG17mtp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbgHCDLO (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727812AbgHCDLN (ORCPT ); Sun, 2 Aug 2020 23:11:13 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12E5EC06174A for ; Sun, 2 Aug 2020 20:11:13 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id t14so8893143wmi.3 for ; Sun, 02 Aug 2020 20:11:13 -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=MEUWUJFP24hT9x0knHQlZkJe347puz4cw8J1YAVzn7s=; b=tKG17mtpsX0klVMiQxGI+DP8DvKFoPtEXyU3w+gbF7kgs/CcT9tn4rfnfDfmx/t6vP w42UmnPwT2YHvcR35nSq+yH091rRmmax8QzcJocshpBtTnoznSEAsYr6wooHcl+6wfzT ciqxOfZigb68eWDjW16OLoFlXWpp/vnBrV95zo5z+whMuKhAIcPxcVe8cWzvaYseJXpR B6O4OtOnvI/WaCs4Epxanrv+QjH0Hj0Wpx497osNE+uosqgLJwTK+dOnIqXS1aXQg6SW DOZ45Y//xObl70MVlqN2iu0JOdb1XzuCLW0dqdwnu5UhOo0rmTsYysNN+EwUNgb63cm8 eCjA== 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=MEUWUJFP24hT9x0knHQlZkJe347puz4cw8J1YAVzn7s=; b=HlbJIYs+SFwikPYufF9ATAusnDuMELSHwv+AfqC5V60HclwZWsoYe68fl3QrlCRkfU Wzg7p4Bdmq6xOiK3ZX6kHdCIOCSK7BStOqPS3U1pvIExMUrhvQPH3DGYCKITQwEQXrZy xcATBQlXaI+wzyODkbhcwItx9UZYP7GQLCvNvd/VTHddNCAcFaB1q4HqkgsiMr+Q3BKI 6XeRQlUpI9VrSg8b64BqRuPMkMucU/rtHURg7aVFp1nnNIfNR08rvmAH+JpnYwhBPB50 mau63VlOk9D9ZkruckjsA2/x7ZjE4YntLbY7y45OX0ynpDM7tfPvvQnOZZxu/QKrjONy VTDQ== X-Gm-Message-State: AOAM530Ki3qYNRWKifl4caMReSu7m/8gmhOhmr0jm7iO1X1q2AcJ/Ey1 aFo1RjCVXuCLGNX0yA/XR6RfQA== X-Received: by 2002:a05:600c:2907:: with SMTP id i7mr13002404wmd.182.1596424271747; Sun, 02 Aug 2020 20:11:11 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:11 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 23/36] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Date: Mon, 3 Aug 2020 04:11:19 +0100 Message-Id: <20200803031132.1427063-24-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit moves BSS parameter setup to a separate function wcn36xx_smd_set_bss_params(). This will allow for further functional decomposition and fewer kzalloc() operations in subsequent patches. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 172 +++++++++++++------------ 1 file changed, 92 insertions(+), 80 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 6232e64fb298..5fda63f79ca7 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1386,6 +1386,97 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif, return ret; } +static void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + const u8 *bssid, + bool update, + struct wcn36xx_hal_config_bss_params *bss) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_config_sta_params *sta_params; + + sta_params = &bss->sta; + + WARN_ON(is_zero_ether_addr(bssid)); + + memcpy(&bss->bssid, bssid, ETH_ALEN); + + memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN); + + if (vif->type == NL80211_IFTYPE_STATION) { + bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE; + + /* STA */ + bss->oper_mode = 1; + bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE; + } else if (vif->type == NL80211_IFTYPE_AP || + vif->type == NL80211_IFTYPE_MESH_POINT) { + bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE; + + /* AP */ + bss->oper_mode = 0; + bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE; + } else if (vif->type == NL80211_IFTYPE_ADHOC) { + bss->bss_type = WCN36XX_HAL_IBSS_MODE; + + /* STA */ + bss->oper_mode = 1; + } else { + wcn36xx_warn("Unknown type for bss config: %d\n", vif->type); + } + + if (vif->type == NL80211_IFTYPE_STATION) + wcn36xx_smd_set_bss_nw_type(wcn, sta, bss); + else + bss->nw_type = WCN36XX_HAL_11N_NW_TYPE; + + bss->short_slot_time_supported = vif->bss_conf.use_short_slot; + bss->lla_coexist = 0; + bss->llb_coexist = 0; + bss->llg_coexist = 0; + bss->rifs_mode = 0; + bss->beacon_interval = vif->bss_conf.beacon_int; + bss->dtim_period = vif_priv->dtim_period; + + wcn36xx_smd_set_bss_ht_params(vif, sta, bss); + + bss->oper_channel = WCN36XX_HW_CHANNEL(wcn); + + if (conf_is_ht40_minus(&wcn->hw->conf)) + bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW; + else if (conf_is_ht40_plus(&wcn->hw->conf)) + bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; + else + bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE; + + bss->reserved = 0; + + /* wcn->ssid is only valid in AP and IBSS mode */ + bss->ssid.length = vif_priv->ssid.length; + memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length); + + bss->obss_prot_enabled = 0; + bss->rmf = 0; + bss->max_probe_resp_retry_limit = 0; + bss->hidden_ssid = vif->bss_conf.hidden_ssid; + bss->proxy_probe_resp = 0; + bss->edca_params_valid = 0; + + /* FIXME: set acbe, acbk, acvi and acvo */ + + bss->ext_set_sta_key_param_valid = 0; + + /* FIXME: set ext_set_sta_key_param */ + + bss->spectrum_mgt_enable = 0; + bss->tx_mgmt_power = 0; + bss->max_tx_power = WCN36XX_MAX_POWER(wcn); + bss->action = update; + + vif_priv->bss_type = bss->bss_type; +} + static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, const struct wcn36xx_hal_config_bss_req_msg *orig) { @@ -1493,7 +1584,6 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return ret; } - static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, @@ -1545,7 +1635,6 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct wcn36xx_hal_config_bss_req_msg *msg; struct wcn36xx_hal_config_bss_params *bss; struct wcn36xx_hal_config_sta_params *sta_params; - struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); int ret; mutex_lock(&wcn->hal_mutex); @@ -1559,84 +1648,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, bss = &msg->bss_params; sta_params = &bss->sta; - WARN_ON(is_zero_ether_addr(bssid)); - - memcpy(&bss->bssid, bssid, ETH_ALEN); - - memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN); - - if (vif->type == NL80211_IFTYPE_STATION) { - bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE; - - /* STA */ - bss->oper_mode = 1; - bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE; - } else if (vif->type == NL80211_IFTYPE_AP || - vif->type == NL80211_IFTYPE_MESH_POINT) { - bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE; - - /* AP */ - bss->oper_mode = 0; - bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE; - } else if (vif->type == NL80211_IFTYPE_ADHOC) { - bss->bss_type = WCN36XX_HAL_IBSS_MODE; - - /* STA */ - bss->oper_mode = 1; - } else { - wcn36xx_warn("Unknown type for bss config: %d\n", vif->type); - } - - if (vif->type == NL80211_IFTYPE_STATION) - wcn36xx_smd_set_bss_nw_type(wcn, sta, bss); - else - bss->nw_type = WCN36XX_HAL_11N_NW_TYPE; - - bss->short_slot_time_supported = vif->bss_conf.use_short_slot; - bss->lla_coexist = 0; - bss->llb_coexist = 0; - bss->llg_coexist = 0; - bss->rifs_mode = 0; - bss->beacon_interval = vif->bss_conf.beacon_int; - bss->dtim_period = vif_priv->dtim_period; - - wcn36xx_smd_set_bss_ht_params(vif, sta, bss); - - bss->oper_channel = WCN36XX_HW_CHANNEL(wcn); - - if (conf_is_ht40_minus(&wcn->hw->conf)) - bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW; - else if (conf_is_ht40_plus(&wcn->hw->conf)) - bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; - else - bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE; - - bss->reserved = 0; - - /* wcn->ssid is only valid in AP and IBSS mode */ - bss->ssid.length = vif_priv->ssid.length; - memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length); - - bss->obss_prot_enabled = 0; - bss->rmf = 0; - bss->max_probe_resp_retry_limit = 0; - bss->hidden_ssid = vif->bss_conf.hidden_ssid; - bss->proxy_probe_resp = 0; - bss->edca_params_valid = 0; - - /* FIXME: set acbe, acbk, acvi and acvo */ - - bss->ext_set_sta_key_param_valid = 0; - - /* FIXME: set ext_set_sta_key_param */ - - bss->spectrum_mgt_enable = 0; - bss->tx_mgmt_power = 0; - bss->max_tx_power = WCN36XX_MAX_POWER(wcn); - bss->action = update; - - vif_priv->bss_type = bss->bss_type; - + wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss); wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); wcn36xx_dbg(WCN36XX_DBG_HAL, From patchwork Mon Aug 3 03:11: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: 247323 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860681ilo; Sun, 2 Aug 2020 20:11:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFYtcVAL6OEA4+kJhTsoz4rYK3rOLUjjLP4a+rZqdHcAaQWHh6/zJuz0mVR+C6tS9hpK1X X-Received: by 2002:a17:906:38da:: with SMTP id r26mr14419078ejd.120.1596424276653; Sun, 02 Aug 2020 20:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424276; cv=none; d=google.com; s=arc-20160816; b=h9SmVhyuudEu2viHnP2HlTp1gVQU8pDiVyYz0L1UYhZ0wuvztQrwkJ4vy7q48rhHdS 3UZbFwFumdsRmK3ThixRXueZ1PckFap7AF9oR2rI58olCMG2W6d5G2JgL3GZmr3PhhCC +JUEx0LMUxMd7vnUmjij3DvVlUjyYvjZWxuT7XYyiBaUS/5jdx1Koe1rcuO+Fnn1T/Wq 1iA1smPwtNskTNEvb8TPfao+Gcu2UChF6DZIl/ejIljqgG4xfled/3hgivvOu3wH5+uY kvwAzcWLpnExqcdlfBjHmTsvAQY0Su4dXfu/t6Vs3yurDgdrRy8p3sQgheaXrvH8NxsI 57rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5BTNqwjDKrrqUfjjYFYREgjuysuBsm6saZBOF6hQXB8=; b=QspLv+6mGuPVyVQAKkK7FcEV+549Sm2m5HFz+9vEmAOIvoUigDeyt+oVCMbZh4KR/d h9GMLccpC8QwpsT1UZx25ncamZxxrCjSuB1JmUoNlOyak1rfTHxuB2nHeW1W2rtcX716 8o/kh1iWf48ZSt3Acoc7W2aUmMYcMsrvZLULoySzO3JONjpZ2Kjyykc4uzjehjoElWBJ AIK8+LuonYTJMsdveZQ0KfxIGs69xvP2GpbDbjvMoM99ZkLSHfRJ/cPSAiT/HOtY1eD4 io1YrUvJl8WSEkdrGbIJZ1zGIRMYAVpKjfV8EyuwtkGZz3DC5gdzGFfECzCVHyO423V3 hIaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pf0p2LqH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.16; Sun, 02 Aug 2020 20:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pf0p2LqH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727829AbgHCDLP (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbgHCDLO (ORCPT ); Sun, 2 Aug 2020 23:11:14 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D953EC06174A for ; Sun, 2 Aug 2020 20:11:13 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id p14so13026999wmg.1 for ; Sun, 02 Aug 2020 20:11:13 -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=5BTNqwjDKrrqUfjjYFYREgjuysuBsm6saZBOF6hQXB8=; b=pf0p2LqHvdoSu1NBezIFgTBQbH78N6H71VzMeBjbkBfD4cmjdcRRFaxVCaCZWkJLZo wzBYOriDhpZBpOJ7Uo+muXHglpta9YeXRUpIn87M+hFHV5sehqLv/ndl/3YESsyUMb0c RId4b3JXDVsJju67omiC1M/J/2H9E41BIMyLle3t5kt6d0MErFOUccCg4WQup5uCDNgW o/ji6LTq/HQq4YUqyzTLga8vtqaVaOLXFff5JE/Vll/pXgrXP/9y0h4pzdnwMJnu5cVb 5R2qmDmPX00YeKwJQM4eS6eem7snVnwf6g6tqxBXiGGWWoUofBPcARAe1+7Ju/L9oiGP tzwQ== 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=5BTNqwjDKrrqUfjjYFYREgjuysuBsm6saZBOF6hQXB8=; b=d6JZ6hByAecyzJFoZ4y6eUbQtqaMztEgyg7979W1NPuNC5XEmcIdqw90HONivBQeNe KNdEDfukwGrXU8iXrGS61I9u0pIUvSOtBPFmByIVPSfy7zSZ1z53vAlfuWMKMQgMsxTs h9hgAfAJFMz+B66rzaezuKQVRiGLKHtknnhjTiqs4snExyX2S/ZwX6HDb0VVgzcZDYMC H3DliYlUW8Q5uv0qTSl3MK/nu4aA3McvM4BKxBthyEHwb9g3V5+h2ueKDPFibfUXe5ak q3F906BNhCSCd69/l35qXILpalugc1LxPR0Pqi6MlURsHVJozQmxvArB8YV8OOFn1u0A es4w== X-Gm-Message-State: AOAM532pSvgRB41amLdbZSg8KhEgnG2UmVIBNLdV2smgXYu9QrVE7hQD 2wKNCPbkJUo3MwxaGxBCySVFRQ== X-Received: by 2002:a1c:a553:: with SMTP id o80mr13645349wme.50.1596424272685; Sun, 02 Aug 2020 20:11:12 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:12 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 24/36] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Mon, 3 Aug 2020 04:11:20 +0100 Message-Id: <20200803031132.1427063-25-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds wcn36xx_smd_config_bss_v0() as a step along the road of functionally decomposing wcn36xx_smd_config_bss(). Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 5fda63f79ca7..43021b13b5b0 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1584,6 +1584,47 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return ret; } +int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif, + struct ieee80211_sta *sta, const u8 *bssid, + bool update) +{ + struct wcn36xx_hal_config_bss_req_msg *msg; + struct wcn36xx_hal_config_bss_params *bss; + struct wcn36xx_hal_config_sta_params *sta_params; + int ret; + + msg = kzalloc(sizeof(*msg), GFP_KERNEL); + if (!msg) + return -ENOMEM; + + INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ); + + bss = &msg->bss_params; + sta_params = &bss->sta; + + wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss); + wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); + + PREPARE_HAL_BUF(wcn->hal_buf, (*msg)); + + wcn36xx_dbg(WCN36XX_DBG_HAL, + "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n", + bss->bssid, bss->self_mac_addr, bss->bss_type, + bss->oper_mode, bss->nw_type); + + wcn36xx_dbg(WCN36XX_DBG_HAL, + "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n", + sta_params->bssid, sta_params->action, + sta_params->sta_index, sta_params->bssid_index, + sta_params->aid, sta_params->type, + sta_params->mac); + + ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len); + kfree(msg); + + return ret; +} + static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, From patchwork Mon Aug 3 03:11:21 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: 247324 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860687ilo; Sun, 2 Aug 2020 20:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS3h+YJq2r+TYnJsyEw8B3rB5U48ZUI7MWmP4aPudDh62x9ZwmH8++Srz6F3BNEh//9Ym9 X-Received: by 2002:a50:b285:: with SMTP id p5mr5096296edd.139.1596424277286; Sun, 02 Aug 2020 20:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424277; cv=none; d=google.com; s=arc-20160816; b=zuIEIXS4iOYQPSicLw2tgiQ179VsUqX6qSOItqofX3wOhS+DGhTVqUmr0FwSt2MK5H vKDQK1Za4opydAWVOiY3YRi+/9nHlBvP+pTr0RXm57n7ubZKHv4X6iRqKjkeghGMQiSi HtYEqysaA7cP0UuC1/mPOkjWM3oxeKbKIB+xgtpKXbslZljrf5XDlmoRznYXePPDXhna BENXgFYr6RmyjGm7UBEsxuyzsnuHRA52E+fmZbVg96g7QaoLznrbwX7y1fZ6F/N0l6RK TkyMhtjF6R2SDR2JE6mUMU/ixBYen4C+6GnY//VMlPnZnbJuBfCDfaG0sWAwKVPp/YxO 0H2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pKx2vUsb2J83Nd1ElnjujJcXzTbgjOG6BmjNC2hrd9o=; b=lolgFIRpexJEOvrVhl65bfEHMzL4YAknOp+v5PSc6tOYO8EErSlPGDeZ74VjupQzoV cz24QzcZ4mIyVMtYqPrH6/iXBB0p2FIQsFQFiyIq9gb78ilz93YQarB2VB4pn2iWCC1n NKeysaEDRM6ck8uPILQkjlqMjBWpGOH8T8/sOE0A5Thuu8ItNkZGKo92jbWKC+X1oUVY JYJUJkuafS1yo2aAPVYm0aFsOWfmiIoR/sry6nIrZ9FD9pzed/RKL8y+bIscj3Z4MtI+ gPSyC17PR5CJnf7mCurJAR5CoCIfB63luAF66uPQ1Bna7SCfLI3F/cnYiG7PznEY0jOP cIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=glKF7drX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.17; Sun, 02 Aug 2020 20:11:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=glKF7drX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727840AbgHCDLQ (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727812AbgHCDLP (ORCPT ); Sun, 2 Aug 2020 23:11:15 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2CF0C06174A for ; Sun, 2 Aug 2020 20:11:14 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id a14so32807058wra.5 for ; Sun, 02 Aug 2020 20:11:14 -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=pKx2vUsb2J83Nd1ElnjujJcXzTbgjOG6BmjNC2hrd9o=; b=glKF7drXVHhwTibsv3qDncmKpdlk6w4TMknv04P3xr8NhHbkqHl43KLlVhaPSMR9i6 YfgtMXZGTbyeWXHpu5iQV2rbl2Qx0aUP6S/U8IM0DcRBhAE1NVTWf696tb8nv/U3rJBA atU19kieY6k1GGhGAi6gb6iNL/HtYwZCZ4cweHqJuAp2FFMdP1Nls2RKfWGLieepsbwV GX/TaziX1wrxMH3icMRsyP1vxfIMBbBIvsyxb+kUbksGkkqFuQMJsAf+Q8AE1xD40RM5 z+zA7HL1CzwKwgYPSTNrpCu08cTkpYzGrB7gf4TpHWWF1DinAzqP2c6jerVW+0KwYK1J EqNA== 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=pKx2vUsb2J83Nd1ElnjujJcXzTbgjOG6BmjNC2hrd9o=; b=UtVUiCGU2OATFFiyt8hvFeCFzgEWpAwlEA0AY7uTgcFtC//ygQ9kyT7kJ+Uzer7kcn yCXBuLWB66zV8hsYEuTv9AGXwJ8iNkP8si73UqObAMchi72hssSl4cyW+8Z6NJ7//Sgz ZCVSpG4Mfi494kdN0DcB51IUv8WBxXmP1rJTK+GAStlgIE4HPB6fmsPaikFKnf1enEbE hv7yLMDENvX063z1M2xPQlebf7BODufw+An3NFTCllQKf7S7OnMYHgEgZNvl9Z9goDEg Dd2Lsvld5aa4NDOahdQ7wJA3+8eFrYYDo/kIzin49LXeuhp/2H0/eJaMlR+eK5LUmYLL 5rGg== X-Gm-Message-State: AOAM533VA5V/PJptT+V/hdaByx4tVRL3JNIByTqdshJvsLgrs1XT+tAJ iN4NFfjifjUP9npMM3SBBV7oVw== X-Received: by 2002:a5d:55d2:: with SMTP id i18mr12585610wrw.378.1596424273692; Sun, 02 Aug 2020 20:11:13 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:13 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 25/36] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally Date: Mon, 3 Aug 2020 04:11:21 +0100 Message-Id: <20200803031132.1427063-26-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch updates wcn36xx_smd_config_bss_v1() to update on internally derived parameters only, specifically making use of STA v1 wrapper routines previously added. Once done we no longer need to pass a struct wcn36xx_hal_config_bss_req_msg which gives us options in later patches to eliminate the kzalloc() in wcn36xx_smd_config_bss entirely. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 115 +++++++++++++------------ 1 file changed, 59 insertions(+), 56 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 43021b13b5b0..50559871d109 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1477,11 +1477,13 @@ static void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn, vif_priv->bss_type = bss->bss_type; } -static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, - const struct wcn36xx_hal_config_bss_req_msg *orig) +int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, + struct ieee80211_sta *sta_80211, const u8 *bssid, + bool update) { struct wcn36xx_hal_config_bss_req_msg_v1 *msg_body; struct wcn36xx_hal_config_bss_params_v1 *bss; + struct wcn36xx_hal_config_bss_params bss_v0; struct wcn36xx_hal_config_sta_params_v1 *sta; int ret; @@ -1499,72 +1501,73 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, bss = &msg_body->bss_params; sta = &bss->sta; + wcn36xx_smd_set_bss_params(wcn, vif, sta_80211, bssid, update, &bss_v0); + wcn36xx_smd_set_sta_params_v1(wcn, vif, sta_80211, sta); + /* convert orig to v1 */ - memcpy(bss->bssid, &orig->bss_params.bssid, ETH_ALEN); - memcpy(bss->self_mac_addr, &orig->bss_params.self_mac_addr, ETH_ALEN); + memcpy(bss->bssid, &bss_v0.bssid, ETH_ALEN); + memcpy(bss->self_mac_addr, &bss_v0.self_mac_addr, ETH_ALEN); - bss->bss_type = orig->bss_params.bss_type; - bss->oper_mode = orig->bss_params.oper_mode; - bss->nw_type = orig->bss_params.nw_type; + bss->bss_type = bss_v0.bss_type; + bss->oper_mode = bss_v0.oper_mode; + bss->nw_type = bss_v0.nw_type; bss->short_slot_time_supported = - orig->bss_params.short_slot_time_supported; - bss->lla_coexist = orig->bss_params.lla_coexist; - bss->llb_coexist = orig->bss_params.llb_coexist; - bss->llg_coexist = orig->bss_params.llg_coexist; - bss->ht20_coexist = orig->bss_params.ht20_coexist; - bss->lln_non_gf_coexist = orig->bss_params.lln_non_gf_coexist; + bss_v0.short_slot_time_supported; + bss->lla_coexist = bss_v0.lla_coexist; + bss->llb_coexist = bss_v0.llb_coexist; + bss->llg_coexist = bss_v0.llg_coexist; + bss->ht20_coexist = bss_v0.ht20_coexist; + bss->lln_non_gf_coexist = bss_v0.lln_non_gf_coexist; bss->lsig_tx_op_protection_full_support = - orig->bss_params.lsig_tx_op_protection_full_support; - bss->rifs_mode = orig->bss_params.rifs_mode; - bss->beacon_interval = orig->bss_params.beacon_interval; - bss->dtim_period = orig->bss_params.dtim_period; - bss->tx_channel_width_set = orig->bss_params.tx_channel_width_set; - bss->oper_channel = orig->bss_params.oper_channel; - bss->ext_channel = orig->bss_params.ext_channel; - - bss->reserved = orig->bss_params.reserved; - - memcpy(&bss->ssid, &orig->bss_params.ssid, - sizeof(orig->bss_params.ssid)); - - bss->action = orig->bss_params.action; - bss->rateset = orig->bss_params.rateset; - bss->ht = orig->bss_params.ht; - bss->obss_prot_enabled = orig->bss_params.obss_prot_enabled; - bss->rmf = orig->bss_params.rmf; - bss->ht_oper_mode = orig->bss_params.ht_oper_mode; - bss->dual_cts_protection = orig->bss_params.dual_cts_protection; + bss_v0.lsig_tx_op_protection_full_support; + bss->rifs_mode = bss_v0.rifs_mode; + bss->beacon_interval = bss_v0.beacon_interval; + bss->dtim_period = bss_v0.dtim_period; + bss->tx_channel_width_set = bss_v0.tx_channel_width_set; + bss->oper_channel = bss_v0.oper_channel; + bss->ext_channel = bss_v0.ext_channel; + + bss->reserved = bss_v0.reserved; + + memcpy(&bss->ssid, &bss_v0.ssid, + sizeof(bss_v0.ssid)); + + bss->action = bss_v0.action; + bss->rateset = bss_v0.rateset; + bss->ht = bss_v0.ht; + bss->obss_prot_enabled = bss_v0.obss_prot_enabled; + bss->rmf = bss_v0.rmf; + bss->ht_oper_mode = bss_v0.ht_oper_mode; + bss->dual_cts_protection = bss_v0.dual_cts_protection; bss->max_probe_resp_retry_limit = - orig->bss_params.max_probe_resp_retry_limit; - bss->hidden_ssid = orig->bss_params.hidden_ssid; - bss->proxy_probe_resp = orig->bss_params.proxy_probe_resp; - bss->edca_params_valid = orig->bss_params.edca_params_valid; - - memcpy(&bss->acbe, &orig->bss_params.acbe, - sizeof(orig->bss_params.acbe)); - memcpy(&bss->acbk, &orig->bss_params.acbk, - sizeof(orig->bss_params.acbk)); - memcpy(&bss->acvi, &orig->bss_params.acvi, - sizeof(orig->bss_params.acvi)); - memcpy(&bss->acvo, &orig->bss_params.acvo, - sizeof(orig->bss_params.acvo)); + bss_v0.max_probe_resp_retry_limit; + bss->hidden_ssid = bss_v0.hidden_ssid; + bss->proxy_probe_resp = bss_v0.proxy_probe_resp; + bss->edca_params_valid = bss_v0.edca_params_valid; + + memcpy(&bss->acbe, &bss_v0.acbe, + sizeof(bss_v0.acbe)); + memcpy(&bss->acbk, &bss_v0.acbk, + sizeof(bss_v0.acbk)); + memcpy(&bss->acvi, &bss_v0.acvi, + sizeof(bss_v0.acvi)); + memcpy(&bss->acvo, &bss_v0.acvo, + sizeof(bss_v0.acvo)); bss->ext_set_sta_key_param_valid = - orig->bss_params.ext_set_sta_key_param_valid; + bss_v0.ext_set_sta_key_param_valid; memcpy(&bss->ext_set_sta_key_param, - &orig->bss_params.ext_set_sta_key_param, - sizeof(orig->bss_params.acvo)); - - bss->wcn36xx_hal_persona = orig->bss_params.wcn36xx_hal_persona; - bss->spectrum_mgt_enable = orig->bss_params.spectrum_mgt_enable; - bss->tx_mgmt_power = orig->bss_params.tx_mgmt_power; - bss->max_tx_power = orig->bss_params.max_tx_power; + &bss_v0.ext_set_sta_key_param, + sizeof(bss_v0.acvo)); - wcn36xx_smd_convert_sta_to_v1(wcn, &orig->bss_params.sta, sta); + bss->wcn36xx_hal_persona = bss_v0.wcn36xx_hal_persona; + bss->spectrum_mgt_enable = bss_v0.spectrum_mgt_enable; + bss->tx_mgmt_power = bss_v0.tx_mgmt_power; + bss->max_tx_power = bss_v0.max_tx_power; PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); @@ -1705,7 +1708,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, sta_params->mac); if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { - ret = wcn36xx_smd_config_bss_v1(wcn, msg); + ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update); } else { PREPARE_HAL_BUF(wcn->hal_buf, (*msg)); From patchwork Mon Aug 3 03:11:22 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: 247327 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860737ilo; Sun, 2 Aug 2020 20:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwn8LIKxDoLE/+FFx27Y198RuGLrqw6dSCeiJQ3GnD2h3JlWeCQd3Jaj+9rfdajT35g5mW X-Received: by 2002:a37:9e90:: with SMTP id h138mr14476868qke.176.1596424283829; Sun, 02 Aug 2020 20:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424283; cv=none; d=google.com; s=arc-20160816; b=zweXRfZKYftyGJX1b44qUJb6zUwJyWZSjs/lMV4P/qNEy9/pTOg02d3Xy8IRD8F00q 1nxFDdYsaBfKT14id02ojtDeyZcwwQsg29qFE7Xy+3JV/+YGoObTFKwBd2cubdKA0RbX e4PziCTZsL9tODA+j5yIy+rMNleWvrtDR4F2xneD1J6U2nkjRjpv4Jecm0rvtkDRxfyh +a9YsQbFBoc63ruLv8JshIaToOkM+Fayb/YjwGLDvP9QvZOHB4nvZW1lLc5Xc/7rOUqD TgBFuzHnQtGNFAnryW06Cp+Djb4O+msouOlYSOjSy+QlZY8T8FAlnVnxDPX6xzU5DGUP 7mtA== 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=h/xcb22vVcU8Ya1KQObsSEv4IaM+453gJaEX3PagODY=; b=QphfOU5oGawmeYS2u5syjonkN3mb2qRMD+Zi5roflkta0ltZ3WfRwQdVuPRcma5J4/ 7WV9FQ55oa4NHpxf21fjwAT7wVZZCji4yb9Xy7mXOXZbOam/hDqSCNFsWHCSy0bZ/3uK 7Ety2PtWqViTmq2u2My1R6T97IWwJ52aSLf4/G0ZnwJ7QB112kwarmVZ2T//7tv7Q8aM WkGJV+IqmM264BkKZsjCWGELEE7BhYN6NC/uaEiKcbEMbtvol7tYHLw5EYSeM+qqJccC GvHHzZf3E24gY5t4FYMVFOMYlWUMv/gTHgDcrHgeBII8wyb6ZC2VbQMON0SV0NZhwexi 2rAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=x4Lj5Yor; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="s9l2/eO/"; 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 d12si8936971qvy.16.2020.08.02.20.11.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:23 -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=x4Lj5Yor; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="s9l2/eO/"; 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=h/xcb22vVcU8Ya1KQObsSEv4IaM+453gJaEX3PagODY=; b=x4Lj5YorP2Nu8ngPleGRW0lfB H3AXkGGz7hw1RgW7rlW8oUdMmE4opSC0eD4KKK4l098wjklW7WvlXwaG+Hm+kQ12IQLEnITpJ0rSn MZE35ijz0Z7h77sHJKlm4qx6EaAOnlJc2lIXLizP5cijS25EXPrm0z46k7xCjqX5fOS/34uZ6GdnP JgqphbfxAX25BP5mQ2QpHMrr/YEsj8VGKKExsC6OlW4tBz+yN9ag4ZIGojUvFhFybEyv43zKZwWMo Rs+Wf1mnDqNx+fmpvFRJIm+kFLsaCwv0a+Ohkyo97+OOBV5y3U5/7CA4+gAP6bN0dYN92vueM8b05 8yJA8gQ3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsi-0002iv-73; Mon, 03 Aug 2020 03:11:20 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsd-0002eQ-JN for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:16 +0000 Received: by mail-wm1-x343.google.com with SMTP id t14so8893199wmi.3 for ; Sun, 02 Aug 2020 20:11:15 -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=zBh3ROPhrGIW2kesBf+bRTaWxVaasDDdtUrc0+Ft64o=; b=s9l2/eO/Zqk3vRbIoBFtoeYfeVNL2XnNhUFm46L50xRWa/qtInzNprqVb5kcvbMwK7 EgmgXuht6ZM5Fp1toNm69MyIa1mSUw6w3lAhVGdukvLosY0S8MlD/g/1IjyraKO5XWfr AlWuvJzCJCGThyKTCPm8FPTCyWRzhp1naQh/7eOuBA9jMmpvKRjcwGtX5MlrFQKvLhSn hewFIsJcHd/7Zu6uQPZ1pAzkKrGMHfycNfEWamQd74H8ReDz28G0MBhQ08sZKlVQzNGg wMoAzu4X/7PVb+nEy9rgBxdQBxMfeChmALMgNTz97at3P3g0g3QWj1mrdzG9KB67u6+o 4Caw== 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=zBh3ROPhrGIW2kesBf+bRTaWxVaasDDdtUrc0+Ft64o=; b=Lw2uWB8+1egrxY95wIYWadwAQwGTrcPLJjJ/Dt0K6cpjO6ln1UNjaF7gsvhGeZS2uI 96Qy5RQg9/vabNzZVqN2dbdZ4TSQhylavUGe/JnZq+oTyK55FLj42WGtZAOjfPoA57SI b0GkkD64ZO3erKb5pScgbODntMhxsLuUIJkNbkq+DUdD/85A8+x2yTmZkWmWj21SpbRC a9+BK4RMfA+xB3V9DV0HpPK10NcPhZ3sV/Su+ycqpXg/hiWcNT2f28vINRyoDFDBSMIy ryaTpoNBIiOaDRf0cUijN3TDx5RjjdLcX/4nYSqdOUPSUmnrocsH8lQFwr6T4eTgaymE a28g== X-Gm-Message-State: AOAM531RgiJRsGo7rQpvWDBb+tCRYZBQ26n1PZ5ACfySWHTQ+m5ocN5H aLrpMXU1uUoHceaxMJkUN/7uyw== X-Received: by 2002:a1c:7918:: with SMTP id l24mr13642585wme.158.1596424274637; Sun, 02 Aug 2020 20:11:14 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:14 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 26/36] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Date: Mon, 3 Aug 2020 04:11:22 +0100 Message-Id: <20200803031132.1427063-27-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231115_715671_F5D37164 X-CRM114-Status: GOOD ( 11.52 ) 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:343 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org A previous patch added wcn36xx_smd_config_bss_v0() this patch converts the version 0 data-path in wcn36xx_smd_config_bss() to use wcn36xx_smd_config_bss_v0(). Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 4 +--- 1 file changed, 1 insertion(+), 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 50559871d109..033afe52dd9c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1710,9 +1710,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update); } else { - PREPARE_HAL_BUF(wcn->hal_buf, (*msg)); - - ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len); + ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update); } if (ret) { wcn36xx_err("Sending hal_config_bss failed\n"); From patchwork Mon Aug 3 03:11:23 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: 247325 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860708ilo; Sun, 2 Aug 2020 20:11:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrlt6GDFywH5jiey173thnAVY0LZbd+eRJePHhw1xGOdL9wR7OFJLK6Mwl0HI4z6L11jN0 X-Received: by 2002:a05:6402:8cb:: with SMTP id d11mr6003680edz.100.1596424279982; Sun, 02 Aug 2020 20:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424279; cv=none; d=google.com; s=arc-20160816; b=td1xbsTeWyX4Drj5xTl/lrr80z1CoX29z9Z0rA54NvUs0QRFUr02aMezBhcOxlGMhh 3axBuoXQZemhc6gtWMEcZwP0/XwlYjRMV4ExfaEJxdM3kgK8KJ7pxTNCBySrI4/TNfNX vRErCl5tYVjH3l6tsjLamH5i3zSc+jTfSr9A7p22mqyv6ceViqPQKhjz5D3y/3BeeqfS orSe8P2cy0rfsffbJriT9Butdo7mRLIjjaiVnhTyZkL5FjtSXXxef3HIX4Bla1QamVe8 iGBcUC4GL5UZZ2GMFmbvqSHIudygiEzOL8V/2L5EikTrDYy7LUTZxLZGDY5E+XooPMzo 4gmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JZJJwTRfJFPBU3Vu91Q4/DbR77Wu6U4kNTpxlGREayg=; b=oOAc6DcZHXV6TQ2F7BiU5N4ccZZ78fR+/cLGootQYsEMfisAsvLBfP/LiEKKXrSlBk XK876/0oeB8OxX+E7Gl2V7nWOz07MFFHnMG9JJr+J7/W2OTjclEQIxZ+9tJnt5Kl4RyL Pdu5z328iuPeEhfN1GcAukVSSGzg8X6LDxSc/6pZbNzI/r8Gle+uWTdZrqgjsVWL6vfv HQXfzvzlCwzm6DVIleDa2f3vP8LzEg63oP6MqTgQnArCTVS423St1Fn0GlC2xropoYGO r2gA9Iqijt2N1EUJCfL6QoHQUwXYbIZVubG8AQiabvP83Mwjw7ca1fx+vOpG+iTm55o+ 0MRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=elbd9VM5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.19; Sun, 02 Aug 2020 20:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=elbd9VM5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbgHCDLS (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727849AbgHCDLR (ORCPT ); Sun, 2 Aug 2020 23:11:17 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D185BC06174A for ; Sun, 2 Aug 2020 20:11:16 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id p14so13027050wmg.1 for ; Sun, 02 Aug 2020 20:11:16 -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=JZJJwTRfJFPBU3Vu91Q4/DbR77Wu6U4kNTpxlGREayg=; b=elbd9VM5vFPn0RwWyS8xk6xx97ocJlVW15ll+koqPbmbVJiUKCqe8IdD4YHZA/ipAe jkzzr8yLrxb+RPTswk59mDPdu8y9tuXQOwCe2K5kAhgbB+9eG7x2TkfeSu59e/yqHLPu ulsS4nIuvFW0Vd0KLeDbdZoEKAIR1MbyGBwq67tsqPa4onEMNkPihff+SJT75/WHNe2U JWn9dQt5UXqEiD/FJLkwp3p21Rbq05WUsz4hufjFj5HILQcXThdxUz/Oq/41/DV+NBHT QloEDSy1gtMquhxje0dHP7iPtzsstke6cWJSMMPSQ42Mw4xv7ZVwNChUVInO4R8aLjYM lI0A== 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=JZJJwTRfJFPBU3Vu91Q4/DbR77Wu6U4kNTpxlGREayg=; b=ASVWMBSgr7HhegzFZqyB08VCH/t73NE26TTpjEJQBOcyeKY2+DNV3xRg8HdiQbjAbQ HoGYhl9clG/88+BXgayfYiPgS2NAwIlZkMmaOCSnFZP5AF7KlLEol83ByrlFWH5WFjZ3 xw7LYmch/q/0FhVL0w44aKT5bpcmxm42U125MqD9vy9KVeOlFxeYUNFtaFD7UUEeZ8pL qq5xCg5JmpwW9W70LXO/OOo0sd1NnCdq8DMU3sTjsvxCCecM/kfGA3m16UPZRCrWhrRe Syr8xK63HW1UkEYg7ad298AIaA0LlIMmPLv+nBio8W5llND2vC7mMGPJVm2P83Femhar pzmQ== X-Gm-Message-State: AOAM530lZT43BPkD/T7QGJ7hX+31ZHdJtcep2E9W1t4DmzOM3aA4fRfZ Sw39heUbHItGGWR0dwqAsAJHhw== X-Received: by 2002:a7b:c095:: with SMTP id r21mr13309557wmh.96.1596424275655; Sun, 02 Aug 2020 20:11:15 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:15 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 27/36] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Date: Mon, 3 Aug 2020 04:11:23 +0100 Message-Id: <20200803031132.1427063-28-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org wcn36xx_smd_config_bss_v0() and wcn36xx_smd_config_bss_v1() have been designed to operate in standalone fashion. As a result we can drop the dead code now present in wcn36xx_smd_config_bss() and happily remove one kzalloc from the BSS config path as we do so. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 39 ++++---------------------- 1 file changed, 5 insertions(+), 34 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 033afe52dd9c..1eb13765e1f2 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1676,42 +1676,15 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, const u8 *bssid, bool update) { - struct wcn36xx_hal_config_bss_req_msg *msg; - struct wcn36xx_hal_config_bss_params *bss; - struct wcn36xx_hal_config_sta_params *sta_params; int ret; mutex_lock(&wcn->hal_mutex); - msg = kzalloc(sizeof(*msg), GFP_KERNEL); - if (!msg) { - ret = -ENOMEM; - goto out; - } - INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ); - - bss = &msg->bss_params; - sta_params = &bss->sta; - - wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss); - wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); - - wcn36xx_dbg(WCN36XX_DBG_HAL, - "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n", - bss->bssid, bss->self_mac_addr, bss->bss_type, - bss->oper_mode, bss->nw_type); - wcn36xx_dbg(WCN36XX_DBG_HAL, - "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n", - sta_params->bssid, sta_params->action, - sta_params->sta_index, sta_params->bssid_index, - sta_params->aid, sta_params->type, - sta_params->mac); - - if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { + if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update); - } else { + else ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update); - } + if (ret) { wcn36xx_err("Sending hal_config_bss failed\n"); goto out; @@ -1721,12 +1694,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, sta, wcn->hal_buf, wcn->hal_rsp_len); - if (ret) { + if (ret) wcn36xx_err("hal_config_bss response failed err=%d\n", ret); - goto out; - } + out: - kfree(msg); mutex_unlock(&wcn->hal_mutex); return ret; } From patchwork Mon Aug 3 03:11:24 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: 247326 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860711ilo; Sun, 2 Aug 2020 20:11:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxApwuBqthv1AIdX9fTUPVtSuP93o3D5Lg0imUNHeDiL+AXdGQohpp1XiHVZwtcs3Z67mTc X-Received: by 2002:a05:6402:1c88:: with SMTP id cy8mr14132410edb.24.1596424280565; Sun, 02 Aug 2020 20:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424280; cv=none; d=google.com; s=arc-20160816; b=iJn8kBpHqQWLtTPPecOsoRd4GCE0AmbuNEUhiHqZw8iIEQkkJZ08wq57pEmdlbp/Y+ X4hs22g7xPpoaUJqtng32aGOIk2Sgnpit8KdPP0g5b9YOyvoblsrcFQIeHrZeyAEOJlQ QlD2FuliF/+nkLqWWFcrgTfxTPtGM4UmA52+c46reRyFRZxHh0FBE2OSKt6qz+jSUr4n baxK9S2F8Ux/Ptg/kzTHz9jdqmK6SU5CHl8lsDh+/tel1kSVRKyprxH7M0KSeE8ufkCj rKSJTnofqFNngr7lKSvXI+f9Zx4+EyV9JlYyUU/wWF4v58npeHYX6MzVVd1aPwEQI8TH /SRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f/x0eExpVICVKXEktjj0SGBU1wjl5TjsRllYZDRNbK8=; b=BIMW21dF3Hnxjs5nwgAseSgwxVVxVHwnFo6c/7YJNy9oeBOEwU0OL9NajrDj2PbuC2 dWZUOlj72CJPoo4ufAllaTSDngzH0Jpc0AIB4IrC72rtw1669ra8220G/2f3QpdQS+e9 jP3QLvyIgZcuwjkVXyC65SZJGLX6uc7RywAd9MiPez2FIcxPzpzGZb9+phQOLps93+Lv C4xDNRsLmQtiHBXymK3PM5JbeDCBKUHrRSyFp5TV0wEamd/D8duM/6S4kIK7+mtOFSSV JYvfVdnha+Ijt0brZUmO64TQPTBKpYbdRkqv4ZbZ845DRAUznhqSKUCTo9ZW4/iS27Sq YBnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=laCKwgH9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.20; Sun, 02 Aug 2020 20:11:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=laCKwgH9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbgHCDLT (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbgHCDLS (ORCPT ); Sun, 2 Aug 2020 23:11:18 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D130FC06174A for ; Sun, 2 Aug 2020 20:11:17 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id f18so10196039wmc.0 for ; Sun, 02 Aug 2020 20:11:17 -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=f/x0eExpVICVKXEktjj0SGBU1wjl5TjsRllYZDRNbK8=; b=laCKwgH931UpB6FaFWchH4vSzf5kAW/zaUI6nNweH62neq5EF3MYKPUJfQURyvf3Mi t8HyLhj6DErxSLI1eaAybNSb6ziIgVw4eMj3B+8N86Dz45Xn2L/5FkvfOrIL13hzqdsf qZddPGbw9JCPguNBhZVwLt/V+Oj6BOXNHtCe+YXecmE6LoydnvMmeXaLA4CI+8gkQk0b s/s6guDsLVEuMbtpap7qb7ZiYcwozsOk5vcIw1CheBztrFcusvuB1rfGJfN8ETnbiNXP 8sHITTDOQ5hnxf70yKq5qmwoDyNCO0w2Mk5LlEvC4o2NO65DLKE4lAeDImYu0aBDoUjM OEOA== 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=f/x0eExpVICVKXEktjj0SGBU1wjl5TjsRllYZDRNbK8=; b=jG0vKLCyu6iy/QGjJcusQjL1TXTFh1T3du2P3aFFojwrihDKEymNKnGBDi9EAHefLL vBw3I3gF1s93U3PSYjuC7n/pnbQLVwOZlM/kSYIyE9AX7QmMV8y91VLZOLJDgNV1aI9L 7fj3yCykmzPVkqodi6rJgwokOLIItTy8nZq9T8aChkkFs9Qy4JmSrU9JUaq4l+TNyDmP IOyqzI63LlIwAJv9uDdp42PJ7dFFNLRqcZIqdlCCitWDuAVfjGm/oINAsaxDOv4qlZRG tAKia/AtLF5bjEFKs6vIJPXQHbElRotj0G3Ype/Sp67vWXYYoEknpT8p0UBIa4kIn+fC mh8A== X-Gm-Message-State: AOAM5333j2Nnl0d3UXHvuZ/QBNcjVexxXH3WfcxlT3O1DXK6A/HptYpW +PsBv+q1gAQke5p/+xH6SY3PEg== X-Received: by 2002:a7b:c14a:: with SMTP id z10mr12997055wmi.63.1596424276604; Sun, 02 Aug 2020 20:11:16 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:16 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 28/36] wcn36xx: Latch VHT specific BSS parameters to firmware Date: Mon, 3 Aug 2020 04:11:24 +0100 Message-Id: <20200803031132.1427063-29-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit makes use of wcn36xx_smd_set_bss_vht_params() to extract VHT parameters from the 80211_sta structure and latch appropriate bits in the bss_params_v1 structure for transmission to the wcnss firmware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 1eb13765e1f2..cedf4391a69a 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1569,6 +1569,8 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, bss->tx_mgmt_power = bss_v0.tx_mgmt_power; bss->max_tx_power = bss_v0.max_tx_power; + wcn36xx_smd_set_bss_vht_params(vif, sta_80211, bss); + PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); wcn36xx_dbg(WCN36XX_DBG_HAL, From patchwork Mon Aug 3 03:11:25 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: 247336 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861418ilo; Sun, 2 Aug 2020 20:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9K9TgpaZuFz1p59MTC48ar4jIzp/fqy7d6wzlp8hmBlJTv/Qg0s50zYdBfPRYwwEnHe1n X-Received: by 2002:ac8:776b:: with SMTP id h11mr14297221qtu.59.1596424286023; Sun, 02 Aug 2020 20:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424286; cv=none; d=google.com; s=arc-20160816; b=lqNGHzwqfWvYSuMM7b14eX+cle7yFalgfWicjl57tpRvQ2k1gHKrP0hBH/pRLUeffC jHxP2UHVoHsclYAFm9WAXaGl+gJ1EH67gagAR95ggETtd2yTe85Vokc3OfHRWQz7RcJe boPn5g7bBGjhob0n77DxFjtf8ZVvQEThiCOQ6DB6W5HuJ7SYyCWNavI9wpyuBc0SeSVl 7Oy3By/RB3wcqKSl5coWC+CdPxTJ+oWjNZz9hkvt4JVhs1jrXi2p/bmE0A8ZAzf9QawU LRx3A8ghd4+u5Y0llMCr6KgYhaiqgrpuIwd9bMfPSXnTefyKZWH0arNNNg+14b19kfHH QEqg== 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=Ee/pbgHB/ogob+V/+QC6BRAtjU4LyaeuMyGvWDWgEgc=; b=aEka0PsGEDDywn2Wkr/mFZZRmK3fYB0GYGfu0TB9hCgfpl52T7GcW1s6ibtPQTBi4B 1/m7D5/hSk0D7k1iRZg1enjKY0DAd+D2c0Jb3ddeFwztUyiQlijs0C4K62VE3XzQn0Ag Pfg56GWRBxwetDoTX2Aqail05rAY9X2YEC5LiWgiL7fyY14nVmEwH09ltKHeRarEMhmY aQ541Tsu8HP1MhDB+gS34wOHhrhjygWVb8g3/RVfAFCOj7KXGuhn/SJMWay6ZI3+sdvs h0Dn+Ath2tRIsvqV58YXkldt54L3VMx+gZBZIiw/0NvGVzdtHUV+bWqES4a8CkwkgYaM OxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="fR/fYRJp"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YSnZELLi; 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 w9si8442551qvz.81.2020.08.02.20.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:26 -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="fR/fYRJp"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YSnZELLi; 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=Ee/pbgHB/ogob+V/+QC6BRAtjU4LyaeuMyGvWDWgEgc=; b=fR/fYRJpJC2tN9W6N2WJqyNlX JTCxBDbVRYSHO9JuqdawJTZhkGU9W6uaeW19Wg8IimIYEcZ0HUtxI67Q8EkQPNRvLmHSL7U3FBJ0e n1gG0ycWwGY/AhwxWUk0i+uEUW/Y5Y/7wypa3dHr4McAgXtdo5dk+CP7vcKNTg3hWe4M3N/wt9baQ nYpXkH36aLaMlB7vrB3gL3SYZI6nmuv29+vmBUydglF+tpTQBu9G/JmfZvSisN9qQwPfopc8E5ogb 8C8TGtITCW5Ac/u5zdNmWo0feTgup5iGkbmN6TQTAdQCIW86QMP/LAXoMcFfnoRU0n3JfflHeEWTg 8q+hsKd2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsk-0002kx-KB; Mon, 03 Aug 2020 03:11:22 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsg-0002gu-Ie for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:19 +0000 Received: by mail-wm1-x341.google.com with SMTP id f18so10196055wmc.0 for ; Sun, 02 Aug 2020 20:11:18 -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=r9KmogYdjeDiArvHcPSK2BD1IBaC6ai9UQ+vtopjnEI=; b=YSnZELLiIpi4yphEV/LAs0Pr6WBG1CQBwIPnYh0gs1vqPCb0EkmXaCKqDS3ZCidx7C TwPjFCi8ts0mYmld8V+IHdpj29ab9RFXjt4sU8/AkjjXlE4O2ib3Sfg5gEkwTsj9uSsi Bfsb7P1EDcexR25z3Nka8o70Pp+1K2HHmU1nIfDQ7rvySz/mSBiydk4f93Wbd1xwjPVz +gIWPGC9tENEYFyrv8aXdAPBV9JpOA2Z9/43qSZaPLFyeSDNwb16KPVExmS0oc7X8czS Df6/sMx+ds6wgSdGW5xxgI/YqBlPe6e8IxD675T5r5oxXbOJZyTQe/k9F8imFum0j/xN WaqA== 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=r9KmogYdjeDiArvHcPSK2BD1IBaC6ai9UQ+vtopjnEI=; b=JTj6creXhrDKv1WsYVjwetOlmyS9l8YZqJl3vSPMJAEwo10fKNSUqfDkvZFH5kP5Km zrEXt0RK29nr867OGeKvuyyjCgeWpn8gfhzv+ffKDAaQ8holDZQaNTdvm75HkaDX/sMc kJY7qyuVxJIS/XTaK8P03OtE3/AdaLTQa335iWGmIMyY+7Kn+gduaVxC/FgO5joS7L4c 8sqZ1NBeNlh0oKGSZZJgkGLzxbP0f7rhh+oZMOTqWIzYcGZfX+CS+O5MBYqL6dzo/S0v PmAnOZzEt3LLJP9FFf8ss8Rx8MjsFrZM0b2Uh1/V69uzKfU34LjdbyqR7nBQ/xneTpk4 89MA== X-Gm-Message-State: AOAM532zIEMpv/uKAfsywXLjr7X/uDX1FUsbQVOBpjrBg+piSkWLcwnL 77t1LDYtIlY3P+z6bCoCU0WG5Q== X-Received: by 2002:a1c:7e12:: with SMTP id z18mr2703516wmc.188.1596424277597; Sun, 02 Aug 2020 20:11:17 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:17 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 29/36] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Mon, 3 Aug 2020 04:11:25 +0100 Message-Id: <20200803031132.1427063-30-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231118_696728_053CC421 X-CRM114-Status: GOOD ( 12.03 ) 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:341 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Adds HW_VALUE_CHANNEL(hw_value) an access macro that will be used to extract the channel number from struct ieee80211_channel->hw_value in preparation for also storing PHY settings for 802.11ac in the upper bits of hw_value. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 18ccc6c31a38..ae8bda76d573 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,7 +83,9 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; -#define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value) +#define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) +#define WCN36XX_HW_CHANNEL(__wcn)\ + HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) #define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band) #define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq) #define WCN36XX_LISTEN_INTERVAL(__wcn) (__wcn->hw->conf.listen_interval) From patchwork Mon Aug 3 03:11:26 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: 247342 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861623ilo; Sun, 2 Aug 2020 20:13:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5L4J0GUoKpKPIdMZ45havO7a/mcejSSJ4pcUIZ3NVfGTDsCpwNz/Vip5MwSaTKEHCb91b X-Received: by 2002:aa7:cf06:: with SMTP id a6mr14410207edy.293.1596424283056; Sun, 02 Aug 2020 20:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424283; cv=none; d=google.com; s=arc-20160816; b=T5SHRIjIOw7arrW+WNP6+S1zA1yztTvDLlUSGOsb4E2zuhWUwpbbBe6oYVn3ZQ1OSk RYWPMMb6AcBPqBnHB05qZW3Q904x1Kn6NYjsz7FklYKjC/WOj/zQW5dYuO98RV/5T+M2 7hg3rc7fg2Cguv2ObuI77H9dcR7EyRUYbRPQkcMYGPW+Cr+ZertRZbfkDd0UQuAnd1dD DbyUvJMhFgCAtySGXqT3bPbK6MjkU4B9knZAEjK8BRBcDbZqM/Vgdko3jRh6Ebjsp27p Qc4GikUhU+76Q7Jkd+vIBYLwtHvLiFn8waY/6ACvOaso0ORX1tZyfIyKGf/DWZ5Da4Xx LVFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y0MUmRNnfJhqzV4htTrjwxN3KiW8rf6W51Q4u6sP/f4=; b=y56s8yZsaUNSMTCV5ZXsoj8Lr9dqnLXBOdlQiN0eTthfH1NiOotQBXLrkh5oqGzf2o 9tobpsRFG2x3WeZwM3DnJJ7QgZw/L8zQYSTUO0XyuHU03kYNeDm++qy9K0ZKD8FSMk+5 ReJrMtRabHXIEIWBC78qH1CjvhSzEuP9T79wIBdrU/wWffE2RnzAgTYvYDOLYZRBFW7o ne4wm2FGnyoC3l8v4UU9EekEAh+UdBi+iY/QJ+KbhDIk6McJ4wkGE+kGCbwWnoKOwXIk IiYBIy70wjoF6ljZiZjb3f9VXzI2HuKW6GT4zy/TJwQpU0nTNo9stEuz4aQ5x3aQpjFo Ybxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yJSC1Hm+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.22; Sun, 02 Aug 2020 20:11:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yJSC1Hm+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727887AbgHCDLV (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbgHCDLU (ORCPT ); Sun, 2 Aug 2020 23:11:20 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC966C06174A for ; Sun, 2 Aug 2020 20:11:19 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f18so32795330wrs.0 for ; Sun, 02 Aug 2020 20:11:19 -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=Y0MUmRNnfJhqzV4htTrjwxN3KiW8rf6W51Q4u6sP/f4=; b=yJSC1Hm+ZkvCnyrpM0d1nYzEQ1c381CKbRUyCPL07S5o4w06eRWjHCCfBkZwFivB0A WGrlIU99UHW+viSdK2N5xqXWQqZf2tVsCK/uwQUaHc970LvJZ9fE4M6OY4dUMgf05SzL kj+EwyZtpIOaV+1TvLce46xV4HproflPrfT3GrnblyYgkDhMLJUMD71GGmgAsOONu1aV rwLEpRcXnBC6kMRmTa/CT6KRvENNZDUwQHJwdmJS8PvBEPVJqVq7RZrPcpT5LaEkfdYc tQ7Kllwrlrh8thpoPr+9bGV7kKKyx41vAS3tH5xkEjZweDsr0svgXmJBxmZDx5MkVULr w3/Q== 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=Y0MUmRNnfJhqzV4htTrjwxN3KiW8rf6W51Q4u6sP/f4=; b=WuF52VY2/kvqDDvRHVTtyDT7MST++GEz7a8HAErlxWHmTbQ5QDwIyYIC7FbuUNvx81 ZCL9w+8tIZW23eo+fT757FQPCoStGDEmrYwdUYOWM3O4mDPwsIRxmkVLHOZU8XM40RkN BSviJcuAPNkRnBKDGi0NZg0aAgKlNrVTnPWtuBgCvKfT3GOj8VVs1jdnPuF6FwynZ8KE eOShWGsf6zwzVtGbBa1i1uZ7//hBIYYFyYbttm/kcCsUdpLGHVkHMIw1bk4pnI52wDyf eJXwVlbvbtRAZvR+osxn+Xh7S/3GBDm2Y8bx1wAB82fy1CsBcdjhQo0djkbTYHIGv9wM aVZQ== X-Gm-Message-State: AOAM530ywgpT54hhIyhR0tuH3DgZaUa5OEr9h9Pmni86ASt0WFfyd/KH XqQ8LVHHck9Npmr6DANzLYGGTw== X-Received: by 2002:a5d:40cf:: with SMTP id b15mr12845030wrq.319.1596424278690; Sun, 02 Aug 2020 20:11:18 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:18 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 30/36] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Mon, 3 Aug 2020 04:11:26 +0100 Message-Id: <20200803031132.1427063-31-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index cedf4391a69a..9a7e6f96f0b6 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -758,8 +758,10 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, msg_body->num_channel = min_t(u8, req->n_channels, sizeof(msg_body->channels)); - for (i = 0; i < msg_body->num_channel; i++) - msg_body->channels[i] = req->channels[i]->hw_value; + for (i = 0; i < msg_body->num_channel; i++) { + msg_body->channels[i] = + HW_VALUE_CHANNEL(req->channels[i]->hw_value); + } msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; From patchwork Mon Aug 3 03:11:27 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: 247328 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860754ilo; Sun, 2 Aug 2020 20:11:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXGNLhB5LZNn2OaYrfJu9HflCsCPSksPWqCGby3tOooyzG0cmfSHHDTbBPs3Fi37TrIh6A X-Received: by 2002:a17:906:8d8:: with SMTP id o24mr3604189eje.384.1596424285474; Sun, 02 Aug 2020 20:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424285; cv=none; d=google.com; s=arc-20160816; b=UI7UASnhYwhEgOL36d8JZ4hgJL/risLA4I8fzmr/F33UA51xwU92MVpKme56FSEeIw FL9btyIhyWO0ibRIPKwqTJ9AjkoIpeJZ2I3XZXYfiZO8hEi21MRUFmUPiY06qmvLO/2s fxGWViCmfrPDAzY0Jw9A5IvOZOnC1E+4IHbOh3WafITQz3eKkPUkpF8wGTnaGJXjDoih j7YDPth3AihrtUAVeP1VkNVeEBtDIvxNu33YUam2l9elmMrwT4sbQSj20IJI/N9wso91 H1SFp3YojQtg0vIsx2Enyd25KW9fnVCflydfM2muXLb3YcucJTXJwm/QROcbSuTZ0HLA nr9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=rgtJPqBVHgnMoS0YhIYbD1FuQX24wEFJkfXLvnNFOZVRFXrrQr/hsYzRDcSm9bH7d4 +d67xoPYT47scltiQgBI7siLmb+MCYzLPsuoIu6zEVWR6pz/uOX4NOVZ7a3dlIdPjViC 76P+t7U2kRVzjq24pxZ9vn2a7Gpq3HfDqgyBJ0G2zDYkWmy8i92vmDDkhSyL1tqXg1KR luie7/x+M1vEB/Coae3qurtNpw04ScpUvnDUMjFFbOWgLqEJDlMXT6zcpiZv4F9vzwla Ah85g9fTJQqLsl5keyR14apUUd+P9YUc3WEuCGQ56IHHbi7N9Q6QDSoIv561IqAXkVtI a2Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KCazHJ0K; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.25; Sun, 02 Aug 2020 20:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KCazHJ0K; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgHCDLW (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgHCDLV (ORCPT ); Sun, 2 Aug 2020 23:11:21 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D42C061756 for ; Sun, 2 Aug 2020 20:11:20 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id d190so13001733wmd.4 for ; Sun, 02 Aug 2020 20:11:20 -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=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=KCazHJ0KESxu5Qe7sbtrF/XremK3VUToyVi0LwfpMO8oDZxM7fGX07Bcm4cSryBKdB slWxCeM99yTSQeq6/IBelaCC6JwQqBorw/13GflONbMLhKkOi98jlSXgHyE+nmG7N/xd kXuY3c39iP2nTHVCjRDcQTK/4OHWlI6ZhK3dLVNRboI7VGN2hoFro2hy27PuogjFPDbp 96lDOzlO0FfmERbTJI/b21FcZjoJUfhcMthqSH9vcc28L7rGd07We6WA3B5SOCbQWNwQ MpyQO81SH1uLA/9o0JKPxVgzlauxid9nZN2rP4OEJBsbON2ZXFKSIRndQqfoonYcclfb X8wA== 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=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=GJiZET+bPsamjqwY4ZMZCU6YiGk5mtj95JiGsqAEsZSaRvk44aeb0BPdK1u33vZRw7 sgUlZKDSlPCS+aQBiqU+zpZ5rm5lX8fVf6MbYTjqoIDXjQR/xWYKSZohX0Nilz0TGeRb Cr7oOOnysikaL59v6OHkM7koJ3PfPa6xcUEUQeBJDVQ/BsWE96FWeBwsXQMwZie75qjH 0Yehfu2TYURy9/bMKZiSgyJ4Y9pS4CONrbqPF/tYcAEMkx5khx66cujd+VNmHCn3vDE3 rt0SUnkvVkTh+wrfwXjNA3kq3FdKvWmOeKAQxS9uCtX0E+NkWqAnBGRNlMCglyBjc6gV hGPQ== X-Gm-Message-State: AOAM532n9cWktaqMc5JZ37GslrdOK0zkYeGStwRTznyC6/voEQBJ8R4g UfAdGW7PdkAgK7X9HTCJDXTUVVyNzgw= X-Received: by 2002:a1c:9d53:: with SMTP id g80mr13692876wme.70.1596424279680; Sun, 02 Aug 2020 20:11:19 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:19 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 31/36] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Mon, 3 Aug 2020 04:11:27 +0100 Message-Id: <20200803031132.1427063-32-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Adds HW_VALUE_PHY(hw_value) an access macro that will be used to extract a hardware specific PHY setting for a given channel. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index ae8bda76d573..38d68161d9fd 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,6 +83,8 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; +#define HW_VALUE_PHY_SHIFT 8 +#define HW_VALUE_PHY(hw_value) ((hw_value) >> HW_VALUE_PHY_SHIFT) #define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) #define WCN36XX_HW_CHANNEL(__wcn)\ HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) From patchwork Mon Aug 3 03:11:28 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: 247341 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861574ilo; Sun, 2 Aug 2020 20:13:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg2uKVIZL5hAVcANXO/BQ/FHfiOR9ovUiaUU3/XtNZwQQc8jp2BPyW6SlSMjlKoBTsa7ON X-Received: by 2002:ae9:e506:: with SMTP id w6mr14193033qkf.376.1596424289387; Sun, 02 Aug 2020 20:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424289; cv=none; d=google.com; s=arc-20160816; b=IuIRWQmvCgnZvw1lEk2IAvT4Foef2mrHdC/yffSLS/hUDicfBZYCfHFLD/ZoPBVjrU obc+h1C/xyB6xkuqazHoI0ZnSX0oqZ2UsvZL0U+NAdrDljWuRx/aVbM1Zbe/JbtERwC8 Q/qPAXjvA3UsU4Cxt4B7/IBVeucgO4C83owo8Nvx+SggUsAdoNhlixNdvgoeUSV51JKz F6NBEMtEXfzt8KETtlNIpYF+403k/9c7EsVDn/a1A6tXb/VG27XBGmTQ/0NIoZN7ngnl GTRb2UizhWoHTU+11lWulPQYBVavu+NKhT7phMWTegHsz/yCvODlVv47gU3G8PTQrVTR FSZA== 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=LBD3CPfNApb2Q7dWT3pAK3aOsKAhfKfS8FiTaOKRTZE=; b=TxVnF4UO9SANCpp0eM7Om2KXlg0NPOq06S+E0fzPgj4zZ9wPo98hmlQP26Qe/4j6Z1 flsQgOeQ5NZEkrUa4bzm9VqcasMejk8rVVl156ndl4ixh/7Jgm5OIf7WmuWuhJCBI6JI A3eqRIjdJiswXDDar4BJFBJ9lJYpTHjDGbjW0ccJfJCF5YcS1hWP4/dmQXLC6mDYaqlU //PHj//wfr/WB4U2QXOVmJmLLKalBtAAb45DSn+2ofV8Gq13h0JTIDOvsUT0a3Rc8TdN c2M6KMIggZciEW5yW+eag+GGHtxphBdL0/2Jz2+4rD34aDBMa8avoPc3GBwTlYFPRcdn DO/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=RCpFwc2V; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KBUtOVWl; 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 b24si8844854qtq.79.2020.08.02.20.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:29 -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=RCpFwc2V; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KBUtOVWl; 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=LBD3CPfNApb2Q7dWT3pAK3aOsKAhfKfS8FiTaOKRTZE=; b=RCpFwc2Vcj6/01LFnJM9uwkbA qxb1rP1Hr1KVSTEDCzPB7jKrSGMA9WmvTvmIisaq6xGj2QV7TdU/SkDBFWBjo1AcaKZ59ilynlN/l tT/ZPWLKYXO/q4z6tPseHfu+sRKpMRwvIrvXeKQn7qRAqj7vnYZT9Yu7A+R1gYaXQeSpXIwvojkP/ bcEe4/kDpEV5xcmJmPH+ZcwJLoDr3lHFlq+A3/rJ6bfH8U2rIXd+LJJdl9JsXFT2zFzyKeJPevw3P 5plePYGwTIHazAMFO0p/YBIAPE4nKy26G561DFN5ZUWN+BnA8td4skMTOF2yUItLzeKSl8OfZjFa3 0fp/Cr+7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsn-0002nT-Q3; Mon, 03 Aug 2020 03:11:25 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsj-0002jQ-Fp for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:22 +0000 Received: by mail-wm1-x341.google.com with SMTP id 184so14106830wmb.0 for ; Sun, 02 Aug 2020 20:11:21 -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=3Gog2znRpiQy6wPYsGUf9FYxk4e4/BYWwYaxty3ALVY=; b=KBUtOVWlteyuIsDzEt/d/MDfs/AKw1OQQlOaJ603BNQ4XExsJ40qfKSDUalWCA8QGH ktKso7OCM/X/NMbglI9KbLOCvObqAF7BEyJ/QvaRcsM0S+EgpxJOq3CCsoXbxOrgjWd0 l6dUtNbQVY44R23UmT53MF18EIWh8AinVH6+01DDSc2XrOl7nUHuK3xi6ie1xNzBpe6A /lc9hnmbDxPc7tpVn0/1BTDS3NaN3gL3+T2UJIxBcHjbtr8XIJIfL9kDOkPAXxJkfn4F d826u9coUlrTs/7IXbYI8Tv4LGc77DX41LaZE+NAMMFXyHkBTUdlzfE2NmkrTtsmANvv OKfA== 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=3Gog2znRpiQy6wPYsGUf9FYxk4e4/BYWwYaxty3ALVY=; b=FT4Fso+43hpUq/+IBhX8bcly7Fmr5oz6klt4qAMemCnwwqAigY5do4UipMu3jgvm1/ 6KSsdihBz1QkIohVTp1uFGboLOclGM6heJDLmQkfOiVvhMFteOnFMuhsBEw+Y9JEYYHY cbQqbrrdqUtS6ziIAocqFYFzJ+wEq1U4WD1+zzP0l0yelfR/YQz6iL15zc02SY50ndJd 2JwmKJFE7VlkOV5O0eJbTWXOWJTlCPUtUj7MiDXl2f4A8E76697YI8Pu6+motgWwaTT8 USFVPlSlADCCWQOhXF38Q9uRBA8fga3zuj9nxeZV25ywtA09uAiMKyvSA0WehYXec5gr YXdA== X-Gm-Message-State: AOAM530a0X6T/+ZXXmRRndOiLxdlVbuzUvRmV33CZ/f9UJQurzzJYJ/e cXl5SEmkTa4Q1ecoQcJGfXK/SA== X-Received: by 2002:a05:600c:2904:: with SMTP id i4mr13255240wmd.126.1596424280597; Sun, 02 Aug 2020 20:11:20 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:20 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 32/36] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Mon, 3 Aug 2020 04:11:28 +0100 Message-Id: <20200803031132.1427063-33-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231121_614446_0729E4E0 X-CRM114-Status: GOOD ( 12.66 ) 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:341 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit encodes the 802.11ac PHY mode for a given channel in the upper bits of the hw_value field. This allows for a neat read-out and application of the relevant PHY setting. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 6a85bb699d10..c96ae33a80d5 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -39,10 +39,10 @@ MODULE_PARM_DESC(debug_mask, "Debugging mask"); .max_power = 25, \ } -#define CHAN5G(_freq, _idx) { \ +#define CHAN5G(_freq, _idx, _phy_val) { \ .band = NL80211_BAND_5GHZ, \ .center_freq = (_freq), \ - .hw_value = (_idx), \ + .hw_value = (_phy_val) << HW_VALUE_PHY_SHIFT | HW_VALUE_CHANNEL(_idx), \ .max_power = 25, \ } @@ -67,29 +67,29 @@ static struct ieee80211_channel wcn_2ghz_channels[] = { }; static struct ieee80211_channel wcn_5ghz_channels[] = { - CHAN5G(5180, 36), - CHAN5G(5200, 40), - CHAN5G(5220, 44), - CHAN5G(5240, 48), - CHAN5G(5260, 52), - CHAN5G(5280, 56), - CHAN5G(5300, 60), - CHAN5G(5320, 64), - CHAN5G(5500, 100), - CHAN5G(5520, 104), - CHAN5G(5540, 108), - CHAN5G(5560, 112), - CHAN5G(5580, 116), - CHAN5G(5600, 120), - CHAN5G(5620, 124), - CHAN5G(5640, 128), - CHAN5G(5660, 132), - CHAN5G(5700, 140), - CHAN5G(5745, 149), - CHAN5G(5765, 153), - CHAN5G(5785, 157), - CHAN5G(5805, 161), - CHAN5G(5825, 165) + CHAN5G(5180, 36, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5200, 40, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5220, 44, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5240, 48, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5260, 52, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5280, 56, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5300, 60, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5320, 64, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5500, 100, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5520, 104, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5540, 108, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5560, 112, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5580, 116, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5600, 120, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5620, 124, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5640, 128, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5660, 132, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5700, 140, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5745, 149, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5765, 153, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5785, 157, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5805, 161, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5825, 165, 0) }; #define RATE(_bitrate, _hw_rate, _flags) { \ From patchwork Mon Aug 3 03:11:29 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: 247338 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861428ilo; Sun, 2 Aug 2020 20:12:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWSuuHwrzwo3RV9j3k/yK5fNUqWNxNVb9XqYkm75697gdRkhsM7hdVWGrz+VvvFhgRoHi4 X-Received: by 2002:a17:906:23e9:: with SMTP id j9mr14233573ejg.107.1596424292264; Sun, 02 Aug 2020 20:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424292; cv=none; d=google.com; s=arc-20160816; b=cw0jzcXVjh109Z3KKOYsexWx3VDoopj7P27Xkj7Wp7HBxgGWYmPVbtN6uStiR4mLx6 xbAYSr9nUPyUAMRM7vVDWV6rNbom9Mp+Ye/qTrU9y/RpjWKKTyIluxwot35FlFttxmBs 9GJMkIxDMB6cnXZCJiIh3wClRY0GG8G7YR0+tIN9F7YFGgr6L/K+joy3r1rs4NDMKViE hSMaz93aukTSyCzeIh67t7IuxpQNyd49AgtXFZt/FDAi+WdPeGhydKUTveRGUZETg4EZ kfYSaBYx0DGyBZgWDFV2S97UTrTamSaq5xlr/mYiNKmwjfh2UCvifVMLA9qzpxK8zQpT YrpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bjS/i84B6ZPWvX9FfR+k97So50sjazJcZS53gCPXCDQ=; b=0+G7nrVYx71V9PnctgXhZQinNOVWBbQ6+L+aQ2vO49L7eIfxJw/0IsJgyMDxuzEgrd ieZPA2K7HJRincaBd9MxWHZdvSDWE45y9dXaABNvMS/H4wT2PqVEEQtlg+LOEY8LHKYo AvkcKt87dplYu+b2WQWRcU2T4hWO3Bd4eJ7G73aCOEFHmYsWNC3BtBKmH1+HfYRaBTZf 5MWfKc9HPrT/F63T8jAkZlSFmcM70zZ1c2HH5YWHW0GJkuDtgGedKfgsGJihFILjxLT0 hyMCKkpLHxRryf67SMIYepYMWZhU1dUbes4ezzpLAvvm2cxyNcced1BIkgWknWwdVUN0 0MtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TrwaFydT; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si9440020edv.165.2020.08.02.20.11.32; Sun, 02 Aug 2020 20:11:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TrwaFydT; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727933AbgHCDLb (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgHCDLX (ORCPT ); Sun, 2 Aug 2020 23:11:23 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A94C06174A for ; Sun, 2 Aug 2020 20:11:22 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id a15so32764232wrh.10 for ; Sun, 02 Aug 2020 20:11:22 -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=bjS/i84B6ZPWvX9FfR+k97So50sjazJcZS53gCPXCDQ=; b=TrwaFydTgwuNUGglRyHoaXlS2rlOPAyEUpd0gn/m4RgMYqZ8r0QgcMVug/fVoFM1dX TNQj0y4qsMCVhl3xuIk20SrLPK/i6RC3IfG0+/4VhsAJO0eEFs44klu7/VZo97flHz6/ ymZDR+1By1n8Lrv6VO5c8aBfeCUDk+Qu4fY6u816UK4ynK4oXDZ6UBneovMhaDB5MFDQ rSAyl0V+PTb/j1i9hE0eX1akkaAL8QrPN/zYqfvS7bA+J9SbyqkS8xUMMOorbtTjGxw4 Qbzw+iJc8sm0Jihqck6TGAfXUAmOndgPHWvn6uvecVCcaerD3ryPv11ttyf8WPBYa6w7 iK8w== 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=bjS/i84B6ZPWvX9FfR+k97So50sjazJcZS53gCPXCDQ=; b=jQDpncxs//hs2mKR3jcf0DDD4CcQG5geRL8L6wUMdEzp7bdOKuQHbTWQHjyIwMv7nK cPyhjXPmkZbi42ZmfbGzTl8mKhRRFYak+ffFJIfm2H5h3huw8iJZD77D81cyDL7HEfSv eFcpQ1O0Za00Ed8xbPQb5TXJo4b5ozHp/u3m1Z+eu1VUPCv/Ub3xIJnYKV9jx7kBB1Uh tsPXEfHuCo++VRZknZpnizt1GXrgj+A9HfijU00fQDnsp8VPQP4uQt5BQBDTkijh4dQk uyv7Z1kDxxef3rF6gVPnPaa3/aWbhLT5EVue0zZHIU9dNXa5clU2s9Q/d8z/yOmKTzw2 hSWQ== X-Gm-Message-State: AOAM532RERktX/DXRBO07KNJsKMMX75jImNvNBXwIZs99Vsbwv7xsmng irU2w8aAEnkCrXlQ5VCd8BkUaQ== X-Received: by 2002:a5d:5446:: with SMTP id w6mr12836617wrv.127.1596424281602; Sun, 02 Aug 2020 20:11:21 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:21 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 33/36] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Mon, 3 Aug 2020 04:11:29 +0100 Message-Id: <20200803031132.1427063-34-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 9a7e6f96f0b6..527da56a1386 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1487,6 +1487,7 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct wcn36xx_hal_config_bss_params_v1 *bss; struct wcn36xx_hal_config_bss_params bss_v0; struct wcn36xx_hal_config_sta_params_v1 *sta; + struct cfg80211_chan_def *chandef; int ret; msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); @@ -1529,7 +1530,13 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, bss->dtim_period = bss_v0.dtim_period; bss->tx_channel_width_set = bss_v0.tx_channel_width_set; bss->oper_channel = bss_v0.oper_channel; - bss->ext_channel = bss_v0.ext_channel; + + if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) { + chandef = &wcn->hw->conf.chandef; + bss->ext_channel = HW_VALUE_PHY(chandef->chan->hw_value); + } else { + bss->ext_channel = bss_v0.ext_channel; + } bss->reserved = bss_v0.reserved; From patchwork Mon Aug 3 03:11:30 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: 247330 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860810ilo; Sun, 2 Aug 2020 20:11:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf3ITlhNn3vo8q3O3Ew4iEeEEcbhob7gRaEi0qQG7X+WK6L1WCUXkJj1kM4th/Ni93CzHl X-Received: by 2002:a05:6214:1709:: with SMTP id db9mr15133589qvb.142.1596424291447; Sun, 02 Aug 2020 20:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424291; cv=none; d=google.com; s=arc-20160816; b=pIH/wFcp4xaeG/jrJp7E+8qLWiUR9P9itdWeP1EuCff17hAA+AjIStUVaRxjvdWMFy 2M3jWkdIgiRfkqlfcqurev1WMD5ainOoTXcGaF3f5llISSvxsamdM6Vv3L+pOngGLicS IoPMDMQWWKs1+sIJcmN92OTG4Z8fzh5gwGChPxQMQ5syTxxb9XxvCi5BQV5OqoXw6gv/ Rd2IAWoiWshaaYpX/RzWo/cd3TuJmEZmoaJwWMN8ANXhcr3QVKH+WzuR5MrghIhab/ZI EbNllYOan1fc2Bjt7C//lQ665q+t35BJPFDfefz3XFrW9g7mEZ1T3wNHi7oh+Ho/EUcN 9bRw== 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=8qQsfzX6SUYQmZAnhYSZTOOmXx/Nva/0ntSAZNjJX1c=; b=bE7tbizgu3D2WgMzLLv7T3HCFYtUlJQNppgX77E3uujtd919a+GbnEueSeoK5/SRlk FiebhMAevPDnt9grDxCnHu8uZzTeXTD+5EmUhMJXG+1JVZLpRWeJjedxDzouYQG8pfaZ MfPYW2KD+/NAcb9FrQY12EifAOHXOMMeKPXsUlFUk6YeMlDiK5kGtLY7GLZZV9AgM8pE 2eYGoe1/Gh67qrVS1Gj0V30tL0jagFjRZfd+ifogbFweNZQgzB2gF13p4g0ArsQihDe8 DJLbgFojlqH12oURrDCAxzVm02b2IWjD2i+m/1+VuSiMNb0XyiGRDALAyC+ZC1aSaSZB HpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=MrnXLcIG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GXFccykc; 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 d5si10057886qtm.163.2020.08.02.20.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:31 -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=MrnXLcIG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GXFccykc; 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=8qQsfzX6SUYQmZAnhYSZTOOmXx/Nva/0ntSAZNjJX1c=; b=MrnXLcIGNT7baNnoVwXahg+Os NkpuOBRSNBNQFSsZLHPCjYOvD+ho7gRTx5ji9bEU3lqC+AqVzzx3kZMBhBJ6rg8dCeWhZYRvo0eyR 3V1U90qHwrStNtJfRgHNn8vDCqRLsP79XCyo+aLgSU2Vueq6IUvXfvbt9K1L7NbWZDCs53F3dNA/r JVf2Ytf7v5raQuxVe/Jd3JDhXw2Ii+0EP5IjpgcNWxlI07HV2pw6JZMRdfh8qLAn9iwDyaft9MTIi L0IA2DZ8ZADDBRMVUbdCehp3XnJqBm9pEKzNO2J/pvy46mjtIAY5xaZNY5DIlPl6AaN/aFBGXgjW+ o7Tc0os6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsq-0002pR-3Z; Mon, 03 Aug 2020 03:11:28 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsm-0002lM-1f for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:25 +0000 Received: by mail-wr1-x42b.google.com with SMTP id a5so22816377wrm.6 for ; Sun, 02 Aug 2020 20:11:23 -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=nI9SMi6ePF9rK/Ijds9YAMsR6E6CCi6sMz7MSQYkySc=; b=GXFccykcaGSjyE0f1HkfpEPr1zzZcb6ZzoxyUK7PIdyHldU5swpTe3HRcNZUHQRqeb glIiAQjzqYXI+XWrST0SQLCeaXHVJ+tCRsJEm5L9OzPzenCw7Wu0OaZC5PsgK8aMqJvL aUlaj3oPj1EvysvJ2+ZgdRoLt1OQxpRtc77aE69rw7A77usQKjQL2luZo4oDUHsTjxLs tHh4sbeThhIG3NvA/hNa4kk6hEm9wtw0qOZkkJo8BhZwwNhnJEnn9DmIxZi8Ionho0CO xJZrLITjduhPqTYEPxyyK1q5V2Lx5yfXw9Z9qDQGygtWucRopmVAQrnMpmAbOgYPUTkT fpSQ== 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=nI9SMi6ePF9rK/Ijds9YAMsR6E6CCi6sMz7MSQYkySc=; b=M+HSnXm+O1+HW71XFlBqqzOuFRnXgTF30BqLdG3Yjj84mN/ChT2Xa67qDVjPF54JVF JB9oDCS7U7OPD55C8YGO/k4TE1Rbf8QRMfY804cL38Uh9sYRnahfE1dUqK3itDBdWWyd VY7NItmQUr2bn3abkVEAg2c5H7YQpj/n2weJ3R+IOmoCNfoiAL7a9z/eSpA6N3FqavEZ W1ac168fy3eW+SEO1RYn4z8wEkt+Wpyz/z3LD7zXz6dy5s0lDJqsUMjg6t+tx6jD19j7 WH4b4KI1jlor7PAlux73RNJNIYlc7nZBThmG/vh20MKGHbbX/r4C6u5hkrDTST3xFbTo fYCA== X-Gm-Message-State: AOAM531+uBgGTByOShz5HXeAQdL5/DGq6eWHzgACsmWpED7lMqTTY/Dl k9OPtcH1Dr+1Q2hPy8AwDTSRpQ== X-Received: by 2002:adf:e68f:: with SMTP id r15mr12843713wrm.196.1596424282551; Sun, 02 Aug 2020 20:11:22 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:22 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 34/36] wcn36xx: Extend HAL param config list Date: Mon, 3 Aug 2020 04:11:30 +0100 Message-Id: <20200803031132.1427063-35-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231124_141999_31427C71 X-CRM114-Status: GOOD ( 11.26 ) X-Spam-Score: 0.6 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.6 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:42b 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_VALID Message has at least one valid DKIM or DK signature 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.8 UPPERCASE_50_75 message body is 50-75% uppercase 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org In order to get 802.11ac working the way we want, additional parameters need to be passed down to the firmware. This patch takes the full remaining set of parameters defined in the downstream riva/inc/wlan_hal_cfg.h and imports them into hal.h with some minor name length adjustments. This addition will allow us to pass a larger firmware configuration set later on. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 124 ++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 1 deletion(-) -- 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/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 10ce05110d11..35b72b1b9bbf 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -726,7 +726,129 @@ enum pe_stats_mask { #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104 -#define WCN36XX_HAL_CFG_MAX_PARAMS 105 +#define WCN36XX_HAL_CFG_ENABLE_NAT_KEEP_ALIVE_FILTER 105 +#define WCN36XX_HAL_CFG_ENABLE_SAP_OBSS_PROT 106 +#define WCN36XX_HAL_CFG_PSPOLL_DATA_RECEP_TIMEOUT 107 +#define WCN36XX_HAL_CFG_TDLS_PUAPSD_BUFFER_STA_CAPABLE 108 +#define WCN36XX_HAL_CFG_TDLS_PUAPSD_MASK 109 +#define WCN36XX_HAL_CFG_TDLS_PUAPSD_INACTIVITY_TIME 110 +#define WCN36XX_HAL_CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD 111 +#define WCN36XX_HAL_CFG_ANTENNA_DIVERSITY 112 +#define WCN36XX_HAL_CFG_ATH_DISABLE 113 +#define WCN36XX_HAL_CFG_FLEXCONNECT_POWER_FACTOR 114 +#define WCN36XX_HAL_CFG_ENABLE_ADAPTIVE_RX_DRAIN 115 +#define WCN36XX_HAL_CFG_TDLS_OFF_CHANNEL_CAPABLE 116 +#define WCN36XX_HAL_CFG_MWS_COEX_V1_WAN_FREQ 117 +#define WCN36XX_HAL_CFG_MWS_COEX_V1_WLAN_FREQ 118 +#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG 119 +#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG2 120 +#define WCN36XX_HAL_CFG_MWS_COEX_V2_WAN_FREQ 121 +#define WCN36XX_HAL_CFG_MWS_COEX_V2_WLAN_FREQ 122 +#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG 123 +#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG2 124 +#define WCN36XX_HAL_CFG_MWS_COEX_V3_WAN_FREQ 125 +#define WCN36XX_HAL_CFG_MWS_COEX_V3_WLAN_FREQ 126 +#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG 127 +#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG2 128 +#define WCN36XX_HAL_CFG_MWS_COEX_V4_WAN_FREQ 129 +#define WCN36XX_HAL_CFG_MWS_COEX_V4_WLAN_FREQ 130 +#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG 131 +#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG2 132 +#define WCN36XX_HAL_CFG_MWS_COEX_V5_WAN_FREQ 133 +#define WCN36XX_HAL_CFG_MWS_COEX_V5_WLAN_FREQ 134 +#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG 135 +#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG2 136 +#define WCN36XX_HAL_CFG_MWS_COEX_V6_WAN_FREQ 137 +#define WCN36XX_HAL_CFG_MWS_COEX_V6_WLAN_FREQ 138 +#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG 139 +#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG2 140 +#define WCN36XX_HAL_CFG_MWS_COEX_V7_WAN_FREQ 141 +#define WCN36XX_HAL_CFG_MWS_COEX_V7_WLAN_FREQ 142 +#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG 143 +#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG2 144 +#define WCN36XX_HAL_CFG_MWS_COEX_V8_WAN_FREQ 145 +#define WCN36XX_HAL_CFG_MWS_COEX_V8_WLAN_FREQ 146 +#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG 147 +#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG2 148 +#define WCN36XX_HAL_CFG_MWS_COEX_V9_WAN_FREQ 149 +#define WCN36XX_HAL_CFG_MWS_COEX_V9_WLAN_FREQ 150 +#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG 151 +#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG2 152 +#define WCN36XX_HAL_CFG_MWS_COEX_V10_WAN_FREQ 153 +#define WCN36XX_HAL_CFG_MWS_COEX_V10_WLAN_FREQ 154 +#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG 155 +#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG2 156 +#define WCN36XX_HAL_CFG_MWS_COEX_MODEM_BACKOFF 157 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG1 158 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG2 159 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG3 160 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG4 161 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG5 162 +#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG6 163 +#define WCN36XX_HAL_CFG_SAR_POWER_BACKOFF 164 +#define WCN36XX_HAL_CFG_GO_LINK_MONITOR_TIMEOUT 165 +#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_WLAN_LEN 166 +#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_BT_LEN 167 +#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_WLAN_LEN 168 +#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_BT_LEN 169 +#define WCN36XX_HAL_CFG_RMC_FIXED_RATE 170 +#define WCN36XX_HAL_CFG_ASD_PROBE_INTERVAL 171 +#define WCN36XX_HAL_CFG_ASD_TRIGGER_THRESHOLD 172 +#define WCN36XX_HAL_CFG_ASD_RTT_RSSI_HYST_THRESHOLD 173 +#define WCN36XX_HAL_CFG_BTC_CTS2S_ON_STA_DURING_SCO 174 +#define WCN36XX_HAL_CFG_SHORT_PREAMBLE 175 +#define WCN36XX_HAL_CFG_SHORT_SLOT_TIME 176 +#define WCN36XX_HAL_CFG_DELAYED_BA 177 +#define WCN36XX_HAL_CFG_IMMEDIATE_BA 178 +#define WCN36XX_HAL_CFG_DOT11_MODE 179 +#define WCN36XX_HAL_CFG_HT_CAPS 180 +#define WCN36XX_HAL_CFG_AMPDU_PARAMS 181 +#define WCN36XX_HAL_CFG_TX_BF_INFO 182 +#define WCN36XX_HAL_CFG_ASC_CAP_INFO 183 +#define WCN36XX_HAL_CFG_EXT_HT_CAPS 184 +#define WCN36XX_HAL_CFG_QOS_ENABLED 185 +#define WCN36XX_HAL_CFG_WME_ENABLED 186 +#define WCN36XX_HAL_CFG_WSM_ENABLED 187 +#define WCN36XX_HAL_CFG_WMM_ENABLED 188 +#define WCN36XX_HAL_CFG_UAPSD_PER_AC_BITMASK 189 +#define WCN36XX_HAL_CFG_MCS_RATES 190 +#define WCN36XX_HAL_CFG_VHT_CAPS 191 +#define WCN36XX_HAL_CFG_VHT_RX_SUPP_MCS 192 +#define WCN36XX_HAL_CFG_VHT_TX_SUPP_MCS 193 +#define WCN36XX_HAL_CFG_RA_FILTER_ENABLE 194 +#define WCN36XX_HAL_CFG_RA_RATE_LIMIT_INTERVAL 195 +#define WCN36XX_HAL_CFG_BTC_FATAL_HID_NSNIFF_BLK 196 +#define WCN36XX_HAL_CFG_BTC_CRITICAL_HID_NSNIFF_BLK 197 +#define WCN36XX_HAL_CFG_BTC_DYN_A2DP_TX_QUEUE_THOLD 198 +#define WCN36XX_HAL_CFG_BTC_DYN_OPP_TX_QUEUE_THOLD 199 +#define WCN36XX_HAL_CFG_LINK_FAIL_TIMEOUT 200 +#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_SP 201 +#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT 202 +#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT 203 +#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT_MEAS_WINDOW 204 +#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT_MEAS_WINDOW 205 +#define WCN36XX_HAL_CFG_MAX_PSPOLL_IN_WMM_UAPSD_PS_MODE 206 +#define WCN36XX_HAL_CFG_MAX_UAPSD_INACTIVITY_INTERVALS 207 +#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_WMMPS 208 +#define WCN36XX_HAL_CFG_BURST_MODE_BE_TXOP_VALUE 209 +#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE 210 +#define WCN36XX_HAL_CFG_BTC_FAST_WLAN_CONN_PREF 211 +#define WCN36XX_HAL_CFG_ENABLE_RTSCTS_HTVHT 212 +#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_WLAN_LEN 213 +#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_BT_LEN 214 +#define WCN36XX_HAL_CFG_LINK_FAIL_TX_CNT 215 +#define WCN36XX_HAL_CFG_TOGGLE_ARP_BDRATES 216 +#define WCN36XX_HAL_CFG_OPTIMIZE_CA_EVENT 217 +#define WCN36XX_HAL_CFG_EXT_SCAN_CONC_MODE 218 +#define WCN36XX_HAL_CFG_BAR_WAKEUP_HOST_DISABLE 219 +#define WCN36XX_HAL_CFG_SAR_BOFFSET_CORRECTION_ENABLE 220 +#define WCN36XX_HAL_CFG_UNITS_OF_BCN_WAIT_TIME 221 +#define WCN36XX_HAL_CFG_CONS_BCNMISS_COUNT 222 +#define WCN36XX_HAL_CFG_BTC_DISABLE_WLAN_LINK_CRITICAL 223 +#define WCN36XX_HAL_CFG_DISABLE_SCAN_DURING_SCO 224 +#define WCN36XX_HAL_CFG_TRIGGER_NULLFRAME_BEFORE_HB 225 +#define WCN36XX_HAL_CFG_ENABLE_POWERSAVE_OFFLOAD 226 +#define WCN36XX_HAL_CFG_MAX_PARAMS 227 /* Message definitons - All the messages below need to be packed */ From patchwork Mon Aug 3 03:11:31 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: 247331 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860817ilo; Sun, 2 Aug 2020 20:11:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA9tZ+Az3xse56iIXV8L4oDkbDoTWSt+trhbM45aM8MowHaWcnC/8x0sMIRKE6o3yBkvn/ X-Received: by 2002:a05:620a:4ed:: with SMTP id b13mr14569541qkh.493.1596424291867; Sun, 02 Aug 2020 20:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424291; cv=none; d=google.com; s=arc-20160816; b=yzO8Kdg9ReVmhvCnKxTEjQ1FHIpqljT1NJ6oDCBCvffFvI0d0cAbgOy6dRjDPr3j00 4zx2pIX6B43udXK3e8fuTc87yKYjc5k0WbDMnSNyhOlZ8BcOSAeqbXpw5SlG+iOcjKyI MubbSetHa1EEeWztbcGN7ieMc845jNOk8DNvwQ7Av7oaTMiLSFRlI4MeI4BZJzKe9uWU Xk77DZnA5adY/6Ta5h8hJzXOQUPWbW51tanv8yTys8W2eqGq78LYd+A1lD20eSEKWKud PKV3CRX9KTPJcR3ESL6l4rORzMo+3s6CCLQZHf2dBgILltx/caYsEUI6oncyO6erVEm2 3KXg== 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=chx+EtEUTh4Ioo8fbgJJldIB9WhhHXs/3iQFOI7xTJc=; b=qAB+OVWu3N6jucYEZmdhohMY92TpyzEv1KwcuxB6AgZUqu6NYsJsmaf6ilaSqTxjqZ qpN0OqUpG26kDvkopcKi0bOZCY4ANCgDQe38MBC9kMEylcMxgVmfvXbI/9Iiw0bSkVDD nNEV2f46c0kxcA391GKiphf3PMHDi8h3jgJkQlIgkI5RcRI6mAyZXeF6ZkrJGm8eKjG2 MA+2rnaGGFzLqEgbcDw4y58QazAUIkXQs9ZmK8zUmG/hbG+/2dVPRGFSKD5vR1KGUVbq BIMq7gVpTNyWqWZu3PS2zXjGjd7JfO/AHhyVPyUTYmpj0yGqoPnMcGZhU9BYFVyRoJkG hepQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=psJM3gsw; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yUqKY0kb; 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 c13si7711332qko.211.2020.08.02.20.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:31 -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=psJM3gsw; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yUqKY0kb; 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=chx+EtEUTh4Ioo8fbgJJldIB9WhhHXs/3iQFOI7xTJc=; b=psJM3gswGApl7MiXUmrj73j7Q gqGn66kqTzrUe8oYTfZGszf13q534MyAhtG7RO5opEKEumQh1OnkoKti3AhnByfLnC6GFGt+OtXIU qI77kuqCbbrY1VdKnZsAbGX95yVkxRgofeaWPortZ9eTD0LwWeNNEWRp5iKUDHx8OrjH6UH/UhCdv m4xEKyn23qcqYmf0WQ5TI0WPVCsYF0fnjUmfrCLxx4NUgDRH7J99VEWJASM7f8Cp+A7zHcH9WlVrZ AEECZuwCY1m8HFLvIondmUMSLzh7Fo6W3cDKRXFOh+nSrMHt2sffx7MgFgJK/JcF1+Tr3A/vTtP4Y GJf8zb6IA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsq-0002pw-O3; Mon, 03 Aug 2020 03:11:28 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsm-0002m1-C7 for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:25 +0000 Received: by mail-wr1-x442.google.com with SMTP id r12so32728915wrj.13 for ; Sun, 02 Aug 2020 20:11:24 -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=LSnn0LuGUOx2Z2N9RvyUQexCHbiNUTojEbR97kkWDC8=; b=yUqKY0kbVgIHXY02N+fCcyagWZnyqdB8gpqWqXkEzBYjZgIwALrliBSAAB7VQ7wrI+ HVlQ2l6jOK6bramvgih8F2SsGPWdptunS/k0E0NFXczI9pRhukKUASnLHlyx28gpBPBr SBfKFA5mkEpJXIiFHjUNrPGzwFf+XCtEz3BOfEMOte02gmm2lmzTTFHJT4Tgq/UdYDK5 ms5HTDc6qRzyMU7flYYLgr/ZOGDW4SK5ce/MJfIcN7NLGGAvueBezuOisZ7v2gy9j1Bj OjO8AyQf2EqoVS62fBbmCj35ZJ2JjRL0gTHPAQHV1WM6AZ4bI/sSHEECK+gg78DKqBc8 kyYQ== 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=LSnn0LuGUOx2Z2N9RvyUQexCHbiNUTojEbR97kkWDC8=; b=tvS757V9oCxe2hZuCWu1R0k6+8GnV71qCn1Xk/J1zJmKrFTLob3WMVmSdz9C4cjPtW noMTDf/ModdzFvBAh+wQK9F5yijET3m2a4JiTXPTDYqKcNg9tXDhz8Py3QU1DKZG2kfU aCSRvJnerzVxptKjeZS3LEUgfNn6IRH4VegTAxGpahB0ZWUUxq4mqnfwPrMujHWOZNgp 17acPJlbxSGWWjNkQaQIwJZ6CxB8LKyrvYVaflYKbjGPTeJaNXAT1UVMuJlPcb56ZBl2 1EEnUykQ9tM2lj4/iO7KAfniyFeZx/gnm8CYxZZwEZyd+Xy1pHODTdpUF7vZYdCe0szr bAHA== X-Gm-Message-State: AOAM53127XQitqXcin8EE8JqzWZpaqosMUSuBaiLtfziKgXIjGXC0jre fXapzE+M2dWc6wnDDP3xh0YPnw== X-Received: by 2002:adf:d84f:: with SMTP id k15mr12481848wrl.176.1596424283406; Sun, 02 Aug 2020 20:11:23 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:22 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 35/36] wcn36xx: Define wcn3680 specific firmware parameters Date: Mon, 3 Aug 2020 04:11:31 +0100 Message-Id: <20200803031132.1427063-36-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231124_447910_42DD96F7 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: 0.6 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.6 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:442 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_VALID Message has at least one valid DKIM or DK signature 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.8 UPPERCASE_50_75 message body is 50-75% uppercase 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit defines a firmware configuration for the wcn3680 which represents a working downstream configuration. This configuration has been successfully applied to the upstream driver with antecedent patches resulting in the same or better through-put in comparison to the downstream driver on the test hardware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 96 ++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) -- 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 527da56a1386..925d82dc0e88 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -79,6 +79,102 @@ static struct wcn36xx_cfg_val wcn36xx_cfg_vals[] = { WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0), }; +static struct wcn36xx_cfg_val wcn3680_cfg_vals[] = { + WCN36XX_CFG_VAL(CURRENT_TX_ANTENNA, 1), + WCN36XX_CFG_VAL(CURRENT_RX_ANTENNA, 1), + WCN36XX_CFG_VAL(LOW_GAIN_OVERRIDE, 0), + WCN36XX_CFG_VAL(POWER_STATE_PER_CHAIN, 785), + WCN36XX_CFG_VAL(CAL_PERIOD, 5), + WCN36XX_CFG_VAL(CAL_CONTROL, 1), + WCN36XX_CFG_VAL(PROXIMITY, 0), + WCN36XX_CFG_VAL(NETWORK_DENSITY, 3), + WCN36XX_CFG_VAL(MAX_MEDIUM_TIME, 4096), + WCN36XX_CFG_VAL(MAX_MPDUS_IN_AMPDU, 64), + WCN36XX_CFG_VAL(RTS_THRESHOLD, 2347), + WCN36XX_CFG_VAL(SHORT_RETRY_LIMIT, 15), + WCN36XX_CFG_VAL(LONG_RETRY_LIMIT, 15), + WCN36XX_CFG_VAL(FRAGMENTATION_THRESHOLD, 8000), + WCN36XX_CFG_VAL(DYNAMIC_THRESHOLD_ZERO, 5), + WCN36XX_CFG_VAL(DYNAMIC_THRESHOLD_ONE, 10), + WCN36XX_CFG_VAL(DYNAMIC_THRESHOLD_TWO, 15), + WCN36XX_CFG_VAL(FIXED_RATE, 0), + WCN36XX_CFG_VAL(RETRYRATE_POLICY, 4), + WCN36XX_CFG_VAL(RETRYRATE_SECONDARY, 0), + WCN36XX_CFG_VAL(RETRYRATE_TERTIARY, 0), + WCN36XX_CFG_VAL(FORCE_POLICY_PROTECTION, 5), + WCN36XX_CFG_VAL(FIXED_RATE_MULTICAST_24GHZ, 1), + WCN36XX_CFG_VAL(FIXED_RATE_MULTICAST_5GHZ, 5), + WCN36XX_CFG_VAL(DEFAULT_RATE_INDEX_24GHZ, 1), + WCN36XX_CFG_VAL(DEFAULT_RATE_INDEX_5GHZ, 5), + WCN36XX_CFG_VAL(MAX_BA_SESSIONS, 40), + WCN36XX_CFG_VAL(PS_DATA_INACTIVITY_TIMEOUT, 200), + WCN36XX_CFG_VAL(PS_ENABLE_BCN_FILTER, 1), + WCN36XX_CFG_VAL(PS_ENABLE_RSSI_MONITOR, 1), + WCN36XX_CFG_VAL(NUM_BEACON_PER_RSSI_AVERAGE, 20), + WCN36XX_CFG_VAL(STATS_PERIOD, 10), + WCN36XX_CFG_VAL(CFP_MAX_DURATION, 30000), + WCN36XX_CFG_VAL(FRAME_TRANS_ENABLED, 0), + WCN36XX_CFG_VAL(BA_THRESHOLD_HIGH, 128), + WCN36XX_CFG_VAL(MAX_BA_BUFFERS, 2560), + WCN36XX_CFG_VAL(DYNAMIC_PS_POLL_VALUE, 0), + WCN36XX_CFG_VAL(TX_PWR_CTRL_ENABLE, 1), + WCN36XX_CFG_VAL(ENABLE_CLOSE_LOOP, 1), + WCN36XX_CFG_VAL(ENABLE_LPWR_IMG_TRANSITION, 0), + WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_BT, 120000), + WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_WLAN, 30000), + WCN36XX_CFG_VAL(MAX_ASSOC_LIMIT, 10), + WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0), + WCN36XX_CFG_VAL(TDLS_PUAPSD_MASK, 0), + WCN36XX_CFG_VAL(TDLS_PUAPSD_BUFFER_STA_CAPABLE, 1), + WCN36XX_CFG_VAL(TDLS_PUAPSD_INACTIVITY_TIME, 0), + WCN36XX_CFG_VAL(TDLS_PUAPSD_RX_FRAME_THRESHOLD, 10), + WCN36XX_CFG_VAL(TDLS_OFF_CHANNEL_CAPABLE, 1), + WCN36XX_CFG_VAL(ENABLE_ADAPTIVE_RX_DRAIN, 1), + WCN36XX_CFG_VAL(FLEXCONNECT_POWER_FACTOR, 0), + WCN36XX_CFG_VAL(ANTENNA_DIVERSITY, 3), + WCN36XX_CFG_VAL(ATH_DISABLE, 0), + WCN36XX_CFG_VAL(BTC_STATIC_OPP_WLAN_ACTIVE_WLAN_LEN, 60000), + WCN36XX_CFG_VAL(BTC_STATIC_OPP_WLAN_ACTIVE_BT_LEN, 90000), + WCN36XX_CFG_VAL(BTC_SAP_STATIC_OPP_ACTIVE_WLAN_LEN, 30000), + WCN36XX_CFG_VAL(BTC_SAP_STATIC_OPP_ACTIVE_BT_LEN, 30000), + WCN36XX_CFG_VAL(ASD_PROBE_INTERVAL, 50), + WCN36XX_CFG_VAL(ASD_TRIGGER_THRESHOLD, -60), + WCN36XX_CFG_VAL(ASD_RTT_RSSI_HYST_THRESHOLD, 3), + WCN36XX_CFG_VAL(BTC_CTS2S_ON_STA_DURING_SCO, 0), + WCN36XX_CFG_VAL(RA_FILTER_ENABLE, 0), + WCN36XX_CFG_VAL(RA_RATE_LIMIT_INTERVAL, 60), + WCN36XX_CFG_VAL(BTC_FATAL_HID_NSNIFF_BLK, 2), + WCN36XX_CFG_VAL(BTC_CRITICAL_HID_NSNIFF_BLK, 1), + WCN36XX_CFG_VAL(BTC_DYN_A2DP_TX_QUEUE_THOLD, 0), + WCN36XX_CFG_VAL(BTC_DYN_OPP_TX_QUEUE_THOLD, 1), + WCN36XX_CFG_VAL(MAX_UAPSD_CONSEC_SP, 10), + WCN36XX_CFG_VAL(MAX_UAPSD_CONSEC_RX_CNT, 50), + WCN36XX_CFG_VAL(MAX_UAPSD_CONSEC_TX_CNT, 50), + WCN36XX_CFG_VAL(MAX_UAPSD_CONSEC_TX_CNT_MEAS_WINDOW, 500), + WCN36XX_CFG_VAL(MAX_UAPSD_CONSEC_RX_CNT_MEAS_WINDOW, 500), + WCN36XX_CFG_VAL(MAX_PSPOLL_IN_WMM_UAPSD_PS_MODE, 0), + WCN36XX_CFG_VAL(MAX_UAPSD_INACTIVITY_INTERVALS, 10), + WCN36XX_CFG_VAL(ENABLE_DYNAMIC_WMMPS, 1), + WCN36XX_CFG_VAL(BURST_MODE_BE_TXOP_VALUE, 0), + WCN36XX_CFG_VAL(ENABLE_DYNAMIC_RA_START_RATE, 0), + WCN36XX_CFG_VAL(BTC_FAST_WLAN_CONN_PREF, 1), + WCN36XX_CFG_VAL(ENABLE_RTSCTS_HTVHT, 0), + WCN36XX_CFG_VAL(BTC_STATIC_OPP_WLAN_IDLE_WLAN_LEN, 30000), + WCN36XX_CFG_VAL(BTC_STATIC_OPP_WLAN_IDLE_BT_LEN, 120000), + WCN36XX_CFG_VAL(LINK_FAIL_TX_CNT, 200), + WCN36XX_CFG_VAL(TOGGLE_ARP_BDRATES, 0), + WCN36XX_CFG_VAL(OPTIMIZE_CA_EVENT, 0), + WCN36XX_CFG_VAL(EXT_SCAN_CONC_MODE, 0), + WCN36XX_CFG_VAL(BAR_WAKEUP_HOST_DISABLE, 0), + WCN36XX_CFG_VAL(SAR_BOFFSET_CORRECTION_ENABLE, 0), + WCN36XX_CFG_VAL(BTC_DISABLE_WLAN_LINK_CRITICAL, 5), + WCN36XX_CFG_VAL(DISABLE_SCAN_DURING_SCO, 2), + WCN36XX_CFG_VAL(CONS_BCNMISS_COUNT, 0), + WCN36XX_CFG_VAL(UNITS_OF_BCN_WAIT_TIME, 0), + WCN36XX_CFG_VAL(TRIGGER_NULLFRAME_BEFORE_HB, 0), + WCN36XX_CFG_VAL(ENABLE_POWERSAVE_OFFLOAD, 0), +}; + static int put_cfg_tlv_u32(struct wcn36xx *wcn, size_t *len, u32 id, u32 value) { struct wcn36xx_hal_cfg *entry; From patchwork Mon Aug 3 03:11:32 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: 247329 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860784ilo; Sun, 2 Aug 2020 20:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUNjiV6TrtZjgjXPiOPU4JzuUE1ao74vcaEa9u+Rzb2GE00SUxIC8a4AnL4AGzsgcExqGm X-Received: by 2002:a17:906:57cc:: with SMTP id u12mr15365663ejr.422.1596424288602; Sun, 02 Aug 2020 20:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424288; cv=none; d=google.com; s=arc-20160816; b=e7PnjR5IYBZONSyRWqXUcrangquFoL0mqQ+6cgrX1a/3LtuVV8IJ4o/byDTwZr6t2u OtMSULkmQjNOUKDWEnqy45a/h43HjqGOPBOFWikN4bNyHXZsu02lDEwhm1WB5+USEktQ kx2yPvQUZrlWdITj1vbqjur0RDNpFVeIS5wr8Tq5sURZm73ddy8u2RmckKE315sYoS6r /3xOEuvS0RuUWWM/NRllJMLCLWUB1mFbcD1vYJEKPC5D8W+1uib5PHj4i4/Llc+a0XLJ Ad1BvPDxJjhqHg+hVFE8Ebj7QVtsemlvyrw94Ax4rrSDK1EdfrKFePEAlmuYzILVDBR/ U7Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=Tc2DL2odHO2a+NBou0j2hTrrp8nZ/5FFnOB7kBCHe+Eh7acg6M0J1KiAFFyEm5zYSC sBpAJloHI51dgjR+uwn4pMBLY+Bkm03kciBpCNU2w5UITl+c4SCn5j0g69H+/VfRDki1 JUuUusX+9tViHgPEu2JacOoIFA5Fu6e47/l1YE3WMrspPgyygkgK23NLnNb4HUUcgUX9 TzURilFoo4e8OOK42UOLXMz1O2fqscoCGT/1b1yb5G7gxUyAS4x/QYEkA/X2/GO/Qddh PNsQ9wAYwYPaYg0Q8+FcdXqXi5Xffv34P30vfyOesGO2gYrIOKM/IBy6pfJ2joCYigyB +cFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hWXQ530S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si9440020edv.165.2020.08.02.20.11.28; Sun, 02 Aug 2020 20:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hWXQ530S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbgHCDL1 (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727909AbgHCDL0 (ORCPT ); Sun, 2 Aug 2020 23:11:26 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF05C06174A for ; Sun, 2 Aug 2020 20:11:25 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z18so29222610wrm.12 for ; Sun, 02 Aug 2020 20:11:25 -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=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=hWXQ530Suvyx18R5slJjFBMAu5Yu1/M6Hv9gVzKw+P3DYUCEKtmxPH04xYYuDPWyYv VexaJc0nbTMJCZ7nuslAd72+UZ+WTW6jTwqz5EUVNb8ngwtjBNU7r+HtqFdvgrsqIKOv 3zHlD8wtDixB6oycL91C3ryNDjDnY9uZyV862m9vKP4RQ0lcDnFu+EgqNGVRPHlGMv13 SOFTpISuD27v8DNyTZhIPQM4yhIv/Z7eYtGJXPAgtS1agAkbL83gGq+wOnOBB9lLiRt8 YULzjuG2M3rrlwkkmkm8dVw4CPW7Fry/rjLwhOAOpPf1duiKp15T9QPw5yEJK3A64+mc UxDw== 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=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=NLXstQL8e+UN1f19xK7uApviRpSi8heqPPJVtt4kxnUXREkNa18jJjKfs+Gk4sX92I YR6ntxHn2v6lc/McpZ0GBnjThgk5Ksw+OUAuPfIBEyF4r5rRDYrjczNC3BHk7XpVQcg6 zmKW5FcTiQxK1FxApffuZnovsv84L7tzox6q9Nd1pg2zF85UUAotzF2WQWEI8TFnOUt5 QwU9gg/NDG7CdQU3wQDzPgEUFjI9R9AHsNEe1DxfmIqCBtwjvdHy2aYKa8YudF17WK40 y/9nI1a3LFxbt7KETLXp1Yl4wIeL6TfBucSJqw0v72tAAYg9D41NDv+F6p4Gpwf15pN0 kr1Q== X-Gm-Message-State: AOAM532r7D/biNNdyPfSTELgitMUSYc0oPZomI4gaUqRb3DRPbys7T6b btpwY+DnsoLoFOrPf+yEslkAaA== X-Received: by 2002:a05:6000:150:: with SMTP id r16mr12875781wrx.63.1596424284449; Sun, 02 Aug 2020 20:11:24 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:23 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 36/36] wcn36xx: Add ability to download wcn3680 specific firmware parameters Date: Mon, 3 Aug 2020 04:11:32 +0100 Message-Id: <20200803031132.1427063-37-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 925d82dc0e88..542c5d160ebe 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -610,6 +610,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); @@ -622,9 +624,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; }