linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull request: iwlwifi 2013-11-19
@ 2013-11-19 20:49 Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs Emmanuel Grumbach
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:49 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 2546 bytes --]

Hi John,

This is a pull request for 3.13.

I have here a few fixes for BT Coex. One of them is a NULL pointer
dereference. Another one avoids to enable a feature that can make the
firmware unhappy since the firmware isn't ready for it yet. WE also
avoid a WARNING that can be triggered upon association in not-so-bad
cases even if the association succeeded. We add support for new NICs
(not yet on the market) and bump the API so that 3.13 will be able to
work with the new firmware that will be out soon hopefully.
I also have a boundary check from Johannes.

I reset my tree to wireless/master as the time of this writing. I did
that mainly because I needed the changes that were in -next before 3.12
went out even if 3.13-rc1 isn't out yet. I plan to rebase my tree on
3.13-rc2 (or 3.13-rc1 if this pull request makes it to 3.13-rc1 but that
seems unlikely).
Tell me if you have any issues.


The following changes since commit 3b1bace9960b0acbcb5d0ca194077f03df7cc2c0:

  brcmfmac: fix possible memory leak (2013-11-18 15:13:01 -0500)

are available in the git repository at:


git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git
for-john

for you to fetch changes up to 8c5ec2eb4a10c588969e6a67239bcabd9a2bf04f:

  iwlwifi: bump required firmware API version for 3160/7260 (2013-11-19
22:32:56 +0200)

----------------------------------------------------------------
Emmanuel Grumbach (5):
      iwlwifi: pcie: refactor a bit the interrupt coalescing
      iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT
      iwlwifi: mvm: BT Coex fix another NULL pointer dereference
      iwlwifi: mvm: don't WARN about unsuccessful time event
      iwlwifi: bump required firmware API version for 3160/7260

Johannes Berg (1):
      iwlwifi: mvm: check sta_id/drain values in debugfs

Oren Givon (1):
      iwlwifi: add new HW - 7265 series

 drivers/net/wireless/iwlwifi/iwl-7000.c       |   29
+++++++++++++++++++++++--
 drivers/net/wireless/iwlwifi/iwl-config.h     |    5 +++++
 drivers/net/wireless/iwlwifi/iwl-csr.h        |    5 +----
 drivers/net/wireless/iwlwifi/mvm/bt-coex.c    |    6 ++++-
 drivers/net/wireless/iwlwifi/mvm/debugfs.c    |    4 ++++
 drivers/net/wireless/iwlwifi/mvm/time-event.c |    7 ++++--
 drivers/net/wireless/iwlwifi/pcie/drv.c       |   22 +++++++++++++++++++
 drivers/net/wireless/iwlwifi/pcie/rx.c        |    4 ++++
 drivers/net/wireless/iwlwifi/pcie/trans.c     |    3 ---
 9 files changed, 73 insertions(+), 12 deletions(-)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 2/7] iwlwifi: pcie: refactor a bit the interrupt coalescing Emmanuel Grumbach
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, stable, Emmanuel Grumbach

From: Johannes Berg <johannes.berg@intel.com>

The station ID must be valid, if it's out of range then
the array access may crash. Validate the station ID to
the array length, and also validate the drain value even
if that doesn't matter all that much.

Cc: stable@vger.kernel.org
Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/debugfs.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 9864d71..a8fe6b4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -119,6 +119,10 @@ static ssize_t iwl_dbgfs_sta_drain_write(struct file *file,
 
 	if (sscanf(buf, "%d %d", &sta_id, &drain) != 2)
 		return -EINVAL;
+	if (sta_id < 0 || sta_id >= IWL_MVM_STATION_COUNT)
+		return -EINVAL;
+	if (drain < 0 || drain > 1)
+		return -EINVAL;
 
 	mutex_lock(&mvm->mutex);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/7] iwlwifi: pcie: refactor a bit the interrupt coalescing
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 3/7] iwlwifi: add new HW - 7265 series Emmanuel Grumbach
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

We changed the timeout for the interrupt coealescing for
calibration, but that wasn't effective since we changed
that value back before loading the firmware. Since
calibrations are notification from firmware and not Rx
packets, this doesn't change anyway - the firmware will
fire an interrupt straight away regardless of the interrupt
coalescing value.
Also, a HW issue has been discovered in 7000 devices series.
The work around is to disable the new interrupt coalescing
timeout feature - do this by setting bit 31 in
CSR_INT_COALESCING.
This has been fixed in 7265 which means that we can't rely
on the device family and must have a hint in the iwl_cfg
structure.

Cc: stable@vger.kernel.org [3.10+]
Fixes: 99cd47142399 ("iwlwifi: add 7000 series device configuration")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-7000.c   |    7 +++++++
 drivers/net/wireless/iwlwifi/iwl-config.h |    3 +++
 drivers/net/wireless/iwlwifi/iwl-csr.h    |    5 +----
 drivers/net/wireless/iwlwifi/pcie/rx.c    |    4 ++++
 drivers/net/wireless/iwlwifi/pcie/trans.c |    3 ---
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index 85879db..2ea4b11 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -130,6 +130,7 @@ const struct iwl_cfg iwl7260_2ac_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL7260_NVM_VERSION,
 	.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl7260_2ac_cfg_high_temp = {
@@ -140,6 +141,7 @@ const struct iwl_cfg iwl7260_2ac_cfg_high_temp = {
 	.nvm_ver = IWL7260_NVM_VERSION,
 	.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
 	.high_temp = true,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl7260_2n_cfg = {
@@ -149,6 +151,7 @@ const struct iwl_cfg iwl7260_2n_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL7260_NVM_VERSION,
 	.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl7260_n_cfg = {
@@ -158,6 +161,7 @@ const struct iwl_cfg iwl7260_n_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL7260_NVM_VERSION,
 	.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl3160_2ac_cfg = {
@@ -167,6 +171,7 @@ const struct iwl_cfg iwl3160_2ac_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL3160_NVM_VERSION,
 	.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl3160_2n_cfg = {
@@ -176,6 +181,7 @@ const struct iwl_cfg iwl3160_2n_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL3160_NVM_VERSION,
 	.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl3160_n_cfg = {
@@ -185,6 +191,7 @@ const struct iwl_cfg iwl3160_n_cfg = {
 	.ht_params = &iwl7000_ht_params,
 	.nvm_ver = IWL3160_NVM_VERSION,
 	.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+	.host_interrupt_operation_mode = true,
 };
 
 const struct iwl_cfg iwl7265_2ac_cfg = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h
index 18f232e..6801c7a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -207,6 +207,8 @@ struct iwl_eeprom_params {
  * @rx_with_siso_diversity: 1x1 device with rx antenna diversity
  * @internal_wimax_coex: internal wifi/wimax combo device
  * @high_temp: Is this NIC is designated to be in high temperature.
+ * @host_interrupt_operation_mode: device needs host interrupt operation
+ *	mode set
  *
  * We enable the driver to be backward compatible wrt. hardware features.
  * API differences in uCode shouldn't be handled here but through TLVs
@@ -235,6 +237,7 @@ struct iwl_cfg {
 	enum iwl_led_mode led_mode;
 	const bool rx_with_siso_diversity;
 	const bool internal_wimax_coex;
+	const bool host_interrupt_operation_mode;
 	bool high_temp;
 };
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 54a4fdc..da4eca8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -495,14 +495,11 @@ enum secure_load_status_reg {
  * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit
  *
  * default interrupt coalescing timer is 64 x 32 = 2048 usecs
- * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs
  */
 #define IWL_HOST_INT_TIMEOUT_MAX	(0xFF)
 #define IWL_HOST_INT_TIMEOUT_DEF	(0x40)
 #define IWL_HOST_INT_TIMEOUT_MIN	(0x0)
-#define IWL_HOST_INT_CALIB_TIMEOUT_MAX	(0xFF)
-#define IWL_HOST_INT_CALIB_TIMEOUT_DEF	(0x10)
-#define IWL_HOST_INT_CALIB_TIMEOUT_MIN	(0x0)
+#define IWL_HOST_INT_OPER_MODE		BIT(31)
 
 /*****************************************************************************
  *                        7000/3000 series SHR DTS addresses                 *
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c
index 3f237b4..83d28bc 100644
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -489,6 +489,10 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq)
 
 	/* Set interrupt coalescing timer to default (2048 usecs) */
 	iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF);
+
+	/* W/A for interrupt coalescing bug in 7260 and 3160 */
+	if (trans->cfg->host_interrupt_operation_mode)
+		iwl_set_bit(trans, CSR_INT_COALESCING, IWL_HOST_INT_OPER_MODE);
 }
 
 static void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq)
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 5d9337b..cde9c16 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -279,9 +279,6 @@ static int iwl_pcie_nic_init(struct iwl_trans *trans)
 	spin_lock_irqsave(&trans_pcie->irq_lock, flags);
 	iwl_pcie_apm_init(trans);
 
-	/* Set interrupt coalescing calibration timer to default (512 usecs) */
-	iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF);
-
 	spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
 
 	iwl_pcie_set_pwr(trans, false);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/7] iwlwifi: add new HW - 7265 series
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 2/7] iwlwifi: pcie: refactor a bit the interrupt coalescing Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 4/7] iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT Emmanuel Grumbach
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Oren Givon, Emmanuel Grumbach

From: Oren Givon <oren.givon@intel.com>

Add new HW IDs and configurations for 7265 series.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-7000.c   |   18 ++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-config.h |    2 ++
 drivers/net/wireless/iwlwifi/pcie/drv.c   |   22 ++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index 2ea4b11..1ed861f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -203,5 +203,23 @@ const struct iwl_cfg iwl7265_2ac_cfg = {
 	.nvm_calib_ver = IWL7265_TX_POWER_VERSION,
 };
 
+const struct iwl_cfg iwl7265_2n_cfg = {
+	.name = "Intel(R) Dual Band Wireless N 7265",
+	.fw_name_pre = IWL7265_FW_PRE,
+	IWL_DEVICE_7000,
+	.ht_params = &iwl7000_ht_params,
+	.nvm_ver = IWL7265_NVM_VERSION,
+	.nvm_calib_ver = IWL7265_TX_POWER_VERSION,
+};
+
+const struct iwl_cfg iwl7265_n_cfg = {
+	.name = "Intel(R) Wireless N 7265",
+	.fw_name_pre = IWL7265_FW_PRE,
+	IWL_DEVICE_7000,
+	.ht_params = &iwl7000_ht_params,
+	.nvm_ver = IWL7265_NVM_VERSION,
+	.nvm_calib_ver = IWL7265_TX_POWER_VERSION,
+};
+
 MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
 MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h
index 6801c7a..03fd9aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -297,6 +297,8 @@ extern const struct iwl_cfg iwl3160_2ac_cfg;
 extern const struct iwl_cfg iwl3160_2n_cfg;
 extern const struct iwl_cfg iwl3160_n_cfg;
 extern const struct iwl_cfg iwl7265_2ac_cfg;
+extern const struct iwl_cfg iwl7265_2n_cfg;
+extern const struct iwl_cfg iwl7265_n_cfg;
 #endif /* CONFIG_IWLMVM */
 
 #endif /* __IWL_CONFIG_H__ */
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 941c0c8..64d6ac5 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -352,7 +352,29 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
 	{IWL_PCI_DEVICE(0x08B3, 0x8570, iwl3160_2ac_cfg)},
 
 /* 7265 Series */
+	{IWL_PCI_DEVICE(0x08B1, 0x0000, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)},
 #endif /* CONFIG_IWLMVM */
 
 	{0}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/7] iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
                   ` (2 preceding siblings ...)
  2013-11-19 20:52 ` [PATCH 3/7] iwlwifi: add new HW - 7265 series Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 5/7] iwlwifi: mvm: BT Coex fix another NULL pointer dereference Emmanuel Grumbach
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

