From patchwork Tue Sep 8 18:34:23 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: 11763833 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 96149138E for ; Tue, 8 Sep 2020 18:34:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B7C62080C for ; Tue, 8 Sep 2020 18:34:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qgBhPVuV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731582AbgIHSds (ORCPT ); Tue, 8 Sep 2020 14:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731451AbgIHSdj (ORCPT ); Tue, 8 Sep 2020 14:33:39 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF81C061573 for ; Tue, 8 Sep 2020 11:33:38 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z4so256923wrr.4 for ; Tue, 08 Sep 2020 11:33:38 -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=Qjd8fV7YLxTioYXpGkugtmpc2/qrixUOQBDAVrehnVM=; b=qgBhPVuVYy6Q8M49AdQ4WF2mbirJRIUSI4J3wlYPz640eBCc6tmic0Iz8gxn3XhkQP 7zEGRjAcAPhDHZaCOM5xbJwTtkSzYSoopbdu5Oyh9FiURTVrchtpAW6xCdRo6mBqVp6w Ob3LUy3bw0r5dyGXxrBd4LIIiEueDOIFTMMMe4QfzKIOOSKZnepEenm6IeFPv15fVqCr JH4cYa4DUc8dVsUUlapx8f0t6oCZLdluoixyjs0ftCfoXbtH67WjrI55ZM18zsDXyLUu dWo9hor3bL7D6o3QGYKqjzQCsWdt9Y6lJRubeb+6JTS9cptFtgFJu/1qOkwVngDeCE+u 7KEQ== 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=Qjd8fV7YLxTioYXpGkugtmpc2/qrixUOQBDAVrehnVM=; b=OXrB5pSJZVmXzSNQj/KqYq09pMK3jn0/yMvfYpAPI3z9pMJoJeWntQ2fo10k0H5MY4 FvMGfGt/tUSc72+ShmdYA2lS5HwXXjK+Y5oGLTve07G1ARMGPj5rpE9djDjgTLjIMZRj JOx3hntuYlNWrAW21KePK0au8aE1emjJrvdMjbfbDI9VRGpTHgLb2BEjnWTxoEhct1uN dIqJy4Gopxq7lZHyntU3wtaBa/KbYWrCBKsYYq6jivXrUw2Yo8Ecs6qmAOKEib9hNoEe +s8LQOmjXDYq1FKfZPfJ0QuvbaGGbGFIJw2vSjyTBoKBXkIjymtCi2NSaGWMIM3LCzEk kGnw== X-Gm-Message-State: AOAM532rUYDy/0DvZXK8sbdI3ZLS0vaCqH1LXFBmlgUj0Cu2X7K+8Wga oer4nL6gtvx1EYgo4pupsH/wBA== X-Google-Smtp-Source: ABdhPJy9yk0CEBxQY1XHjqCi42d4Yfn+j1pgsy2tx2kEgJ+QZsQmVd7NTdAGfuZljgSUqD4qXr2NVA== X-Received: by 2002:a5d:4603:: with SMTP id t3mr912133wrq.424.1599590017534; Tue, 08 Sep 2020 11:33:37 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id b194sm294992wmd.42.2020.09.08.11.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:33:37 -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 v3 1/2] wcn36xx: Mark internal smd functions static Date: Tue, 8 Sep 2020 19:34:23 +0100 Message-Id: <20200908183424.2871101-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908183424.2871101-1-bryan.odonoghue@linaro.org> References: <20200908183424.2871101-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 | 34 ++++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index ac10789332d8..a8d2af74ef62 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,7 +242,7 @@ static void wcn36xx_smd_set_bss_ht_params(struct ieee80211_vif *vif, } } -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) @@ -279,7 +279,7 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } -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) { @@ -299,7 +299,7 @@ void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, } } -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) { @@ -324,7 +324,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, +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) { @@ -340,7 +340,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, +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) @@ -1361,7 +1361,7 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } -void +static void wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, @@ -1500,12 +1500,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) +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); struct wcn36xx_hal_config_sta_params *sta_params; @@ -1713,9 +1713,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) +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 Tue Sep 8 18:34:24 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: 11763835 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 9A9A0138E for ; Tue, 8 Sep 2020 18:34:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78AAD2080C for ; Tue, 8 Sep 2020 18:34:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CyfllJee" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729404AbgIHSeI (ORCPT ); Tue, 8 Sep 2020 14:34:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731461AbgIHSdk (ORCPT ); Tue, 8 Sep 2020 14:33:40 -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 4C83AC061756 for ; Tue, 8 Sep 2020 11:33:40 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z1so263904wrt.3 for ; Tue, 08 Sep 2020 11:33:40 -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=fYS/m1bPyZkdQcLi31wUabR/VQlSuGHp2lU5CceXrgc=; b=CyfllJeeN46yeFryr1S/z5scYIs5a4+SXqm2bhA0jRgEMhF8hn2ozQQkxo68RRsiV0 g1Sn+jrSydQwrDsI21h839+RepLjtCQAkOGkT8/pTNeO4jsqfDjnCS66zSTxRL3oYywS VYapWSsfW3HjnpWF14tULNsxcx1U4TbJzrhbgdncavuy2MkwT2Pegv+Bjp7yuUCXtIBB mMydRSsBHZPh4skzyl1qTioW1HMkvReH+qksu0F5EgEzHeNoFo1WtJsNrkG8Af4EsvIl oGEeZ2U1T96Jo3zmJ9HzoEbXon0OjXf+iQDQ09W3ra2rjDKaErFUnkAUfQhrb8gU+w6y xDaA== 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=fYS/m1bPyZkdQcLi31wUabR/VQlSuGHp2lU5CceXrgc=; b=INbSZJ7P33Jeo4DoEe6uXJEM21mV52lT9IDMjgMszchSqLF3glrWjP2EzY+0pZFbbB PBesJ3GJPmxKljwBWnHi6+2VV+Bali4MvAYN8DWpy/ieUptKm7rnGG0XuCD0C3Wn15YE iGmKUpIcOacec7rZ56bJk2ZG0LLHS2/HWOwQOq/l8iMlYmQqfj+AoougEy0v/5JyjHGz ncG7b/zKvOuJguUJqIwPYHUWDxxfwu89aH/WksmQOsKhc1uu2AhrZyB4UoPQevNMr2RB t8GSmsIw3hOfzdxdmzd+OG16T2XC6DuXMLAgLkdPOP2ChVb/2xnzDppeCtfbneEpVN5F 2tvA== X-Gm-Message-State: AOAM531xv5E8LyYPcpB7hfJJ3cIBXuaG1pLvRb6BZTe9HMP8PSqd87cK tv4LnOZFSzQoBt2ydmOak0eu7w== X-Google-Smtp-Source: ABdhPJyziyqMXadeVj5u6zT/yaXIdYXwkRqxxRLkZ7waYIATDzhK5Z/eFJ2N8m/4HG8kn+XstXsl+Q== X-Received: by 2002:a5d:6283:: with SMTP id k3mr969670wru.191.1599590018513; Tue, 08 Sep 2020 11:33:38 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id b194sm294992wmd.42.2020.09.08.11.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:33:38 -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 v3 2/2] wcn36xx: Ensure spaces between functions Date: Tue, 8 Sep 2020 19:34:24 +0100 Message-Id: <20200908183424.2871101-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908183424.2871101-1-bryan.odonoghue@linaro.org> References: <20200908183424.2871101-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 9e97513feeb5..929425415d05 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 a8d2af74ef62..b6e49f8f029b 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) @@ -2192,6 +2193,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; @@ -2221,6 +2223,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 */ @@ -2900,6 +2903,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");