From patchwork Thu Sep 10 15:08:44 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: 11768913 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 7E9D4159A for ; Thu, 10 Sep 2020 19:34:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C90421D92 for ; Thu, 10 Sep 2020 19:34:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EAtrRbzx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgIJTeS (ORCPT ); Thu, 10 Sep 2020 15:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731405AbgIJPsO (ORCPT ); Thu, 10 Sep 2020 11:48:14 -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 988E1C061347 for ; Thu, 10 Sep 2020 08:07:59 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id x14so7053429wrl.12 for ; Thu, 10 Sep 2020 08:07:59 -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=bux7fAG0+zOODRO5fQccC45bmW3bWHTSwsrxqwBCgeg=; b=EAtrRbzxlI8L7D+Mx1FEFBHBOY14RfStjnJdk7p0Gt4QMaL/0kDxz52hvNrTiFPO1I B7bd4UNzRxFRoF1cQGLBVMLkisIm6yqsSXH+4WAYWQrJMpF37g/sVqe6TakU9cvlp9LK 9dRlP/IZPy1mZucFDmuAg9O9LOJO+U2sdsAgjmY+NwnC0UdHeM7pU8+gLmH8J+gF9KoZ SrIrHTOVDM7C0rAgLdk8MSEBugeYEF1qAoVAT4Pkp69vWx0kt6SoSoo8aXgJS5mlJtmG m1tkznaKYVKtRgqHLzM+1qIpdw6j1tliiiwcOFTpx0B0sU+Mv3qTed0Vf9vJVwXEk6Ru PQhA== 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=bux7fAG0+zOODRO5fQccC45bmW3bWHTSwsrxqwBCgeg=; b=eUSVVCM9sxFyC1C0BTUXdoWA3yHltarzkjtp3+n7PRu7s0l/S/7OIZa35c+6q57ulG Mn9QSjinUO/ILOs8Xm5eMbsmo5sXgKoFdeBrd6zSPaY7AeMZDVHJSh1uMK2TK+YQkAqC eU5ycMCELEY1VXjjBo2bZsOny+/zEUUcc6eM3UMoyT3r1VCx5RQ3YAS174l24ZRzkeBZ gXRj2CkXEGu+ZHHK/F5c6kasrkc4MFwKgRcRIGI3k2PoERDD7/JTIjOZnWJK1rXOicyK VO1GIDvm+Ddap6pxsePKP2gScQ0JgEXEQ1FCE21fiSbe2IAbA+wxLl5X+wdHkL6OgSlx /oHg== X-Gm-Message-State: AOAM531cow9K6GWLtxYopys4dtZPItFmSv8dHUFrCS/uvMynOUZ4+a1i GNw8djwhI7/7niwyVrjSDRr/xg== X-Google-Smtp-Source: ABdhPJxY3awhQi65w0bK3UUvTHgep0wUBRBirhrhvW+wuRnVmMrPNrPo0xeU2ACrAxqCZHT7e6w82w== X-Received: by 2002:adf:a1d6:: with SMTP id v22mr9788348wrv.185.1599750478327; Thu, 10 Sep 2020 08:07:58 -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 a17sm9732901wra.24.2020.09.10.08.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:57 -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/2] wcn36xx: Mark internal smd functions static Date: Thu, 10 Sep 2020 16:08:44 +0100 Message-Id: <20200910150845.2179320-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150845.2179320-1-bryan.odonoghue@linaro.org> References: <20200910150845.2179320-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 marks all smd.c functions that are only used inside of smd.c as static. Previous commits added some VHT specific setup functions non-static which is the right thing to do in terms of having granular git commits that compile warning free. What we really want is for local not global scope on those functions. This patch makes the conversion from global to local scope. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 61 ++++++++------------------ 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index e74abc153153..bccdae62ffbc 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -80,7 +80,7 @@ static struct wcn36xx_cfg_val wcn36xx_cfg_vals[] = { WCN36XX_CFG_VAL(ENABLE_DYNAMIC_RA_START_RATE, 133), /* MCS 5 */ }; -struct wcn36xx_cfg_val wcn3680_cfg_vals[] = { +static struct wcn36xx_cfg_val wcn3680_cfg_vals[] = { WCN36XX_CFG_VAL(CURRENT_TX_ANTENNA, 1), WCN36XX_CFG_VAL(CURRENT_RX_ANTENNA, 1), WCN36XX_CFG_VAL(LOW_GAIN_OVERRIDE, 0), @@ -242,11 +242,7 @@ static void wcn36xx_smd_set_bss_ht_params(struct ieee80211_vif *vif, } } -void -wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct wcn36xx_hal_config_bss_params_v1 *bss); -void +static void wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct wcn36xx_hal_config_bss_params_v1 *bss) @@ -283,10 +279,7 @@ 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); -void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, +static void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, struct ieee80211_sta *sta, struct wcn36xx_hal_config_sta_params_v1 *sta_params) { @@ -308,9 +301,7 @@ void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, } } -void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta, - struct wcn36xx_hal_config_sta_params_v1 *sta_params); -void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta, +static void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta, struct wcn36xx_hal_config_sta_params_v1 *sta_params) { if (sta->ht_cap.ht_supported) { @@ -335,9 +326,7 @@ static void wcn36xx_smd_set_sta_default_ht_params( sta_params->dsss_cck_mode_40mhz = 1; } -void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, - struct wcn36xx_hal_config_sta_params_v1 *sta_params); -void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, +static void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_params_v1 *sta_params) { if (wcn->rf_id == RF_IRIS_WCN3680) { @@ -353,9 +342,7 @@ 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); -void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn, +static 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) @@ -1376,12 +1363,7 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } -void -wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct wcn36xx_hal_config_sta_params_v1 *sta_par); -void +static void wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, @@ -1520,18 +1502,12 @@ 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) +static 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); @@ -1736,12 +1712,11 @@ 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) +static 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; From patchwork Thu Sep 10 15:08:45 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: 11768097 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 AB6F3746 for ; Thu, 10 Sep 2020 15:50:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 855832076C for ; Thu, 10 Sep 2020 15:50:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zD3wpIpR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731443AbgIJPuB (ORCPT ); Thu, 10 Sep 2020 11:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731399AbgIJPsN (ORCPT ); Thu, 10 Sep 2020 11:48:13 -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 93D5DC061348 for ; Thu, 10 Sep 2020 08:08:00 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id c18so7072191wrm.9 for ; Thu, 10 Sep 2020 08:08:00 -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=jLFPvFT3j2ucUrOKv+CXZzEP/po/jvIwEnOoqRXFc6s=; b=zD3wpIpRmsJGa9vb5i2t8lVxubP9ExGeUWJVoxOZwW6zHYetHYrFFZznVdgk5jUNqf vFl3b8QWWeMUdL4a6qwFczTkxoWI6mDpfS91TwyNp49iqdQpuY9DX5AgfCFcxHPEA2/s rMgSOwPd1nBCKJaIChk45TMohRsS6ypb6Mebyvaft9x3M+HJdt6p1W1xE9mAh1fBO4o6 rFsukhnIYd9LcXdFfoMomTUcme2NK2f2/0RH8OkxPCruf5kArwpMj8kLDEDJIx3MFDXY Xgwr4IyWX4zuZcywAqIOdXR3e069nLv2NT6twojlVD47U7k9MXdi9StBaG/FHwn+RkSs 6eqQ== 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=jLFPvFT3j2ucUrOKv+CXZzEP/po/jvIwEnOoqRXFc6s=; b=WJ4tGsu+cZnVwl+EWaN5tR6YNWZ6Ai8kYHzBHjv/iKjI+cz4uu35HaI8mTZeLDzCxt 5cmnVLazrUzP4bTWoPIE9zV8oq694Yqj4Mj4KiUwW+XYyFINc2uUzj4vbd7XgidOvIi1 nDI4+YmbRKN3ph7uCTC9qWvPbE7g4su2vPr1SJZp31f0vmH/uXfIbfxLtooSnb8DVbQS p1H8dAiy+quaQbUg73wqMT4rgtlD07w0n4PKKAqvRGGwlaW0vWeka7hgYon70rkYAJyQ 0TMncpxfsTqCYWmeF/QiT8kD/GgcygkSYWG5N8U2E+giDdIaLj+wJbTTFPkPRYbGfBmg cnUA== X-Gm-Message-State: AOAM531NWunfS/MLwUq+to4ltAz1mJCcK1WLgZ1lb5eiW/0ddXFUweEY 8LhN/lKT1omM44NZYZ1516k51A== X-Google-Smtp-Source: ABdhPJwrR5byj619IrTorj9k0YRpmbfDjUB9uVdEbOgAB9MuTGrpnDd1oAcCoNcal61hykMVSPF4+g== X-Received: by 2002:a5d:69c9:: with SMTP id s9mr9424456wrw.348.1599750479241; Thu, 10 Sep 2020 08:07:59 -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 a17sm9732901wra.24.2020.09.10.08.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:58 -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/2] wcn36xx: Ensure spaces between functions Date: Thu, 10 Sep 2020 16:08:45 +0100 Message-Id: <20200910150845.2179320-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150845.2179320-1-bryan.odonoghue@linaro.org> References: <20200910150845.2179320-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 is a small update to fix an error I saw where a few functions do not have a blank line in between them. Affects smd.c and main.c - no logic is affected by this change. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 1 + drivers/net/wireless/ath/wcn36xx/smd.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 43596b919ed7..706728fba72d 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -775,6 +775,7 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, sta->vht_cap.vht_mcs.tx_mcs_map; } } + void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) { u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES] = { diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index bccdae62ffbc..766400f7b61c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -218,6 +218,7 @@ static inline u8 is_cap_supported(unsigned long caps, unsigned long flag) { return caps & flag ? 1 : 0; } + static void wcn36xx_smd_set_bss_ht_params(struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct wcn36xx_hal_config_bss_params *bss_params) @@ -2191,6 +2192,7 @@ int wcn36xx_smd_exit_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif) mutex_unlock(&wcn->hal_mutex); return ret; } + int wcn36xx_smd_set_power_params(struct wcn36xx *wcn, bool ignore_dtim) { struct wcn36xx_hal_set_power_params_req_msg msg_body; @@ -2220,6 +2222,7 @@ int wcn36xx_smd_set_power_params(struct wcn36xx *wcn, bool ignore_dtim) mutex_unlock(&wcn->hal_mutex); return ret; } + /* Notice: This function should be called after associated, or else it * will be invalid */ @@ -2899,6 +2902,7 @@ static void wcn36xx_ind_smd_work(struct work_struct *work) kfree(hal_ind_msg); } } + int wcn36xx_smd_open(struct wcn36xx *wcn) { wcn->hal_ind_wq = create_freezable_workqueue("wcn36xx_smd_ind");