This feature isn't supported by the firmware (yet).
Note that settingt he values to BT_CFG_CMD is harmless if
the validity bit is clear - so keep the configuration
values in BT_CFG_CMD, but clear the validity bit until thes
feature is enabled in the firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/bt-coex.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
index 5d066cb..b647147 100644
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
@@ -391,7 +391,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
 					    BT_VALID_LUT |
 					    BT_VALID_WIFI_RX_SW_PRIO_BOOST |
 					    BT_VALID_WIFI_TX_SW_PRIO_BOOST |
-					    BT_VALID_MULTI_PRIO_LUT |
 					    BT_VALID_CORUN_LUT_20 |
 					    BT_VALID_CORUN_LUT_40 |
 					    BT_VALID_ANT_ISOLATION |
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/7] iwlwifi: mvm: BT Coex fix another NULL pointer dereference
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
                   ` (3 preceding siblings ...)
  2013-11-19 20:52 ` [PATCH 4/7] iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 6/7] iwlwifi: mvm: don't WARN about unsuccessful time event Emmanuel Grumbach
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

This patch is very similar to a previous fix: 22cba0c0852f

When we disassociate, mac80211 removes the station and
then, it sets the bss it unsets the assoc bool in bss_info.

Since the firwmware wants it the opposite (first set the
MAC context as unassoc, and only then, remove the STA of
the API), we have a small period of time in which the STA
in firmware doesn't have a valid ieee80211_sta pointer.
During that time, iwl_mvm_vif->ap_sta_id, is still set
to the STA in firmware that represent the AP.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/bt-coex.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
index b647147..75b72a9 100644
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
@@ -841,6 +841,11 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,
 
 	sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id],
 					lockdep_is_held(&mvm->mutex));
+
+	/* This can happen if the station has been removed right now */
+	if (IS_ERR_OR_NULL(sta))
+		return;
+
 	mvmsta = (void *)sta->drv_priv;
 
 	data->num_bss_ifaces++;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/7] iwlwifi: mvm: don't WARN about unsuccessful time event
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
                   ` (4 preceding siblings ...)
  2013-11-19 20:52 ` [PATCH 5/7] iwlwifi: mvm: BT Coex fix another NULL pointer dereference Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-19 20:52 ` [PATCH 7/7] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
  2013-11-24 17:04 ` pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Time event notification can have a failure status even if
the time event was scheduled:
* in START notification, this can happen if the time event
  was scheduled later than the requested apply time.
* in STOP notification, this can happen if the time event
  is truncated.

Even if both happened, the offchannel packets sent during
the remain on channel are very likely to have been sent.
Hence, don't WARN when this happens, but rather print a
discrete line in the kernel log.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/time-event.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c
index 33cf56f..95ce4b6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c
@@ -176,8 +176,11 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm,
 	 * P2P Device discoveribility, while there are other higher priority
 	 * events in the system).
 	 */
-	if (WARN_ONCE(!le32_to_cpu(notif->status),
-		      "Failed to schedule time event\n")) {
+	if (!le32_to_cpu(notif->status)) {
+		bool start = le32_to_cpu(notif->action) &
+				TE_V2_NOTIF_HOST_EVENT_START;
+		IWL_WARN(mvm, "Time Event %s notification failure\n",
+			 start ? "start" : "end");
 		if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, NULL)) {
 			iwl_mvm_te_clear_data(mvm, te_data);
 			return;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/7] iwlwifi: bump required firmware API version for 3160/7260
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
                   ` (5 preceding siblings ...)
  2013-11-19 20:52 ` [PATCH 6/7] iwlwifi: mvm: don't WARN about unsuccessful time event Emmanuel Grumbach
@ 2013-11-19 20:52 ` Emmanuel Grumbach
  2013-11-24 17:04 ` pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
  7 siblings, 0 replies; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-19 20:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

A new firmware is coming out soon with new APIs.
To make sure that this new firmware won't be loaded on old
driver that don't support it, it's API version has been
updated to 8. In order to be able to load it, bump the API
version to 8.
API version 7 is still supported and will be for another
year or so.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-7000.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index 1ed861f..3c34a72 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -67,8 +67,8 @@
 #include "iwl-agn-hw.h"
 
 /* Highest firmware API version supported */
-#define IWL7260_UCODE_API_MAX	7
-#define IWL3160_UCODE_API_MAX	7
+#define IWL7260_UCODE_API_MAX	8
+#define IWL3160_UCODE_API_MAX	8
 
 /* Oldest version we won't warn about */
 #define IWL7260_UCODE_API_OK	7
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: pull request: iwlwifi 2013-11-19
  2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
                   ` (6 preceding siblings ...)
  2013-11-19 20:52 ` [PATCH 7/7] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
@ 2013-11-24 17:04 ` Emmanuel Grumbach
  2013-11-25 20:41   ` John W. Linville
  7 siblings, 1 reply; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-24 17:04 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless@vger.kernel.org



