All of lore.kernel.org
 help / color / mirror / Atom feed
* pull request: iwlwifi 2016-01-26
@ 2016-01-26 10:19 Grumbach, Emmanuel
  2016-01-26 10:21 ` [PATCH 1/5] iwlwifi: add new 3168 series devices support Emmanuel Grumbach
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Grumbach, Emmanuel @ 2016-01-26 10:19 UTC (permalink / raw)
  To: Kalle Valo <kvalo@adurom.com> Kalle Valo; +Cc: linux-wireless

Hi Kalle,

This is the first round of fixes for 4.5.
Most of them are really trivial. The TPC stats one stands out a little bit.
It can fix traffic issues which are typically hard to debug.
Please pull and let me know if you have issues.

I also have a batch of patches for -next, but wireless-drivers-next.git doesn't
seem ready to accept new patches at this stage.

Thanks!

The following changes since commit aee3bfa3307cd0da2126bdc0ea359dabea5ee8f7:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next (2016-01-12 18:57:02 -0800)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git tags/iwlwifi-for-kalle-2016-01-26

for you to fetch changes up to a0d792850af3257d9b4b1dbf4e3df57994a481e7:

  iwlwifi: mvm: rs: fix TPC statistics handling (2016-01-25 14:42:11 +0200)

----------------------------------------------------------------
* Fix support for 3168 device
	+ NVM version
	+ firmware file name
	+ device IDs
* Fix a compilation warning in dvm calibration code
* Fix the TPC (reduced Tx Power) code. This fixes performance issues
* Device IDs for 8265

----------------------------------------------------------------
Gregory Greenman (1):
      iwlwifi: mvm: rs: fix TPC statistics handling

Johannes Berg (1):
      iwlwifi: dvm: calib.c: fix min() warning

Oren Givon (3):
      iwlwifi: add new 3168 series devices support
      iwlwifi: add device ID for 8265
      iwlwifi: update support for 3168 series firmware and NVM

 drivers/net/wireless/intel/iwlwifi/dvm/calib.c     |  4 ++--
 drivers/net/wireless/intel/iwlwifi/iwl-7000.c      | 23 +++++++++++++++++++----
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h |  6 +++++-
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c        | 74 ++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c        |  5 +++--
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |  4 ++++
 6 files changed, 81 insertions(+), 35 deletions(-)


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

* [PATCH 1/5] iwlwifi: add new 3168 series devices support
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
@ 2016-01-26 10:21 ` Emmanuel Grumbach
  2016-01-26 10:21 ` [PATCH 2/5] iwlwifi: add device ID for 8265 Emmanuel Grumbach
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Emmanuel Grumbach @ 2016-01-26 10:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Oren Givon, Emmanuel Grumbach

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

Add new sub-system PCI IDs to the 3168 series.
Added 0x2010, 0x2050 and 0x2150 sub-system IDs.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 6261a68..944e88a 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -378,7 +378,10 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
 	{IWL_PCI_DEVICE(0x3165, 0x8110, iwl3165_2ac_cfg)},
 
 /* 3168 Series */
+	{IWL_PCI_DEVICE(0x24FB, 0x2010, iwl3168_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x24FB, 0x2110, iwl3168_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x24FB, 0x2050, iwl3168_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x24FB, 0x2150, iwl3168_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x24FB, 0x0000, iwl3168_2ac_cfg)},
 
 /* 7265 Series */
-- 
2.5.0


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

* [PATCH 2/5] iwlwifi: add device ID for 8265
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
  2016-01-26 10:21 ` [PATCH 1/5] iwlwifi: add new 3168 series devices support Emmanuel Grumbach
