linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 07/21] iwlwifi: pass the iwl_trans instead of cfg to some functions
Date: Tue,  3 Sep 2019 10:37:00 +0300	[thread overview]
Message-ID: <20190903073714.32278-8-luca@coelho.fi> (raw)
In-Reply-To: <20190903073714.32278-1-luca@coelho.fi>

From: Shaul Triebitz <shaul.triebitz@intel.com>

A few functions were receiving the iwl_cfg struct directly, but we
will also need other parts of the trans, so pass the trans (which
includes the cfg) to them.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index e43e452403f5..83d4311e83d7 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -393,11 +393,12 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
 	return n_channels;
 }
 
-static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
+static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
 				  struct iwl_nvm_data *data,
 				  struct ieee80211_sta_vht_cap *vht_cap,
 				  u8 tx_chains, u8 rx_chains)
 {
+	const struct iwl_cfg *cfg = trans->cfg;
 	int num_rx_ants = num_of_ant(rx_chains);
 	int num_tx_ants = num_of_ant(tx_chains);
 	unsigned int max_ampdu_exponent = (cfg->max_vht_ampdu_exponent ?:
@@ -669,11 +670,13 @@ static void iwl_init_he_hw_capab(struct ieee80211_supported_band *sband,
 	}
 }
 
-static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
+static void iwl_init_sbands(struct iwl_trans *trans,
 			    struct iwl_nvm_data *data,
 			    const void *nvm_ch_flags, u8 tx_chains,
 			    u8 rx_chains, u32 sbands_flags, bool v4)
 {
+	struct device *dev = trans->dev;
+	const struct iwl_cfg *cfg = trans->cfg;
 	int n_channels;
 	int n_used = 0;
 	struct ieee80211_supported_band *sband;
@@ -701,7 +704,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
 	iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ,
 			     tx_chains, rx_chains);
 	if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac)
-		iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap,
+		iwl_init_vht_hw_capab(trans, data, &sband->vht_cap,
 				      tx_chains, rx_chains);
 
 	if (data->sku_cap_11ax_enable && !iwlwifi_mod_params.disable_11ax)
@@ -1019,7 +1022,7 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 	if (iwl_nvm_no_wide_in_5ghz(dev, cfg, nvm_hw))
 		sbands_flags |= IWL_NVM_SBANDS_FLAGS_NO_WIDE_IN_5GHZ;
 
-	iwl_init_sbands(dev, cfg, data, ch_section, tx_chains, rx_chains,
+	iwl_init_sbands(trans, data, ch_section, tx_chains, rx_chains,
 			sbands_flags, false);
 	data->calib_version = 255;
 
@@ -1485,7 +1488,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
 	channel_profile = v4 ? (void *)rsp->regulatory.channel_profile :
 			  (void *)rsp_v3->regulatory.channel_profile;
 
-	iwl_init_sbands(trans->dev, trans->cfg, nvm,
+	iwl_init_sbands(trans, nvm,
 			channel_profile,
 			nvm->valid_tx_ant & fw->valid_tx_ant,
 			nvm->valid_rx_ant & fw->valid_rx_ant,
-- 
2.23.0.rc1


  parent reply	other threads:[~2019-09-03  7:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  7:36 [PATCH 00/21] iwlwifi: updates intended for v5.4 2019-09-03 Luca Coelho
2019-09-03  7:36 ` [PATCH 01/21] iwlwifi: separate elements from cfg that are needed by trans_alloc Luca Coelho
2019-09-03  7:36 ` [PATCH 02/21] iwlwifi: pcie: use the cfg we passed to iwl_trans_pcie_alloc() Luca Coelho
2019-09-03  7:36 ` [PATCH 03/21] iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe Luca Coelho
2019-09-03  7:36 ` [PATCH 04/21] iwlwifi: pcie: set iwl_trans->cfg later in the probe function Luca Coelho
2019-09-03  7:36 ` [PATCH 05/21] iwlwifi: pass the iwl_config_trans_params when needed Luca Coelho
2019-09-03  7:36 ` [PATCH 06/21] iwlwifi: add a pointer to the trans_cfg directly in trans Luca Coelho
2019-09-03  7:37 ` Luca Coelho [this message]
2019-09-03  7:37 ` [PATCH 08/21] iwlwifi: always access the trans configuration via trans Luca Coelho
2019-09-03  7:37 ` [PATCH 09/21] iwlwifi: fix warning iwl-trans.h is included more than once Luca Coelho
2019-09-03  7:37 ` [PATCH 10/21] iwlwifi: add support for suspend-resume flow for new device generation Luca Coelho
2019-09-03  7:37 ` [PATCH 11/21] iwlwifi: add sta_id to WOWLAN_CONFIG_CMD Luca Coelho
2019-09-03  7:37 ` [PATCH 12/21] iwlwifi: mvm: drop BA sessions on too many old-SN frames Luca Coelho
2019-09-03  7:37 ` [PATCH 13/21] iwlwifi: mvm: handle BAR_FRAME_RELEASE (0xc2) notification Luca Coelho
2019-09-03  7:37 ` [PATCH 14/21] iwlwifi: mvm: add support for single antenna diversity Luca Coelho
2019-09-03  7:37 ` [PATCH 15/21] iwlwifi: mvm: don't log un-decrypted frames Luca Coelho
2019-09-03  7:37 ` [PATCH 16/21] iwlwifi: add iwl_tlv_array_len() Luca Coelho
2019-09-03  7:37 ` [PATCH 17/21] iwlwifi: dbg_ini: remove apply point, switch to time point API Luca Coelho
2019-09-03  7:37 ` [PATCH 18/21] iwlwifi: fw api: add DRAM buffer allocation command Luca Coelho
2019-09-03  7:37 ` [PATCH 19/21] iwlwifi: dbg_ini: fix dump structs doc Luca Coelho
2019-09-03  7:37 ` [PATCH 20/21] iwlwifi: dbg_ini: remove periodic trigger Luca Coelho
2019-09-03  7:37 ` [PATCH 21/21] iwlwifi: dbg: remove iwl_fw_cancel_dumps function Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903073714.32278-8-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).