On 11/19/2013 10:49 PM, Emmanuel Grumbach wrote:
> Hi John,
> 
> This is a pull request for 3.13.
> 
> I have here a few fixes for BT Coex. One of them is a NULL pointer
> dereference. Another one avoids to enable a feature that can make the
> firmware unhappy since the firmware isn't ready for it yet. WE also
> avoid a WARNING that can be triggered upon association in not-so-bad
> cases even if the association succeeded. We add support for new NICs
> (not yet on the market) and bump the API so that 3.13 will be able to
> work with the new firmware that will be out soon hopefully.
> I also have a boundary check from Johannes.
> 
> I reset my tree to wireless/master as the time of this writing. I did
> that mainly because I needed the changes that were in -next before 3.12
> went out even if 3.13-rc1 isn't out yet. I plan to rebase my tree on
> 3.13-rc2 (or 3.13-rc1 if this pull request makes it to 3.13-rc1 but that
> seems unlikely).
> Tell me if you have any issues.
> 
> 

FWIW - since 3.13-rc1 is already out and you haven't pulled yet, I
rebased this pull request --onto v3.13-rc1.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pull request: iwlwifi 2013-11-19
  2013-11-24 17:04 ` pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
@ 2013-11-25 20:41   ` John W. Linville
  2013-11-25 21:05     ` Emmanuel Grumbach
  0 siblings, 1 reply; 12+ messages in thread
From: John W. Linville @ 2013-11-25 20:41 UTC (permalink / raw)
  To: Emmanuel Grumbach; +Cc: linux-wireless@vger.kernel.org

On Sun, Nov 24, 2013 at 07:04:36PM +0200, Emmanuel Grumbach wrote:
> 
> 
> On 11/19/2013 10:49 PM, Emmanuel Grumbach wrote:
> > Hi John,
> > 
> > This is a pull request for 3.13.
> > 
> > I have here a few fixes for BT Coex. One of them is a NULL pointer
> > dereference. Another one avoids to enable a feature that can make the
> > firmware unhappy since the firmware isn't ready for it yet. WE also
> > avoid a WARNING that can be triggered upon association in not-so-bad
> > cases even if the association succeeded. We add support for new NICs
> > (not yet on the market) and bump the API so that 3.13 will be able to
> > work with the new firmware that will be out soon hopefully.
> > I also have a boundary check from Johannes.
> > 
> > I reset my tree to wireless/master as the time of this writing. I did
> > that mainly because I needed the changes that were in -next before 3.12
> > went out even if 3.13-rc1 isn't out yet. I plan to rebase my tree on
> > 3.13-rc2 (or 3.13-rc1 if this pull request makes it to 3.13-rc1 but that
> > seems unlikely).
> > Tell me if you have any issues.
> > 
> > 
> 
> FWIW - since 3.13-rc1 is already out and you haven't pulled yet, I
> rebased this pull request --onto v3.13-rc1.

3.13-rc1 is not in the wireless tree (because it isn't in the net
tree).  If it is in your tree, then I can't pull from you -- sorry!

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pull request: iwlwifi 2013-11-19
  2013-11-25 20:41   ` John W. Linville
@ 2013-11-25 21:05     ` Emmanuel Grumbach
  2013-12-02 17:58       ` John W. Linville
  0 siblings, 1 reply; 12+ messages in thread
From: Emmanuel Grumbach @ 2013-11-25 21:05 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 3810 bytes --]



On 11/25/2013 10:41 PM, John W. Linville wrote:
> On Sun, Nov 24, 2013 at 07:04:36PM +0200, Emmanuel Grumbach wrote:
>>
>>
>> On 11/19/2013 10:49 PM, Emmanuel Grumbach wrote:
>>> Hi John,
>>>
>>> This is a pull request for 3.13.
>>>
>>> I have here a few fixes for BT Coex. One of them is a NULL pointer
>>> dereference. Another one avoids to enable a feature that can make the
>>> firmware unhappy since the firmware isn't ready for it yet. WE also
>>> avoid a WARNING that can be triggered upon association in not-so-bad
>>> cases even if the association succeeded. We add support for new NICs
>>> (not yet on the market) and bump the API so that 3.13 will be able to
>>> work with the new firmware that will be out soon hopefully.
>>> I also have a boundary check from Johannes.
>>>
>>> I reset my tree to wireless/master as the time of this writing. I did
>>> that mainly because I needed the changes that were in -next before 3.12
>>> went out even if 3.13-rc1 isn't out yet. I plan to rebase my tree on
>>> 3.13-rc2 (or 3.13-rc1 if this pull request makes it to 3.13-rc1 but that
>>> seems unlikely).
>>> Tell me if you have any issues.
>>>
>>>
>>
>> FWIW - since 3.13-rc1 is already out and you haven't pulled yet, I
>> rebased this pull request --onto v3.13-rc1.
> 
> 3.13-rc1 is not in the wireless tree (because it isn't in the net
> tree).  If it is in your tree, then I can't pull from you -- sorry!
> 


Sure - sorry... still starting with all this...
Anyway - I rebased my tree on yours - so here is a new pull request.

Can you please make sure you pull -no-ff?
It makes it easier for people to see when you pull from others rather
than apply patches.

Thanks!

The following changes since commit 9d8506cc2d7ea1f911c72c100193a3677f6668c3:

  gso: handle new frag_list of frags GRO packets (2013-11-21 14:11:50 -0500)

are available in the git repository at:


git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git
master

for you to fetch changes up to 3c5da7eefce5835acfc73ebd0a4f961cdae4ae67:

  iwlwifi: mvm: use a cast to calculate the last seqno from the next one
(2013-11-25 23:00:21 +0200)

----------------------------------------------------------------
Alexander Bondar (1):
      iwlwifi: pcie: stop sending commands to dead firmware

Emmanuel Grumbach (5):
      iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160
      iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT
      iwlwifi: mvm: BT Coex fix another NULL pointer dereference
      iwlwifi: mvm: don't WARN about unsuccessful time event
      iwlwifi: bump required firmware API version for 3160/7260

Johannes Berg (1):
      iwlwifi: mvm: check sta_id/drain values in debugfs

Luciano Coelho (2):
      iwlwifi: mvm: set seqno also when no keys are set
      iwlwifi: mvm: use a cast to calculate the last seqno from the next one

Oren Givon (1):
      iwlwifi: add new HW - 7265 series

 drivers/net/wireless/iwlwifi/iwl-7000.c       |   29
+++++++++++++++++++++++--
 drivers/net/wireless/iwlwifi/iwl-config.h     |    5 +++++
 drivers/net/wireless/iwlwifi/iwl-csr.h        |    5 +----
 drivers/net/wireless/iwlwifi/mvm/bt-coex.c    |    6 ++++-
 drivers/net/wireless/iwlwifi/mvm/d3.c         |    5 +++--
 drivers/net/wireless/iwlwifi/mvm/debugfs.c    |    4 ++++
 drivers/net/wireless/iwlwifi/mvm/time-event.c |    7 ++++--
 drivers/net/wireless/iwlwifi/pcie/drv.c       |   21 ++++++++++++++++++
 drivers/net/wireless/iwlwifi/pcie/internal.h  |    8 +++++++
 drivers/net/wireless/iwlwifi/pcie/rx.c        |    7 +++++-
 drivers/net/wireless/iwlwifi/pcie/trans.c     |    3 ---
 drivers/net/wireless/iwlwifi/pcie/tx.c        |    6 ++---
 12 files changed, 88 insertions(+), 18 deletions(-)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pull request: iwlwifi 2013-11-19
  2013-11-25 21:05     ` Emmanuel Grumbach
@ 2013-12-02 17:58       ` John W. Linville
  0 siblings, 0 replies; 12+ messages in thread
From: John W. Linville @ 2013-12-02 17:58 UTC (permalink / raw)
  To: Emmanuel Grumbach; +Cc: linux-wireless@vger.kernel.org