@ 2016-01-26 10:21 ` Emmanuel Grumbach
  2016-01-26 10:21 ` [PATCH 3/5] iwlwifi: dvm: calib.c: fix min() warning Emmanuel Grumbach
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Emmanuel Grumbach @ 2016-01-26 10:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Oren Givon, Emmanuel Grumbach

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

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 944e88a..00335ea 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -478,6 +478,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
 	{IWL_PCI_DEVICE(0x24F3, 0x0000, iwl8265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x24FD, 0x0010, iwl8265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x24FD, 0x8010, iwl8265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x24FD, 0x0810, iwl8265_2ac_cfg)},
 
 /* 9000 Series */
 	{IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl5165_2ac_cfg)},
-- 
2.5.0


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

* [PATCH 3/5] iwlwifi: dvm: calib.c: fix min() warning
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
  2016-01-26 10:21 ` [PATCH 1/5] iwlwifi: add new 3168 series devices support Emmanuel Grumbach
  2016-01-26 10:21 ` [PATCH 2/5] iwlwifi: add device ID for 8265 Emmanuel Grumbach
@ 2016-01-26 10:21 ` Emmanuel Grumbach
  2016-01-26 10:21 ` [PATCH 4/5] iwlwifi: update support for 3168 series firmware and NVM Emmanuel Grumbach
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Emmanuel Grumbach @ 2016-01-26 10:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Emmanuel Grumbach

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

