From patchwork Thu Sep 10 15:06: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: 249645 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826050ilk; Thu, 10 Sep 2020 08:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyye0jIksS+YfDIe0ezFU/NCbq2SQht7dMi7/ZhIK57uxNqxWHZWPm0g2uq3L6SNHzaGA1n X-Received: by 2002:a92:ad11:: with SMTP id w17mr2287749ilh.77.1599750358164; Thu, 10 Sep 2020 08:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750358; cv=none; d=google.com; s=arc-20160816; b=yyCU/JjkXVC6OS6Acn+0BotHwTPi3kNWwnnHN5xpqyaYQAcpoziDF9UtEWa3VEFHMF 53Gj3rq6WeRQGGg1iEi5aAe9WryEYpLfbEMlQ30Uo+ICyVPmSD7CzMPf/5zg76AHzXva auTimqzqp9WNrR0cnn+czZvzMdc0vBa14jgILcV0eTXQv3NNJCnhQ09xTXppkSL6hCwR Niupzlf6aLZpjHA8B8pSeiWwS0aUYEbh3sIZyq+QfPrNb5pn4R8lVWd8bgTovFY0M7lW /kTvEMYGUtSLWSqb80CcqpyUJV8fwfOz9+ejOK3j2amfk8d108HzGc6lXUc963+iv19H yojA== 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=Q7pqjuVvPrODxeeL9b2eJ6s6x+O9fSFPkdb+8DQ9ilg=; b=KecOL5N+OiOgYAqlhM6D4Y3mBGj8PpGxq7EEeDBo3UjJOPUJympoeOCO1LV15hSOYy pdZJgK435imFAdV9+6uNKR/QezT7X0kn5IB8g9ofM1cc5xQ3UdF+BH12MYCen4eEWzRP l1P3HFuUEL5/Ld73fSiqjhqgjglosCFO3S7KhquN2jZhR3mqtLxmlyeT7J6l6JKALko7 G/60aps4dHHPjC8XNF99XvyQkNzvrhzC6JPtW7s6Q9IIE/q0hSLAPrjFbxMe+EG2ucMl dQgJxt5q5WW/arO9JrpnSSAz8kvq/GUuSZwrjZZ/qvAqB5qwWbavmcto8wseOaoJRyVX 0/bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=YMKCqDWb; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XJRTNmuF; 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 h12si1486754ile.115.2020.09.10.08.05.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:58 -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=YMKCqDWb; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XJRTNmuF; 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=Q7pqjuVvPrODxeeL9b2eJ6s6x+O9fSFPkdb+8DQ9ilg=; b=YMKCqDWbM5eQOkmuL5/ht5FXg kDi8pK5S3I4DO0W/yNfJ6TaR+tugfeogvfVWK4pqHHPGzELcvnidHStPLn5vwIlXT0cel/UlTPGmZ Y0lMLyVvOYXppO389Ps2l4UGKEgX+UOcFGIeN8cgKaEFEq2Q8zktdkaC65k7DoJXDO1Dw3Q61C7qD J7IKfm7szNEgMHGIQms8DH0b1RKKcm39mNfooEA/Ll9hGLv8fX50vlfQ+MGMiue+/bICJlTs8pVtJ rOr39pauGxOQMQ33b6CIuTnOdhKQbtzP+0OnEhM7KNDlTm/FyxaDnxLPB0fHRhNZALS0mLJB6hL6X a44Ex+uFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO94-0007jP-Jv; Thu, 10 Sep 2020 15:05:54 +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 1kGO91-0007hO-84 for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:05:52 +0000 Received: by mail-wr1-x443.google.com with SMTP id j2so7082781wrx.7 for ; Thu, 10 Sep 2020 08:05: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=X2d2QAbaWN6PJb4MxG2jZFR8Dup0bgRXymEPCft+cEk=; b=XJRTNmuFkVTy99bAh3/QJevYHn/iaHeLI6pHIvsPy24gCoLFpqw/D0lJAdyJroV2kj mmclL5HorcC3D1FNkbvUGF7RM4c7xQmCl+P2ppmvvMCnBWmCzMpVvH4DMO8abzkMcnJw iaK2nGOepRPxGfA8d7Bvp4eFxpsKrkBSXmeQpXlTTegl3pTq48Hs6Khhrkr86v5D1mnp 6Wp7qWMhjfFw4vkzWg9Fm/tIPCJzjuOS3Tw1L+wOf0xhoTDralDT6g+Ex6TLvtD/gCxY EXOt6LEP1qaNsVPxm7DCiNFeYlHYweC/bYG0AQixMQr3oMxwI29aW0Udf29A0907Vpry NrlA== 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=X2d2QAbaWN6PJb4MxG2jZFR8Dup0bgRXymEPCft+cEk=; b=GzWCgggo/cNxvfjAJl5Rj5GRYoQYOgDWt8gyaSeeg2o1mfFdAIcCUwdVJnj/3S/Nhw lW9c7MN2QcxNiPGQJogvNvyuhryNRURJdTO2T4C5jTSQYLBb1kchUo4aSUCDfToY+k/K zOuKOU01bs5QlWi1YTt+XsoxRLpB3GUW85MiwCtbZOSijNj4FCFo7Tq8JK3dL5n1n+Oj SAsTfaePoyBGVe+58OO+O7eJojPxVai/qt29Ay3p2XoFVtApT162gOR2lFVxHv7gDD0p l+3ZIrE+vVE6mkFkNRFyBxGGK8UY7LxC2UYA9VT3V9hjXQMku3cAr387Qz/4AQMs4tO8 v5LA== X-Gm-Message-State: AOAM5334P+9WoIj+6wpT9e9FGmCIoiFZ/03lJgmpdwskZL1voKNx0LTN GyGFfa0ozpHlcWHS+F+Wofgp4Q== X-Received: by 2002:adf:f808:: with SMTP id s8mr9505546wrp.268.1599750350396; Thu, 10 Sep 2020 08:05:50 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id k24sm3857005wmj.19.2020.09.10.08.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:49 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Date: Thu, 10 Sep 2020 16:06:31 +0100 Message-Id: <20200910150631.2178970-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150631.2178970-1-bryan.odonoghue@linaro.org> References: <20200910150631.2178970-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_110551_324923_091A7E59 X-CRM114-Status: GOOD ( 13.23 ) 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org 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 5ae6a2ccfebc..05e5e079dab3 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1697,42 +1697,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; @@ -1742,12 +1715,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; }