From patchwork Sat Aug 29 03:39: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: 248693 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602751ilg; Fri, 28 Aug 2020 20:38:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc8GWwT6rXn7F3t9yRGsmTmetjMXKFgKrnMC1sdODQs8kj+y49edFu2DFBnmDKjHTgAziP X-Received: by 2002:a02:1649:: with SMTP id a70mr3834724jaa.39.1598672339068; Fri, 28 Aug 2020 20:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672339; cv=none; d=google.com; s=arc-20160816; b=iCXFK13ypbtHaSZAppuqBZvd9TpyNcKH4sh38nHjwHGojyxaVQ5ll2xg4tu7YF1CjS gLFbv8/ORpCba9Sxcf++pe9aW+5fU8wD2wTpRt19MAlLSmN5DpX4IM/jnyEjPY0uyyKi ML78ttrcPChAXtDld+vVvjka1eI3JsDwIrmg1tH4ZtSsAHdIwsUdbRnHu9397nw8L++y tTk0votj4MmlrcaiIVoEaYw7gizWX/P+2do8yyCiSu7z6/jrDqtZH4vNmdDrl1NNF17I yubSTuPXLvphqeVrArJ78Xn3wrFZac8RNvFdFgKM2EXOXJr0/pR1crpa2Kf1SbPlfI26 tWmQ== 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=y7JydTvjGYNxEZA7QbjdvLYx7Sdi6i3QQfCkZvrJcGs=; b=pRJA2NfUIA5w37RQT7+kJ/R9QuED52hT1hZhl5MJcV3QwJESAcUyfDl6CZkNk9Zuev 1jw7uin4escHcfWl0cXY918iahRE3XSNtWxbj/fKfARLNrkPJ6zKZSbAhUeNMJPcj6KX EiU6I9QwtxbOycwZX9lABIRSF6P0IlwyTjDFr3/4MsrzCJ1c2DOKutIPtzBg7+UlFl01 /7iluQDnk1F2o4icLCdwxfGcgB48e5e8OvakFqyf0RZJpFhHmv4Nly/PiqSNNyRVarFC BExVZelhPBir82Uk3LpsVqj6Z//LmElkE9/Nnfta1Fg4D9rJIRN5GKE6UC+ZT7k0k7SZ yPmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="VTVu0I/m"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=X7A5f5kI; 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 l5si1078495ilg.87.2020.08.28.20.38.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:59 -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="VTVu0I/m"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=X7A5f5kI; 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=y7JydTvjGYNxEZA7QbjdvLYx7Sdi6i3QQfCkZvrJcGs=; b=VTVu0I/mTxOiW/tDK639dJL5g uus5AniyCkT/U07tt5RShjQRarBLtct4T9APGMPgm06jdroQHI25kFKZxxID/Z7m150AzyeOWxcOP S37BuaD1E5i/z87Ne9cN5iU8qzf8kpgEl26VHpK5wqG0l2nNoAfZoZ5FaPOzmjIow+5/Gwq5eRnXw ZPRaao7HrHEI4Q3BCbNGrFnfSxLMoAtFagTCo3sd5l+TFQr3/I4acFwRYYSrHQqytRxMuh+qSJg64 5b+jskEqLZ8Ld6Ottzt5fI3YrqS3YzVDUOayiAQWQXtr+yXX0YVR+l+wH3eA2qOeU/3wsMQslZ5tK FtEZ2gElw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhf-0002XB-Qf; Sat, 29 Aug 2020 03:38:55 +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 1kBrhd-0002Vf-Gt for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:38:54 +0000 Received: by mail-wr1-x442.google.com with SMTP id w5so868027wrp.8 for ; Fri, 28 Aug 2020 20:38: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=uxv61ncwVKFnMMfQ3MXOOnXWNB/b+jhNeIcIEXIr8Og=; b=X7A5f5kIZQxiUDKLPU+AyV/QmxXLuswYHbKSh6F1VmRxPjWCzx3SyQ4oHX5H1S6t2u mGXjZQfvo1/SQNzftI86fsJS9aq1sIKYUqQy3kShimW8ZADkw3q02mrzeydHmTnNFeIp 7q1hL3lNe0NxQYXBXvJEmHERxi+yEixSHy4Ry2RQeY7kWK3JlOAKbflMcpNDAg7Rhwyp ZMM7aLgFlSS6KO+xOiZww2BGgQJtNR7j3g4zpg3Ht6oQQ5xIa1SlJ3z2YuxeiLzqCRKj Shd4Dh9A8aLG9iOTf3pkjxGKUa6WU8+lltBmEXwUxP3RiRA0sME22LunfGHJH95+E/UQ CdBA== 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=uxv61ncwVKFnMMfQ3MXOOnXWNB/b+jhNeIcIEXIr8Og=; b=R54rETIzfsXbSNLvGYso2DUe49pWceMUul835RoS17hP5aTRpd7m3l544oK99rzv/K jPnkYkSqnD03sbbELjtbJboq/K8H8hZ5Qga4aEXsMNLXPNU3weAfudBHHpW+AQXRO1sq sMwRjavqLE7jQhLJESj5EFkc0sxT4RBAC9cl9EF+OPxFxUx0xdcC7kUdtRp80D569Qpo LaQ5U+ElQYHybOpM3BZg0rI6lAgPI9Cbz5usys0pkdv3gu7juYhwltGbCUCvLni3laCQ OQcyASSaE2lhSVT5sktpQ3trHjL2i8/xkXrEEoq9SOiD3GYVllLbYEIjq+8ZAeGSABP1 d8wg== X-Gm-Message-State: AOAM531oatOJmmMjG+4wDqpRS05gkEza5kF+eEtzzdJt6k1TqJVvNfHw jOhjnJkAu0lpE7Vg2NKKmiVjHA== X-Received: by 2002:adf:f106:: with SMTP id r6mr1752085wro.106.1598672332736; Fri, 28 Aug 2020 20:38:52 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id s20sm1691700wmh.21.2020.08.28.20.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:52 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Date: Sat, 29 Aug 2020 04:39:29 +0100 Message-Id: <20200829033929.2167761-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033929.2167761-1-bryan.odonoghue@linaro.org> References: <20200829033929.2167761-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-20200828_233853_620907_E8915650 X-CRM114-Status: GOOD ( 13.81 ) 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:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 --- 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 9acf1af14c54..2c58f7050836 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1683,42 +1683,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; @@ -1728,12 +1701,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; }