From patchwork Tue Sep 8 18:24: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: 11763855 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B9E2138E for ; Tue, 8 Sep 2020 18:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FE6E2080C for ; Tue, 8 Sep 2020 18:34:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SmTEGwEZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731646AbgIHSeY (ORCPT ); Tue, 8 Sep 2020 14:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731860AbgIHScx (ORCPT ); Tue, 8 Sep 2020 14:32:53 -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 BAC38C061797 for ; Tue, 8 Sep 2020 11:23:52 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id k15so196138wrn.10 for ; Tue, 08 Sep 2020 11:23: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=zLRqP0UInT6/AdhLdK71Y86cDeh3fCR/pcMIonkjMoI=; b=SmTEGwEZQG6wXCTPyYjWIn3jeLFANvjtPiQ38Ztow3DkSQ3vc1jTFkqZdoCqjlKjWr S2K75Th1aMeRlRf9sSxFRWFqsvi7fjM5rIHCd64ckGRHwgtPCuAblLMDGf66YX5IH9ip PjtHkysjWJ7D+bAsdaWGOu4B4Y6Oi9epEtnVXelpQ6ypP2IoH21FxEScC/sqmcHWlMu7 OW0oI7PEyCyXH6bsPZdvxIZrP8W2hNZ8wzI1/Qznk4S2ydD+2N8u8cKazUSD2ZU7Am+h sQLzebFkAyR2HGV5t3RzO6dJ/muTFDfEG1yDsV//MkN4ApO4tScJe2DCIiLWWGc2woI4 4PbQ== 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=zLRqP0UInT6/AdhLdK71Y86cDeh3fCR/pcMIonkjMoI=; b=A/Xu/Nfjj2bf6WxGofVx1QuboTxzwrVaCiAtSNwzn2pnr1na6z6M62epkWmMjny8cd U9q4AEkVb3BA1vAkKWEJ534zDur/F1yzsHPgN776BW+kCiIqMFwNodOvtgV1zsrrYRma ehM/0QRo3Bis11e3ErZ1a3DSqLX12wxCt017I/wtezxBVbgdJ6DIYGj+/t2ZMI6nzdzG jgknkoP7DNSmSPtf9luzo4hv2wX1UuJIB51puQQLrodCnTfD4PdO+IF1MFPICQWTlTmQ 3gOEZkhbSuYL7wxdX9AM3NqaYNxTBziavHjEP08w7ydsK+4Et0F61bB5oMf3Tjpb7hmQ 0cVA== X-Gm-Message-State: AOAM533U7Xcv8cBCiTBe8i6EAAtxyh7sJhT/tYJne8AiPqA2JcNCKkMK 2GzHA2DPQqxK97J+b0+b33J5GQ== X-Google-Smtp-Source: ABdhPJz90UAS3wKGMgR//5WUKSyEQz5P21njTPBZ417vPlGfOFtujBhDM5DtiyIE6DsIcayghW7Y3Q== X-Received: by 2002:a5d:4d01:: with SMTP id z1mr908365wrt.366.1599589431460; Tue, 08 Sep 2020 11:23:51 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:51 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 1/7] wcn36xx: Add wcn36xx_set_default_rates_v1 Date: Tue, 8 Sep 2020 19:24:31 +0100 Message-Id: <20200908182437.2870281-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-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(+) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index eb518bd88870..ba37439352a7 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -793,6 +793,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 d7d349de20e6..2da81d9926c4 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -271,6 +271,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 Tue Sep 8 18:24:50 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: 11763831 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 658D21599 for ; Tue, 8 Sep 2020 18:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43EE62080C for ; Tue, 8 Sep 2020 18:33:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xUo/Mj/s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731596AbgIHSdR (ORCPT ); Tue, 8 Sep 2020 14:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731550AbgIHSck (ORCPT ); Tue, 8 Sep 2020 14:32:40 -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 DAE81C0617A2 for ; Tue, 8 Sep 2020 11:24:11 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id t10so249933wrv.1 for ; Tue, 08 Sep 2020 11:24: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=naU0RpV8J9Z6Qcq0aj4T/awPa3wV7pjar3MjYtbLY9w=; b=xUo/Mj/s1sJsaYWY+y3Gfo/CcSyX9jnhvjfW2EQ4K7CGpNlGtvMSEjilGQHeocn5y1 h6DdqZfXl/hKp7fBVL6kqPAVEthkgx99duEEGk7GmgeYKTQeRlkUXBoCC2LiUZNvGN9W acsu9Ed3pgrhA9KTkXLPQJJgHvvsLBc2IJ8yiIrE3Fbz0c9iyAeTMzJ2yOvFsZa2yWaQ bjF/yATYZMrpqCa+v6rtAcSIvmzeSTypywXZa1Z2H2FlAloN4FnL+9cHycrzBj7HyaTq DjJ5umHfMikKtuSzBrmoOsgAbXbIweymhRrP3xCCYlZJdzVyzVINa73MBwgpkTPR5Obi zp5g== 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=naU0RpV8J9Z6Qcq0aj4T/awPa3wV7pjar3MjYtbLY9w=; b=QvegXM6OYcDirFC2cqArBBAd4Nji4AzHZbuWmVmgFdwke6jE0cpSpshDzLlcEd1xtf 8nhRNwIipyw27y0FknniBNNy0te7iZY7kBUQzhBEziT04vzuTbSR+e9SkjJSH1qkzasU DqZKMRKq7B7YW/7d3HuNXZYjhPjV00DWqkT4Rrc/eVeCPahfqclSeT7T1IQNjLddtRrm boZ/+itgYdRXkXdOcCzyL3gSUQaOfJn5zcl/qS2jHN4pFh2TyPt5BIyYrGA8msTj/pFt bk/RE/YTP1hSFxjdiv8+wVVlTB16UR9NzD665vjg5Tp13I9FY3QsE3sRYzKhMdXqiiNo X2cg== X-Gm-Message-State: AOAM532Zkp+KffQ2VCy6ETqcV/iUXc80FXLCn2k5T6sFBMBoo+w6Dh0/ DaUYv93av1K63hs+TfoscfcOzg== X-Google-Smtp-Source: ABdhPJw+uCUWMi2lTNj7RnnRhDMTKx6oVVjvVvNeZu7CxHMP0u0bVqsfWa8gFh+xRX2t5cMETuhB+Q== X-Received: by 2002:adf:e7c8:: with SMTP id e8mr968198wrn.358.1599589450623; Tue, 08 Sep 2020 11:24:10 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id 189sm330439wmb.3.2020.09.08.11.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:10 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Date: Tue, 8 Sep 2020 19:24:50 +0100 Message-Id: <20200908182455.2870345-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> References: <20200908182455.2870345-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 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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index e26752396bdf..28a571918b19 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1606,7 +1606,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; @@ -1632,6 +1631,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 Tue Sep 8 18:24:33 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: 11763851 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0C10159A for ; Tue, 8 Sep 2020 18:34:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B51462080C for ; Tue, 8 Sep 2020 18:34:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LTHB9KCJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbgIHSeW (ORCPT ); Tue, 8 Sep 2020 14:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731864AbgIHScz (ORCPT ); Tue, 8 Sep 2020 14:32:55 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC89AC061799 for ; Tue, 8 Sep 2020 11:23:54 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id l9so303534wme.3 for ; Tue, 08 Sep 2020 11:23: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=YvzZFSwrpgxQ+WGjQnmFyunvxfM/MsB1Cn6EiHCvmSY=; b=LTHB9KCJE1QUX6RZrRuw1GYy4xlUDUeqoywhh/tA8Jc9cINXN7UARuLYNdBTwe449u OpBTNnsUvGxfYfA2KvjxqWj4J+k+LcvMDJ5jvtbMHjvu1v8Oirjp0UVZTibtH8gtfHLE BjGJDO8O0bydjsQQa9d87Mmmrx+ODTZEHXPH9mVWpLrCJomhltz57Pmz45H1+NzgFaKY quPSNGfklDg3e3YXHv7mq5BUE2WmXYmuoxtP50ZmbyHuCa8BhFhCogQ4mCXnZTSAG/R+ /e4UBhBr29vruFJsRcBSWaYXAuec2wPOen3rIzmUBbeyPvFw9KuEsoJ6rD8WMPACr1Yt EOcw== 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=YvzZFSwrpgxQ+WGjQnmFyunvxfM/MsB1Cn6EiHCvmSY=; b=fAUJcUXHTUQJx34fHxdR80paHawJcH1RT99CZxU0U002Q/79WLE60+o5oRbo4iujWs dRCiG84dzOHXKWnR6SV/4H4+VXHXPV6KlS551hqAlIot07qLljt6pUUdVRSbdV8e0KVI YoE+968KY/5zHM7EQ/cqkBTZQVkJzzDs3c9C8qAdbmP3P20EgCrIXFni9o2ZWkmt3bxD vUWdpabQKKTSCRRFWLLYaxba2R94x6vpDi3Wm4eK0qLVPoy/EILEccdDpx9xvnHw7aPf UU5wxXfnGcj2pivHeyOTC3iVrfWdDk7ogqHgqDOJGar/RY4t/Pu6g4lQj6zDie7PvbTC 7VxQ== X-Gm-Message-State: AOAM532dzf9oRltT2I0rHORnzfIO+TeqoU3XBklZR6hib4D9Z9uSNfkl b2FsqoIHRf79vlIopvyqzYb5KQ== X-Google-Smtp-Source: ABdhPJwvTrPDuc0XXgWWwBR9bVnejwWI/m88kFgrrbZlpAeI+18A7QOo4Yztl+ApedZr9n9ACCJm7w== X-Received: by 2002:a7b:cf30:: with SMTP id m16mr416670wmg.0.1599589433441; Tue, 08 Sep 2020 11:23:53 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:53 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 3/7] wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Date: Tue, 8 Sep 2020 19:24:33 +0100 Message-Id: <20200908182437.2870281-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-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 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(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index bb31c4d4d9a8..3f57acfe11bb 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -206,6 +206,15 @@ void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, sta_params->vht_tx_bf_enabled = 0; } +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 Tue Sep 8 18:24:34 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: 11763863 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01CA1138E for ; Tue, 8 Sep 2020 18:34:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D730F2080A for ; Tue, 8 Sep 2020 18:34:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mzC+qw3P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731550AbgIHSep (ORCPT ); Tue, 8 Sep 2020 14:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731855AbgIHScq (ORCPT ); Tue, 8 Sep 2020 14:32:46 -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 A84D9C06179A for ; Tue, 8 Sep 2020 11:23:55 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id l9so303567wme.3 for ; Tue, 08 Sep 2020 11:23: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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=mzC+qw3PBiNDtT3lcLfVPhDiSpqYDd06JZfexYQ4PrNGCgSwzhbC13oSWY9nVLojy0 Ba6n/nRYKOMnCqCz3ivfD/WdLGM7CUiRKXQncfcN10ad8t3m9Fs5tQZl/zs+ALihrw9x 8uVdP+JbF0Gqj4phgy9qgBo16eMN3LJ/GhM/6kVon7YJO5IXHxcaRxgfst7ji3XvtoPJ 38vvyIopps6bW95W+4PTuzougoCQ0n+Be+vQm890Iw9vg05mtSLRzhw0v/ClbX48iC2t Uj4XZR9rhqocM1f397uS4SFCt+7lXh+FwY2oGxFE9Tb9bG2wCWzmIBTEvvG5mrjSjys7 CHnQ== 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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=YmW8DsUlnHYoz9KvjyyZkL/3P6DZAmFbXaL9L3ZMaVV3MuMvL3JUxdDRnecpgmu6lz OKRqgKor+2piHMiKSdYxWs3pz4MsFXfVPLuXILXir9IGqnTbUsmiIQZzVJ2ULfjB9Hbz SLv/TCkl3whMzc5G51GFQoksppLHrqpeGCMZ25aHsvGj+rJFJ9EWX8Ho5l6anj5G4nL1 ieu61yc1sas5IVVV0K/zdSUJQ0hMxE6KDoUm6DmqOmnrw0uak4Bv0VV3QfBk4zIJT6nq DjVuyDQleN0BkUSRisKS5nYszb6VfXLtTuF457l+TXtKC1iUwiwtm69z6aJWy7V4WLaM C+Bw== X-Gm-Message-State: AOAM532a2F1cZa3cNO04O/44hIfZOXKRKZPfesatODOZaMBuZtT+DFat Ji/4opTZZT5HAe4JvYRV1iOblw== X-Google-Smtp-Source: ABdhPJw3mMWB4C4/adZFd183ZMjr5XfxlV58gzMDvo1115bO+wcyjGoQB6w+iTokzLtEk7+4n4Tteg== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr362132wmf.109.1599589434392; Tue, 08 Sep 2020 11:23:54 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:53 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Tue, 8 Sep 2020 19:24:34 +0100 Message-Id: <20200908182437.2870281-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-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. 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 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 3f57acfe11bb..a563a30c3a0c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,28 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, + 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); + if (get_feat_caps(wcn->fw_feat_caps, MU_MIMO)) { + sta_params->vht_tx_mu_beamformee_capable = + is_cap_supported(caps, IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); + if (sta_params->vht_tx_mu_beamformee_capable) + sta_params->vht_tx_bf_enabled = 1; + } else { + sta_params->vht_tx_mu_beamformee_capable = 0; + } + 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 Tue Sep 8 18:24:53 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: 11763857 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EA90159A for ; Tue, 8 Sep 2020 18:34:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04AC6208FE for ; Tue, 8 Sep 2020 18:34:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="y4UZqdFw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731691AbgIHSec (ORCPT ); Tue, 8 Sep 2020 14:34:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731764AbgIHScu (ORCPT ); Tue, 8 Sep 2020 14:32:50 -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 58946C0617A5 for ; Tue, 8 Sep 2020 11:24:16 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id g4so228558wrs.5 for ; Tue, 08 Sep 2020 11:24: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=HkVQqcl8Y72suOLVUyDLPMVLmKcAEdEBQttsVtZoFdc=; b=y4UZqdFwkp8nFPNtkEBkwllKDqiZ5DJDPAoBQ1pt+AR0JBZGN4f7fZLScqvPdZ+5gN gEWX8+QDG7hzBMrEsrr/M1BMq6I3JpC6U/xpXHG/xXJv89+5qpaY/yP7fQB2B4CiI9hP eH0P2vw4VQ9OBXKugLSNBMx+PyHzV1lcwfkhYLAuXZleCoUzzWqFTc16v/3mN9Rbc+ty xLpxL4Yi88QCh3T2Tq52TctSGCM5ZE2PhazvxteoPr+PRL+RNyBSu+Lcqgp8oAzodc3R kp1g+v3j+qUF2O6OvhUw7D5px4thZ5TCnrgja/98Lk35Frp5n4Y9ur/+nbaqYt0Un1Za oOOQ== 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=HkVQqcl8Y72suOLVUyDLPMVLmKcAEdEBQttsVtZoFdc=; b=OS6HQRrHLDlqIcNUYFzinxUCkoPLk2mMDrpLLzSYrswzKSnCSqCfU/c4ZtRH41Yo5+ fVKqQ0uzLHoPOYNd0zr9oZdshdw2oinkQ9ZYbM0J/gsUQ9AbX3G44jZVSxy9VNoiSM7T ybhdZNUxoKUpTUxX6hrc2XVCGspwJf9/Q1RemaaUNv8aMkn90EuNbd2+B2MYqT6fNw51 3WPXhtomnyj04b1KWWgBtqpPbJlFn0lFtRgJAxuHhFT/jo4WNypCCk72IYm4QIjBSggk m5lR4CjVH5NTGi9DU+Nze4qiMK+mb9KbWFj1TPm/QXnHvcs/LdPoNUKoibSxB8nTYd9s 73vQ== X-Gm-Message-State: AOAM532WehbOw939wBxQKFufA0kBynO1aLbhQjK/c0GBhrxRKoj73Sqr WevFePENQXyVWTFY5TvBIEA6BQ== X-Google-Smtp-Source: ABdhPJzlLeVSm6L1QG/FzThUZL/hwPD73T9x+gfpdyG0srSg/leuNMuP7KqPVRpBq7TyfyZgP67tYQ== X-Received: by 2002:a5d:46c5:: with SMTP id g5mr951320wrs.416.1599589455037; Tue, 08 Sep 2020 11:24:15 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id 189sm330439wmb.3.2020.09.08.11.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:14 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Tue, 8 Sep 2020 19:24:53 +0100 Message-Id: <20200908182455.2870345-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> References: <20200908182455.2870345-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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 7e3302ba97fa..e603e2d3be16 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 Tue Sep 8 18:24:54 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: 11763873 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2789A159A for ; Tue, 8 Sep 2020 18:34:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C7BE2080C for ; Tue, 8 Sep 2020 18:34:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HxjEjeDB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731731AbgIHSez (ORCPT ); Tue, 8 Sep 2020 14:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731721AbgIHScm (ORCPT ); Tue, 8 Sep 2020 14:32:42 -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 6C866C0617A9 for ; Tue, 8 Sep 2020 11:24:17 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id y15so320422wmi.0 for ; Tue, 08 Sep 2020 11:24: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=w/nry3NgBBjA9BLR7RzttfZX9dZbP5DRqQfPiOO3p9I=; b=HxjEjeDBpqabIpTm9g8TfVny9NUnL1Xihv2rOtm2tlJTyPEAHZBVpluoQb8Ak53QKY dUPcWsNWEqq2jYhMIvrxQUMq3awrNg//GzJolKw8l4WM+ju7sfe8qAzYZ1xkIQ/BlGc6 DIsYmJxaxA3EW7RQHbi/MUpNvssNh0Pnh5p8WT4AuUmnVHzlr/3dLHpM3CDRd4NgPTwM HMZmgQ7pNw6CRAx3eQF4uFetr217Y5e2n65TMZNIQ9TZJQYQq3WyBKpPcjtkwkasSI0r CRoutRGFOfaDxRWWPnRmnvLwo/NAfZDNrnfkqmsS+uJdQDiw4kqR9jrAIbR0muESpqbY oktg== 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=w/nry3NgBBjA9BLR7RzttfZX9dZbP5DRqQfPiOO3p9I=; b=hhDED9CKX36QGvsUjIlAhTU3GlSN7vmaB0Q0ZpJ9iApmZDQv7ZW8qzM280Oz1okgki 5V2Gl3RzZq8n9e8HSNiQsgms/7QauIwHRmRLndC4w/EzChTsAXuUG8mNNiirfHxYm1+g JE5oupU/aAoob/6EDtH8uuxMoJc6cLUt1ZkgdE04oEZ/HUq80pOZJiTrhAdBNpGSdixk 3u1bguBiA6HVs55LPK3M5Eb8r+ppiJhjHXDh8p0qk2VmdFi4BVW2p1S8gEdLw7SRyES6 5f3SX+g/p0c9sBet3jYDvmwlZVqaO9U2nBrNussu379qIQWBOMkaJw9bByv3zLBtZiSl s28w== X-Gm-Message-State: AOAM532WGTnhZU8BBdo0rsPnT+H0U5YL+m5ynQLq+zXntQlea4P39tfi EX869Jzen7Fki4CjJbRWv+CUPw== X-Google-Smtp-Source: ABdhPJxyfLNWtypkQM07L2ohUM8yZ0qFlIZ175eNIR4rWUp3yi5HOjrtXz59ODWJWoYfNvPvF3f/mA== X-Received: by 2002:a1c:6445:: with SMTP id y66mr445429wmb.12.1599589456130; Tue, 08 Sep 2020 11:24:16 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id 189sm330439wmb.3.2020.09.08.11.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:15 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Date: Tue, 8 Sep 2020 19:24:54 +0100 Message-Id: <20200908182455.2870345-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> References: <20200908182455.2870345-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 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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index e603e2d3be16..fc922dd9ccde 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1707,9 +1707,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 Tue Sep 8 18:24:55 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: 11763871 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03B53138E for ; Tue, 8 Sep 2020 18:34:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE2182080C for ; Tue, 8 Sep 2020 18:34:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="R/5PR7kx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731688AbgIHSez (ORCPT ); Tue, 8 Sep 2020 14:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731730AbgIHScm (ORCPT ); Tue, 8 Sep 2020 14:32:42 -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 664EEC0617AA for ; Tue, 8 Sep 2020 11:24:18 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e17so303478wme.0 for ; Tue, 08 Sep 2020 11:24: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=yTFsQ/Thh+oiXlokRzBRhy7fryTyWLYZWgMktev/5uE=; b=R/5PR7kx5bfQao/dqFxTgY6vVvKrEtNMCgcmIzT8IuiRX6AkKDoLQuIu2T/OUZrFRa 5NdfNo3Nj8cfkFq0zvoUSU3r8iPIy3IO0bua3rHtdY029+N1mAKp0GeXFDKdtmPCTDSE kfLaUVJ8StB+NaAWiB843vsIR50j55pTpA/zAsY6EgrOFTn0jG45GDj/sYl7QpJtO4Rk 0Y3UhlAg6Ui1aMqYVWVGJSd5YlzbUh3sNbpvEQQPO3+a/OiB3rElDdMEALn2qs6LZY/Y d9OMMlkS6K1g1hWqzPKwCF0C8+l1zcB+RhvHCJmKKAs0CWz7eGBFZ4CY2PMjO8Q5DxcA ZWUA== 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=yTFsQ/Thh+oiXlokRzBRhy7fryTyWLYZWgMktev/5uE=; b=MtwoqsiqAEsFmnI6pxK6I0u9X/eFuF1OWO0uO8s6qBJ4whUwW+C2qYWb0TCv1ggL2h axBvB7yuoXG2hxoCzfHrx+nS3COUK51sMiGWvobYTVixK1f9fXVQkFHmxabYWeAWK2Tg K437IM0YIjtrUGGL31Xt8wQCp0P/soOlW5SUlL2ZdWndxup/035O0/NXnHRA1PibuDf+ 8KdvY0qjHiwwZVUiE9MCCk6Kcw2zpzCGpHS7sEzX4L4pD7ZnQyOApCKrro70kYM/gPbX TLJ+QD6SUoNV0Ijr4r51IwIV6fjIaQyi2VlpLdIDu8LnYUTbBa43oIO/NaJrrX4RWeVq xoCQ== X-Gm-Message-State: AOAM531fg8iIxfYMAWBl3VU31fumyMe8OT1CkuA9joMoJqJlspYn+919 ETk0/4xsb4yW3gUlCvWm0zi1yw== X-Google-Smtp-Source: ABdhPJxSctMZIslzg5qvvruim3fRsoq+FUlU67ow/yttLzUjjiFy4VTlVejKzNMUxxkoBvKcP2NzPQ== X-Received: by 2002:a1c:a385:: with SMTP id m127mr373050wme.189.1599589457082; Tue, 08 Sep 2020 11:24:17 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id 189sm330439wmb.3.2020.09.08.11.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:16 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Date: Tue, 8 Sep 2020 19:24:55 +0100 Message-Id: <20200908182455.2870345-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> References: <20200908182455.2870345-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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 39 ++++---------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index fc922dd9ccde..ce6536a3185c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1673,42 +1673,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; @@ -1718,12 +1691,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; }