Depending on the system, kernel, architecture abs() might
return long or not - just use min_t(u8, ...) to avoid any
warnings.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/dvm/calib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
index 07a4c64..14949ef 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
@@ -900,8 +900,8 @@ static void iwlagn_gain_computation(struct iwl_priv *priv,
 
 		/* bound gain by 2 bits value max, 3rd bit is sign */
 		data->delta_gain_code[i] =
-			min(abs(delta_g),
-			(long) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
+			min_t(u8, abs(delta_g),
+			      CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
 
 		if (delta_g < 0)
 			/*
-- 
2.5.0


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

* [PATCH 4/5] iwlwifi: update support for 3168 series firmware and NVM
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
                   ` (2 preceding siblings ...)
  2016-01-26 10:21 ` [PATCH 3/5] iwlwifi: dvm: calib.c: fix min() warning Emmanuel Grumbach
@ 2016-01-26 10:21 ` Emmanuel Grumbach
  2016-01-26 10:21 ` [PATCH 5/5] iwlwifi: mvm: rs: fix TPC statistics handling Emmanuel Grumbach
  2016-01-26 13:50 ` pull request: iwlwifi 2016-01-26 Kalle Valo
  5 siblings, 0 replies; 11+ messages in thread
From: Emmanuel Grumbach @ 2016-01-26 10:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Oren Givon, Emmanuel Grumbach

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

Update the struct which defines the support for 3168 cards.
Now it will search for a firmware of this format:
iwlwifi-3168-XX.ucode
Also, set the minimum version of the ucode to 20.
Update the minimum NVM version and minimum NVM calibrations
version of the 3168 series.

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

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
index e60cf14..fa41a5e 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
@@ -74,16 +74,19 @@
 #define IWL7260_UCODE_API_MAX	17
 #define IWL7265_UCODE_API_MAX	17
 #define IWL7265D_UCODE_API_MAX	20
+#define IWL3168_UCODE_API_MAX	20
 
 /* Oldest version we won't warn about */
 #define IWL7260_UCODE_API_OK	13
 #define IWL7265_UCODE_API_OK	13
 #define IWL7265D_UCODE_API_OK	13
+#define IWL3168_UCODE_API_OK	20
 
 /* Lowest firmware API version supported */
 #define IWL7260_UCODE_API_MIN	13
 #define IWL7265_UCODE_API_MIN	13
 #define IWL7265D_UCODE_API_MIN	13
+#define IWL3168_UCODE_API_MIN	20
 
 /* NVM versions */
 #define IWL7260_NVM_VERSION		0x0a1d
@@ -92,6 +95,8 @@
 #define IWL3160_TX_POWER_VERSION	0xffff /* meaningless */
 #define IWL3165_NVM_VERSION		0x709
 #define IWL3165_TX_POWER_VERSION	0xffff /* meaningless */
+#define IWL3168_NVM_VERSION		0xd01
+#define IWL3168_TX_POWER_VERSION	0xffff /* meaningless */
 #define IWL7265_NVM_VERSION		0x0a1d
 #define IWL7265_TX_POWER_VERSION	0xffff /* meaningless */
 #define IWL7265D_NVM_VERSION		0x0c11
@@ -109,6 +114,9 @@
 #define IWL3160_FW_PRE "iwlwifi-3160-"
 #define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
 
+#define IWL3168_FW_PRE "iwlwifi-3168-"
+#define IWL3168_MODULE_FIRMWARE(api) IWL3168_FW_PRE __stringify(api) ".ucode"
+
 #define IWL7265_FW_PRE "iwlwifi-7265-"
 #define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"
 
@@ -180,6 +188,12 @@ static const struct iwl_ht_params iwl7000_ht_params = {
 	.ucode_api_ok = IWL7265_UCODE_API_OK,			\
 	.ucode_api_min = IWL7265_UCODE_API_MIN
 
+#define IWL_DEVICE_3008						\
+	IWL_DEVICE_7000_COMMON,					\
+	.ucode_api_max = IWL3168_UCODE_API_MAX,			\
+	.ucode_api_ok = IWL3168_UCODE_API_OK,			\
+	.ucode_api_min = IWL3168_UCODE_API_MIN
+
 #define IWL_DEVICE_7005D					\
 	IWL_DEVICE_7000_COMMON,					\
 	.ucode_api_max = IWL7265D_UCODE_API_MAX,		\
@@ -299,11 +313,11 @@ const struct iwl_cfg iwl3165_2ac_cfg = {
 
 const struct iwl_cfg iwl3168_2ac_cfg = {
 	.name = "Intel(R) Dual Band Wireless AC 3168",
-	.fw_name_pre = IWL7265D_FW_PRE,
-	IWL_DEVICE_7000,
+	.fw_name_pre = IWL3168_FW_PRE,
+	IWL_DEVICE_3008,
 	.ht_params = &iwl7000_ht_params,
-	.nvm_ver = IWL3165_NVM_VERSION,
-	.nvm_calib_ver = IWL3165_TX_POWER_VERSION,
+	.nvm_ver = IWL3168_NVM_VERSION,
+	.nvm_calib_ver = IWL3168_TX_POWER_VERSION,
 	.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
 	.dccm_len = IWL7265_DCCM_LEN,
 };
@@ -376,5 +390,6 @@ const struct iwl_cfg iwl7265d_n_cfg = {
 
 MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
 MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
+MODULE_FIRMWARE(IWL3168_MODULE_FIRMWARE(IWL3168_UCODE_API_OK));
 MODULE_FIRMWARE(IWL7265_MODULE_FIRMWARE(IWL7265_UCODE_API_OK));
 MODULE_FIRMWARE(IWL7265D_MODULE_FIRMWARE(IWL7265D_UCODE_API_OK));
-- 
2.5.0


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

* [PATCH 5/5] iwlwifi: mvm: rs: fix TPC statistics handling
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
                   ` (3 preceding siblings ...)
  2016-01-26 10:21 ` [PATCH 4/5] iwlwifi: update support for 3168 series firmware and NVM Emmanuel Grumbach
@ 2016-01-26 10:21 ` Emmanuel Grumbach
  2016-01-26 13:50 ` pull request: iwlwifi 2016-01-26 Kalle Valo
  5 siblings, 0 replies; 11+ messages in thread
From: Emmanuel Grumbach @ 2016-01-26 10:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Gregory Greenman, Emmanuel Grumbach

From: Gregory Greenman <gregory.greenman@intel.com>

FW behaviour changed and now updates driver about the used TPC
reduction in the following cases:
1. In tx response, which is used mostly for a single frame case
2. In BA notification

When tx aggregation fails with the initial rate, FW will send
to the driver BA notification and will try to transmit with the
next rate, but this time without tx power reduction. Thus, in case
of a failure with the initial rate, driver will get two BA notifications,
the first one with reduced tx power as in the LQ command and the second
one with 0 power reduction.

This patch adapts the TPC statistics according to the description above:
1. Use BA notifications instead of Tx response
2. For TPC only, drop the optimization which considers empty BA as one
MPDU. The reason is that with TPC we want to recover very quickly from
a bad power reduction and, therefore we'd like the success ratio to get
an immediate hit when failing to get a BA, so we'd switch back to a
lower or zero power reduction

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h |  6 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c        | 74 ++++++++++++++--------
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c        |  5 +-
 3 files changed, 56 insertions(+), 29 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
index 0036d18..ba3f0bb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
@@ -510,6 +510,9 @@ struct iwl_mvm_tx_resp {
  * @scd_ssn: the index of the last contiguously sent packet
  * @txed: number of Txed frames in this batch
  * @txed_2_done: number of Acked frames in this batch
+ * @reduced_txp: power reduced according to TPC. This is the actual value and
+ *	not a copy from the LQ command. Thus, if not the first rate was used
+ *	for Tx-ing then this value will be set to 0 by FW.
  */
 struct iwl_mvm_ba_notif {
 	__le32 sta_addr_lo32;
@@ -524,7 +527,8 @@ struct iwl_mvm_ba_notif {
 	__le16 scd_ssn;
 	u8 txed;
 	u8 txed_2_done;
-	__le16 reserved1;
+	u8 reduced_txp;
+	u8 reserved1;
 } __packed;
 
 /*
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 7bb6fd0..94caa88 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -2,6 +2,7 @@
  *
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2016 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -724,14 +725,28 @@ static int _rs_collect_tx_data(struct iwl_mvm *mvm,
 	return 0;
 }
 
-static int rs_collect_tx_data(struct iwl_mvm *mvm,
-			      struct iwl_lq_sta *lq_sta,
-			      struct iwl_scale_tbl_info *tbl,
-			      int scale_index, int attempts, int successes,
-			      u8 reduced_txp)
+static int rs_collect_tpc_data(struct iwl_mvm *mvm,
+			       struct iwl_lq_sta *lq_sta,
+			       struct iwl_scale_tbl_info *tbl,
+			       int scale_index, int attempts, int successes,
+			       u8 reduced_txp)
+{
+	struct iwl_rate_scale_data *window = NULL;
+
+	if (WARN_ON_ONCE(reduced_txp > TPC_MAX_REDUCTION))
+		return -EINVAL;
+
+	window = &tbl->tpc_win[reduced_txp];
+	return  _rs_collect_tx_data(mvm, tbl, scale_index, attempts, successes,
+				    window);
+}
+
+static int rs_collect_tlc_data(struct iwl_mvm *mvm,
+			       struct iwl_lq_sta *lq_sta,
+			       struct iwl_scale_tbl_info *tbl,
+			       int scale_index, int attempts, int successes)
 {
 	struct iwl_rate_scale_data *window = NULL;
-	int ret;
 
 	if (scale_index < 0 || scale_index >= IWL_RATE_COUNT)
 		return -EINVAL;
@@ -745,16 +760,6 @@ static int rs_collect_tx_data(struct iwl_mvm *mvm,
 
 	/* Select window for current tx bit rate */
 	window = &(tbl->win[scale_index]);
-
-	ret = _rs_collect_tx_data(mvm, tbl, scale_index, attempts, successes,
-				  window);
-	if (ret)
-		return ret;
-
-	if (WARN_ON_ONCE(reduced_txp > TPC_MAX_REDUCTION))
-		return -EINVAL;
-
-	window = &tbl->tpc_win[reduced_txp];
 	return _rs_collect_tx_data(mvm, tbl, scale_index, attempts, successes,
 				   window);
 }
@@ -1301,17 +1306,30 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 	 * first index into rate scale table.
 	 */
 	if (info->flags & IEEE80211_TX_STAT_AMPDU) {
-		/* ampdu_ack_len = 0 marks no BA was received. In this case
-		 * treat it as a single frame loss as we don't want the success
-		 * ratio to dip too quickly because a BA wasn't received
+		rs_collect_tpc_data(mvm, lq_sta, curr_tbl, lq_rate.index,
+				    info->status.ampdu_len,
+				    info->status.ampdu_ack_len,
+				    reduced_txp);
+
+		/* ampdu_ack_len = 0 marks no BA was received. For TLC, treat
+		 * it as a single frame loss as we don't want the success ratio
+		 * to dip too quickly because a BA wasn't received.
+		 * For TPC, there's no need for this optimisation since we want
+		 * to recover very quickly from a bad power reduction and,
+		 * therefore we'd like the success ratio to get an immediate hit
+		 * when failing to get a BA, so we'd switch back to a lower or
+		 * zero power reduction. When FW transmits agg with a rate
+		 * different from the initial rate, it will not use reduced txp
+		 * and will send BA notification twice (one empty with reduced
+		 * txp equal to the value from LQ and one with reduced txp 0).
+		 * We need to update counters for each txp level accordingly.
 		 */
 		if (info->status.ampdu_ack_len == 0)
 			info->status.ampdu_len = 1;
 
-		rs_collect_tx_data(mvm, lq_sta, curr_tbl, lq_rate.index,
-				   info->status.ampdu_len,
-				   info->status.ampdu_ack_len,
-				   reduced_txp);
+		rs_collect_tlc_data(mvm, lq_sta, curr_tbl, lq_rate.index,
+				    info->status.ampdu_len,
+				    info->status.ampdu_ack_len);
 
 		/* Update success/fail counts if not searching for new mode */
 		if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) {
@@ -1344,9 +1362,13 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 			else
 				continue;
 
-			rs_collect_tx_data(mvm, lq_sta, tmp_tbl, lq_rate.index,
-					   1, i < retries ? 0 : legacy_success,
-					   reduced_txp);
+			rs_collect_tpc_data(mvm, lq_sta, tmp_tbl,
+					    lq_rate.index, 1,
+					    i < retries ? 0 : legacy_success,
+					    reduced_txp);
+			rs_collect_tlc_data(mvm, lq_sta, tmp_tbl,
+					    lq_rate.index, 1,
+					    i < retries ? 0 : legacy_success);
 		}
 
 		/* Update success/fail counts if not searching for new mode */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 8bf48a7..0914ec2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1029,7 +1029,6 @@ static void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm,
 		struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 		mvmsta->tid_data[tid].rate_n_flags =
 			le32_to_cpu(tx_resp->initial_rate);
-		mvmsta->tid_data[tid].reduced_tpc = tx_resp->reduced_tpc;
 		mvmsta->tid_data[tid].tx_time =
 			le16_to_cpu(tx_resp->wireless_media_time);
 	}
@@ -1060,7 +1059,7 @@ static void iwl_mvm_tx_info_from_ba_notif(struct ieee80211_tx_info *info,
 	/* TODO: not accounted if the whole A-MPDU failed */
 	info->status.tx_time = tid_data->tx_time;
 	info->status.status_driver_data[0] =
-		(void *)(uintptr_t)tid_data->reduced_tpc;
+		(void *)(uintptr_t)ba_notif->reduced_txp;
 	info->status.status_driver_data[1] =
 		(void *)(uintptr_t)tid_data->rate_n_flags;
 }
@@ -1133,6 +1132,8 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
 			   scd_flow, ba_resp_scd_ssn, ba_notif->txed,
 			   ba_notif->txed_2_done);
 
+	IWL_DEBUG_TX_REPLY(mvm, "reduced txp from ba notif %d\n",
+			   ba_notif->reduced_txp);
 	tid_data->next_reclaimed = ba_resp_scd_ssn;
 
 	iwl_mvm_check_ratid_empty(mvm, sta, tid);
-- 
2.5.0


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

* Re: pull request: iwlwifi 2016-01-26
  2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
                   ` (4 preceding siblings ...)
  2016-01-26 10:21 ` [PATCH 5/5] iwlwifi: mvm: rs: fix TPC statistics handling Emmanuel Grumbach
@ 2016-01-26 13:50 ` Kalle Valo
  2016-01-26 13:57   ` Grumbach, Emmanuel
  5 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2016-01-26 13:50 UTC (permalink / raw)
  To: Grumbach, Emmanuel; +Cc: linux-wireless

"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com> writes:

> This is the first round of fixes for 4.5. Most of them are really
> trivial. The TPC stats one stands out a little bit. It can fix traffic
> issues which are typically hard to debug. Please pull and let me know
> if you have issues.

There's a conflict due to 8f57e4d930d, how should I fix it?

diff --cc drivers/net/wireless/intel/iwlwifi/dvm/calib.c
index e9cef9de9ed8,14949efc4a35..000000000000
--- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
@@@ -900,8 -900,8 +900,13 @@@ static void iwlagn_gain_computation(str
  
                /* bound gain by 2 bits value max, 3rd bit is sign */
                data->delta_gain_code[i] =
++<<<<<<< HEAD
 +                      min(abs(delta_g),
 +                      (s32) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
++=======
+                       min_t(u8, abs(delta_g),
+                             CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
++>>>>>>> c3653efc57d9b3c51ee657a471578d2493b6e3f0
  
                if (delta_g < 0)
                        /*


> I also have a batch of patches for -next, but
> wireless-drivers-next.git doesn't seem ready to accept new patches at
> this stage.

I'll open wireless-drivers-next once net-next is open, but AFAIK Dave
hasn't opened it yet.

-- 
Kalle Valo

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

* Re: pull request: iwlwifi 2016-01-26
  2016-01-26 13:50 ` pull request: iwlwifi 2016-01-26 Kalle Valo
@ 2016-01-26 13:57   ` Grumbach, Emmanuel
  2016-01-26 14:01     ` Johannes Berg
  0 siblings, 1 reply; 11+ messages in thread
From: Grumbach, Emmanuel @ 2016-01-26 13:57 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

Hi Kalle,

On 01/26/2016 03:51 PM, Kalle Valo wrote:
> "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com> writes:
>
>> This is the first round of fixes for 4.5. Most of them are really
>> trivial. The TPC stats one stands out a little bit. It can fix traffic
>> issues which are typically hard to debug. Please pull and let me know
>> if you have issues.
> There's a conflict due to 8f57e4d930d, how should I fix it?
>
> diff --cc drivers/net/wireless/intel/iwlwifi/dvm/calib.c
> index e9cef9de9ed8,14949efc4a35..000000000000
> --- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
> +++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
> @@@ -900,8 -900,8 +900,13 @@@ static void iwlagn_gain_computation(str
>   
>                 /* bound gain by 2 bits value max, 3rd bit is sign */
>                 data->delta_gain_code[i] =
> ++<<<<<<< HEAD
>  +                      min(abs(delta_g),
>  +                      (s32) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
> ++=======
> +                       min_t(u8, abs(delta_g),
> +                             CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
> ++>>>>>>> c3653efc57d9b3c51ee657a471578d2493b6e3f0
>   
>                 if (delta_g < 0)
>                         /*
>
No, I'll rebase.
thanks.

>> I also have a batch of patches for -next, but
>> wireless-drivers-next.git doesn't seem ready to accept new patches at
>> this stage.
> I'll open wireless-drivers-next once net-next is open, but AFAIK Dave
> hasn't opened it yet.
>


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

* Re: pull request: iwlwifi 2016-01-26
  2016-01-26 13:57   ` Grumbach, Emmanuel
@ 2016-01-26 14:01     ` Johannes Berg
  2016-01-26 14:05       ` Grumbach, Emmanuel
  0 siblings, 1 reply; 11+ messages in thread
From: Johannes Berg @ 2016-01-26 14:01 UTC (permalink / raw)
  To: Grumbach, Emmanuel, Kalle Valo; +Cc: linux-wireless


> > There's a conflict due to 8f57e4d930d, how should I fix it?

I think we can thus drop my patch - that commit fixes the issue that
Andrew had reported as well, and that I worked around by casting the
result... now that abs() has a consistent result, using s32 in both
sides of the min() is perfectly fine.

johannes


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

* Re: pull request: iwlwifi 2016-01-26
  2016-01-26 14:01     ` Johannes Berg
@ 2016-01-26 14:05       ` Grumbach, Emmanuel
  2016-01-27 12:20         ` Kalle Valo
  0 siblings, 1 reply; 11+ messages in thread
From: Grumbach, Emmanuel @ 2016-01-26 14:05 UTC (permalink / raw)
  To: Johannes Berg, Kalle Valo; +Cc: linux-wireless



On 01/26/2016 04:01 PM, Johannes Berg wrote:
>>> There's a conflict due to 8f57e4d930d, how should I fix it?
> I think we can thus drop my patch - that commit fixes the issue that
> Andrew had reported as well, and that I worked around by casting the
> result... now that abs() has a consistent result, using s32 in both
> sides of the min() is perfectly fine.
>
> johannes
>
>

I did just that in my new tag: iwlwifi-for-kalle-2016-01-26_2

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

* Re: pull request: iwlwifi 2016-01-26
  2016-01-26 14:05       ` Grumbach, Emmanuel
@ 2016-01-27 12:20         ` Kalle Valo
  0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2016-01-27 12:20 UTC (permalink / raw)
  To: Grumbach, Emmanuel; +Cc: Johannes Berg, linux-wireless

"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com> writes:

> On 01/26/2016 04:01 PM, Johannes Berg wrote:
>>>> There's a conflict due to 8f57e4d930d, how should I fix it?
>> I think we can thus drop my patch - that commit fixes the issue that
>> Andrew had reported as well, and that I worked around by casting the
>> result... now that abs() has a consistent result, using s32 in both
>> sides of the min() is perfectly fine.
>>
>> johannes
>>
>>
>
> I did just that in my new tag: iwlwifi-for-kalle-2016-01-26_2

Pulled, thanks.

-- 
Kalle Valo

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

end of thread, other threads:[~2016-01-27 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 10:19 pull request: iwlwifi 2016-01-26 Grumbach, Emmanuel
2016-01-26 10:21 ` [PATCH 1/5] iwlwifi: add new 3168 series devices support Emmanuel Grumbach
2016-01-26 10:21 ` [PATCH 2/5] iwlwifi: add device ID for 8265 Emmanuel Grumbach
2016-01-26 10:21 ` [PATCH 3/5] iwlwifi: dvm: calib.c: fix min() warning Emmanuel Grumbach
2016-01-26 10:21 ` [PATCH 4/5] iwlwifi: update support for 3168 series firmware and NVM Emmanuel Grumbach
2016-01-26 10:21 ` [PATCH 5/5] iwlwifi: mvm: rs: fix TPC statistics handling Emmanuel Grumbach
2016-01-26 13:50 ` pull request: iwlwifi 2016-01-26 Kalle Valo
2016-01-26 13:57   ` Grumbach, Emmanuel
2016-01-26 14:01     ` Johannes Berg
2016-01-26 14:05       ` Grumbach, Emmanuel
2016-01-27 12:20         ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.