linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Liad Kaufman <liad.kaufman@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 28/33] iwlwifi: tlv: add support for IWL_UCODE_TLV_SDIO_ADMA_ADDR TLV
Date: Tue, 30 Dec 2014 16:19:03 +0200	[thread overview]
Message-ID: <1419949148-24046-28-git-send-email-emmanuel.grumbach@intel.com> (raw)
In-Reply-To: <1419948357.21410.4.camel@egrumbacBox>

From: Liad Kaufman <liad.kaufman@intel.com>

A new TLV supplies the ADMA address for SDIO mode, allowing
the driver to configure the default base address to be this
(as given in the FW), rather than hardcoding the values to
use until the FW sends the ALIVE message.

Use the value given by the FW in the IWL_UCODE_TLV_SDIO_ADMA_ADDR
TLV for setting the default SDTM base address until the FW sends
the ALIVE message. If it isn't given in the FW - use the current
hardcoded values.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-drv.c     | 6 ++++++
 drivers/net/wireless/iwlwifi/iwl-fw-file.h | 1 +
 drivers/net/wireless/iwlwifi/iwl-fw.h      | 4 ++++
 drivers/net/wireless/iwlwifi/iwl-trans.h   | 4 ++++
 drivers/net/wireless/iwlwifi/mvm/ops.c     | 2 ++
 5 files changed, 17 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index 0381dc4..0d34726 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -903,6 +903,12 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
 					    IWL_UCODE_REGULAR_USNIFFER,
 					    tlv_len);
 			break;
+		case IWL_UCODE_TLV_SDIO_ADMA_ADDR:
+			if (tlv_len != sizeof(u32))
+				goto invalid_tlv_len;
+			drv->fw.sdio_adma_addr =
+				le32_to_cpup((__le32 *)tlv_data);
+			break;
 		default:
 			IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type);
 			break;
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/iwlwifi/iwl-fw-file.h
index f2a047f..752c72b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw-file.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw-file.h
@@ -132,6 +132,7 @@ enum iwl_ucode_tlv_type {
 	IWL_UCODE_TLV_ENABLED_CAPABILITIES	= 30,
 	IWL_UCODE_TLV_N_SCAN_CHANNELS		= 31,
 	IWL_UCODE_TLV_SEC_RT_USNIFFER	= 34,
+	IWL_UCODE_TLV_SDIO_ADMA_ADDR	= 35,
 	IWL_UCODE_TLV_FW_DBG_DEST	= 38,
 	IWL_UCODE_TLV_FW_DBG_CONF	= 39,
 };
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h
index e6dc3b8..ffd785c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@ -152,6 +152,8 @@ struct iwl_fw_cscheme_list {
  * @mvm_fw: indicates this is MVM firmware
  * @cipher_scheme: optional external cipher scheme.
  * @human_readable: human readable version
+ * @sdio_adma_addr: the default address to set for the ADMA in SDIO mode until
+ *	we get the ALIVE from the uCode
  * @dbg_dest_tlv: points to the destination TLV for debug
  * @dbg_conf_tlv: array of pointers to configuration TLVs for debug
  * @dbg_conf_tlv_len: lengths of the @dbg_conf_tlv entries
@@ -181,6 +183,8 @@ struct iwl_fw {
 	struct ieee80211_cipher_scheme cs[IWL_UCODE_MAX_CS];
 	u8 human_readable[FW_VER_HUMAN_READABLE_SZ];
 
+	u32 sdio_adma_addr;
+
 	struct iwl_fw_dbg_dest_tlv *dbg_dest_tlv;
 	struct iwl_fw_dbg_conf_tlv *dbg_conf_tlv[FW_DBG_MAX];
 	size_t dbg_conf_tlv_len[FW_DBG_MAX];
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 10ae9d7..84d8477 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -382,6 +382,8 @@ enum iwl_trans_status {
  *	are considered stuck and will trigger device restart
  * @command_names: array of command names, must be 256 entries
  *	(one for each command); for debugging only
+ * @sdio_adma_addr: the default address to set for the ADMA in SDIO mode until
+ *	we get the ALIVE from the uCode
  */
 struct iwl_trans_config {
 	struct iwl_op_mode *op_mode;
@@ -396,6 +398,8 @@ struct iwl_trans_config {
 	bool scd_set_active;
 	unsigned int queue_watchdog_timeout;
 	const char *const *command_names;
+
+	u32 sdio_adma_addr;
 };
 
 struct iwl_trans_dump_data {
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index 6bb6546..4906967 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -481,6 +481,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 	trans_cfg.cmd_fifo = IWL_MVM_TX_FIFO_CMD;
 	trans_cfg.scd_set_active = true;
 
+	trans_cfg.sdio_adma_addr = fw->sdio_adma_addr;
+
 	snprintf(mvm->hw->wiphy->fw_version,
 		 sizeof(mvm->hw->wiphy->fw_version),
 		 "%s", fw->fw_version);
-- 
1.9.1


  parent reply	other threads:[~2014-12-30 14:20 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30 14:05 pull request: iwlwifi-next 2012-12-30 Grumbach, Emmanuel
2014-12-30 14:18 ` [PATCH 01/33] iwlwifi: remove MODULE_VERSION Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 02/33] iwlwifi: mvm: add fw runtime stack to dump data Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 03/33] Revert "iwlwifi: use correct fw file in 8000 b-step" Emmanuel Grumbach
2015-01-06 17:30   ` Kalle Valo
2014-12-30 14:18 ` [PATCH 04/33] iwlwifi: mvm: support LnP 1x1 antenna configuration Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 05/33] iwlwifi: pcie: let the Manageability Engine know when we leave Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 06/33] iwlwifi: mvm: add debugfs to trigger fw debug logs collection Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 07/33] iwlwifi: mvm: allow RSSI compensation Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 08/33] iwlwifi: mvm: Set the HW step in the core dump Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 09/33] iwlwifi: mvm: clear tt values when entering CT-kill Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 10/33] iwlwifi: mvm: rs: fix max rate allowed if no rate is allowed Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 11/33] iwlwifi: mvm: support additional nvm_file in family 8000 B step Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 12/33] iwlwifi: mvm: add smem content to dump data Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 13/33] iwlwifi: mvm: change SMEM dump to general purpose memory dump Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 14/33] iwlwifi: mvm: convert the SRAM dump to the generic " Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 15/33] iwlwifi: pcie: add basic reference accounting Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 16/33] iwlwifi: mvm: allow both d0i3 and d3 wowlan configuration modes Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 17/33] iwlwifi: support multiple d0i3 modes Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 18/33] iwlwifi: mvm: support IWL_D0I3_MODE_ON_SUSPEND d0i3 mode Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 19/33] iwlwifi: mvm: consider d0i3_disable in iwl_mvm_is_d0i3_supported() Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 20/33] iwlwifi: mvm: wait for d0i3 exit on hw restart Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 21/33] iwlwifi: mvm: support 2 different channels Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 22/33] iwlwifi: dvm: tt: Use setup_timer Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 23/33] iwlwifi: dvm: main: " Emmanuel Grumbach
2014-12-30 14:18 ` [PATCH 24/33] iwlwifi: mvm: clean refs before stop_device() Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 25/33] iwlwifi: remove useless extern definition of iwl4265_2ac_sdio_cfg Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 26/33] iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistently Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 27/33] iwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently Emmanuel Grumbach
2014-12-30 14:19 ` Emmanuel Grumbach [this message]
2014-12-30 14:19 ` [PATCH 29/33] iwlwifi: mvm: ask the fw to wakeup (from d0i3) on sysassert Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 30/33] iwlwifi: mvm: Configure EBS scan ratio Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 31/33] iwlwifi: mvm: call to pcie_apply_destination also on family 8000 B step Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 32/33] iwlwifi: mvm: Alter passive scan fragmentation parameters in case of multi-MAC Emmanuel Grumbach
2014-12-30 14:19 ` [PATCH 33/33] iwlwifi: mvm: rs: organize and cleanup consts Emmanuel Grumbach
2015-01-06 17:37 ` pull request: iwlwifi-next 2012-12-30 Kalle Valo

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=1419949148-24046-28-git-send-email-emmanuel.grumbach@intel.com \
    --to=emmanuel.grumbach@intel.com \
    --cc=liad.kaufman@intel.com \
    --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).