On Mon, Nov 25, 2013 at 11:05:57PM +0200, Emmanuel Grumbach wrote:
> 
> 
> On 11/25/2013 10:41 PM, John W. Linville wrote:
> > On Sun, Nov 24, 2013 at 07:04:36PM +0200, Emmanuel Grumbach wrote:
> >>
> >>
> >> On 11/19/2013 10:49 PM, Emmanuel Grumbach wrote:
> >>> Hi John,
> >>>
> >>> This is a pull request for 3.13.
> >>>
> >>> I have here a few fixes for BT Coex. One of them is a NULL pointer
> >>> dereference. Another one avoids to enable a feature that can make the
> >>> firmware unhappy since the firmware isn't ready for it yet. WE also
> >>> avoid a WARNING that can be triggered upon association in not-so-bad
> >>> cases even if the association succeeded. We add support for new NICs
> >>> (not yet on the market) and bump the API so that 3.13 will be able to
> >>> work with the new firmware that will be out soon hopefully.
> >>> I also have a boundary check from Johannes.
> >>>
> >>> I reset my tree to wireless/master as the time of this writing. I did
> >>> that mainly because I needed the changes that were in -next before 3.12
> >>> went out even if 3.13-rc1 isn't out yet. I plan to rebase my tree on
> >>> 3.13-rc2 (or 3.13-rc1 if this pull request makes it to 3.13-rc1 but that
> >>> seems unlikely).
> >>> Tell me if you have any issues.
> >>>
> >>>
> >>
> >> FWIW - since 3.13-rc1 is already out and you haven't pulled yet, I
> >> rebased this pull request --onto v3.13-rc1.
> > 
> > 3.13-rc1 is not in the wireless tree (because it isn't in the net
> > tree).  If it is in your tree, then I can't pull from you -- sorry!
> > 
> 
> 
> Sure - sorry... still starting with all this...
> Anyway - I rebased my tree on yours - so here is a new pull request.
> 
> Can you please make sure you pull -no-ff?
> It makes it easier for people to see when you pull from others rather
> than apply patches.
> 
> Thanks!
> 
> The following changes since commit 9d8506cc2d7ea1f911c72c100193a3677f6668c3:
> 
>   gso: handle new frag_list of frags GRO packets (2013-11-21 14:11:50 -0500)
> 
> are available in the git repository at:
> 
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git
> master
> 
> for you to fetch changes up to 3c5da7eefce5835acfc73ebd0a4f961cdae4ae67:
> 
>   iwlwifi: mvm: use a cast to calculate the last seqno from the next one
> (2013-11-25 23:00:21 +0200)
> 
> ----------------------------------------------------------------
> Alexander Bondar (1):
>       iwlwifi: pcie: stop sending commands to dead firmware
> 
> Emmanuel Grumbach (5):
>       iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160
>       iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT
>       iwlwifi: mvm: BT Coex fix another NULL pointer dereference
>       iwlwifi: mvm: don't WARN about unsuccessful time event
>       iwlwifi: bump required firmware API version for 3160/7260
> 
> Johannes Berg (1):
>       iwlwifi: mvm: check sta_id/drain values in debugfs
> 
> Luciano Coelho (2):
>       iwlwifi: mvm: set seqno also when no keys are set
>       iwlwifi: mvm: use a cast to calculate the last seqno from the next one
> 
> Oren Givon (1):
>       iwlwifi: add new HW - 7265 series
> 
>  drivers/net/wireless/iwlwifi/iwl-7000.c       |   29
> +++++++++++++++++++++++--
>  drivers/net/wireless/iwlwifi/iwl-config.h     |    5 +++++
>  drivers/net/wireless/iwlwifi/iwl-csr.h        |    5 +----
>  drivers/net/wireless/iwlwifi/mvm/bt-coex.c    |    6 ++++-
>  drivers/net/wireless/iwlwifi/mvm/d3.c         |    5 +++--
>  drivers/net/wireless/iwlwifi/mvm/debugfs.c    |    4 ++++
>  drivers/net/wireless/iwlwifi/mvm/time-event.c |    7 ++++--
>  drivers/net/wireless/iwlwifi/pcie/drv.c       |   21 ++++++++++++++++++
>  drivers/net/wireless/iwlwifi/pcie/internal.h  |    8 +++++++
>  drivers/net/wireless/iwlwifi/pcie/rx.c        |    7 +++++-
>  drivers/net/wireless/iwlwifi/pcie/trans.c     |    3 ---
>  drivers/net/wireless/iwlwifi/pcie/tx.c        |    6 ++---
>  12 files changed, 88 insertions(+), 18 deletions(-)

Pulling now...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-12-02 18:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 2/7] iwlwifi: pcie: refactor a bit the interrupt coalescing Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 3/7] iwlwifi: add new HW - 7265 series Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 4/7] iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 5/7] iwlwifi: mvm: BT Coex fix another NULL pointer dereference Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 6/7] iwlwifi: mvm: don't WARN about unsuccessful time event Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 7/7] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
2013-11-24 17:04 ` pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
2013-11-25 20:41   ` John W. Linville
2013-11-25 21:05     ` Emmanuel Grumbach
2013-12-02 17:58       ` John W. Linville

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).