From patchwork Thu Sep 10 15:06: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: 11768939 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 DB076139F for ; Thu, 10 Sep 2020 19:39:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B689121D81 for ; Thu, 10 Sep 2020 19:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bXdk5WDh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbgIJTjO (ORCPT ); Thu, 10 Sep 2020 15:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731256AbgIJPmg (ORCPT ); Thu, 10 Sep 2020 11:42:36 -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 E8ECBC061757 for ; Thu, 10 Sep 2020 08:05:45 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id e16so7110514wrm.2 for ; Thu, 10 Sep 2020 08:05:45 -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=jPZywSlUGy1DbYCXOG17ZaN4fGsj4lfwxAd0j52fwtc=; b=bXdk5WDh+FTYAUqvJ+3Rkt9BfbjPH88W65o4uL/hwqVRtPxELZodv7ZLsql2nAxYPK hs/GH8U/9O9CQ3uFAQeT8ZRsM6bFOxVYqXMv87jBkUyM8VCwjNWq2azM2hi+nlb5jg4T a5OrNL873vPbxgQztjzjpZpCzmPYdT4+Xi4Zn40VyQwQj2RksH148JrQ212hS9l5nEGR xdtJ8iiq9N0F4+Uuapy/YbkIMriqudeoozncz4mLlWuATC6NO0S8mIZjq5fHWNlI8oRc C6EE2WRIVx/yKwRqiDmJBU7/hSfORQDehB+/Fhu933LvKB45Kqt0ZnjfojmkyKozU8Jj vH9A== 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=jPZywSlUGy1DbYCXOG17ZaN4fGsj4lfwxAd0j52fwtc=; b=Z0XKzm0NaJTN6ypE7sCeU9c1aTbvOPZTLT1M3IRPSC7z7vaNKL8VcRn4wIDObysBEB ClslyOLBNI7upoNdJI5ifi7VinOl7UcBaMi5IPt1afcU0Q7jQhmV0/cCd3KwysUB/1YM kfkYUDwmlXKLAjcAqNhbPfwVZSiVPZhJAcn6GmKqdX8nTFV47b6HkmDHssJDDn7nM0Uq 7ztVexA2PtdLS9spl/o+uklSSg2mKno4ORwCGkVLzNXjcXkNxAg9cH229YkMlMQ1x4Rj steg6LzbkolkoFQmlPlomgvAEiQ9OrsHxZtdjhyg4aD/712C7N89KWpqisvMK92dBpfQ 2utA== X-Gm-Message-State: AOAM5316ws+YNIMMQQxUpaCR2ntT7c1znHlMkEzM+2EEZmC5unkolONs JvGDnAPOk273icLfvaxUFSaoWA== X-Google-Smtp-Source: ABdhPJxdkuVMxqA0Mf7/yk85MFls20O2MKUcPt4GBl1oKxe84zIZzY11kZRMRivmYWaNd1HEkFq1iw== X-Received: by 2002:adf:aad1:: with SMTP id i17mr10102202wrc.360.1599750344653; Thu, 10 Sep 2020 08:05:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:44 -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 v5 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Date: Thu, 10 Sep 2020 16:06:25 +0100 Message-Id: <20200910150631.2178970-2-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 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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 53 ++++++++++++++++---------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 71ecf3ef5ab2..475d4f60185c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1326,54 +1326,65 @@ 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; 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); + 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 Thu Sep 10 15:06: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: 11768919 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 1FE74746 for ; Thu, 10 Sep 2020 19:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0462C2076C for ; Thu, 10 Sep 2020 19:35:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VO7fpuHq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727900AbgIJTfb (ORCPT ); Thu, 10 Sep 2020 15:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731390AbgIJPn1 (ORCPT ); Thu, 10 Sep 2020 11:43:27 -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 0D49BC061796 for ; Thu, 10 Sep 2020 08:05:47 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id a9so381410wmm.2 for ; Thu, 10 Sep 2020 08:05:46 -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=TSmlKxa8tfftdzKPtW1OR0b3dc7k+Gxn+7syuplFMNk=; b=VO7fpuHqsdhMHthwTUSalazntVQBN4BaxAdhtZ3mhGhxzgk6z9lyBeCGM0jG1aWkAS IqBgziRfD7RUCgTPh/ZzKJCDmskLEGmJaT+5ayggvKm8SYYyrcUCLdPBLB90qEND90io Snz27uNhXQn/fMWJ1ibTnK4VZXxY4TDaIxS8y+CeeDawO1LP1VUvI4OT+imCQFtsZzq+ PaFaJVPOW2fcf9N/qzzpl7KeMpvVlhcx3Er+uHMDU93BjlSKJnfFVMFVPx+TbGPY2JSO 3eaZ1Z3Q/aqrR8bvyyu7VFWsIGQ2oo9q0adDade4MJzDpuQpE+oose9SZkmgqhOuIAxm v0Aw== 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=TSmlKxa8tfftdzKPtW1OR0b3dc7k+Gxn+7syuplFMNk=; b=Cm70qt77bxfDgXVEp+buTmjNXGysJR2SBA+hVgs6dngRssELRat+ZBsVdy4lV9uxPz zsUMi7cIq921FqsUy9PQV98COd4OthJk4ZQPlBTFMdHTDp+WndWpBVu0N8Q5vj1FUhn2 D+j8+gPPt4ROZ7Km368Tf+Roe53lKJ9NR2vC4hn6wb26t2CM3fRwjkcCiDRPfgKNqlWN 0Kokot/i584Pe/GGFopBwhUEMst73iEVRVL1/eh90B3UzpbRYLA4WWPwkrLHV1mokvH4 2yvU9ULf37Hl3bmQLSSNdurndEQSfmN5/wgx1WZZhA+oUAm7xlTMBCuQPMd5JsRlOw2t 2CfA== X-Gm-Message-State: AOAM532Swl/zpddJJxTwglevHnXSk/Hjfld8Lo2aWMIg9FfxODIMpwFF J9bVqgEPwTXUHwUx6yNLBpjB9Q== X-Google-Smtp-Source: ABdhPJx0WC1q/RTRjPht3KQ7gJ75fYdvk9kb4/qf7SjD+K2hrScX9W21U5af7ztcfjY2Z1Qm56rUlg== X-Received: by 2002:a7b:cb47:: with SMTP id v7mr470670wmj.36.1599750345707; Thu, 10 Sep 2020 08:05:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:45 -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 v5 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Date: Thu, 10 Sep 2020 16:06:26 +0100 Message-Id: <20200910150631.2178970-3-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 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 475d4f60185c..fa4357b36a8e 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1624,7 +1624,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; @@ -1650,6 +1649,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 Thu Sep 10 15:06: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: 11768349 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 52E1D698 for ; Thu, 10 Sep 2020 17:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28828206A1 for ; Thu, 10 Sep 2020 17:39:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="M2Wg92rS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727794AbgIJRjN (ORCPT ); Thu, 10 Sep 2020 13:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727853AbgIJRhg (ORCPT ); Thu, 10 Sep 2020 13:37:36 -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 1007AC061799 for ; Thu, 10 Sep 2020 08:05:48 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id a9so381463wmm.2 for ; Thu, 10 Sep 2020 08:05:47 -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=C1kM/nc6ngULE2TMZqCWmpEyLxElDiaI0yH/xvzMhMM=; b=M2Wg92rS/qXH/CKBPOKrB8DyumKnguAlhB9mxAWkLq6IZ7txZ1uptKFQqVwPl/Aldu 0HY3u9jPgVS335mW+yaAKF8P4pV7Dmss/dc516MWRktquag0EZcvrD48lLEQvXu/d2wV QSuf9uBMicyCpg5h1ce7geqEBYE1CDvp6hLctVYA+MeYRfkcV5gQH6Of+ItsfqeNDsEr DXb0tLRloFvMLfDyu3lO2KoQmugmxztfH8t5CIEex/cg3Arxa69oKoOOia9hvP7VvGoq I8STni2IgHRP7Yo2qSsO044hW7sdWpv1moMNaQS7z6lVfcXw39HvBYAqWosCUXoCTG5j Nxhw== 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=C1kM/nc6ngULE2TMZqCWmpEyLxElDiaI0yH/xvzMhMM=; b=c9wOmO494mkdtI7OIU0XmKQhIdZLAup2Ydus18vv9uV5bcqkBOPIaPkeLRVFz29gSN uBNOcJDy7B3G6/cfNPaDzJdYYAWweVUuSgGtN+mQxRniGu20LMi7RiRFoCEIDeRTyYYS xZykvK2uqroMikr+/kkHvK2TS8sx3ScFVh1ltz+KNjElIONMBoYzQHsugQH18TTlmya6 as5F8SRTVQNVQ94p5wLvW2ozJ/ZHM98WV25/ojj6mcmryKQmRTQNIOhbUMKJbgaWM3/a xmXLFzGbRlvrVobtxh2X5JEE+szJyroEOXiphKETL1WuedCjEx9oNdBT5ySl716HbGOL BQUQ== X-Gm-Message-State: AOAM533bgjkLiXEf0zzrzzRN65jp1z1OEtOg49s/aEkX+pIGKnXf0RqZ Yc37v1VCFgGALN4YZhhmFOpxzg== X-Google-Smtp-Source: ABdhPJyMhq5Oev5MwsqfgmOkHLnBUvi67jZCh7iGWgKNqyWwwmcA5J4VEpIClMWJFJF/3vM0H6QX/w== X-Received: by 2002:a1c:2501:: with SMTP id l1mr525100wml.16.1599750346719; Thu, 10 Sep 2020 08:05:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:46 -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 v5 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Date: Thu, 10 Sep 2020 16:06:27 +0100 Message-Id: <20200910150631.2178970-4-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 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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 175 ++++++++++++++----------- 1 file changed, 95 insertions(+), 80 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index fa4357b36a8e..4be9def9509c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1402,6 +1402,100 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif, return ret; } +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); +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); + + 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) { @@ -1505,7 +1599,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, @@ -1557,7 +1650,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); @@ -1571,84 +1663,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 Thu Sep 10 15:06: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: 11768933 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 062FE139F for ; Thu, 10 Sep 2020 19:39:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0CDA21556 for ; Thu, 10 Sep 2020 19:39:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VuGX6XAd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbgIJTjG (ORCPT ); Thu, 10 Sep 2020 15:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731296AbgIJPmg (ORCPT ); Thu, 10 Sep 2020 11:42:36 -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 E1300C06179A for ; Thu, 10 Sep 2020 08:05:48 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id t10so7101229wrv.1 for ; Thu, 10 Sep 2020 08:05:48 -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=I/9+HeHIB4nGhFjGnD4wvRk8F1lVUy5xO8WmHdgPIRA=; b=VuGX6XAdUz+CWmKY8YPSLDHRfNol9VqmNpnXK8TpWu5wmj4saYILPPaOnAzrnPGPEq W0OadQKTk+/mpMQDQD+eJbGMMKxo2pyPGnpG/dmx4BBikw3a7kaIh9Dfd1dowIa5RtsE n3uaa1SjHJDwg4bDgiuqTNE/+NDlDN+DDp//OLdzi8bzsrnLuP5+Qoy+RD/THyyKhuHK pLIXfOB7o3LUmFeaM9spfWKujQMNlDKw0Yv6AiWnG/j+cLZojNiJP7fbP6JPCe8LX6cL IF/pbhn45wRTlMlU3V0onffULkWGIyBoFHRdG+lzUL+fgPng8QLF12zLNnVyk1aXKzZ8 t+4g== 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=I/9+HeHIB4nGhFjGnD4wvRk8F1lVUy5xO8WmHdgPIRA=; b=XUjIPTgwLMi29YkLtPvegEiz+sTLjmZq/LLaVGOxTZqndlaJuJ8Pf1SJAo6oTJD8AA Ciz5aGDcUp1HbP9IXeWSfzit+KfaqdXpxJzeorgXT+tStYMO8BNVKDGg4sIip3p48SMb A0vVVRlwvmPa9mla4bkyjtKzYfKm/98Av5U7i/0QYtyf80mLdlgn2z8MQuGT2VQVKpWl +97TZxkVqM6YJZIk5qY5drBnFlQ1UA4N8S3p/TzGdIzB3QF0Ol4eEWR90EkVm9in/Mxp rl3VMUZL0944PWcs1+vl8/KLNH58eih7QzZx/65x+tRuDWesVqZ+r2etd4tHjhM/IDJ9 xF5Q== X-Gm-Message-State: AOAM532wuotb+0AFREMOx0i9wPuWohE2qBvfkjLU9oOQAaGDFTKQSk+q +hdfuxGleFI/ppaGTYXn9O4W612jO0zz3A== X-Google-Smtp-Source: ABdhPJzy6SyGcQN75aBmzoICxCibyDa0MBYkk12xCAPeQIM+z+FPclZa7b2YsjuPLwiUC97DLHhjcQ== X-Received: by 2002:adf:a18c:: with SMTP id u12mr10080362wru.90.1599750347566; Thu, 10 Sep 2020 08:05:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:47 -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 v5 4/7] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally Date: Thu, 10 Sep 2020 16:06:28 +0100 Message-Id: <20200910150631.2178970-5-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 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 Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 116 +++++++++++++------------ 1 file changed, 61 insertions(+), 55 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4be9def9509c..809a4c0899ff 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1497,10 +1497,14 @@ void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn, } static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, - const struct wcn36xx_hal_config_bss_req_msg *orig) + 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; @@ -1514,72 +1518,74 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, bss = &msg_body->bss_params; sta = &bss->sta; + memset(&bss_v0, 0x00, sizeof(bss_v0)); + 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)); @@ -1679,7 +1685,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 Thu Sep 10 15:06: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: 11768153 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 CCA6759D for ; Thu, 10 Sep 2020 16:31:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0457214F1 for ; Thu, 10 Sep 2020 16:31:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ucpAjTCa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726932AbgIJQaq (ORCPT ); Thu, 10 Sep 2020 12:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726815AbgIJQ1g (ORCPT ); Thu, 10 Sep 2020 12:27:36 -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 C5BC4C0617A1 for ; Thu, 10 Sep 2020 08:05:49 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id a17so7082474wrn.6 for ; Thu, 10 Sep 2020 08:05: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=DQTt4ZJIu8GTxj+4B1cvxGG4nybh/ZrPxormf6iSTCU=; b=ucpAjTCaNTUlZJQEWLRjLbssJXBm1SZt/yxRqtoouzmk77RdUBsbFmOShJDl8PD6TG d4hbRJLnGhz354i7xar3axwWUh7cBcuwfxj3pCoA90tiBAUdv7fp17i9EZ1sFz0gFH/u R2nNEyrSwuWHVq30F8dDq3BkvOQGUfF3/rCvazqpC5vOEyTWYZxpCZPULItp+YzZA4wv IoarB7c3QNy1ue7JgiQ9/nnGLEpjBUVVT1Te4Quc+FFRXR8g9ZfktV5/M6G+E6IINyL3 siYscq+JNeFURo//EjmCllqq/ysPNQzvCOrDeeY9lpp6BLPMd5g36ABIJx5VN/5kh8k8 D1LQ== 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=DQTt4ZJIu8GTxj+4B1cvxGG4nybh/ZrPxormf6iSTCU=; b=Q+0uolXp0QJROF0xpLnqfY3ln9y0LI4mNYJYDyj1wGQa65FSjo2DIPbRTSbdpMFXQA TLShMASw42SrFN++eZhaeTULZCtIs3IwTaHUIQMwTKko/tB6q5ZJUD+zFjyz0470E1IU Cki/BJ4ylbA8ttH3wpvBnPyDLj0CYJ+ZqkX0f3mXNJ4+F78gmvm0YHCWWgZiXbMp/jpN nWndUsD2sARIOY/SEtaPuImf85IouoJskwY9goRFBU8pa3QcNXAi9QtZs7lShVPbsjms mFBrimX1nuy4jtrAVM3ZwvB5Zr9jNznUgaonFGEWlgbQvlCUav7d3CkSgaRkBk4Pj35X Yu0A== X-Gm-Message-State: AOAM533PnfG/dPsUUzIKUSOxl1Zc2Xh5IvjRPMzDypHodT982BYvPzG4 yK5DTVPIwOwv8SdX72U5CUAAkw== X-Google-Smtp-Source: ABdhPJz/fUEoROVUDl7E48VmQ537BDAItWSpzRBNr29zyul28DvOpDeBheLu46NjAFCh0vSm8gN0Ow== X-Received: by 2002:a5d:4d8a:: with SMTP id b10mr9498645wru.82.1599750348555; Thu, 10 Sep 2020 08:05:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:48 -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 v5 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Thu, 10 Sep 2020 16:06:29 +0100 Message-Id: <20200910150631.2178970-6-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 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 | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 809a4c0899ff..57833eec16eb 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1605,6 +1605,50 @@ 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); +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 Thu Sep 10 15:06: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: 11768911 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 8F2B8139F for ; Thu, 10 Sep 2020 19:34:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73B3921D81 for ; Thu, 10 Sep 2020 19:34:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EpVdyZCt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727938AbgIJTeU (ORCPT ); Thu, 10 Sep 2020 15:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730865AbgIJPq4 (ORCPT ); Thu, 10 Sep 2020 11:46: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 BCB5DC0617A2 for ; Thu, 10 Sep 2020 08:05:50 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id s12so7050992wrw.11 for ; Thu, 10 Sep 2020 08:05: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=Vs96u/qi7chpLeX5SwWqqSg+eACXy2WDHCGDCKt1xWU=; b=EpVdyZCt6A7xsrh45J2RD2x0lR3dYPwxd8i6XP3A+vCmpVx5iv66Upql1TH5ezlixe Q8pMtpLBWKf9dCtZW8xP9vrrkcYsn4kbS4r1Yf1p/XqMbh2I8zZqUa50+QRJrQd9Nqig emrzwZG6AkP9AkJ2P+9M3wIOtTlmf4CUFCMo/pjpy/s/L+rDgL0cueu2Ca+7HfzszvK+ 2UIideNvjNyYoQ1gff/hPYlwlA4AHDqKIg76LSOYDG3O3R1El/WozPL1C9owmBy5uWZ+ BAqBOFcV9QIfT8K4wgqydBW4Pe7S5WidrPmsXc2LA/wpeMu73Xcw+a0yE2bYmJbOciTG g+cA== 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=Vs96u/qi7chpLeX5SwWqqSg+eACXy2WDHCGDCKt1xWU=; b=V/2iJrUJW3JvIknsLdKnfPgAZDtkVvgKNRuLVpGihSvvo6OLbemK2poFoA/+HipiD3 O/scq/U6BDfiQyKIq8eKWmOz/BeQx87dJnhErOS9VAfA109R+Fzmu5nA334hfJpRslO1 WLsqrtgKyx5DYlshrm6yPuCopqC4ddqc9kG2SfiNbANJ0Pr+YNY+7rXmEHXTitopM8Gb 0fJ94w9e/Wo8sK8JGg6wZsPppIcdf+ASI8NL/2rDx1vIIzwyQvRAadYvt7dA+FsEOr09 Qp1eMCPhy5EQtIaxh5l/HwdqOhZYbW3dLUpeNt4RIGybOzZUPXRqZZafTwheLEsdRBAi zKgw== X-Gm-Message-State: AOAM530Bej5qkpLTrwLNiWdaNcmZ1riQ4tG+cKJuYfijuIIDJYFAUrtw aJqdD2Zwp8CwVRVaB4yxBdpTJA== X-Google-Smtp-Source: ABdhPJyh+mqxzOs0kYND7lZrQHcHGnMYyUWJulh+IgHFStK7UShjCXPwAkVcfeNRZq1cMCZODFuHsw== X-Received: by 2002:a5d:668b:: with SMTP id l11mr9187531wru.89.1599750349431; Thu, 10 Sep 2020 08:05:49 -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.48 (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 Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v5 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Date: Thu, 10 Sep 2020 16:06:30 +0100 Message-Id: <20200910150631.2178970-7-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 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 57833eec16eb..5ae6a2ccfebc 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1731,9 +1731,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 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: 11768419 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 4DCE2698 for ; Thu, 10 Sep 2020 17:43:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2401320795 for ; Thu, 10 Sep 2020 17:43:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XJRTNmuF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbgIJRnG (ORCPT ); Thu, 10 Sep 2020 13:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbgIJRmh (ORCPT ); Thu, 10 Sep 2020 13:42:37 -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 ADC83C0617A3 for ; Thu, 10 Sep 2020 08:05:51 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z1so7089102wrt.3 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=EbDJcJJyssYPd0DZHyuwhEJPqnaMW7ZQJzd8hheUZ88CyYiXnm74D3Ff5U2pFrpi55 qxSPXgCO11lCY1S0u8mdLXlKRNcI9Pr04lZnjcfqwqU+iyKtDRXw8qqAZwx0BISI7NDk 4n1vIwLN1dXZDUQdKTjAqTnzRTiL9GNROkb3KFn6xotzMzZI4vC3Zq8bZ/Osx5GSF2ZC 4+ZlEZ1WSvyxQ0e/JYwYH4CUfX/QkOJBJeBJddgNhAQATr97qREz3J5N8M/dGdHTJWud kOcYfcGgKJM/e7dGpGsSZ4TMJZyHgL1JdTzXleJd2mKknGsONOLj8piG/Lx8ruix6xDT knpw== X-Gm-Message-State: AOAM530t42LsC7KhHW0NUTDrbyLFd1ksvZWHFF95gLpXvU+LTbSdd06U z1rTfGfFYJL1S6h39UIH7EZGFw== X-Google-Smtp-Source: ABdhPJxsNW1RrlTNM94g+Yj6nMxOB88SLLJn44sqRjUg2sXjVMMGC8PrQ2+IrzN3cb5mOp5Vk2AeVw== 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 Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.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 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 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; }