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: 249330 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791688ilg; Tue, 8 Sep 2020 11:24:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgOm/4ZyRw+jnm12O+6yCgdoG7ZYyNLz1CZxeUfEPJRZXthLuWp90qwU3htPGaPogQaJbu X-Received: by 2002:a6b:6309:: with SMTP id p9mr152266iog.78.1599589465014; Tue, 08 Sep 2020 11:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589465; cv=none; d=google.com; s=arc-20160816; b=sN9dmA+cVIIdr7O0ZcOda1WraTjczHmGUflRZC86XY2rGEeMXbnHvil+Mj/Wq+Xdht L6ED6IEneiDAAEF11+OL+wVinHOkXqHCCMVxHWER/J3BsHlEW+/8IEI6EHRiYOwftkos rtZ1QqJV0wwskbTXjNWOYvnSamMP8wVvbbnas4xwjZIutfa/6G0iYLbPCz8UE+H6jvOw H07p4zdYKWFLF7+pYddIPfG7y4dxDjJeqdYE/dX6dh5ar7TArqeGWSuaLYFBLzhZV11e jvpnIF+ghO61NERqbkev8PZKNv+Qo1DrSRjSiC1Kifu5sXvnoukGEHLbmHOWI4zippHv esuQ== 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=bO8abkq1sdaBCdr+F1kXFa/GeWECCdvP/LdxiwDLGuo=; b=kBr1v+7fZdQ8rSxuM22l//QY2fSawcS4hGcK5lizx914p5PZz2lqiQtchwheYfzsaU VqriH9OYLhrqpmgFvtjTpVrRw4uOWtKwmkLz4XVr2R2462Nl5Wg2jm2UP1HxRLmHC8pi OjSU5FUxlQhq7ho57MD6Tbc7Uj8etiIuBy6o+xyqBgM47Oj6GMzonrVB4mf9hWJetM1Z UT2TemVu10LNBHpT6cZ8FalLrwy2q59ZvAvoXyzdjB6mtfjy7YiO7L7YfL/dVI7oQZRn P3VFR9acZJkha2QHoHajVCfW9ucGk0s0NSBaFBvY815Z2W2aG6EZXPWclxILrESRlI+3 xa/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=aITJ4APe; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="R/5PR7kx"; 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 v73si198887ili.146.2020.09.08.11.24.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:25 -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=aITJ4APe; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="R/5PR7kx"; 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=bO8abkq1sdaBCdr+F1kXFa/GeWECCdvP/LdxiwDLGuo=; b=aITJ4APeLy3EFMiCcmCgFzH6V ap51fWi/HI9yr7IT3BVa1tk74df5Om1CX6q2wslw9uLtEW5xkivB8YNje3dIYWiVU92BYNkRkvPVr Pin1nfPWGnitd6c04ik7frXfXDqyz3jqoLYiCJC/9REtAmBxcu29l10Ga0gYQiLHpvn4qqi2dtuyg VgAwiwEFdhzGLWjfajdfrslyZQMxiuOz5EQNp8DzVqYkv8KcXjhiBlSDLkueIYqu1cAj+92eSu7Xk 31WWF/j3tu0xHTKy07u1ELMB1tJXOTloYGkvFD6DqZLc9MbCMbNPdz6cH9+1ZvYe9LzYwY+m5lBOf fAtdAPklA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiI1-0005Dt-JV; Tue, 08 Sep 2020 18:24:21 +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 1kFiHy-0005BZ-6H for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:19 +0000 Received: by mail-wm1-x342.google.com with SMTP id x23so284408wmi.3 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=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=bxBE2FISzU1JlT+BMZ0PH0mdIKkSAnwD7CymutHzwybHjqe1AcO5qsqFfg1wUNTS3z PqQXCbXSXPgOa/kTafteRz5zdWK3q1bDTr3jcJzryZwgJeBWAjUP9/2/y2OABTmZHtyn BtKCYKyKPl3X45hZmaYfBJ/pQnKDbW5wDQJI19B8JXBxaJKxsc5FpPxyKd7u5dpXexnF W7TTHREd6TdvxKnB5ESMaADXporSUZjVRp61poj2ZCkMohuF8hDfyv4bzdTlrBxN9fZ2 nw+jOAEvDmZfb5ubfhM5boufsa01qL2RJDalWTq6ubIgQ5MfH4gAqDvi9fkNC2jpHBNm tCRA== X-Gm-Message-State: AOAM5316QYXT3hV78of8fTSSeextPu1NnakFDvZCkBunz1D6CNqPZUHq RIrvnj4a2wKq2vkq+dNE6Kefa59pM/lxAw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200908_142418_276462_73DCFD58 X-CRM114-Status: GOOD ( 13.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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.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(-) -- 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 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; }