* Re: Broadcom Firmware Rollback
From: Rafał Miłecki @ 2016-09-23 4:48 UTC (permalink / raw)
To: David Petrizze; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <CA+PvwyEA-U2OeTrGW+d8B_sEHZYdaM3J79ZcpcC=89MvvYsrCw@mail.gmail.com>
On 23 September 2016 at 04:43, David Petrizze <dpetrizze@gmail.com> wrote:
> I'm having issues with broadcom's latest firmware / driver, version
> 6.30.163.46. Wireless is solid for about a minute, and then drops
> completely. My research has led me to believe my chip (BCM4331) is no
> longer supported under 6.30.X.X, or has a bug somewhere. I want to
> roll back to the firmware that worked.
>
> What I'm looking for is a file named broadcom-wl-6.20.*.*.tar.bz2. I
> found my current firmware from http://www.lwfinger.com/b43-firmware/,
> but 6.20.X.X is nowhere to be found. 5.100.X.X is there, but the 4331
> definitely wasn't supported for that one.
>
> Inside each of these archives on lwfinger is a file called wl_apsta.o,
> where the firmware is extracted from. Since b43-fwcutter only
> extracts firmware from versions of wl_apsta.o that match specific
> MD5's, I figure 6.20.X.X has to be out there somewhere.
>
> More info can be found from my original post:
> https://bbs.archlinux.org/viewtopic.php?id=3D217326
>
> ...and other people confrim 6.30.X.X being a problem in this ubuntu bug:
> https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1189611
>
> If anyone could point me in the right direction, I would be immensely gra=
teful.
You can't make proprietary driver using firmware of your choice, so
don't bother looking at MIPS drivers stored at Larry's server.
You just need to find a /complete/ (mostly closed source of course)
driver 6.20 for x86/x86_64. I don't think it was ever published on
Broadcom's site, I think it was made available to Ubuntu only under
some agreement. So keep looking at Ubuntu resources.
Also linux-wireless ML focuses on open source drivers, so you may have
more luck asking at Ubuntu community.
--=20
Rafa=C5=82
^ permalink raw reply
* Broadcom Firmware Rollback
From: David Petrizze @ 2016-09-23 2:43 UTC (permalink / raw)
To: linux-wireless
Hi all,
I'm having issues with broadcom's latest firmware / driver, version
6.30.163.46. Wireless is solid for about a minute, and then drops
completely. My research has led me to believe my chip (BCM4331) is no
longer supported under 6.30.X.X, or has a bug somewhere. I want to
roll back to the firmware that worked.
What I'm looking for is a file named broadcom-wl-6.20.*.*.tar.bz2. I
found my current firmware from http://www.lwfinger.com/b43-firmware/,
but 6.20.X.X is nowhere to be found. 5.100.X.X is there, but the 4331
definitely wasn't supported for that one.
Inside each of these archives on lwfinger is a file called wl_apsta.o,
where the firmware is extracted from. Since b43-fwcutter only
extracts firmware from versions of wl_apsta.o that match specific
MD5's, I figure 6.20.X.X has to be out there somewhere.
More info can be found from my original post:
https://bbs.archlinux.org/viewtopic.php?id=217326
...and other people confrim 6.30.X.X being a problem in this ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1189611
If anyone could point me in the right direction, I would be immensely grateful.
Thank you for your time,
David
^ permalink raw reply
* Re: rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed
From: Jean Delvare @ 2016-09-22 21:01 UTC (permalink / raw)
To: Larry Finger; +Cc: Chaoming Li, linux-wireless
In-Reply-To: <83974845-037d-0cde-00b1-ec7b28eeb15f@lwfinger.net>
Hi Larry,
On Thu, 22 Sep 2016 10:09:58 -0500, Larry Finger wrote:
> Do you build your own kernel, or are you using openSUSE's supplied version? If
> the latter, I will need to think how we might debug the issue. If the former,
> please add the attached patch.
The debug module is in place. The error message was logged 3 times
today, so I should have some data for you tomorrow.
Thanks,
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply
* [PATCH 10/10] iwlwifi: mvm: initialise ADD_STA before sending it to the firmware
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Emmanuel Grumbach, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
When we unshare a queue, the ADD_STA was not properly
initialised.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 258a234..fc77188 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -933,7 +933,7 @@ static void iwl_mvm_unshare_queue(struct iwl_mvm *mvm, int queue)
/* If aggs should be turned back on - do it */
if (mvmsta->tid_data[tid].state == IWL_AGG_ON) {
- struct iwl_mvm_add_sta_cmd cmd;
+ struct iwl_mvm_add_sta_cmd cmd = {0};
mvmsta->tid_disable_agg &= ~BIT(tid);
--
2.9.3
^ permalink raw reply related
* [PATCH 02/10] iwlwifi: mvm: cleanup usage of init_dbg parameter
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Sara Sharon, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
Move the init_dbg check to earlier in the function to simplify the
code.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 7322c43..8f10780 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1115,27 +1115,27 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
* (for example, if we were in RFKILL)
*/
ret = iwl_run_init_mvm_ucode(mvm, false);
- if (ret && !iwlmvm_mod_params.init_dbg) {
+
+ if (iwlmvm_mod_params.init_dbg)
+ return 0;
+
+ if (ret) {
IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret);
/* this can't happen */
if (WARN_ON(ret > 0))
ret = -ERFKILL;
goto error;
}
- if (!iwlmvm_mod_params.init_dbg) {
- /*
- * Stop and start the transport without entering low power
- * mode. This will save the state of other components on the
- * device that are triggered by the INIT firwmare (MFUART).
- */
- _iwl_trans_stop_device(mvm->trans, false);
- ret = _iwl_trans_start_hw(mvm->trans, false);
- if (ret)
- goto error;
- }
- if (iwlmvm_mod_params.init_dbg)
- return 0;
+ /*
+ * Stop and start the transport without entering low power
+ * mode. This will save the state of other components on the
+ * device that are triggered by the INIT firwmare (MFUART).
+ */
+ _iwl_trans_stop_device(mvm->trans, false);
+ ret = _iwl_trans_start_hw(mvm->trans, false);
+ if (ret)
+ goto error;
ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR);
if (ret) {
--
2.9.3
^ permalink raw reply related
* [PATCH 09/10] iwlwifi: allow error table address new range
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Sara Sharon, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
The firmware has a new smart linker, and this table can now be
in ICCM or in SMEM. It is not hardcoded, but depends on code
size. Allow the full range.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 9e366e2..d04babd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -512,7 +512,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
base = mvm->fw->inst_errlog_ptr;
}
- if (base < 0x800000) {
+ if (base < 0x400000) {
IWL_ERR(mvm,
"Not valid error log pointer 0x%08X for %s uCode\n",
base,
--
2.9.3
^ permalink raw reply related
* [PATCH 08/10] iwlwifi: mvm: fix typo in TC_CMD_SEC_KEY_FROM_TABLE
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Emmanuel Grumbach, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This define should really be TX_CMD_SEC_KEY_FROM_TABLE
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 4 ++--
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +-
2 files changed, 3 insertions(+), 3 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 57d29a1..59ca97a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
@@ -147,7 +147,7 @@ enum iwl_tx_pm_timeouts {
* @TX_CMD_SEC_EXT: extended cipher algorithm.
* @TX_CMD_SEC_GCMP: GCMP encryption algorithm.
* @TX_CMD_SEC_KEY128: set for 104 bits WEP key.
- * @TC_CMD_SEC_KEY_FROM_TABLE: for a non-WEP key, set if the key should be taken
+ * @TX_CMD_SEC_KEY_FROM_TABLE: for a non-WEP key, set if the key should be taken
* from the table instead of from the TX command.
* If the key is taken from the key table its index should be given by the
* first byte of the TX command key field.
@@ -159,7 +159,7 @@ enum iwl_tx_cmd_sec_ctrl {
TX_CMD_SEC_EXT = 0x04,
TX_CMD_SEC_GCMP = 0x05,
TX_CMD_SEC_KEY128 = 0x08,
- TC_CMD_SEC_KEY_FROM_TABLE = 0x08,
+ TX_CMD_SEC_KEY_FROM_TABLE = 0x08,
};
/* TODO: how does these values are OK with only 16 bit variable??? */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index ef4bdfc..a3fe73b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -441,7 +441,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
* one.
* Need to handle this.
*/
- tx_cmd->sec_ctl |= TX_CMD_SEC_GCMP | TC_CMD_SEC_KEY_FROM_TABLE;
+ tx_cmd->sec_ctl |= TX_CMD_SEC_GCMP | TX_CMD_SEC_KEY_FROM_TABLE;
tx_cmd->key[0] = keyconf->hw_key_idx;
iwl_mvm_set_tx_cmd_pn(info, crypto_hdr);
break;
--
2.9.3
^ permalink raw reply related
* [PATCH 07/10] iwlwifi: remove support for fw older than -17 and -22
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Luca Coelho <luciano.coelho@intel.com>
FW versions older than -17 for 3160 and 7260 and older than -22 for
newer NICs are not supported anymore. Don't load these versions
and remove code that handles them.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 6 ++---
drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 24 +------------------
.../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 3 +--
.../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 21 +++++------------
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 2 --
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 +-------
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 24 ++++++++-----------
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 --
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 ++---
drivers/net/wireless/intel/iwlwifi/mvm/power.c | 15 ++++--------
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 27 ++++------------------
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 10 ++------
14 files changed, 36 insertions(+), 118 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
index aa575fb..d4b73de 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
@@ -77,9 +77,9 @@
#define IWL3168_UCODE_API_MAX 26
/* Lowest firmware API version supported */
-#define IWL7260_UCODE_API_MIN 16
-#define IWL7265_UCODE_API_MIN 16
-#define IWL7265D_UCODE_API_MIN 16
+#define IWL7260_UCODE_API_MIN 17
+#define IWL7265_UCODE_API_MIN 17
+#define IWL7265D_UCODE_API_MIN 17
#define IWL3168_UCODE_API_MIN 20
/* NVM versions */
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
index 990cf2b..d02ca14 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
@@ -74,7 +74,7 @@
#define IWL8265_UCODE_API_MAX 26
/* Lowest firmware API version supported */
-#define IWL8000_UCODE_API_MIN 16
+#define IWL8000_UCODE_API_MIN 17
#define IWL8265_UCODE_API_MIN 20
/* NVM versions */
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
index a2c7946..ff85041 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
@@ -58,7 +58,7 @@
#define IWL9000_UCODE_API_MAX 26
/* Lowest firmware API version supported */
-#define IWL9000_UCODE_API_MIN 16
+#define IWL9000_UCODE_API_MIN 17
/* NVM versions */
#define IWL9000_NVM_VERSION 0x0a1d
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
index 94423f0..ceec5ca 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
@@ -199,8 +199,6 @@ struct iwl_ucode_capa {
* @IWL_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behavior on hidden SSID,
* treats good CRC threshold as a boolean
* @IWL_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w).
- * @IWL_UCODE_TLV_FLAGS_P2P: This uCode image supports P2P.
- * @IWL_UCODE_TLV_FLAGS_DW_BC_TABLE: The SCD byte count table is in DWORDS
* @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: This uCode image supports uAPSD
* @IWL_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan
* offload profile config command.
@@ -210,36 +208,24 @@ struct iwl_ucode_capa {
* from the probe request template.
* @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL: new NS offload (small version)
* @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version)
- * @IWL_UCODE_TLV_FLAGS_P2P_PM: P2P client supports PM as a stand alone MAC
- * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_DCM: support power save on BSS station and
- * P2P client interfaces simultaneously if they are in different bindings.
- * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_SCM: support power save on BSS station and
- * P2P client interfaces simultaneously if they are in same bindings.
* @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD
* @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save
* @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering.
- * @IWL_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients
* @IWL_UCODE_TLV_FLAGS_EBS_SUPPORT: this uCode image supports EBS.
*/
enum iwl_ucode_tlv_flag {
IWL_UCODE_TLV_FLAGS_PAN = BIT(0),
IWL_UCODE_TLV_FLAGS_NEWSCAN = BIT(1),
IWL_UCODE_TLV_FLAGS_MFP = BIT(2),
- IWL_UCODE_TLV_FLAGS_P2P = BIT(3),
- IWL_UCODE_TLV_FLAGS_DW_BC_TABLE = BIT(4),
IWL_UCODE_TLV_FLAGS_SHORT_BL = BIT(7),
IWL_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = BIT(10),
IWL_UCODE_TLV_FLAGS_NO_BASIC_SSID = BIT(12),
IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL = BIT(15),
IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE = BIT(16),
- IWL_UCODE_TLV_FLAGS_P2P_PM = BIT(21),
- IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM = BIT(22),
- IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM = BIT(23),
IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24),
IWL_UCODE_TLV_FLAGS_EBS_SUPPORT = BIT(25),
IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD = BIT(26),
IWL_UCODE_TLV_FLAGS_BCAST_FILTERING = BIT(29),
- IWL_UCODE_TLV_FLAGS_GO_UAPSD = BIT(30),
};
typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
@@ -249,13 +235,8 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
* @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time
* longer than the passive one, which is essential for fragmented scan.
* @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source.
- * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header
* @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params
* @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
- * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
- * instead of 3.
- * @IWL_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size
- * (command version 3) that supports per-chain limits
* @IWL_UCODE_TLV_API_SCAN_TSF_REPORT: Scan start time reported in scan
* iteration complete notification, and the timestamp reported for RX
* received during scan, are reported in TSF of the mac specified in the
@@ -266,11 +247,8 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
enum iwl_ucode_tlv_api {
IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t)8,
IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t)9,
- IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t)14,
IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t)18,
- IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20,
- IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY = (__force iwl_ucode_tlv_api_t)24,
- IWL_UCODE_TLV_API_TX_POWER_CHAIN = (__force iwl_ucode_tlv_api_t)27,
+ IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20,
IWL_UCODE_TLV_API_SCAN_TSF_REPORT = (__force iwl_ucode_tlv_api_t)28,
NUM_IWL_UCODE_TLV_API
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
index 8ff1921..2d6f44f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
@@ -1578,8 +1578,7 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) ||
- (vif->type == NL80211_IFTYPE_STATION && vif->p2p &&
- mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM)))
+ (vif->type == NL80211_IFTYPE_STATION && vif->p2p)))
MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, S_IWUSR |
S_IRUSR);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h
index 404b0de..3fa43d1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h
@@ -313,35 +313,26 @@ enum iwl_dev_tx_power_cmd_mode {
IWL_TX_POWER_MODE_SET_ACK = 3,
}; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_4 */;
+#define IWL_NUM_CHAIN_LIMITS 2
+#define IWL_NUM_SUB_BANDS 5
+
/**
- * struct iwl_dev_tx_power_cmd_v2 - TX power reduction command
+ * struct iwl_dev_tx_power_cmd - TX power reduction command
* @set_mode: see &enum iwl_dev_tx_power_cmd_mode
* @mac_context_id: id of the mac ctx for which we are reducing TX power.
* @pwr_restriction: TX power restriction in 1/8 dBms.
* @dev_24: device TX power restriction in 1/8 dBms
* @dev_52_low: device TX power restriction upper band - low
* @dev_52_high: device TX power restriction upper band - high
+ * @per_chain_restriction: per chain restrictions
*/
-struct iwl_dev_tx_power_cmd_v2 {
+struct iwl_dev_tx_power_cmd_v3 {
__le32 set_mode;
__le32 mac_context_id;
__le16 pwr_restriction;
__le16 dev_24;
__le16 dev_52_low;
__le16 dev_52_high;
-} __packed; /* TX_REDUCED_POWER_API_S_VER_2 */
-
-#define IWL_NUM_CHAIN_LIMITS 2
-#define IWL_NUM_SUB_BANDS 5
-
-/**
- * struct iwl_dev_tx_power_cmd - TX power reduction command
- * @v2: version 2 of the command, embedded here for easier software handling
- * @per_chain_restriction: per chain restrictions
- */
-struct iwl_dev_tx_power_cmd_v3 {
- /* v3 is just an extension of v2 - keep this here */
- struct iwl_dev_tx_power_cmd_v2 v2;
__le16 per_chain_restriction[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS];
} __packed; /* TX_REDUCED_POWER_API_S_VER_3 */
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 0055a96..57d29a1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
@@ -89,7 +89,6 @@
* @TX_CMD_FLG_MH_PAD: driver inserted 2 byte padding after MAC header.
* Should be set for 26/30 length MAC headers
* @TX_CMD_FLG_RESP_TO_DRV: zero this if the response should go only to FW
- * @TX_CMD_FLG_CCMP_AGG: this frame uses CCMP for aggregation acceleration
* @TX_CMD_FLG_TKIP_MIC_DONE: FW already performed TKIP MIC calculation
* @TX_CMD_FLG_DUR: disable duration overwriting used in PS-Poll Assoc-id
* @TX_CMD_FLG_FW_DROP: FW should mark frame to be dropped
@@ -116,7 +115,6 @@ enum iwl_tx_flags {
TX_CMD_FLG_KEEP_SEQ_CTL = BIT(18),
TX_CMD_FLG_MH_PAD = BIT(20),
TX_CMD_FLG_RESP_TO_DRV = BIT(21),
- TX_CMD_FLG_CCMP_AGG = BIT(22),
TX_CMD_FLG_TKIP_MIC_DONE = BIT(23),
TX_CMD_FLG_DUR = BIT(25),
TX_CMD_FLG_FW_DROP = BIT(26),
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 8974120..8720663 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1046,19 +1046,11 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
{
struct iwl_mvm_sar_table sar_table;
struct iwl_dev_tx_power_cmd cmd = {
- .v3.v2.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS),
+ .v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS),
};
int ret, i, j, idx;
int len = sizeof(cmd);
- /* we can't do anything with the table if the FW doesn't support it */
- if (!fw_has_api(&mvm->fw->ucode_capa,
- IWL_UCODE_TLV_API_TX_POWER_CHAIN)) {
- IWL_DEBUG_RADIO(mvm,
- "FW doesn't support per-chain TX power settings.\n");
- return 0;
- }
-
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
len = sizeof(cmd.v3);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index a5ede8c..318efd8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -479,13 +479,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
hw->wiphy->n_cipher_suites++;
}
- /*
- * Enable 11w if advertised by firmware and software crypto
- * is not enabled (as the firmware will interpret some mgmt
- * packets, so enabling it with software crypto isn't safe)
+ /* Enable 11w if software crypto is not enabled (as the
+ * firmware will interpret some mgmt packets, so enabling it
+ * with software crypto isn't safe).
*/
- if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_MFP &&
- !iwlwifi_mod_params.sw_crypto) {
+ if (!iwlwifi_mod_params.sw_crypto) {
ieee80211_hw_set(hw, MFP_CAPABLE);
mvm->ciphers[hw->wiphy->n_cipher_suites] =
WLAN_CIPHER_SUITE_AES_CMAC;
@@ -547,9 +545,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG |
REGULATORY_DISABLE_BEACON_HINTS;
- if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_GO_UAPSD)
- hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
-
+ hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
hw->wiphy->iface_combinations = iwl_mvm_iface_combinations;
@@ -1273,20 +1269,18 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
s16 tx_power)
{
struct iwl_dev_tx_power_cmd cmd = {
- .v3.v2.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
- .v3.v2.mac_context_id =
+ .v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
+ .v3.mac_context_id =
cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id),
- .v3.v2.pwr_restriction = cpu_to_le16(8 * tx_power),
+ .v3.pwr_restriction = cpu_to_le16(8 * tx_power),
};
int len = sizeof(cmd);
if (tx_power == IWL_DEFAULT_MAX_TX_POWER)
- cmd.v3.v2.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
+ cmd.v3.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
len = sizeof(cmd.v3);
- if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_TX_POWER_CHAIN))
- len = sizeof(cmd.v3.v2);
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd);
}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index b7cfdcb..d17cbf6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1305,8 +1305,6 @@ static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info,
tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
memcpy(tx_cmd->key, keyconf->key, keyconf->keylen);
- if (info->flags & IEEE80211_TX_CTL_AMPDU)
- tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_CCMP_AGG);
}
static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 6c08aa3..05fe6dd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -653,11 +653,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
/* the hardware splits the A-MSDU */
if (mvm->cfg->mq_rx_supported)
trans_cfg.rx_buf_size = IWL_AMSDU_4K;
- trans->wide_cmd_header = fw_has_api(&mvm->fw->ucode_capa,
- IWL_UCODE_TLV_API_WIDE_CMD_HDR);
- if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_DW_BC_TABLE)
- trans_cfg.bc_table_dword = true;
+ trans->wide_cmd_header = true;
+ trans_cfg.bc_table_dword = true;
trans_cfg.command_groups = iwl_mvm_groups;
trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
index ff85865..af6d10c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
@@ -694,8 +694,7 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm,
/* enable PM on p2p if p2p stand alone */
if (vifs->p2p_active && !vifs->bss_active && !vifs->ap_active) {
- if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM)
- p2p_mvmvif->pm_enabled = true;
+ p2p_mvmvif->pm_enabled = true;
return;
}
@@ -707,12 +706,10 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm,
ap_mvmvif->phy_ctxt->id);
/* clients are not stand alone: enable PM if DCM */
- if (!(client_same_channel || ap_same_channel) &&
- (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM)) {
+ if (!(client_same_channel || ap_same_channel)) {
if (vifs->bss_active)
bss_mvmvif->pm_enabled = true;
- if (vifs->p2p_active &&
- (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM))
+ if (vifs->p2p_active)
p2p_mvmvif->pm_enabled = true;
return;
}
@@ -721,12 +718,10 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm,
* There is only one channel in the system and there are only
* bss and p2p clients that share it
*/
- if (client_same_channel && !vifs->ap_active &&
- (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM)) {
+ if (client_same_channel && !vifs->ap_active) {
/* share same channel*/
bss_mvmvif->pm_enabled = true;
- if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM)
- p2p_mvmvif->pm_enabled = true;
+ p2p_mvmvif->pm_enabled = true;
}
}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 00b03fc..f279fdd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -739,22 +739,6 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
params->preq.common_data.len = cpu_to_le16(ies->common_ie_len);
}
-static __le32 iwl_mvm_scan_priority(struct iwl_mvm *mvm,
- enum iwl_scan_priority_ext prio)
-{
- if (fw_has_api(&mvm->fw->ucode_capa,
- IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY))
- return cpu_to_le32(prio);
-
- if (prio <= IWL_SCAN_PRIORITY_EXT_2)
- return cpu_to_le32(IWL_SCAN_PRIORITY_LOW);
-
- if (prio <= IWL_SCAN_PRIORITY_EXT_4)
- return cpu_to_le32(IWL_SCAN_PRIORITY_MEDIUM);
-
- return cpu_to_le32(IWL_SCAN_PRIORITY_HIGH);
-}
-
static void iwl_mvm_scan_lmac_dwell(struct iwl_mvm *mvm,
struct iwl_scan_req_lmac *cmd,
struct iwl_mvm_scan_params *params)
@@ -765,7 +749,7 @@ static void iwl_mvm_scan_lmac_dwell(struct iwl_mvm *mvm,
cmd->extended_dwell = scan_timing[params->type].dwell_extended;
cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time);
cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time);
- cmd->scan_prio = iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6);
+ cmd->scan_prio = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6);
}
static inline bool iwl_mvm_scan_fits(struct iwl_mvm *mvm, int n_ssids,
@@ -1067,15 +1051,12 @@ static void iwl_mvm_scan_umac_dwell(struct iwl_mvm *mvm,
cmd->fragmented_dwell = scan_timing[params->type].dwell_fragmented;
cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time);
cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time);
- cmd->scan_priority =
- iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6);
+ cmd->scan_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6);
if (iwl_mvm_is_regular_scan(params))
- cmd->ooc_priority =
- iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6);
+ cmd->ooc_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6);
else
- cmd->ooc_priority =
- iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_2);
+ cmd->ooc_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_2);
}
static void
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 58fc7b3..63a051b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -241,11 +241,8 @@ static int iwl_mvm_get_temp_cmd(struct iwl_mvm *mvm)
};
u32 cmdid;
- if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_WIDE_CMD_HDR))
- cmdid = iwl_cmd_id(CMD_DTS_MEASUREMENT_TRIGGER_WIDE,
- PHY_OPS_GROUP, 0);
- else
- cmdid = CMD_DTS_MEASUREMENT_TRIGGER;
+ cmdid = iwl_cmd_id(CMD_DTS_MEASUREMENT_TRIGGER_WIDE,
+ PHY_OPS_GROUP, 0);
if (!fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE))
@@ -261,9 +258,6 @@ int iwl_mvm_get_temp(struct iwl_mvm *mvm, s32 *temp)
DTS_MEASUREMENT_NOTIF_WIDE) };
int ret;
- if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_WIDE_CMD_HDR))
- temp_notif[0] = DTS_MEASUREMENT_NOTIFICATION;
-
lockdep_assert_held(&mvm->mutex);
iwl_init_notification_wait(&mvm->notif_wait, &wait_temp_notif,
--
2.9.3
^ permalink raw reply related
* [PATCH 06/10] iwlwifi: mvm: correct rate_idx bounds-check
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Johannes Berg, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
The upper bound IWL_RATE_COUNT_LEGACY should be used
with a >= check, rejecting the value itself; fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index e0c9065..ef4bdfc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -346,7 +346,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
rate_idx = info->control.rates[0].idx;
/* if the rate isn't a well known legacy rate, take the lowest one */
- if (rate_idx < 0 || rate_idx > IWL_RATE_COUNT_LEGACY)
+ if (rate_idx < 0 || rate_idx >= IWL_RATE_COUNT_LEGACY)
rate_idx = rate_lowest_index(
&mvm->nvm_data->bands[info->band], sta);
--
2.9.3
^ permalink raw reply related
* [PATCH 05/10] iwlwifi: mvm: bail out if CTDP start operation fails
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Luca Coelho <luciano.coelho@intel.com>
We were assigning the return value of iwl_mvm_ctdp_command() to a
variable, but never checking it. If this command fails, we should not
allow the interface up process to proceed, since it is potentially
dangerous to ignore thermal management requirements.
Fixes: commit 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 8f10780..8974120 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1233,9 +1233,12 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
}
/* TODO: read the budget from BIOS / Platform NVM */
- if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0)
+ if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) {
ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START,
mvm->cooling_dev.cur_state);
+ if (ret)
+ goto error;
+ }
#else
/* Initialize tx backoffs to the minimal possible */
iwl_mvm_tt_tx_backoff(mvm, 0);
--
2.9.3
^ permalink raw reply related
* [PATCH 04/10] iwlwifi: pcie: avoid variable shadowing in TFD helpers
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Johannes Berg, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
The various TFD/TB helpers have two code paths depending on the
type of TFD supported, with variable shadowing due to the new if
branches. Move the fall-through code into else branches to avoid
variable shadowing. While doing so, rename some of the variables
and do some other cleanups (like removing void * casts of void *
pointers.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 19 ++++-----
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 47 ++++++++++++----------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
index 2d81630..cac6d99 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
@@ -497,23 +497,20 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
struct sk_buff_head *skbs);
void iwl_trans_pcie_tx_reset(struct iwl_trans *trans);
-static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *tfd,
+static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *_tfd,
u8 idx)
{
- struct iwl_tfd *tfd_fh;
- struct iwl_tfd_tb *tb;
-
if (trans->cfg->use_tfh) {
- struct iwl_tfh_tfd *tfd_fh = (void *)tfd;
- struct iwl_tfh_tb *tb = &tfd_fh->tbs[idx];
+ struct iwl_tfh_tfd *tfd = _tfd;
+ struct iwl_tfh_tb *tb = &tfd->tbs[idx];
return le16_to_cpu(tb->tb_len);
- }
-
- tfd_fh = (void *)tfd;
- tb = &tfd_fh->tbs[idx];
+ } else {
+ struct iwl_tfd *tfd = _tfd;
+ struct iwl_tfd_tb *tb = &tfd->tbs[idx];
- return le16_to_cpu(tb->hi_n_len) >> 4;
+ return le16_to_cpu(tb->hi_n_len) >> 4;
+ }
}
/*****************************************************
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index e00e7d8..e9a278b 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -337,28 +337,32 @@ static inline void *iwl_pcie_get_tfd(struct iwl_trans_pcie *trans_pcie,
}
static inline dma_addr_t iwl_pcie_tfd_tb_get_addr(struct iwl_trans *trans,
- void *tfd, u8 idx)
+ void *_tfd, u8 idx)
{
- struct iwl_tfd *tfd_fh;
- struct iwl_tfd_tb *tb;
- dma_addr_t addr;
if (trans->cfg->use_tfh) {
- struct iwl_tfh_tfd *tfd_fh = (void *)tfd;
- struct iwl_tfh_tb *tb = &tfd_fh->tbs[idx];
+ struct iwl_tfh_tfd *tfd = _tfd;
+ struct iwl_tfh_tb *tb = &tfd->tbs[idx];
return (dma_addr_t)(le64_to_cpu(tb->addr));
- }
+ } else {
+ struct iwl_tfd *tfd = _tfd;
+ struct iwl_tfd_tb *tb = &tfd->tbs[idx];
+ dma_addr_t addr = get_unaligned_le32(&tb->lo);
+ dma_addr_t hi_len;
- tfd_fh = (void *)tfd;
- tb = &tfd_fh->tbs[idx];
- addr = get_unaligned_le32(&tb->lo);
+ if (sizeof(dma_addr_t) <= sizeof(u32))
+ return addr;
- if (sizeof(dma_addr_t) > sizeof(u32))
- addr |=
- ((dma_addr_t)(le16_to_cpu(tb->hi_n_len) & 0xF) << 16) << 16;
+ hi_len = le16_to_cpu(tb->hi_n_len) & 0xF;
- return addr;
+ /*
+ * shift by 16 twice to avoid warnings on 32-bit
+ * (where this code never runs anyway due to the
+ * if statement above)
+ */
+ return addr | ((hi_len << 16) << 16);
+ }
}
static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd,
@@ -388,18 +392,17 @@ static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd,
}
}
-static inline u8 iwl_pcie_tfd_get_num_tbs(struct iwl_trans *trans, void *tfd)
+static inline u8 iwl_pcie_tfd_get_num_tbs(struct iwl_trans *trans, void *_tfd)
{
- struct iwl_tfd *tfd_fh;
-
if (trans->cfg->use_tfh) {
- struct iwl_tfh_tfd *tfd_fh = (void *)tfd;
+ struct iwl_tfh_tfd *tfd = _tfd;
- return le16_to_cpu(tfd_fh->num_tbs) & 0x1f;
- }
+ return le16_to_cpu(tfd->num_tbs) & 0x1f;
+ } else {
+ struct iwl_tfd *tfd = _tfd;
- tfd_fh = (void *)tfd;
- return tfd_fh->num_tbs & 0x1f;
+ return tfd->num_tbs & 0x1f;
+ }
}
static void iwl_pcie_tfd_unmap(struct iwl_trans *trans,
--
2.9.3
^ permalink raw reply related
* [PATCH 03/10] iwlwifi: add two new 9560 series PCI IDs
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Oren Givon, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Oren Givon <oren.givon@intel.com>
Add two new PCI IDs for the 9560 series.
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 3d766f2..001be40 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -529,6 +529,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
{IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)},
{IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)},
{IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)},
+ {IWL_PCI_DEVICE(0x2526, 0x1030, iwl9560_2ac_cfg)},
+ {IWL_PCI_DEVICE(0xA370, 0x1030, iwl9560_2ac_cfg)},
/* a000 Series */
{IWL_PCI_DEVICE(0x2720, 0x0A10, iwla000_2ac_cfg)},
--
2.9.3
^ permalink raw reply related
* [PATCH 01/10] iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init config
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Sara Sharon, Luca Coelho
In-Reply-To: <20160922205210.1778-1-luca@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
This is never really used anymore.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 -
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 46 ++++++++-----------------
2 files changed, 15 insertions(+), 32 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index 6cecb1a..2660cc4 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -359,7 +359,6 @@ struct iwl_cfg {
high_temp:1,
mac_addr_from_csr:1,
lp_xtal_workaround:1,
- no_power_up_nic_in_init:1,
disable_dummy_notification:1,
apmg_not_supported:1,
mq_rx_supported:1,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 75f3ca0..6c08aa3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -712,37 +712,21 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
IWL_DEBUG_EEPROM(mvm->trans->dev,
"working without external nvm file\n");
- if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name,
- "not allowing power-up and not having nvm_file\n"))
+ err = iwl_trans_start_hw(mvm->trans);
+ if (err)
goto out_free;
- /*
- * Even if nvm exists in the nvm_file driver should read again the nvm
- * from the nic because there might be entries that exist in the OTP
- * and not in the file.
- * for nics with no_power_up_nic_in_init: rely completley on nvm_file
- */
- if (cfg->no_power_up_nic_in_init && mvm->nvm_file_name) {
- err = iwl_nvm_init(mvm, false);
- if (err)
- goto out_free;
- } else {
- err = iwl_trans_start_hw(mvm->trans);
- if (err)
- goto out_free;
-
- mutex_lock(&mvm->mutex);
- iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
- err = iwl_run_init_mvm_ucode(mvm, true);
- if (!err || !iwlmvm_mod_params.init_dbg)
- iwl_mvm_stop_device(mvm);
- iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE);
- mutex_unlock(&mvm->mutex);
- /* returns 0 if successful, 1 if success but in rfkill */
- if (err < 0 && !iwlmvm_mod_params.init_dbg) {
- IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err);
- goto out_free;
- }
+ mutex_lock(&mvm->mutex);
+ iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
+ err = iwl_run_init_mvm_ucode(mvm, true);
+ if (!err || !iwlmvm_mod_params.init_dbg)
+ iwl_mvm_stop_device(mvm);
+ iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE);
+ mutex_unlock(&mvm->mutex);
+ /* returns 0 if successful, 1 if success but in rfkill */
+ if (err < 0 && !iwlmvm_mod_params.init_dbg) {
+ IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err);
+ goto out_free;
}
scan_size = iwl_mvm_scan_size(mvm);
@@ -784,8 +768,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
flush_delayed_work(&mvm->fw_dump_wk);
iwl_phy_db_free(mvm->phy_db);
kfree(mvm->scan_cmd);
- if (!cfg->no_power_up_nic_in_init || !mvm->nvm_file_name)
- iwl_trans_op_mode_leave(trans);
+ iwl_trans_op_mode_leave(trans);
+
ieee80211_free_hw(mvm->hw);
return NULL;
}
--
2.9.3
^ permalink raw reply related
* [PATCH 00/10] iwlwifi: updates for 2016-09-22
From: Luca Coelho @ 2016-09-22 20:52 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Luca Coelho
From: Luca Coelho <luciano.coelho@intel.com>
Hi,
Here's a series of patches that were pending in our internal tree.
I'm changing the process a bit. From now on I'll send the patches out
first for review and only later apply them on iwlwifi-next/master and
send a pull request. This will make reviews easier and will also
allow kbuild bot to run tests before I actually apply the patches and
send a pull request.
Please review and let me know if there are any problems.
Cheers,
Luca.
Emmanuel Grumbach (2):
iwlwifi: mvm: fix typo in TC_CMD_SEC_KEY_FROM_TABLE
iwlwifi: mvm: initialise ADD_STA before sending it to the firmware
Johannes Berg (2):
iwlwifi: pcie: avoid variable shadowing in TFD helpers
iwlwifi: mvm: correct rate_idx bounds-check
Luca Coelho (2):
iwlwifi: mvm: bail out if CTDP start operation fails
iwlwifi: remove support for fw older than -17 and -22
Oren Givon (1):
iwlwifi: add two new 9560 series PCI IDs
Sara Sharon (3):
iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init config
iwlwifi: mvm: cleanup usage of init_dbg parameter
iwlwifi: allow error table address new range
drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 6 +--
drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 -
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 24 +---------
.../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 3 +-
.../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 21 +++------
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 6 +--
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 43 ++++++++----------
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 24 ++++------
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 -
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 52 +++++++---------------
drivers/net/wireless/intel/iwlwifi/mvm/power.c | 15 +++----
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 27 ++---------
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 10 +----
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +-
drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +-
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 19 ++++----
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 47 ++++++++++---------
21 files changed, 110 insertions(+), 204 deletions(-)
--
2.9.3
^ permalink raw reply
* [PATCH] cfg80211: Add support for static WEP in the driver
From: Luca Coelho @ 2016-09-22 20:16 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, David Spinadel, Johannes Berg, Luca Coelho
From: David Spinadel <david.spinadel@intel.com>
Add support for drivers that implement static WEP internally, i.e.
expose connection keys to the driver in connect flow and don't
upload the keys after the connection.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
include/net/cfg80211.h | 12 +++++++++++-
net/wireless/core.h | 4 ++--
net/wireless/ibss.c | 5 +++--
net/wireless/sme.c | 6 +++++-
net/wireless/util.c | 2 +-
net/wireless/wext-compat.c | 2 +-
net/wireless/wext-sme.c | 2 +-
7 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bd26cc6..562d00a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5,7 +5,7 @@
*
* Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
- * Copyright 2015 Intel Deutschland GmbH
+ * Copyright 2015-2016 Intel Deutschland GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -593,6 +593,8 @@ struct survey_info {
s8 noise;
};
+#define CFG80211_MAX_WEP_KEYS 4
+
/**
* struct cfg80211_crypto_settings - Crypto settings
* @wpa_versions: indicates which, if any, WPA versions are enabled
@@ -610,6 +612,9 @@ struct survey_info {
* allowed through even on unauthorized ports
* @control_port_no_encrypt: TRUE to prevent encryption of control port
* protocol frames.
+ * @wep_keys: static WEP keys, if not NULL points to an array of
+ * CFG80211_MAX_WEP_KEYS WEP keys
+ * @wep_tx_key: key index (0..3) of the default TX static WEP key
*/
struct cfg80211_crypto_settings {
u32 wpa_versions;
@@ -621,6 +626,8 @@ struct cfg80211_crypto_settings {
bool control_port;
__be16 control_port_ethertype;
bool control_port_no_encrypt;
+ struct key_params *wep_keys;
+ int wep_tx_key;
};
/**
@@ -2900,6 +2907,8 @@ struct cfg80211_ops {
* @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels.
* @WIPHY_FLAG_HAS_CHANNEL_SWITCH: Device supports channel switch in
* beaconing mode (AP, IBSS, Mesh, ...).
+ * @WIPHY_FLAG_HAS_STATIC_WEP: The device supports static WEP key installation
+ * before connection.
*/
enum wiphy_flags {
/* use hole at 0 */
@@ -2925,6 +2934,7 @@ enum wiphy_flags {
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21),
WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22),
WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23),
+ WIPHY_FLAG_HAS_STATIC_WEP = BIT(24),
};
/**
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 5555e3c..554f87d 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -249,8 +249,8 @@ struct cfg80211_event {
};
struct cfg80211_cached_keys {
- struct key_params params[4];
- u8 data[4][WLAN_KEY_LEN_WEP104];
+ struct key_params params[CFG80211_MAX_WEP_KEYS];
+ u8 data[CFG80211_MAX_WEP_KEYS][WLAN_KEY_LEN_WEP104];
int def;
};
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index eafdfa5..364f900 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -43,7 +43,8 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
cfg80211_hold_bss(bss_from_pub(bss));
wdev->current_bss = bss_from_pub(bss);
- cfg80211_upload_connect_keys(wdev);
+ if (!(wdev->wiphy->flags & WIPHY_FLAG_HAS_STATIC_WEP))
+ cfg80211_upload_connect_keys(wdev);
nl80211_send_ibss_bssid(wiphy_to_rdev(wdev->wiphy), dev, bssid,
GFP_KERNEL);
@@ -296,7 +297,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
ck = kmemdup(wdev->wext.keys, sizeof(*ck), GFP_KERNEL);
if (!ck)
return -ENOMEM;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < CFG80211_MAX_WEP_KEYS; i++)
ck->params[i].key = ck->data[i];
}
err = __cfg80211_join_ibss(rdev, wdev->netdev,
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index c08a3b5..a77db33 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -726,7 +726,8 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
wdev->current_bss = bss_from_pub(bss);
- cfg80211_upload_connect_keys(wdev);
+ if (!(wdev->wiphy->flags & WIPHY_FLAG_HAS_STATIC_WEP))
+ cfg80211_upload_connect_keys(wdev);
rcu_read_lock();
country_ie = ieee80211_bss_get_ie(bss, WLAN_EID_COUNTRY);
@@ -1043,6 +1044,9 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
connect->crypto.ciphers_pairwise[0] = cipher;
}
}
+
+ connect->crypto.wep_keys = connkeys->params;
+ connect->crypto.wep_tx_key = connkeys->def;
} else {
if (WARN_ON(connkeys))
return -EINVAL;
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 9e6e2aa..e02141d 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -912,7 +912,7 @@ void cfg80211_upload_connect_keys(struct wireless_dev *wdev)
if (!wdev->connect_keys)
return;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < CFG80211_MAX_WEP_KEYS; i++) {
if (!wdev->connect_keys->params[i].cipher)
continue;
if (rdev_add_key(rdev, dev, i, false, NULL,
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 7b97d43..f381156 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -411,7 +411,7 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
GFP_KERNEL);
if (!wdev->wext.keys)
return -ENOMEM;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < CFG80211_MAX_WEP_KEYS; i++)
wdev->wext.keys->params[i].key =
wdev->wext.keys->data[i];
}
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index 88f1f69..9951638 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -46,7 +46,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
ck = kmemdup(wdev->wext.keys, sizeof(*ck), GFP_KERNEL);
if (!ck)
return -ENOMEM;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < CFG80211_MAX_WEP_KEYS; i++)
ck->params[i].key = ck->data[i];
}
--
2.9.3
^ permalink raw reply related
* Re: ath9k_htc kernel driver regression affecting throughput
From: Oleksij Rempel @ 2016-09-22 17:11 UTC (permalink / raw)
To: bruce m beach; +Cc: linux-wireless
In-Reply-To: <CAArymCnJZgUbgCiLqA6-94RAtXYkYeeS9uF71MX9+ou-AbYszg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 485 bytes --]
Am 22.09.2016 um 05:34 schrieb bruce m beach:
>> We recently updated FW to GCC 6.2 which can detect more problems. So it
>> will be probably interesting for you to pick this patch out.
>
> Yes I saw the message by Adrian Chadd and tried tried to git clone the link
> he gave but that clearly wasn't what was to be done. Is there a patch that I
> need to apply to the firmware? I do have a local copy.
>
this patches are now in main repository.
--
Regards,
Oleksij
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply
* Re: rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed
From: Jean Delvare @ 2016-09-22 17:05 UTC (permalink / raw)
To: Larry Finger; +Cc: Chaoming Li, linux-wireless
In-Reply-To: <83974845-037d-0cde-00b1-ec7b28eeb15f@lwfinger.net>
On Thu, 22 Sep 2016 10:09:58 -0500, Larry Finger wrote:
> On 09/22/2016 04:51 AM, Jean Delvare wrote:
> > Hello,
> >
> > I bought an Asus PCE-N10 PCIe Wi-Fi N card to install in my wife's
> > computer. This morning it stopped working suddenly. Investigating the
> > kernel logs, the following error message caught my eye:
> >
> > rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed
> >
> > It was printed twice, 3.5 hours apart, the second time at the moment
> > the network stopped working. I guess this is not supposed to happen.
> > What additional information can I provide to help you debug the issue?
> > That's the device:
> >
> > 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01)
> > Subsystem: ASUSTeK Computer Inc. Device [1043:84b5]
> > Flags: bus master, fast devsel, latency 0, IRQ 17
> > I/O ports at e800 [size=256]
> > Memory at febfc000 (64-bit, non-prefetchable) [size=16K]
> > Capabilities: <access denied>
> > Kernel driver in use: rtl8192ce
> > Kernel modules: rtl8192ce
> >
> > Kernel version is 4.5.4-1-default x86_64 (openSUSE Tumbleweed.)
> >
> > Reloading the rtl8192ce module and restarting the network service got
> > everything back up.
>
> Unfortunately, that message is not as helpful as it might be.
>
> Do you build your own kernel, or are you using openSUSE's supplied version? If
> the latter, I will need to think how we might debug the issue. If the former,
> please add the attached patch.
I'm a kernel dev :-) I'll test your patch and report, thanks.
That being said, I agree it's better if drivers have useful debug
messages... Makes things faster. So something like your patch should go
upstream anyway. And the same improvement could be applied to various
other messages of the rtlwifi driver family.
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply
* [PATCH v9 2/2] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue
From: Toke Høiland-Jørgensen @ 2016-09-22 17:04 UTC (permalink / raw)
To: make-wifi-fast, linux-wireless; +Cc: Toke Høiland-Jørgensen
In-Reply-To: <20160906114426.25520-1-toke@toke.dk>
The TXQ intermediate queues can cause packet reordering when more than
one flow is active to a single station. Since some of the wifi-specific
packet handling (notably sequence number and encryption handling) is
sensitive to re-ordering, things break if they are applied before the
TXQ.
This splits up the TX handlers and fast_xmit logic into two parts: An
early part and a late part. The former is applied before TXQ enqueue,
and the latter after dequeue. The non-TXQ path just applies both parts
at once.
Because fragments shouldn't be split up or reordered, the fragmentation
handler is run after dequeue. Any fragments are then kept in the TXQ and
on subsequent dequeues they take precedence over dequeueing from the FQ
structure.
This approach avoids having to scatter special cases all over the place
for when TXQ is enabled, at the cost of making the fast_xmit and TX
handler code slightly more complex.
Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>
---
include/net/mac80211.h | 2 +
net/mac80211/ieee80211_i.h | 8 ++
net/mac80211/rx.c | 4 +-
net/mac80211/sta_info.c | 10 +-
net/mac80211/tx.c | 287 +++++++++++++++++++++++++++++++++------=
------
net/mac80211/util.c | 11 +-
6 files changed, 232 insertions(+), 90 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5296100..9463039 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -715,6 +715,7 @@ enum mac80211_tx_info_flags {
* frame (PS-Poll or uAPSD).
* @IEEE80211_TX_CTRL_RATE_INJECT: This frame is injected with rate info=
rmation
* @IEEE80211_TX_CTRL_AMSDU: This frame is an A-MSDU frame
+ * @IEEE80211_TX_CTRL_FAST_XMIT: This frame is going through the fast_xm=
it path
*
* These flags are used in tx_info->control.flags.
*/
@@ -723,6 +724,7 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_CTRL_PS_RESPONSE =3D BIT(1),
IEEE80211_TX_CTRL_RATE_INJECT =3D BIT(2),
IEEE80211_TX_CTRL_AMSDU =3D BIT(3),
+ IEEE80211_TX_CTRL_FAST_XMIT =3D BIT(4),
};
=20
/*
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c71c735..caca265 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -813,12 +813,14 @@ enum txq_info_flags {
* @def_flow: used as a fallback flow when a packet destined to @tin has=
hes to
* a fq_flow which is already owned by a different tin
* @def_cvars: codel vars for @def_flow
+ * @frags: used to keep fragments created after dequeue
*/
struct txq_info {
struct fq_tin tin;
struct fq_flow def_flow;
struct codel_vars def_cvars;
struct codel_stats cstats;
+ struct sk_buff_head frags;
unsigned long flags;
=20
/* keep last! */
@@ -1481,6 +1483,12 @@ static inline struct txq_info *to_txq_info(struct =
ieee80211_txq *txq)
return container_of(txq, struct txq_info, txq);
}
=20
+static inline bool txq_has_queue(struct ieee80211_txq *txq)
+{
+ struct txq_info *txqi =3D to_txq_info(txq);
+ return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
+}
+
static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
{
return ether_addr_equal(raddr, addr) ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index e796060..ae5786b8 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1323,9 +1323,7 @@ static void sta_ps_start(struct sta_info *sta)
return;
=20
for (tid =3D 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
- struct txq_info *txqi =3D to_txq_info(sta->sta.txq[tid]);
-
- if (txqi->tin.backlog_packets)
+ if (txq_has_queue(sta->sta.txq[tid]))
set_bit(tid, &sta->txq_buffered_tids);
else
clear_bit(tid, &sta->txq_buffered_tids);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 1b1b28f..167bff0 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1212,12 +1212,10 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_i=
nfo *sta)
=20
if (sta->sta.txq[0]) {
for (i =3D 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
- struct txq_info *txqi =3D to_txq_info(sta->sta.txq[i]);
-
- if (!txqi->tin.backlog_packets)
+ if (!txq_has_queue(sta->sta.txq[i]))
continue;
=20
- drv_wake_tx_queue(local, txqi);
+ drv_wake_tx_queue(local, to_txq_info(sta->sta.txq[i]));
}
}
=20
@@ -1649,9 +1647,7 @@ ieee80211_sta_ps_deliver_response(struct sta_info *=
sta,
return;
=20
for (tid =3D 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
- struct txq_info *txqi =3D to_txq_info(sta->sta.txq[tid]);
-
- if (!(tids & BIT(tid)) || txqi->tin.backlog_packets)
+ if (!(tids & BIT(tid)) || txq_has_queue(sta->sta.txq[tid]))
continue;
=20
sta_info_recalc_tim(sta);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e8c9964..75e6adf 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -853,8 +853,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
tid =3D *qc & IEEE80211_QOS_CTL_TID_MASK;
tx->sta->tx_stats.msdu[tid]++;
=20
- if (!tx->sta->sta.txq[0])
- hdr->seq_ctrl =3D ieee80211_tx_next_seq(tx->sta, tid);
+ hdr->seq_ctrl =3D ieee80211_tx_next_seq(tx->sta, tid);
=20
return TX_CONTINUE;
}
@@ -1404,6 +1403,7 @@ void ieee80211_txq_init(struct ieee80211_sub_if_dat=
a *sdata,
fq_flow_init(&txqi->def_flow);
codel_vars_init(&txqi->def_cvars);
codel_stats_init(&txqi->cstats);
+ __skb_queue_head_init(&txqi->frags);
=20
txqi->txq.vif =3D &sdata->vif;
=20
@@ -1426,6 +1426,7 @@ void ieee80211_txq_purge(struct ieee80211_local *lo=
cal,
struct fq_tin *tin =3D &txqi->tin;
=20
fq_tin_reset(fq, tin, fq_skb_free_func);
+ ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
}
=20
int ieee80211_txq_setup_flows(struct ieee80211_local *local)
@@ -1476,6 +1477,47 @@ void ieee80211_txq_teardown_flows(struct ieee80211=
_local *local)
spin_unlock_bh(&fq->lock);
}
=20
+static bool ieee80211_queue_skb(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct sta_info *sta,
+ struct sk_buff *skb)
+{
+ struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
+ struct fq *fq =3D &local->fq;
+ struct ieee80211_vif *vif;
+ struct txq_info *txqi;
+ struct ieee80211_sta *pubsta;
+
+ if (!local->ops->wake_tx_queue ||
+ sdata->vif.type =3D=3D NL80211_IFTYPE_MONITOR)
+ return false;
+
+ if (sta && sta->uploaded)
+ pubsta =3D &sta->sta;
+ else
+ pubsta =3D NULL;
+
+ if (sdata->vif.type =3D=3D NL80211_IFTYPE_AP_VLAN)
+ sdata =3D container_of(sdata->bss,
+ struct ieee80211_sub_if_data, u.ap);
+
+ vif =3D &sdata->vif;
+ txqi =3D ieee80211_get_txq(local, vif, pubsta, skb);
+
+ if (!txqi)
+ return false;
+
+ info->control.vif =3D vif;
+
+ spin_lock_bh(&fq->lock);
+ ieee80211_txq_enqueue(local, txqi, skb);
+ spin_unlock_bh(&fq->lock);
+
+ drv_wake_tx_queue(local, txqi);
+
+ return true;
+}
+
static bool ieee80211_tx_frags(struct ieee80211_local *local,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
@@ -1483,9 +1525,7 @@ static bool ieee80211_tx_frags(struct ieee80211_loc=
al *local,
bool txpending)
{
struct ieee80211_tx_control control =3D {};
- struct fq *fq =3D &local->fq;
struct sk_buff *skb, *tmp;
- struct txq_info *txqi;
unsigned long flags;
=20
skb_queue_walk_safe(skbs, skb, tmp) {
@@ -1500,21 +1540,6 @@ static bool ieee80211_tx_frags(struct ieee80211_lo=
cal *local,
}
#endif
=20
- txqi =3D ieee80211_get_txq(local, vif, sta, skb);
- if (txqi) {
- info->control.vif =3D vif;
-
- __skb_unlink(skb, skbs);
-
- spin_lock_bh(&fq->lock);
- ieee80211_txq_enqueue(local, txqi, skb);
- spin_unlock_bh(&fq->lock);
-
- drv_wake_tx_queue(local, txqi);
-
- continue;
- }
-
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
if (local->queue_stop_reasons[q] ||
(!txpending && !skb_queue_empty(&local->pending[q]))) {
@@ -1635,10 +1660,13 @@ static bool __ieee80211_tx(struct ieee80211_local=
*local,
/*
* Invoke TX handlers, return 0 on success and non-zero if the
* frame was dropped or queued.
+ *
+ * The handlers are split into an early and late part. The latter is eve=
rything
+ * that can be sensitive to reordering, and will be deferred to after pa=
ckets
+ * are dequeued from the intermediate queues (when they are enabled).
*/
-static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
+static int invoke_tx_handlers_early(struct ieee80211_tx_data *tx)
{
- struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(tx->skb);
ieee80211_tx_result res =3D TX_DROP;
=20
#define CALL_TXH(txh) \
@@ -1656,6 +1684,31 @@ static int invoke_tx_handlers(struct ieee80211_tx_=
data *tx)
if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
CALL_TXH(ieee80211_tx_h_rate_ctrl);
=20
+ txh_done:
+ if (unlikely(res =3D=3D TX_DROP)) {
+ I802_DEBUG_INC(tx->local->tx_handlers_drop);
+ if (tx->skb)
+ ieee80211_free_txskb(&tx->local->hw, tx->skb);
+ else
+ ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs);
+ return -1;
+ } else if (unlikely(res =3D=3D TX_QUEUED)) {
+ I802_DEBUG_INC(tx->local->tx_handlers_queued);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * Late handlers can be called while the sta lock is held. Handlers that=
can
+ * cause packets to be generated will cause deadlock!
+ */
+static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx)
+{
+ struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(tx->skb);
+ ieee80211_tx_result res =3D TX_CONTINUE;
+
if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
__skb_queue_tail(&tx->skbs, tx->skb);
tx->skb =3D NULL;
@@ -1688,6 +1741,15 @@ static int invoke_tx_handlers(struct ieee80211_tx_=
data *tx)
return 0;
}
=20
+static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
+{
+ int r =3D invoke_tx_handlers_early(tx);
+
+ if (r)
+ return r;
+ return invoke_tx_handlers_late(tx);
+}
+
bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct sk_buff *skb,
int band, struct ieee80211_sta **sta)
@@ -1762,7 +1824,13 @@ static bool ieee80211_tx(struct ieee80211_sub_if_d=
ata *sdata,
info->hw_queue =3D
sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
=20
- if (!invoke_tx_handlers(&tx))
+ if (invoke_tx_handlers_early(&tx))
+ return false;
+
+ if (ieee80211_queue_skb(local, sdata, tx.sta, tx.skb))
+ return true;
+
+ if (!invoke_tx_handlers_late(&tx))
result =3D __ieee80211_tx(local, &tx.skbs, led_len,
tx.sta, txpending);
=20
@@ -3106,8 +3174,73 @@ out:
return ret;
}
=20
+/*
+ * Can be called while the sta lock is held. Anything that can cause pac=
kets to
+ * be generated will cause deadlock!
+ */
+static bool ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sda=
ta,
+ struct sta_info *sta, u8 pn_offs,
+ struct ieee80211_key *key,
+ struct sk_buff *skb)
+{
+ struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
+ struct ieee80211_hdr *hdr =3D (void *)skb->data;
+ u8 tid =3D IEEE80211_NUM_TIDS;
+
+ if (key)
+ info->control.hw_key =3D &key->conf;
+
+ ieee80211_tx_stats(skb->dev, skb->len);
+
+ if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
+ tid =3D skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
+ *ieee80211_get_qos_ctl(hdr) =3D tid;
+ hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, tid);
+ } else {
+ info->flags |=3D IEEE80211_TX_CTL_ASSIGN_SEQ;
+ hdr->seq_ctrl =3D cpu_to_le16(sdata->sequence_number);
+ sdata->sequence_number +=3D 0x10;
+ }
+
+ if (skb_shinfo(skb)->gso_size)
+ sta->tx_stats.msdu[tid] +=3D
+ DIV_ROUND_UP(skb->len, skb_shinfo(skb)->gso_size);
+ else
+ sta->tx_stats.msdu[tid]++;
+
+ info->hw_queue =3D sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
+
+ /* statistics normally done by ieee80211_tx_h_stats (but that
+ * has to consider fragmentation, so is more complex)
+ */
+ sta->tx_stats.bytes[skb_get_queue_mapping(skb)] +=3D skb->len;
+ sta->tx_stats.packets[skb_get_queue_mapping(skb)]++;
+
+ if (pn_offs) {
+ u64 pn;
+ u8 *crypto_hdr =3D skb->data + pn_offs;
+
+ switch (key->conf.cipher) {
+ case WLAN_CIPHER_SUITE_CCMP:
+ case WLAN_CIPHER_SUITE_CCMP_256:
+ case WLAN_CIPHER_SUITE_GCMP:
+ case WLAN_CIPHER_SUITE_GCMP_256:
+ pn =3D atomic64_inc_return(&key->conf.tx_pn);
+ crypto_hdr[0] =3D pn;
+ crypto_hdr[1] =3D pn >> 8;
+ crypto_hdr[4] =3D pn >> 16;
+ crypto_hdr[5] =3D pn >> 24;
+ crypto_hdr[6] =3D pn >> 32;
+ crypto_hdr[7] =3D pn >> 40;
+ break;
+ }
+ }
+
+ return true;
+}
+
static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
- struct net_device *dev, struct sta_info *sta,
+ struct sta_info *sta,
struct ieee80211_fast_tx *fast_tx,
struct sk_buff *skb)
{
@@ -3158,8 +3291,6 @@ static bool ieee80211_xmit_fast(struct ieee80211_su=
b_if_data *sdata,
return true;
}
=20
- ieee80211_tx_stats(dev, skb->len + extra_head);
-
if ((hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) &&
ieee80211_amsdu_aggregate(sdata, sta, fast_tx, skb))
return true;
@@ -3188,24 +3319,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_s=
ub_if_data *sdata,
info->flags =3D IEEE80211_TX_CTL_FIRST_FRAGMENT |
IEEE80211_TX_CTL_DONTFRAG |
(tid_tx ? IEEE80211_TX_CTL_AMPDU : 0);
-
- if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
- *ieee80211_get_qos_ctl(hdr) =3D tid;
- if (!sta->sta.txq[0])
- hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, tid);
- } else {
- info->flags |=3D IEEE80211_TX_CTL_ASSIGN_SEQ;
- hdr->seq_ctrl =3D cpu_to_le16(sdata->sequence_number);
- sdata->sequence_number +=3D 0x10;
- }
-
- if (skb_shinfo(skb)->gso_size)
- sta->tx_stats.msdu[tid] +=3D
- DIV_ROUND_UP(skb->len, skb_shinfo(skb)->gso_size);
- else
- sta->tx_stats.msdu[tid]++;
-
- info->hw_queue =3D sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
+ info->control.flags =3D IEEE80211_TX_CTRL_FAST_XMIT;
=20
__skb_queue_head_init(&tx.skbs);
=20
@@ -3215,9 +3329,6 @@ static bool ieee80211_xmit_fast(struct ieee80211_su=
b_if_data *sdata,
tx.sta =3D sta;
tx.key =3D fast_tx->key;
=20
- if (fast_tx->key)
- info->control.hw_key =3D &fast_tx->key->conf;
-
if (!ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
tx.skb =3D skb;
r =3D ieee80211_tx_h_rate_ctrl(&tx);
@@ -3231,31 +3342,11 @@ static bool ieee80211_xmit_fast(struct ieee80211_=
sub_if_data *sdata,
}
}
=20
- /* statistics normally done by ieee80211_tx_h_stats (but that
- * has to consider fragmentation, so is more complex)
- */
- sta->tx_stats.bytes[skb_get_queue_mapping(skb)] +=3D skb->len;
- sta->tx_stats.packets[skb_get_queue_mapping(skb)]++;
-
- if (fast_tx->pn_offs) {
- u64 pn;
- u8 *crypto_hdr =3D skb->data + fast_tx->pn_offs;
+ if (ieee80211_queue_skb(local, sdata, sta, skb))
+ return true;
=20
- switch (fast_tx->key->conf.cipher) {
- case WLAN_CIPHER_SUITE_CCMP:
- case WLAN_CIPHER_SUITE_CCMP_256:
- case WLAN_CIPHER_SUITE_GCMP:
- case WLAN_CIPHER_SUITE_GCMP_256:
- pn =3D atomic64_inc_return(&fast_tx->key->conf.tx_pn);
- crypto_hdr[0] =3D pn;
- crypto_hdr[1] =3D pn >> 8;
- crypto_hdr[4] =3D pn >> 16;
- crypto_hdr[5] =3D pn >> 24;
- crypto_hdr[6] =3D pn >> 32;
- crypto_hdr[7] =3D pn >> 40;
- break;
- }
- }
+ ieee80211_xmit_fast_finish(sdata, sta, fast_tx->pn_offs,
+ fast_tx->key, skb);
=20
if (sdata->vif.type =3D=3D NL80211_IFTYPE_AP_VLAN)
sdata =3D container_of(sdata->bss,
@@ -3275,12 +3366,22 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee8=
0211_hw *hw,
struct sk_buff *skb =3D NULL;
struct fq *fq =3D &local->fq;
struct fq_tin *tin =3D &txqi->tin;
+ struct ieee80211_tx_info *info;
+ struct ieee80211_tx_data tx;
+ ieee80211_tx_result r;
+
=20
spin_lock_bh(&fq->lock);
=20
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
goto out;
=20
+ /* Make sure fragments stay together. */
+ skb =3D __skb_dequeue(&txqi->frags);
+ if (skb)
+ goto out;
+
+begin:
skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
if (!skb)
goto out;
@@ -3288,16 +3389,46 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee8=
0211_hw *hw,
ieee80211_set_skb_vif(skb, txqi);
=20
hdr =3D (struct ieee80211_hdr *)skb->data;
- if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) {
+ info =3D IEEE80211_SKB_CB(skb);
+
+ memset(&tx, 0, sizeof(tx));
+ __skb_queue_head_init(&tx.skbs);
+ tx.local =3D local;
+ tx.skb =3D skb;
+ tx.sdata =3D vif_to_sdata(info->control.vif);
+
+ if (txq->sta)
+ tx.sta =3D container_of(txq->sta, struct sta_info, sta);
+
+ /*
+ * The key can be removed while the packet was queued, so need to call
+ * this here to get the current key.
+ */
+ r =3D ieee80211_tx_h_select_key(&tx);
+ if (r !=3D TX_CONTINUE) {
+ ieee80211_free_txskb(&local->hw, skb);
+ goto begin;
+ }
+
+ if (txq->sta && info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) {
struct sta_info *sta =3D container_of(txq->sta, struct sta_info,
sta);
- struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
+ u8 pn_offs =3D 0;
=20
- hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid);
- if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags))
- info->flags |=3D IEEE80211_TX_CTL_AMPDU;
- else
- info->flags &=3D ~IEEE80211_TX_CTL_AMPDU;
+ if (tx.key &&
+ (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
+ pn_offs =3D ieee80211_hdrlen(hdr->frame_control);
+
+ ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
+ tx.key, skb);
+ } else {
+ if (invoke_tx_handlers_late(&tx))
+ goto begin;
+
+ skb =3D __skb_dequeue(&tx.skbs);
+
+ if (!skb_queue_empty(&tx.skbs))
+ skb_queue_splice_tail(&tx.skbs, &txqi->frags);
}
=20
out:
@@ -3335,7 +3466,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *s=
kb,
fast_tx =3D rcu_dereference(sta->fast_tx);
=20
if (fast_tx &&
- ieee80211_xmit_fast(sdata, dev, sta, fast_tx, skb))
+ ieee80211_xmit_fast(sdata, sta, fast_tx, skb))
goto out;
}
=20
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index b6865d8..8006f9a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -3393,11 +3393,18 @@ void ieee80211_txq_get_depth(struct ieee80211_txq=
*txq,
unsigned long *byte_cnt)
{
struct txq_info *txqi =3D to_txq_info(txq);
+ u32 frag_cnt =3D 0, frag_bytes =3D 0;
+ struct sk_buff *skb;
+
+ skb_queue_walk(&txqi->frags, skb) {
+ frag_cnt++;
+ frag_bytes +=3D skb->len;
+ }
=20
if (frame_cnt)
- *frame_cnt =3D txqi->tin.backlog_packets;
+ *frame_cnt =3D txqi->tin.backlog_packets + frag_cnt;
=20
if (byte_cnt)
- *byte_cnt =3D txqi->tin.backlog_bytes;
+ *byte_cnt =3D txqi->tin.backlog_bytes + frag_bytes;
}
EXPORT_SYMBOL(ieee80211_txq_get_depth);
--=20
2.9.3
^ permalink raw reply related
* [PATCH v9 1/2] mac80211: Move ieee802111_tx_dequeue() to later in tx.c
From: Toke Høiland-Jørgensen @ 2016-09-22 17:04 UTC (permalink / raw)
To: make-wifi-fast, linux-wireless; +Cc: Toke Høiland-Jørgensen
In-Reply-To: <20160906114426.25520-1-toke@toke.dk>
The TXQ path restructure requires ieee80211_tx_dequeue() to call TX
handlers and parts of the xmit_fast path. Move the function to later in
tx.c in preparation for this.
Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>
---
net/mac80211/tx.c | 90 +++++++++++++++++++++++++++----------------------=
------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 61d302d..e8c9964 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1476,51 +1476,6 @@ void ieee80211_txq_teardown_flows(struct ieee80211=
_local *local)
spin_unlock_bh(&fq->lock);
}
=20
-struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
- struct ieee80211_txq *txq)
-{
- struct ieee80211_local *local =3D hw_to_local(hw);
- struct txq_info *txqi =3D container_of(txq, struct txq_info, txq);
- struct ieee80211_hdr *hdr;
- struct sk_buff *skb =3D NULL;
- struct fq *fq =3D &local->fq;
- struct fq_tin *tin =3D &txqi->tin;
-
- spin_lock_bh(&fq->lock);
-
- if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
- goto out;
-
- skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
- if (!skb)
- goto out;
-
- ieee80211_set_skb_vif(skb, txqi);
-
- hdr =3D (struct ieee80211_hdr *)skb->data;
- if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) {
- struct sta_info *sta =3D container_of(txq->sta, struct sta_info,
- sta);
- struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
-
- hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid);
- if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags))
- info->flags |=3D IEEE80211_TX_CTL_AMPDU;
- else
- info->flags &=3D ~IEEE80211_TX_CTL_AMPDU;
- }
-
-out:
- spin_unlock_bh(&fq->lock);
-
- if (skb && skb_has_frag_list(skb) &&
- !ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
- skb_linearize(skb);
-
- return skb;
-}
-EXPORT_SYMBOL(ieee80211_tx_dequeue);
-
static bool ieee80211_tx_frags(struct ieee80211_local *local,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
@@ -3311,6 +3266,51 @@ static bool ieee80211_xmit_fast(struct ieee80211_s=
ub_if_data *sdata,
return true;
}
=20
+struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
+ struct ieee80211_txq *txq)
+{
+ struct ieee80211_local *local =3D hw_to_local(hw);
+ struct txq_info *txqi =3D container_of(txq, struct txq_info, txq);
+ struct ieee80211_hdr *hdr;
+ struct sk_buff *skb =3D NULL;
+ struct fq *fq =3D &local->fq;
+ struct fq_tin *tin =3D &txqi->tin;
+
+ spin_lock_bh(&fq->lock);
+
+ if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
+ goto out;
+
+ skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
+ if (!skb)
+ goto out;
+
+ ieee80211_set_skb_vif(skb, txqi);
+
+ hdr =3D (struct ieee80211_hdr *)skb->data;
+ if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) {
+ struct sta_info *sta =3D container_of(txq->sta, struct sta_info,
+ sta);
+ struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
+
+ hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid);
+ if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags))
+ info->flags |=3D IEEE80211_TX_CTL_AMPDU;
+ else
+ info->flags &=3D ~IEEE80211_TX_CTL_AMPDU;
+ }
+
+out:
+ spin_unlock_bh(&fq->lock);
+
+ if (skb && skb_has_frag_list(skb) &&
+ !ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
+ skb_linearize(skb);
+
+ return skb;
+}
+EXPORT_SYMBOL(ieee80211_tx_dequeue);
+
void __ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev,
u32 info_flags)
--=20
2.9.3
^ permalink raw reply related
* [PATCH v9 0/2] mac80211: TXQ dequeue path rework
From: Toke Høiland-Jørgensen @ 2016-09-22 17:04 UTC (permalink / raw)
To: make-wifi-fast, linux-wireless; +Cc: Toke Høiland-Jørgensen
In-Reply-To: <20160906114426.25520-1-toke@toke.dk>
This is the ninth iteration of my attempts to reorder the TXQ dequeue
path to avoid issues with reorder-sensitive operations. This version is
split into two patches; the first one moves ieee80211_tx_dequeue() to
avoid adding function stubs at the top of tx.c.
Changes since v8:
- Don't add function stubs to the beginning of tx.c
- Don't use control.hw_key from the dequeued packet, since that can go
away while the packet is queued. Instead, run the select_key handler
on dequeue and use the key from that.
- Change places that check tin.backlog_packets as an indication of
whether the TXQ has anything queued to also look at the 'frags' queue.
- Don't change the order of the select_key handler with respect to the
other handlers.
- Rebase on current mac80211-next tree.
Toke H=C3=B8iland-J=C3=B8rgensen (2):
mac80211: Move ieee802111_tx_dequeue() to later in tx.c
mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue
include/net/mac80211.h | 2 +
net/mac80211/ieee80211_i.h | 8 ++
net/mac80211/rx.c | 4 +-
net/mac80211/sta_info.c | 10 +-
net/mac80211/tx.c | 335 +++++++++++++++++++++++++++++++--------=
------
net/mac80211/util.c | 11 +-
6 files changed, 256 insertions(+), 114 deletions(-)
--=20
2.9.3
base-commit: c13ed534b8db543e4d8ead3885f4b06585a5771c
^ permalink raw reply
* Re: rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed
From: Larry Finger @ 2016-09-22 15:09 UTC (permalink / raw)
To: Jean Delvare, Chaoming Li; +Cc: linux-wireless
In-Reply-To: <20160922115116.149c599c@endymion>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
On 09/22/2016 04:51 AM, Jean Delvare wrote:
> Hello,
>
> I bought an Asus PCE-N10 PCIe Wi-Fi N card to install in my wife's
> computer. This morning it stopped working suddenly. Investigating the
> kernel logs, the following error message caught my eye:
>
> rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed
>
> It was printed twice, 3.5 hours apart, the second time at the moment
> the network stopped working. I guess this is not supposed to happen.
> What additional information can I provide to help you debug the issue?
> That's the device:
>
> 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01)
> Subsystem: ASUSTeK Computer Inc. Device [1043:84b5]
> Flags: bus master, fast devsel, latency 0, IRQ 17
> I/O ports at e800 [size=256]
> Memory at febfc000 (64-bit, non-prefetchable) [size=16K]
> Capabilities: <access denied>
> Kernel driver in use: rtl8192ce
> Kernel modules: rtl8192ce
>
> Kernel version is 4.5.4-1-default x86_64 (openSUSE Tumbleweed.)
>
> Reloading the rtl8192ce module and restarting the network service got
> everything back up.
Unfortunately, that message is not as helpful as it might be.
Do you build your own kernel, or are you using openSUSE's supplied version? If
the latter, I will need to think how we might debug the issue. If the former,
please add the attached patch.
Larry
[-- Attachment #2: rtl8192ce_debug.diff --]
[-- Type: text/x-diff, Size: 518 bytes --]
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
index 04eb5c3..e0c7d36 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
@@ -143,7 +143,7 @@ void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
}
default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
- "switch case not processed\n");
+ "switch case %d not processed\n", variable);
break;
}
}
^ permalink raw reply related
* Re: brcmf_txfinalize misses 802.1x packet leading to infinite WARNINGs
From: Rafał Miłecki @ 2016-09-22 14:09 UTC (permalink / raw)
To: Hante Meuleman, Arend van Spriel, brcm80211 development
Cc: linux-wireless@vger.kernel.org
In-Reply-To: <bdc7e4d1-0d96-c8ed-e07a-fdb19c1265d8@gmail.com>
On 22 September 2016 at 14:24, Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> w=
rote:
> On 09/22/2016 01:59 PM, Rafa=C5=82 Mi=C5=82ecki wrote:
>>
>> And again...
>>
>> I decided to focus on brcmf_flowring_delete a bit more.
>>
>> As I can see flowrings are created and removed from time to time, in mos=
t
>> cases
>> they are empty when being deleted. When they are not, things go wrong. I=
n
>> below
>> log you can see brcmfmac removing flowring that got 8 skb packets.
>>
>> First some summary, of what was already partially noticed in previous
>> e-mail:
>> 1) brcmf_flowring_delete calls brcmu_pkt_buf_free_skb directly bypassing
>> brcmf_txfinalize. It means tracing 802.1x packets and counting TX
>> errors is
>> broken.
>> 2) After freeing skb (as the result of brcmf_flowring_delete) there will
>> still
>> an IRQ, MSGBUF_TYPE_TX_STATUS and call to the brcmf_txfinalize. That'=
s
>> definitely unexpected as brcmf_txfinalize will be operating on skb th=
at
>> was
>> already freed.
>>
>> Now, there is something new that looks even worse. Sometimes
>> brcmf_txfinalize
>> may be called multiple times for the same skb! Take a close look at my
>> log.
>> It was called twice for skb c64a5a80. Twice for c64a5480. Twice for
>> c64a5f00.
>> Then Linux/device rebooted itself due to amount of console messages.
>
>
> I got the same problem again, but this time there was only 1 skb in my
> flowring.
> That resulted in less serial console messages and no reboot.
>
> It doesn't look good. brcmf_txfinalize was called 11 times after deleting
> flowring. Everytime it was working with the same skb that was already fre=
ed.
I'm wondering if there is some bug in flowring code. Please take a
look if my following understanding it correct.
1) Every skb that is supposed to reach the device gets queued on a flowring=
.
2) Dequeuing means skb is not available in a flowring anymore
3a) brcmf_msgbuf_txflow dequeues skbs to pass them to the firmware
3b) brcmf_flowring_delete dequeues skbs to delete (free) them
If that simple description is correct, it shouldn't be possible to skb to:
1) Reach the firmware
*and*
2) Get freed as part of flowring deletion
But this is what seems to be happening in my case. We get one skb
freed on flowring deletion and then reported as transmitted (sometimes
multiple times) by the firmware.
Maybe there is simply a race between brcmf_flowring_delete and
brcmf_msgbuf_txflow?
^ permalink raw reply
* Re: ath9k_htc kernel driver regression affecting throughput
From: Ben Greear @ 2016-09-22 13:34 UTC (permalink / raw)
To: bruce m beach; +Cc: Oleksij Rempel, linux-wireless
In-Reply-To: <CAArymC=VT+1E=-ug1yaVquW0jVvbFfZ0USzRcsRD62tSR-9FRA@mail.gmail.com>
On 09/21/2016 09:53 PM, bruce m beach wrote:
> memory will be very tight. There is 160k or known ram and bits and pieces
> elsewhere. The rom is 24k (maximum). I currently am not to worried about
> it. (although I am watching it)
> bruce
Probably you know this...but check structs for memory holes, unused
fields (write only, for instance) and other wastes.
ath10k firmware was full of needless memory bloat in those areas.
Global pointers can be used in some cases to help, but mysteriously
seem to cause more instruction RAM in some cases.
Watch 'instruction ram' usage: Changing code to use a bitfield may save
some BSS ram, but may easily use far more instruction ram than what you
saved with the bitfield.
Good luck!
Thanks,
Ben
>
> On 9/21/16, Ben Greear <greearb@candelatech.com> wrote:
>>
>>
>> On 09/21/2016 08:34 PM, bruce m beach wrote:
>>
>>>>> i.e a lable that the code jumps to and nothing else. At this point I
>>>>> have
>>>>> added VendorCommand(), and a debugger via ep0. ( ep0 is a good choice
>>>>> since it is available a boot, no matter what) and over the next few
>>>>> months I am going to move ->all<- the rom code into ram starting with
>>>>> the USB subsystem.
>>
>> Have you investigated whether you have enough RAM to do this?
>>
>> I haven't looked at ath9k_htc, but in general, that type of architecture
>> is tight on RAM in my experience.
>>
>> Thanks,
>> Ben
>>
>> --
>> Ben Greear <greearb@candelatech.com>
>> Candela Technologies Inc http://www.candelatech.com
>>
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: TCP data throughput for BCM43362
From: Jörg Krause @ 2016-09-22 12:52 UTC (permalink / raw)
To: Arend Van Spriel, Franky Lin
Cc: Brett Rudley, brcm80211-dev-list, Hante Meuleman, Franky Lin,
linux-wireless, Arend van Spriel
In-Reply-To: <64180601-8d99-09fe-2db5-06c4ed7dd5d6@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 14340 bytes --]
On Do, 2016-09-22 at 10:09 +0200, Arend Van Spriel wrote:
> On 19-9-2016 8:36, Jörg Krause wrote:
> >
> > Hi Arend,
> >
> > On Wed, 2016-09-14 at 20:13 +0200, Arend Van Spriel wrote:
> > >
> > > On 14-9-2016 15:41, Jörg Krause wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > On Mon, 2016-08-29 at 23:15 +0200, Jörg Krause wrote:
> > > > >
> > > > >
> > > > > On Mi, 2016-08-24 at 20:35 +0200, Arend Van Spriel wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 22-8-2016 15:37, Jörg Krause wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hi all,
> > > > > > >
> > > > > > > I am back from vacation and I'd like to do more
> > > > > > > investigations
> > > > > > > about
> > > > > > > this issue. Please see my comments below...
> > > > > > >
> > > > > > > On Sun, 2016-08-07 at 13:41 +0200, Arend van Spriel
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 06-08-16 16:12, Jörg Krause wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > A bit weird email format making it a bit hard to
> > > > > > > > determine
> > > > > > > > where
> > > > > > > > your
> > > > > > > > last reply starts...
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Fr, 2016-08-05 at 17:56 -0700, Franky Lin wrote:
> > > > > > > > >
> > > > > > > > > On Fri, Aug 5, 2016 at 2:29 PM, Jörg Krause
> > > > > > > > > <joerg.krause
> > > > > > > > > @emb
> > > > > > > > > ed
> > > > > > > > > ded.
> > > > > > > > > ro
> > > > > > > > > cks>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Am 5. August 2016 23:01:10 MESZ, schrieb Arend Van
> > > > > > > > > Spriel
> > > > > > > > > <
> > > > > > > > > arend.vanspriel@broadcom.com>:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Op 5 aug. 2016 22:46 schreef "Jörg Krause"
> > > > > > > > > <joerg.krause@embedded.rocks>:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I'm using a custom ARM board with an BCM43362 wifi
> > > > > > > > > chip
> > > > > > > > > from
> > > > > > > > >
> > > > > > > > > Broadcom.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > The wifi chip is attached via SDIO to the controller
> > > > > > > > > with
> > > > > > > > > a
> > > > > > > > > clock of
> > > > > > > > > 48MHz. Linux kernel version is 4.7.
> > > > > > > > >
> > > > > > > > > When measuring the network bandwidth with iperf3 I
> > > > > > > > > get a
> > > > > > > > > bandwith of
> > > > > > > > > only around 5 Mbps. I found a similar thread at the
> > > > > > > > > Broadcom
> > > > > > > > >
> > > > > > > > > community
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > [1] where the test was done with a M4 CPU + BCM43362
> > > > > > > > > and
> > > > > > > > > an
> > > > > > > > > average
> > > > > > > > > result of 3.3 Mbps.
> > > > > > > > >
> > > > > > > > > Interestingly, a BCM43362 Wi-Fi Dev Kit [2] notes a
> > > > > > > > > TCP
> > > > > > > > > data
> > > > > > > > >
> > > > > > > > > throughput
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > greater than 20 Mbps.
> > > > > > > > >
> > > > > > > > > Why is the throughput I measured much lower? Note
> > > > > > > > > that I
> > > > > > > > > measured
> > > > > > > > > several times with almost no neighbor devices or
> > > > > > > > > networks.
> > > > > > > > >
> > > > > > > > > This is a test sample measured with iperf3:
> > > > > > > > >
> > > > > > > > > $ iperf3 -c 192.168.2.1 -i 1 -t 10
> > > > > > > > > Connecting to host 192.168.2.1, port 5201
> > > > > > > > > [ 4] local 192.168.2.155 port 36442 connected to
> > > > > > > > > 192.168.2.1
> > > > > > > > >
> > > > > > > > > port
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > 5201
> > > > > > > > > [ ID]
> > > > > > > > > Interval Transfer Bandwidth Retr
> > > > > > > > > Cwn
> > > > > > > > > d
> > > > > > > > > [ 4] 0.00-1.00 sec 615 KBytes 5.04
> > > > > > > > > Mbits/sec 0 56.6
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 1.00-2.00 sec 622 KBytes 5.10
> > > > > > > > > Mbits/sec 0 84.8
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 2.00-3.00 sec 625 KBytes 5.12
> > > > > > > > > Mbits/sec 0 113
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 3.00-4.00 sec 571 KBytes 4.68
> > > > > > > > > Mbits/sec 0 140
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 4.00-5.00 sec 594 KBytes 4.87
> > > > > > > > > Mbits/sec 0 167
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 5.00-6.00 sec 628 KBytes 5.14
> > > > > > > > > Mbits/sec 0 195
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 6.00-7.00 sec 619 KBytes 5.07
> > > > > > > > > Mbits/sec 0 202
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 7.00-8.00 sec 608 KBytes 4.98
> > > > > > > > > Mbits/sec 0 202
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 8.00-9.00 sec 602 KBytes 4.93
> > > > > > > > > Mbits/sec 0 202
> > > > > > > > > KBytes
> > > > > > > > > [ 4] 9.00-10.00 sec 537 KBytes 4.40
> > > > > > > > > Mbits/sec 0 202
> > > > > > > > > KBytes
> > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - -
> > > > > > > > > [ ID]
> > > > > > > > > Interval Transfer Bandwidth Retr
> > > > > > > > > [ 4] 0.00-10.00 sec 5.88 MBytes 4.93
> > > > > > > > > Mbits/sec 0 sender
> > > > > > > > > [ 4] 0.00-10.00 sec 5.68 MBytes 4.76
> > > > > > > > > Mbits/sec receiver
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Not overly familiar with iperf3. Do these lines mean
> > > > > > > > > you
> > > > > > > > > are
> > > > > > > > > doing
> > > > > > > > > bidirectional test, ie. upstream and downstream at
> > > > > > > > > the
> > > > > > > > > same
> > > > > > > > > time.
> > > > > > > > > Another
> > > > > > > > > thing affecting tput could be power-save.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > No, iperf3 does not support bidrectional test. Power-
> > > > > > > > > save
> > > > > > > > > is
> > > > > > > > > turned
> > > > > > > > > off.
> > > > > > > > >
> > > > > > > > > What does iw link say?
> > > > > > > > >
> > > > > > > >
> > > > > > > > but I guess it starts here!
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I compared the results with a Cubietruck I have:
> > > > > > > > >
> > > > > > > > > # iperf3 -s
> > > > > > > > > ---------------------------------------------------
> > > > > > > > > ----
> > > > > > > > > ----
> > > > > > > > > Server listening on 5201
> > > > > > > > > ---------------------------------------------------
> > > > > > > > > ----
> > > > > > > > > ----
> > > > > > > > > Accepted connection from 192.168.178.46, port 42906
> > > > > > > > > [ 5] local 192.168.178.38 port 5201 connected to
> > > > > > > > > 192.168.178.46
> > > > > > > > > port
> > > > > > > > > 42908
> > > > > > > > > [ ID] Interval Transfer Bandwidth
> > > > > > > > > [ 5] 0.00-1.00 sec 2.29 MBytes 19.2
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 1.00-2.00 sec 2.21 MBytes 18.5
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 2.00-3.00 sec 2.17 MBytes 18.2
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 3.00-4.00 sec 2.09 MBytes 17.6
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 4.00-5.00 sec 2.20 MBytes 18.5
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 5.00-6.00 sec 2.64 MBytes 22.1
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 6.00-7.00 sec 2.67 MBytes 22.4
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 7.00-8.00 sec 2.62 MBytes 22.0
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 8.00-9.00 sec 2.35 MBytes 19.8
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 9.00-10.00 sec 2.30 MBytes 19.3
> > > > > > > > > Mbits/sec
> > > > > > > > > [ 5] 10.00-10.03 sec 83.4 KBytes 23.5
> > > > > > > > > Mbits/sec
> > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - -
> > > > > > > > > [ ID]
> > > > > > > > > Interval Transfer Bandwidth Retr
> > > > > > > > > [ 5] 0.00-10.03 sec 23.9 MBytes 20.0
> > > > > > > > > Mbits/sec 0 sender
> > > > > > > > > [ 5] 0.00-10.03 sec 23.6 MBytes 19.8
> > > > > > > > > Mbits/sec receiver
> > > > > > > > >
> > > > > > > > > # iw dev wlan0 link
> > > > > > > > > Connected to xx:xx:xx:xx:xx (on wlan0)
> > > > > > > > > SSID: xxx
> > > > > > > > > freq: 2437
> > > > > > > > > tx bitrate: 65.0 MBit/s
> > > > > > > > >
> > > > > > > > > bss flags: short-preamble short-slot-
> > > > > > > > > time
> > > > > > > > > dtim period: 1
> > > > > > > > > beacon int: 100
> > > > > > > >
> > > > > > > > Too bad RSSI is not in the output above. That may be
> > > > > > > > due to
> > > > > > > > a
> > > > > > > > regression
> > > > > > > > in our driver which has been fixed by commit
> > > > > > > > 94abd778a7bb
> > > > > > > > ("brcmfmac:
> > > > > > > > add fallback for devices that do not report per-chain
> > > > > > > > values").
> > > > > > > > However,
> > > > > > > > the tx bitrate seems within the same range as the other
> > > > > > > > platform.
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > The Cubietruck works also with the brcmfmac driver.
> > > > > > > > >
> > > > > > > > > May it depend on the NVRAM file?
> > > > > > > >
> > > > > > > > Not sure. Can you tell me a bit more about the custom
> > > > > > > > ARM
> > > > > > > > board.
> > > > > > > > Does
> > > > > > > > it
> > > > > > > > use the same wifi module as Cubietruck, ie. the AMPAK
> > > > > > > > AP6210?
> > > > > > > > If
> > > > > > > > you
> > > > > > > > can
> > > > > > > > make a wireshark sniff we can check the actual bitrate
> > > > > > > > and
> > > > > > > > medium
> > > > > > > > density in terms of packets. Another thing to look at
> > > > > > > > is
> > > > > > > > the
> > > > > > > > SDIO
> > > > > > > > host
> > > > > > > > controller. In brcmf_sdiod_sgtable_alloc() some key
> > > > > > > > values
> > > > > > > > are
> > > > > > > > used
> > > > > > > > from
> > > > > > > > the host controller. It only logs the number of entries
> > > > > > > > of
> > > > > > > > the
> > > > > > > > scatter-gather table, but could you add the other
> > > > > > > > values in
> > > > > > > > this
> > > > > > > > function that are used to determine the number of
> > > > > > > > entries.
> > > > > > >
> > > > > > > My board uses the BCM43362 chip solely (no Bluetooth)
> > > > > > > attached to
> > > > > > > the
> > > > > > > SDIO interface of a NXP i.MX28 processor.
> > > > > > >
> > > > > > > I added some additional printk() to
> > > > > > > brcmf_sdiod_sgtable_alloc().
> > > > > > > These
> > > > > > > are the values printed after modprobe brcmfmac:
> > > > > > >
> > > > > > > [ 8.926657] sg_support=1
> > > > > > > [ 8.929440] max_blocks=511
> > > > > > > [ 8.932213] max_request_size=261632
> > > > > > > [ 8.935741] max_segment_count=52
> > > > > > > [ 8.939005] max_segment_size=65280
> > > > > > > [ 8.946095] nents=35
> > > > > >
> > > > > > Thanks. That looks good.
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Additionally I attached a xz compresses wireshark sniff
> > > > > > > while
> > > > > > > running
> > > > > > > iper3 between the BCM43362 running as in AP mode with
> > > > > > > iperf3
> > > > > > > as a
> > > > > > > server and a PC in station mode running iperf3 as a
> > > > > > > client.
> > > > > >
> > > > > > Looking at the sniff it seems you captured on the ethernet
> > > > > > side.
> > > > > > That
> > > > > > does not give me any 802.11 specific info. Can you make a
> > > > > > wireless
> > > > > > capture preferably without encryption.
> > > > >
> > > > > You,re right! Sorry for this mistake. I did a re-capture on
> > > > > the
> > > > > wireless side now.
> > > >
> > > > Anything new about this? Anything I can do to help?
> > >
> > > I missed your previous email. Was already wondering whether to
> > > ping
> > > you.
> > > Digging around in my email folders I found it so will take a look
> > > at
> > > it.
> >
> > Did you had some time to look at this?
>
> Ehm. I still only see TCP stuff. To capture 802.11 management frames
> you
> need preferably a dedicated device using monitor mode [1].
Stupid me! Now I used a monitor interface on a desktop to monitor the
traffic between the BCM43362 operating in soft-AP mode and a notebook
operating in managed mode.
The BCM43362 runs the iperf server, the notebook the iperf client.
Best regards
Jörg Krause
[-- Attachment #2: bcm43362.pcapng.xz --]
[-- Type: application/x-xz, Size: 590240 bytes --]
^ permalink raw reply
* RE: staging: wilc1000: kernel Oops while opening the device
From: Ganesh.Krishna @ 2016-09-22 12:34 UTC (permalink / raw)
To: gregkh, nicolas.ferre; +Cc: linux-wireless, Aditya.Shankar, luisbg
In-Reply-To: <20160919134201.GA25769@kroah.com>
>-----Original Message-----
>From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
>Sent: Monday, September 19, 2016 7:12 PM
>To: Nicolas Ferre
>Cc: linux-wireless@vger.kernel.org; Aditya Shankar - I16078; Ganesh Krishna - I00112; luisbg@osg.samsung.com
>Subject: Re: staging: wilc1000: kernel Oops while opening the device
>
>On Mon, Sep 19, 2016 at 02:06:02PM +0200, Nicolas Ferre wrote:
>> Hi all,
>>
>> While using the wilc1000 driver with latest 4.8-rc7, I have
>> difficulties to open the device and actually use it as I have this
>> kernel Oops right after the loading of the firmware (wilc1003_firmware.bin).
>>
>> If I revert back the driver to its
>> b9811891a9f60ca9c314dcab3244c65930c4cf37 state, it works okay. I did
>> this because I tend to think that it might be related to the latest move on this driver to "completion" or "work queues".
>> It seems to be a regression from 4.7.
>
>Ick, not good at all.
>
>Any chance you can run 'git bisect' to see if you can find the offending patch?
>
>I thought the maintainers were testing this driver over time :(
>thanks,
>
>greg k-h
Ick indeed. Maintainers are on it full time. Thank you very much for the flag. While I am only reporting activity, hope to have results soon.
Regards,
ganesh k
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox