* [PATCH 12/25] iwlwifi: pcie: log full command sequence
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
Log group as well. Remove 0x prefix to match TX logging.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
index 0b5b331..78cb6d2 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
@@ -1108,13 +1108,14 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
FH_RSCSR_RXQ_POS != rxq->id);
IWL_DEBUG_RX(trans,
- "cmd at offset %d: %s (0x%.2x, seq 0x%x)\n",
+ "cmd at offset %d: %s (%.2x.%2x, seq 0x%x)\n",
rxcb._offset,
iwl_get_cmd_string(trans,
iwl_cmd_id(pkt->hdr.cmd,
pkt->hdr.group_id,
0)),
- pkt->hdr.cmd, le16_to_cpu(pkt->hdr.sequence));
+ pkt->hdr.group_id, pkt->hdr.cmd,
+ le16_to_cpu(pkt->hdr.sequence));
len = iwl_rx_packet_len(pkt);
len += sizeof(u32); /* account for status word */
--
2.9.3
^ permalink raw reply related
* [PATCH 24/25] iwlwifi: mvm: use LIST_HEAD() macro
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Johannes Berg, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 3eccd89..75f3ca0 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -858,9 +858,7 @@ static void iwl_mvm_async_handlers_wk(struct work_struct *wk)
struct iwl_mvm *mvm =
container_of(wk, struct iwl_mvm, async_handlers_wk);
struct iwl_async_handler_entry *entry, *tmp;
- struct list_head local_list;
-
- INIT_LIST_HEAD(&local_list);
+ LIST_HEAD(local_list);
/* Ensure that we are not in stop flow (check iwl_mvm_mac_stop) */
--
2.9.3
^ permalink raw reply related
* [PATCH 10/25] iwlwifi: mvm: support packet injection
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
For automatic testing packet injection can be useful.
Support injection through debugfs.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 55 ++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index b344898..540b7c9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -917,6 +917,59 @@ static ssize_t iwl_dbgfs_indirection_tbl_write(struct iwl_mvm *mvm,
return ret ?: count;
}
+static ssize_t iwl_dbgfs_inject_packet_write(struct iwl_mvm *mvm,
+ char *buf, size_t count,
+ loff_t *ppos)
+{
+ struct iwl_rx_cmd_buffer rxb = {
+ ._rx_page_order = 0,
+ .truesize = 0, /* not used */
+ ._offset = 0,
+ };
+ struct iwl_rx_packet *pkt;
+ struct iwl_rx_mpdu_desc *desc;
+ int bin_len = count / 2;
+ int ret = -EINVAL;
+
+ /* supporting only 9000 descriptor */
+ if (!mvm->trans->cfg->mq_rx_supported)
+ return -ENOTSUPP;
+
+ rxb._page = alloc_pages(GFP_ATOMIC, 0);
+ if (!rxb._page)
+ return -ENOMEM;
+ pkt = rxb_addr(&rxb);
+
+ ret = hex2bin(page_address(rxb._page), buf, bin_len);
+ if (ret)
+ goto out;
+
+ /* avoid invalid memory access */
+ if (bin_len < sizeof(*pkt) + sizeof(*desc))
+ goto out;
+
+ /* check this is RX packet */
+ if (WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd) !=
+ WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD))
+ goto out;
+
+ /* check the length in metadata matches actual received length */
+ desc = (void *)pkt->data;
+ if (le16_to_cpu(desc->mpdu_len) !=
+ (bin_len - sizeof(*desc) - sizeof(*pkt)))
+ goto out;
+
+ local_bh_disable();
+ iwl_mvm_rx_mpdu_mq(mvm, NULL, &rxb, 0);
+ local_bh_enable();
+ ret = 0;
+
+out:
+ iwl_free_rxb(&rxb);
+
+ return ret ?: count;
+}
+
static ssize_t iwl_dbgfs_fw_dbg_conf_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
@@ -1454,6 +1507,7 @@ MVM_DEBUGFS_WRITE_FILE_OPS(cont_recording, 8);
MVM_DEBUGFS_WRITE_FILE_OPS(max_amsdu_len, 8);
MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl,
(IWL_RSS_INDIRECTION_TABLE_SIZE * 2));
+MVM_DEBUGFS_WRITE_FILE_OPS(inject_packet, 512);
#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
MVM_DEBUGFS_READ_WRITE_FILE_OPS(bcast_filters, 256);
@@ -1502,6 +1556,7 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, S_IWUSR);
MVM_DEBUGFS_ADD_FILE(cont_recording, mvm->debugfs_dir, S_IWUSR);
MVM_DEBUGFS_ADD_FILE(indirection_tbl, mvm->debugfs_dir, S_IWUSR);
+ MVM_DEBUGFS_ADD_FILE(inject_packet, mvm->debugfs_dir, S_IWUSR);
if (!debugfs_create_bool("enable_scan_iteration_notif",
S_IRUSR | S_IWUSR,
mvm->debugfs_dir,
--
2.9.3
^ permalink raw reply related
* [PATCH 09/25] iwlwifi: mvm: Add support for RRM by scan
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Avrahams Stern, David Spinadel, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Avrahams Stern <avraham.stern@intel.com>
Implement support for RRM by adding an option to configure the scan
dwell time and reporting scan start time and BSS detection time, and
Advertise support for these features.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 5 ++
.../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 20 ++++---
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 ++++
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 61 +++++++++++++++++++---
5 files changed, 88 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
index 1b1e045..94423f0 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
@@ -256,6 +256,10 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
* 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
+ * scan request.
*
* @NUM_IWL_UCODE_TLV_API: number of bits used
*/
@@ -267,6 +271,7 @@ enum iwl_ucode_tlv_api {
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_SCAN_TSF_REPORT = (__force iwl_ucode_tlv_api_t)28,
NUM_IWL_UCODE_TLV_API
#ifdef __CHECKER__
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h
index f01dab0..0c294c9f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h
@@ -7,6 +7,7 @@
*
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2016 Intel Deutschland GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
@@ -603,6 +604,8 @@ struct iwl_scan_req_umac_tail {
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
* @general_flags: &enum iwl_umac_scan_general_flags
+ * @reserved2: for future use and alignment
+ * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
* @extended_dwell: dwell time for channels 1, 6 and 11
* @active_dwell: dwell time for active scan
* @passive_dwell: dwell time for passive scan
@@ -620,8 +623,10 @@ struct iwl_scan_req_umac {
__le32 flags;
__le32 uid;
__le32 ooc_priority;
- /* SCAN_GENERAL_PARAMS_API_S_VER_1 */
- __le32 general_flags;
+ /* SCAN_GENERAL_PARAMS_API_S_VER_4 */
+ __le16 general_flags;
+ u8 reserved2;
+ u8 scan_start_mac_id;
u8 extended_dwell;
u8 active_dwell;
u8 passive_dwell;
@@ -629,7 +634,7 @@ struct iwl_scan_req_umac {
__le32 max_out_time;
__le32 suspend_time;
__le32 scan_priority;
- /* SCAN_CHANNEL_PARAMS_API_S_VER_1 */
+ /* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
u8 channel_flags;
u8 n_channels;
__le16 reserved;
@@ -718,8 +723,8 @@ struct iwl_scan_offload_profiles_query {
* @status: one of SCAN_COMP_STATUS_*
* @bt_status: BT on/off status
* @last_channel: last channel that was scanned
- * @tsf_low: TSF timer (lower half) in usecs
- * @tsf_high: TSF timer (higher half) in usecs
+ * @start_tsf: TSF timer in usecs of the scan start time for the mac specified
+ * in &struct iwl_scan_req_umac.
* @results: array of scan results, only "scanned_channels" of them are valid
*/
struct iwl_umac_scan_iter_complete_notif {
@@ -728,9 +733,8 @@ struct iwl_umac_scan_iter_complete_notif {
u8 status;
u8 bt_status;
u8 last_channel;
- __le32 tsf_low;
- __le32 tsf_high;
+ __le64 start_tsf;
struct iwl_scan_results_notif results[];
-} __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_1 */
+} __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_2 */
#endif
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index b7d80b5..a5ede8c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -653,6 +653,16 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT))
hw->wiphy->features |= NL80211_FEATURE_WFA_TPC_IE_IN_PROBES;
+ if (fw_has_api(&mvm->fw->ucode_capa,
+ IWL_UCODE_TLV_API_SCAN_TSF_REPORT)) {
+ wiphy_ext_feature_set(hw->wiphy,
+ NL80211_EXT_FEATURE_SCAN_START_TIME);
+ wiphy_ext_feature_set(hw->wiphy,
+ NL80211_EXT_FEATURE_BSS_PARENT_TSF);
+ wiphy_ext_feature_set(hw->wiphy,
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL);
+ }
+
mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
#ifdef CONFIG_PM_SLEEP
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 83f3889..e68a2bd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -821,6 +821,12 @@ struct iwl_mvm {
/* UMAC scan tracking */
u32 scan_uid_status[IWL_MVM_MAX_UMAC_SCANS];
+ /* start time of last scan in TSF of the mac that requested the scan */
+ u64 scan_start;
+
+ /* the vif that requested the current scan */
+ struct iwl_mvm_vif *scan_vif;
+
/* rx chain antennas set through debugfs for the scan command */
u8 scan_rx_ant;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index dac120f..00b03fc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -141,6 +141,7 @@ struct iwl_mvm_scan_params {
struct cfg80211_match_set *match_sets;
int n_scan_plans;
struct cfg80211_sched_scan_plan *scan_plans;
+ u32 measurement_dwell;
};
static u8 iwl_mvm_scan_rx_ant(struct iwl_mvm *mvm)
@@ -232,6 +233,27 @@ iwl_mvm_scan_type iwl_mvm_get_scan_type(struct iwl_mvm *mvm, bool p2p_device)
return IWL_SCAN_TYPE_WILD;
}
+static int
+iwl_mvm_get_measurement_dwell(struct iwl_mvm *mvm,
+ struct cfg80211_scan_request *req,
+ struct iwl_mvm_scan_params *params)
+{
+ if (!req->duration)
+ return 0;
+
+ if (req->duration_mandatory &&
+ req->duration > scan_timing[params->type].max_out_time) {
+ IWL_DEBUG_SCAN(mvm,
+ "Measurement scan - too long dwell %hu (max out time %u)\n",
+ req->duration,
+ scan_timing[params->type].max_out_time);
+ return -EOPNOTSUPP;
+ }
+
+ return min_t(u32, (u32)req->duration,
+ scan_timing[params->type].max_out_time);
+}
+
static inline bool iwl_mvm_rrm_scan_needed(struct iwl_mvm *mvm)
{
/* require rrm scan whenever the fw supports it */
@@ -1033,9 +1055,15 @@ static void iwl_mvm_scan_umac_dwell(struct iwl_mvm *mvm,
struct iwl_scan_req_umac *cmd,
struct iwl_mvm_scan_params *params)
{
- cmd->extended_dwell = scan_timing[params->type].dwell_extended;
- cmd->active_dwell = scan_timing[params->type].dwell_active;
- cmd->passive_dwell = scan_timing[params->type].dwell_passive;
+ if (params->measurement_dwell) {
+ cmd->active_dwell = params->measurement_dwell;
+ cmd->passive_dwell = params->measurement_dwell;
+ cmd->extended_dwell = params->measurement_dwell;
+ } else {
+ cmd->active_dwell = scan_timing[params->type].dwell_active;
+ cmd->passive_dwell = scan_timing[params->type].dwell_passive;
+ cmd->extended_dwell = scan_timing[params->type].dwell_extended;
+ }
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);
@@ -1067,11 +1095,11 @@ iwl_mvm_umac_scan_cfg_channels(struct iwl_mvm *mvm,
}
}
-static u32 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
+static u16 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
struct iwl_mvm_scan_params *params,
struct ieee80211_vif *vif)
{
- int flags = 0;
+ u16 flags = 0;
if (params->n_ssids == 0)
flags = IWL_UMAC_SCAN_GEN_FLAGS_PASSIVE;
@@ -1093,6 +1121,9 @@ static u32 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
if (!iwl_mvm_is_regular_scan(params))
flags |= IWL_UMAC_SCAN_GEN_FLAGS_PERIODIC;
+ if (params->measurement_dwell)
+ flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE;
+
#ifdef CONFIG_IWLWIFI_DEBUGFS
if (mvm->scan_iter_notif_enabled)
flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE;
@@ -1119,6 +1150,7 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
mvm->fw->ucode_capa.n_scan_channels;
int uid, i;
u32 ssid_bitmap = 0;
+ struct iwl_mvm_vif *scan_vif = iwl_mvm_vif_from_mac80211(vif);
lockdep_assert_held(&mvm->mutex);
@@ -1136,8 +1168,9 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
mvm->scan_uid_status[uid] = type;
cmd->uid = cpu_to_le32(uid);
- cmd->general_flags = cpu_to_le32(iwl_mvm_scan_umac_flags(mvm, params,
+ cmd->general_flags = cpu_to_le16(iwl_mvm_scan_umac_flags(mvm, params,
vif));
+ cmd->scan_start_mac_id = scan_vif->id;
if (type == IWL_MVM_SCAN_SCHED || type == IWL_MVM_SCAN_NETDETECT)
cmd->flags = cpu_to_le32(IWL_UMAC_SCAN_FLAG_PREEMPTIVE);
@@ -1289,6 +1322,12 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
iwl_mvm_get_scan_type(mvm,
vif->type == NL80211_IFTYPE_P2P_DEVICE);
+ ret = iwl_mvm_get_measurement_dwell(mvm, req, ¶ms);
+ if (ret < 0)
+ return ret;
+
+ params.measurement_dwell = ret;
+
iwl_mvm_build_scan_probe(mvm, vif, ies, ¶ms);
if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
@@ -1315,6 +1354,7 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
IWL_DEBUG_SCAN(mvm, "Scan request was sent successfully\n");
mvm->scan_status |= IWL_MVM_SCAN_REGULAR;
+ mvm->scan_vif = iwl_mvm_vif_from_mac80211(vif);
iwl_mvm_ref(mvm, IWL_MVM_REF_SCAN);
queue_delayed_work(system_wq, &mvm->scan_timeout_dwork,
@@ -1437,9 +1477,12 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_REGULAR) {
struct cfg80211_scan_info info = {
.aborted = aborted,
+ .scan_start_tsf = mvm->scan_start,
};
+ memcpy(info.tsf_bssid, mvm->scan_vif->bssid, ETH_ALEN);
ieee80211_scan_completed(mvm->hw, &info);
+ mvm->scan_vif = NULL;
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
cancel_delayed_work(&mvm->scan_timeout_dwork);
} else if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_SCHED) {
@@ -1473,6 +1516,8 @@ void iwl_mvm_rx_umac_scan_iter_complete_notif(struct iwl_mvm *mvm,
struct iwl_umac_scan_iter_complete_notif *notif = (void *)pkt->data;
u8 buf[256];
+ mvm->scan_start = le64_to_cpu(notif->start_tsf);
+
IWL_DEBUG_SCAN(mvm,
"UMAC Scan iteration complete: status=0x%x scanned_channels=%d channels list: %s\n",
notif->status, notif->scanned_channels,
@@ -1485,6 +1530,10 @@ void iwl_mvm_rx_umac_scan_iter_complete_notif(struct iwl_mvm *mvm,
ieee80211_sched_scan_results(mvm->hw);
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_ENABLED;
}
+
+ IWL_DEBUG_SCAN(mvm,
+ "UMAC Scan iteration complete: scan started at %llu (TSF)\n",
+ mvm->scan_start);
}
static int iwl_mvm_umac_scan_abort(struct iwl_mvm *mvm, int type)
--
2.9.3
^ permalink raw reply related
* [PATCH 08/25] iwlwifi: mvm: support BAR in reorder buffer
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
On default queue we will not receive frame release notification,
but the BAR itself.
Upon receiving the BAR driver should look at the NSSN and adjust
window accordingly.
Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index b386628..0274f14 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -600,9 +600,10 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
mvm_sta = iwl_mvm_sta_from_mac80211(sta);
- /* not a data packet */
- if (!ieee80211_is_data_qos(hdr->frame_control) ||
- is_multicast_ether_addr(hdr->addr1))
+ /* not a data packet or a bar */
+ if (!ieee80211_is_back_req(hdr->frame_control) &&
+ (!ieee80211_is_data_qos(hdr->frame_control) ||
+ is_multicast_ether_addr(hdr->addr1)))
return false;
if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
@@ -626,6 +627,11 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
spin_lock_bh(&buffer->lock);
+ if (ieee80211_is_back_req(hdr->frame_control)) {
+ iwl_mvm_release_frames(mvm, sta, napi, buffer, nssn);
+ goto drop;
+ }
+
/*
* If there was a significant jump in the nssn - adjust.
* If the SN is smaller than the NSSN it might need to first go into
--
2.9.3
^ permalink raw reply related
* [PATCH 06/25] iwlwifi: check for valid ethernet address provided by OEM
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Haim Dreyfuss, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Haim Dreyfuss <haim.dreyfuss@intel.com>
In 9000 family products we added an option to let the OEM fuse the
mac address via registers. If these registers are zeroed we use the OTP
address instead. Make sure that the address provided by the OEM is valid
and, if not, fall back to the OTP address as well.
Fixes: commit 17c867bfe89b ("iwlwifi: add support for getting HW address from CSR")
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 43f8f7d..adba3b0 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -564,11 +564,16 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans,
__le32 mac_addr0 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR0_STRAP));
__le32 mac_addr1 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR1_STRAP));
- /* If OEM did not fuse address - get it from OTP */
- if (!mac_addr0 && !mac_addr1) {
- mac_addr0 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR0_OTP));
- mac_addr1 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR1_OTP));
- }
+ iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr);
+ /*
+ * If the OEM fused a valid address, use it instead of the one in the
+ * OTP
+ */
+ if (is_valid_ether_addr(data->hw_addr))
+ return;
+
+ mac_addr0 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR0_OTP));
+ mac_addr1 = cpu_to_le32(iwl_read32(trans, CSR_MAC_ADDR1_OTP));
iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr);
}
--
2.9.3
^ permalink raw reply related
* [PATCH 07/25] iwlwifi: mvm: fix DQA AP mode station assumption
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
There was recently a Full AP mode feature added where hostap adds
the station at auth stage, and not assoc.
However, when running with legacy hostapd, we get the auth response
before station was added, and tx_skb_non_sta fails to allocate
a queue, resulting in a complete failure of association.
Take care of this situation as well.
Add a warning when no valid queue is returned at all and make mvm
drop the packet instead of passing it on.
Refactor the function a bit while at it.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 35 +++++++++++++++++++++++------
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 1051777..e0c9065 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -490,16 +490,34 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
struct ieee80211_tx_info *info, __le16 fc)
{
- if (iwl_mvm_is_dqa_supported(mvm)) {
- if (info->control.vif->type == NL80211_IFTYPE_AP &&
- ieee80211_is_probe_resp(fc))
+ if (!iwl_mvm_is_dqa_supported(mvm))
+ return info->hw_queue;
+
+ switch (info->control.vif->type) {
+ case NL80211_IFTYPE_AP:
+ /*
+ * handle legacy hostapd as well, where station may be added
+ * only after assoc.
+ */
+ if (ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc))
return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
- else if (ieee80211_is_mgmt(fc) &&
- info->control.vif->type == NL80211_IFTYPE_P2P_DEVICE)
+ if (info->hw_queue == info->control.vif->cab_queue)
+ return info->hw_queue;
+
+ WARN_ON_ONCE(1);
+ return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
+ case NL80211_IFTYPE_P2P_DEVICE:
+ if (ieee80211_is_mgmt(fc))
return IWL_MVM_DQA_P2P_DEVICE_QUEUE;
- }
+ if (info->hw_queue == info->control.vif->cab_queue)
+ return info->hw_queue;
- return info->hw_queue;
+ WARN_ON_ONCE(1);
+ return IWL_MVM_DQA_P2P_DEVICE_QUEUE;
+ default:
+ WARN_ONCE(1, "Not a ctrl vif, no available queue\n");
+ return -1;
+ }
}
int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
@@ -560,6 +578,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
sta_id = mvmvif->bcast_sta.sta_id;
queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info,
hdr->frame_control);
+ if (queue < 0)
+ return -1;
+
} else if (info.control.vif->type == NL80211_IFTYPE_STATION &&
is_multicast_ether_addr(hdr->addr1)) {
u8 ap_sta_id = ACCESS_ONCE(mvmvif->ap_sta_id);
--
2.9.3
^ permalink raw reply related
* [PATCH 04/25] iwlwifi: mvm: compare full command ID
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Johannes Berg, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
When comparing command IDs, the group should be taken
into account so the same command/notification from a
different group doesn't trigger anything unexpected.
Fix this by comparing to the wide ID.
Fixes: commit 1738d60b31d7 ("iwlwifi: mvm: handle RX MPDUs separately")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 43ea1e5..de34c9f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -966,10 +966,11 @@ static void iwl_mvm_rx(struct iwl_op_mode *op_mode,
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
+ u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
- if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
+ if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
iwl_mvm_rx_rx_mpdu(mvm, napi, rxb);
- else if (pkt->hdr.cmd == REPLY_RX_PHY_CMD)
+ else if (cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_PHY_CMD))
iwl_mvm_rx_rx_phy_cmd(mvm, rxb);
else
iwl_mvm_rx_common(mvm, rxb, pkt);
@@ -981,13 +982,14 @@ static void iwl_mvm_rx_mq(struct iwl_op_mode *op_mode,
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
+ u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
- if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
+ if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, 0);
- else if (unlikely(pkt->hdr.group_id == DATA_PATH_GROUP &&
- pkt->hdr.cmd == RX_QUEUES_NOTIFICATION))
+ else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP,
+ RX_QUEUES_NOTIFICATION)))
iwl_mvm_rx_queue_notif(mvm, rxb, 0);
- else if (pkt->hdr.cmd == FRAME_RELEASE)
+ else if (cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE))
iwl_mvm_rx_frame_release(mvm, napi, rxb, 0);
else
iwl_mvm_rx_common(mvm, rxb, pkt);
@@ -1666,13 +1668,14 @@ static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode,
{
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
struct iwl_rx_packet *pkt = rxb_addr(rxb);
+ u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
- if (unlikely(pkt->hdr.cmd == FRAME_RELEASE))
+ if (unlikely(cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE)))
iwl_mvm_rx_frame_release(mvm, napi, rxb, queue);
- else if (unlikely(pkt->hdr.cmd == RX_QUEUES_NOTIFICATION &&
- pkt->hdr.group_id == DATA_PATH_GROUP))
+ else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP,
+ RX_QUEUES_NOTIFICATION)))
iwl_mvm_rx_queue_notif(mvm, rxb, queue);
- else if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
+ else if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue);
}
--
2.9.3
^ permalink raw reply related
* [PATCH 05/25] iwlwifi: mvm: add support for MU-MIMO air sniffer
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Aviya Erenfeld, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Aviya Erenfeld <aviya.erenfeld@intel.com>
enable MU-MIMO air sniffer if it's supported by the NIC
Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 9506e65..b7d80b5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -720,6 +720,10 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
if (ret)
iwl_mvm_leds_exit(mvm);
+ if (mvm->cfg->vht_mu_mimo_supported)
+ wiphy_ext_feature_set(hw->wiphy,
+ NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER);
+
return ret;
}
@@ -2229,6 +2233,10 @@ static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
case NL80211_IFTYPE_ADHOC:
iwl_mvm_bss_info_changed_ap_ibss(mvm, vif, bss_conf, changes);
break;
+ case NL80211_IFTYPE_MONITOR:
+ if (changes & BSS_CHANGED_MU_GROUPS)
+ iwl_mvm_update_mu_groups(mvm, vif);
+ break;
default:
/* shouldn't happen */
WARN_ON_ONCE(1);
--
2.9.3
^ permalink raw reply related
* [PATCH 03/25] iwlwifi: mvm: cleanup skb queue functions use
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
Use skb_queue_empty() and not skb_peek_tail() to check for
empty list.
Avoid a redundant check as well - loop will take care of it.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index d6d9ec4..b386628 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -418,10 +418,11 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
ssn = ieee80211_sn_inc(ssn);
- /* holes are valid since nssn indicates frames were received. */
- if (skb_queue_empty(skb_list) || !skb_peek_tail(skb_list))
- continue;
- /* Empty the list. Will have more than one frame for A-MSDU */
+ /*
+ * Empty the list. Will have more than one frame for A-MSDU.
+ * Empty list is valid as well since nssn indicates frames were
+ * received.
+ */
while ((skb = __skb_dequeue(skb_list))) {
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
reorder_buf->queue,
@@ -434,7 +435,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
if (reorder_buf->num_stored && !reorder_buf->removed) {
u16 index = reorder_buf->head_sn % reorder_buf->buf_size;
- while (!skb_peek_tail(&reorder_buf->entries[index]))
+ while (skb_queue_empty(&reorder_buf->entries[index]))
index = (index + 1) % reorder_buf->buf_size;
/* modify timer to match next frame's expiration time */
mod_timer(&reorder_buf->reorder_timer,
@@ -462,7 +463,7 @@ void iwl_mvm_reorder_timer_expired(unsigned long data)
for (i = 0; i < buf->buf_size ; i++) {
index = (buf->head_sn + i) % buf->buf_size;
- if (!skb_peek_tail(&buf->entries[index]))
+ if (skb_queue_empty(&buf->entries[index]))
continue;
if (!time_after(jiffies, buf->reorder_time[index] +
RX_REORDER_BUF_TIMEOUT_MQ))
--
2.9.3
^ permalink raw reply related
* [PATCH 02/25] iwlwifi: pcie: fix typo in struct name for a000 devices
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Sara Sharon, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Sara Sharon <sara.sharon@intel.com>
commit 3cd1980b0cdf ("iwlwifi: pcie: introduce new tfd and tb formats")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 188b0de..74199b1 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -2953,7 +2953,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
if (cfg->use_tfh) {
trans_pcie->max_tbs = IWL_TFH_NUM_TBS;
- trans_pcie->tfd_size = sizeof(struct iwl_tfh_tb);
+ trans_pcie->tfd_size = sizeof(struct iwl_tfh_tfd);
} else {
trans_pcie->max_tbs = IWL_NUM_OF_TBS;
--
2.9.3
^ permalink raw reply related
* [PATCH 01/25] iwlwifi: mvm: remove variable shadowing
From: Luca Coelho @ 2016-09-19 7:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Liad Kaufman, Luca Coelho
In-Reply-To: <1474270071.5664.89.camel@coelho.fi>
From: Liad Kaufman <liad.kaufman@intel.com>
Variable "ac" defined twice. Fix that.
Fixes: commit 93f436e2c7fe ("iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 216aa54..d3a0378 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -745,14 +745,14 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm,
.scd_queue = queue,
.action = SCD_CFG_DISABLE_QUEUE,
};
- u8 ac;
+ u8 txq_curr_ac;
disable_agg_tids = iwl_mvm_remove_sta_queue_marking(mvm, queue);
spin_lock_bh(&mvm->queue_info_lock);
- ac = mvm->queue_info[queue].mac80211_ac;
+ txq_curr_ac = mvm->queue_info[queue].mac80211_ac;
cmd.sta_id = mvm->queue_info[queue].ra_sta_id;
- cmd.tx_fifo = iwl_mvm_ac_to_tx_fifo[ac];
+ cmd.tx_fifo = iwl_mvm_ac_to_tx_fifo[txq_curr_ac];
cmd.tid = mvm->queue_info[queue].txq_tid;
spin_unlock_bh(&mvm->queue_info_lock);
--
2.9.3
^ permalink raw reply related
* pull-request: iwlwifi-next 2016-09-19
From: Luca Coelho @ 2016-09-19 7:27 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, linuxwifi
[-- Attachment #1: Type: text/plain, Size: 5257 bytes --]
Hi Kalle,
Here we go again, now I'm almost catching up with the pending stuff in
our internal tree, just in time for 4.9. This pull contains a bunch of
fixes to DQA and new HW support code, a few new features and some
cleanups. More details in the tag description.
Let me know if everything's fine (or not). :)
Luca.
The following changes since commit 80ba4f1d365af206b9e818d17d22fed02fe5def0:
mwifiex: fix null pointer deference when adapter is null (2016-09-17 18:26:32 +0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git tags/iwlwifi-next-for-kalle-2016-09-19
for you to fetch changes up to e9dd5c83fd1c8d36d9b8180a1ca7576f823442fd:
iwlwifi: pcie: use LIST_HEAD() macro (2016-09-19 10:10:19 +0300)
----------------------------------------------------------------
* added support for MU-MIMO sniffer
* added support for RRM by scan
* added support for packet injection
* migrate to devm memory allocation handling
* some fixes, mostly in DQA and new HW support
* other generic cleanups
----------------------------------------------------------------
Arik Nemtsov (1):
iwlwifi: move BIOS MCC retrieval to common code
Aviya Erenfeld (1):
iwlwifi: mvm: add support for MU-MIMO air sniffer
Avrahams Stern (1):
iwlwifi: mvm: Add support for RRM by scan
Emmanuel Grumbach (1):
iwlwifi: don't export trace points that are used in iwlwifi only
Haim Dreyfuss (1):
iwlwifi: check for valid ethernet address provided by OEM
Ido Yariv (1):
iwlwifi: mvm: Add mem debugfs entry
Johannes Berg (6):
iwlwifi: mvm: compare full command ID
iwlwifi: mvm: make iwl_mvm_update_sta() an inline
iwlwifi: mvm: document passing unexpected Block Ack Request frames
iwlwifi: mvm: move AP-specific code to right function
iwlwifi: mvm: use LIST_HEAD() macro
iwlwifi: pcie: use LIST_HEAD() macro
Liad Kaufman (1):
iwlwifi: mvm: remove variable shadowing
Oren Givon (1):
iwlwifi: add new 8265 series PCI ID
Roee Zamir (1):
iwlwifi: mvm: Add debugfs function for clocks diff
Sara Sharon (9):
iwlwifi: pcie: fix typo in struct name for a000 devices
iwlwifi: mvm: cleanup skb queue functions use
iwlwifi: mvm: fix DQA AP mode station assumption
iwlwifi: mvm: support BAR in reorder buffer
iwlwifi: mvm: support packet injection
iwlwifi: pcie: log full command sequence
iwlwifi: move to wide ID for all commands
iwlwifi: mvm: disable P2P queue on mac context release
iwlwifi: mvm: set HCMD_NAME for PHY_DB as well
Sharon Dvir (1):
iwlwifi: migrate to devm_* API
drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c | 3 --
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 5 ++
drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.c | 8 +++-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 104 ++++++++++++++++++++++++++++++++++++++++--
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 20 +++++++-
drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 11 ++---
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 26 +++++++++++
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 20 ++++----
drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 52 ++++++++++++++++++++-
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 47 ++++++++++---------
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 18 ++++++++
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 93 +------------------------------------
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 32 +++++++------
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 30 ++++++++----
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 61 ++++++++++++++++++++++---
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 13 ++----
drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 11 +++--
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 35 +++++++++++---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 -
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 9 ++--
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 84 ++++++++++++++--------------------
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
27 files changed, 632 insertions(+), 252 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* RE: [PATCH v2 1/9] cfg80211: add start / stop NAN commands
From: Otcheretianski, Andrei @ 2016-09-19 7:25 UTC (permalink / raw)
To: Arend Van Spriel, Luca Coelho, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Beker, Ayala, Grumbach, Emmanuel,
Coelho, Luciano
In-Reply-To: <0480de5c-4137-2991-e829-68e6af6e1935@broadcom.com>
> -----Original Message-----
> From: Arend Van Spriel [mailto:arend.vanspriel@broadcom.com]
> Sent: Sunday, September 18, 2016 21:54
> To: Otcheretianski, Andrei <andrei.otcheretianski@intel.com>; Luca Coelho
> <luca@coelho.fi>; johannes@sipsolutions.net
> Cc: linux-wireless@vger.kernel.org; Beker, Ayala <ayala.beker@intel.com>;
> Grumbach, Emmanuel <emmanuel.grumbach@intel.com>; Coelho, Luciano
> <luciano.coelho@intel.com>
> Subject: Re: [PATCH v2 1/9] cfg80211: add start / stop NAN commands
>
> On 18-9-2016 9:44, Otcheretianski, Andrei wrote:
> >> -----Original Message-----
> >> From: Arend Van Spriel [mailto:arend.vanspriel@broadcom.com]
> >> Sent: Friday, September 16, 2016 13:59
> >> To: Luca Coelho <luca@coelho.fi>; johannes@sipsolutions.net
> >> Cc: linux-wireless@vger.kernel.org; Beker, Ayala
> >> <ayala.beker@intel.com>; Otcheretianski, Andrei
> >> <andrei.otcheretianski@intel.com>; Grumbach, Emmanuel
> >> <emmanuel.grumbach@intel.com>; Coelho, Luciano
> >> <luciano.coelho@intel.com>
> >> Subject: Re: [PATCH v2 1/9] cfg80211: add start / stop NAN commands
> >>
> >> On 16-9-2016 10:33, Luca Coelho wrote:
> >>> From: Ayala Beker <ayala.beker@intel.com>
> >>>
> >>> This allows user space to start/stop NAN interface.
> >>> A NAN interface is like P2P device in a few aspects: it doesn't have
> >>> a netdev associated to it.
> >>> Add the new interface type and prevent operations that can't be
> >>> executed on NAN interface like scan.
> >>>
> >>> Define several attributes that may be configured by user space when
> >>> starting NAN functionality (master preference and dual band
> >>> operation)
> >>>
> >>> Signed-off-by: Andrei Otcheretianski
> >>> <andrei.otcheretianski@intel.com>
> >>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> >>> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> >>> ---
> >>> include/net/cfg80211.h | 21 +++++++++-
> >>> include/uapi/linux/nl80211.h | 52 +++++++++++++++++++++++++
> >>> net/mac80211/cfg.c | 2 +
> >>> net/mac80211/chan.c | 3 ++
> >>> net/mac80211/iface.c | 4 ++
> >>> net/mac80211/offchannel.c | 1 +
> >>> net/mac80211/rx.c | 3 ++
> >>> net/mac80211/util.c | 1 +
> >>> net/wireless/chan.c | 2 +
> >>> net/wireless/core.c | 34 ++++++++++++++++
> >>> net/wireless/core.h | 3 ++
> >>> net/wireless/mlme.c | 1 +
> >>> net/wireless/nl80211.c | 93
> >> ++++++++++++++++++++++++++++++++++++++++++--
> >>> net/wireless/rdev-ops.h | 20 ++++++++++
> >>> net/wireless/trace.h | 27 +++++++++++++
> >>> net/wireless/util.c | 6 ++-
> >>> 16 files changed, 267 insertions(+), 6 deletions(-)
> >>>
> >>> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index
> >>> d5e7f69..ca64d69 100644
> >>> --- a/include/net/cfg80211.h
> >>> +++ b/include/net/cfg80211.h
> >>> @@ -2293,6 +2293,19 @@ struct cfg80211_qos_map { };
> >>
> >> [...]
> >>
> >>> +/**
> >>> + * enum nl80211_nan_dual_band_conf - NAN dual band configuration
> >>> + *
> >>> + * Defines the NAN dual band mode of operation
> >>
> >> Does it make sense to have such a notion of bands in use. And what
> >> does 5.2GHz mean. Is this a subband within 5G channels? Probably I
> >> should read the NAN spec to understand what is meant here. I would
> >> consider 5.2G as lower 5G, ie. discovery on channel 44 but not sure if that
> is meant here.
> >>
> >
> > The NAN spec defines single and dual band modes of operation. The
> channels are fixed for each band.
> > On 2.4Ghz is channel 6 and 5GHz is either 44 or 149. Regarding 5.2 - it's just a
> typo. It should be 5G - no deeper meaning.
>
> The thing is that it seems likely other bands will be added so that would kinda
> obsolete this whole enum. So I would propose to have another way to
> configure the bands to use. This enum is not really extensible though it may
> reflect the current state of the spec, which is still in draft if I am not mistaken.
>
I guess you are talking about additional bands that are mentioned in NAN2 spec (like sub-1Ghz etc..).
I'm not sure that these bands will be used for sync or NAN2 specific operations only (like data path or ranging).
Nevertheless, you're right, I guess it doesn't harm to make it a bitmask of supported bands.
> Regards,
> Arend
^ permalink raw reply
* Re: ath10k mesh + ap + encryption?
From: Simon Wunderlich @ 2016-09-19 6:43 UTC (permalink / raw)
To: ath10k
Cc: Pedersen, Thomas, Valo, Kalle, Martin Blumenstingl,
openwrt-devel@lists.openwrt.org, linux-wireless@vger.kernel.org
In-Reply-To: <1473789271.27738.4.camel@qca.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
On Tuesday, September 13, 2016 5:54:38 PM CEST Pedersen, Thomas wrote:
> On Tue, 2016-09-13 at 14:30 +0200, Simon Wunderlich wrote:
>
> > [...]
> >
> > Thanks for the clarification. We will then stick to the 70's branch
> > then.
> >
> > Does anyone have pointers for the other questions? :) I would believe
> > hat many
> > people would be interested in running AP + Mesh encrypted at the same
> > time (at
> > least in the open source community ...).
>
>
> We're testing encrypted AP + Mesh quite successfully right now with
> this firmware: https://github.com/kvalo/ath10k-firmware/commit/307cb46b
> 06661ebd3186723b5002de769c7add83, of course that is for a QCA4019 chip.
> Which chip are you using? I can poke the firmware guys for possibility
> of getting a 10.4.3.2 firmware build for it.
Hi Thomas,
thanks for the hint! We are using an older QCA9882. I assume your firmware will
not work for this one? If you can poke the firmware guys, that would be great.
:)
We also want to test the 70.52 firmware version next, maybe there were some
changes since the .42 we used.
Thanks,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: TCP data throughput for BCM43362
From: Jörg Krause @ 2016-09-19 6:36 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: <27e007ed-57f6-4082-2f65-a11ba3b7f548@broadcom.com>
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?
Best regards
Jörg Krause
^ permalink raw reply
* wireless-drivers-next soon closing for 4.9
From: Kalle Valo @ 2016-09-19 5:46 UTC (permalink / raw)
To: linux-wireless
Hi,
Linus released 4.8-rc7 few hours and said that he "might" release -rc8
still. So if there's anything which you absolutely want to have in 4.9
send it now to make sure it makes it in time in the unlikely case that
-rc8 is not released. If -rc8 is released the deadline will be this
week's Sunday.
wireless-drivers remains open for important fixes.
--
Kalle Valo
^ permalink raw reply
* Re: pull-request: mac80211-next 2016-09-16
From: David Miller @ 2016-09-19 2:30 UTC (permalink / raw)
To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <1474030606-16664-1-git-send-email-johannes@sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 16 Sep 2016 14:56:45 +0200
> And here's another set for net-next, it's been a month or so and we have a
> reasonably large number of patches (for a change, mostly because I cleaned
> up some WEP crypto thing and a few static checkers.)
Pulled, thanks.
^ permalink raw reply
* Re: pull-request: mac80211 2016-09-16
From: David Miller @ 2016-09-19 2:27 UTC (permalink / raw)
To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <1474030043-16094-1-git-send-email-johannes@sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 16 Sep 2016 14:47:22 +0200
> Sorry - I know you only just pulled my tree for the previous fixes,
> but we found two more problems in the last few days; it'd be great
> to get those fixes in as well.
>
> Let me know if there's any problem.
Pulled, thanks Johannes.
^ permalink raw reply
* ath10k inoperatable after suspend
From: Steffen Arntz @ 2016-09-18 22:52 UTC (permalink / raw)
To: linux-wireless
Hi at all,
I have an QCA988X based card in my laptop and have some "issues" with
it, that I was not experiencing with my previous ath9k based card.
The main issue is, that after suspend to RAM the card seems to be
"hung up" and only reloading ath10k_core and ath10k_pci helps to fix
the problem.
dmesg shows the following info after resuming:
>
> ACPI: Low-level resume complete
> ACPI : EC: EC started
> PM: Restoring platform NVS memory
> Enabling non-boot CPUs ...
> x86: Booting SMP configuration:
> smpboot: Booting Node 0 Processor 1 APIC 0x1
> numa_add_cpu cpu 1 node 0: mask now 0-1
> cache: parent cpu1 should not be sleeping
> CPU1 is up
> smpboot: Booting Node 0 Processor 2 APIC 0x4
> numa_add_cpu cpu 2 node 0: mask now 0-2
> cache: parent cpu2 should not be sleeping
> CPU2 is up
> smpboot: Booting Node 0 Processor 3 APIC 0x5
> numa_add_cpu cpu 3 node 0: mask now 0-3
> cache: parent cpu3 should not be sleeping
> CPU3 is up
> ACPI: Waking up from system sleep state S3
> ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
> PM: noirq resume of devices complete after 22.000 msecs
> PM: early resume of devices complete after 2.082 msecs
> tg3 0000:03:00.0: System wakeup disabled by ACPI
> sd 0:0:0:0: [sda] Starting disk
> rtc_cmos 00:01: System wakeup disabled by ACPI
> usb 2-1.6: reset high-speed USB device number 4 using ehci-pci
> ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> ata1.00: supports DRM functions and may not be fully accessible
> ata1.00: disabling queued TRIM support
> ata1.00: supports DRM functions and may not be fully accessible
> ata1.00: disabling queued TRIM support
> ata1.00: configured for UDMA/133
> psmouse serio4: synaptics: queried max coordinates: x [..5714], y [..5172]
> usb 1-1.5: reset full-speed USB device number 10 using ehci-pci
> usb 1-1.5: device firmware changed
> usb 1-1.4: reset full-speed USB device number 4 using ehci-pci
> usb 1-1.2: reset high-speed USB device number 3 using ehci-pci
> PM: resume of devices complete after 4693.622 msecs
> PM: Finishing wakeup.
> Restarting tasks ... done.
> video LNXVIDEO:00: Restoring backlight state
> usb 1-1.5: USB disconnect, device number 10
> usb 1-1.5: new full-speed USB device number 11 using ehci-pci
> usb 1-1.5: New USB device found, idVendor=0cf3, idProduct=3004
> usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
> IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
> IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
> usb 1-1.5: USB disconnect, device number 11
> usb 1-1.5: new full-speed USB device number 12 using ehci-pci
> usb 1-1.5: New USB device found, idVendor=0cf3, idProduct=3004
> usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> wlp1s0: authenticate with 14:cc:20:ec:xx:xx
> ath10k_pci 0000:01:00.0: failed to synchronize setup for vdev 0 restart 0: -110
> ath10k_pci 0000:01:00.0: failed to start vdev 0 addr 1c:3e:84:d3:xx:xx on freq 5180: -110
> ath10k_pci 0000:01:00.0: failed to synchronize setup for vdev 0 restart 0: -110
> ath10k_pci 0000:01:00.0: failed to start vdev 0 addr 1c:3e:84:d3:xx:xx on freq 5180: -110
> ath10k_pci 0000:01:00.0: failed to start WMI vdev 0: -11
> ath10k_pci 0000:01:00.0: failed to start vdev 0 addr 1c:3e:84:d3:xx:xx on freq 5180: -11
> ath10k_pci 0000:01:00.0: failed to start WMI vdev 0: -11
> ath10k_pci 0000:01:00.0: failed to start vdev 0 addr 1c:3e:84:d3:xx:xx on freq 5180: -11
> ath10k_pci 0000:01:00.0: failed to delete WMI vdev 0: -11
> ath10k_pci 0000:01:00.0: could not suspend target (-11)
> ath10k_pci 0000:01:00.0: device has crashed during init
> ath10k_pci 0000:01:00.0: device has crashed during init
> ath10k_pci 0000:01:00.0: failed to wait for target init: -70
> [drm:ironlake_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
> [drm:ironlake_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun
at this point I reload the kernel modules
>
> ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
> ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
> ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
> ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043022ff sub 1a56:1420
> ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
> ath10k_pci 0000:01:00.0: firmware ver 10.2.4.70.54 api 5 features no-p2p,raw-mode,mfp crc32 9d340dd9
> ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
> ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
> ath10k_pci 0000:01:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
this happens on Linux hostnamehere 4.8.0-040800rc5-generic
#201609041832 SMP Sun Sep 4 22:34:01 UTC 2016 x86_64 x86_64 x86_64
GNU/Linux
And the issues where a lot worse with Kernel 4.4.
Fell free to request more detailed debug info as needed.
I wish all a nice rest of the weekend
Steffen Arntz
^ permalink raw reply
* Re: Using ath5k/ath9k radio for constant-tx noise source.
From: Bob Copeland @ 2016-09-18 22:14 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <55D4D406.5000603@candelatech.com>
On Wed, Aug 19, 2015 at 12:07:50PM -0700, Ben Greear wrote:
> I have a commercial AP that is using a CM9 ath5k radio (evidently, I could be wrong)
> and it has the ability to do a constant transmit of raw noise (RF probe shows
> noise, but a monitor-port sniffer does not see any frames from the CM9).
>
> I don't know the low-level details of how it is doing this, but I suspect
> it is using something like madwifi for a driver.
>
> Does anyone know how this can be done with modern software and
> ath5k or ath9k NICs?
So, see the below patch for something that might work. I only dusted off
and compile-tested this, and I'm not sure if it is controllable to the
extent that would be needed for things like DFS testing.
Just to reiterate the disclaimer, I'm told running radio in this mode for
an extended period of time can damage it, so -- good luck.
Note, ath9k has another kind of tx-99 mode which just sends out packets
constantly; ath5k is of course capable of doing that kind of thing too.
Setup for that is mostly the same except the descriptor list is just
self-linked and some of the phy tricks aren't needed.
>From fd374ea31833f705d6a08bb8f8e171cfcda8c302 Mon Sep 17 00:00:00 2001
From: Bob Copeland <me@bobcopeland.com>
Date: Tue, 17 May 2016 00:24:42 -0400
Subject: [PATCH] ath5k: add continuous-wave transmit mode
Continuous-wave mode is a kind of testmode in which RF is emitted on
a single carrier frequency; sometimes this kind of thing is needed
for FCC certification. Some Atheros devices support entering this
mode for testing.
This patch demonstrates (some of?) the settings needed to get the
device into the mode. I don't claim to understand it and the PHY
is 100% undocumented as far as I know, so a lot of this is guesswork
based on what is done in some versions of madwifi. It seems to work
on one radio I tried it on (monitored with ath9k's spectral scan and
my own "speccy" tool) -- but it might well destroy yours, so, don't
run it unless you don't care about that possibility.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/ath/ath5k/Makefile | 1 +
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
drivers/net/wireless/ath/ath5k/base.h | 3 +
drivers/net/wireless/ath/ath5k/debug.c | 47 ++++++++
drivers/net/wireless/ath/ath5k/tx99.c | 200 ++++++++++++++++++++++++++++++++
5 files changed, 252 insertions(+)
create mode 100644 drivers/net/wireless/ath/ath5k/tx99.c
diff --git a/drivers/net/wireless/ath/ath5k/Makefile b/drivers/net/wireless/ath/ath5k/Makefile
index 1b3a34f..afc699f 100644
--- a/drivers/net/wireless/ath/ath5k/Makefile
+++ b/drivers/net/wireless/ath/ath5k/Makefile
@@ -16,6 +16,7 @@ ath5k-y += rfkill.o
ath5k-y += ani.o
ath5k-y += sysfs.o
ath5k-y += mac80211-ops.o
+ath5k-y += tx99.o
ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o
ath5k-$(CONFIG_ATH5K_AHB) += ahb.o
ath5k-$(CONFIG_ATH5K_PCI) += pci.o
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 67fedb6..8c86a96 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1446,6 +1446,7 @@ struct ath5k_hw {
/* Calibration mask */
u8 ah_cal_mask;
+ bool tx99_active;
/*
* Function pointers
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 97469d0..3e50c747 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -112,6 +112,9 @@ const char *ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val);
int ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops);
void ath5k_deinit_ah(struct ath5k_hw *ah);
+void ath5k_tx99_cw_start(struct ath5k_hw *ah);
+void ath5k_tx99_cw_stop(struct ath5k_hw *ah);
+
/* Check whether BSSID mask is supported */
#define ath5k_hw_hasbssidmask(_ah) (ah->ah_version == AR5K_AR5212)
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 4f8d9ed..260f061 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -991,6 +991,50 @@ static const struct file_operations fops_eeprom = {
};
+static ssize_t read_file_tx99(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ char buf[3];
+ struct ath5k_hw *ah = file->private_data;
+
+ if (!ah->tx99_active)
+ buf[0] = '0';
+ else
+ buf[0] = '1';
+ buf[1] = '\n';
+ buf[2] = '\0';
+ return simple_read_from_buffer(user_buf, count, ppos, buf, 2);
+}
+
+static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ char buf[32];
+ size_t buf_size;
+ struct ath5k_hw *ah = file->private_data;
+
+ buf_size = min(count, (sizeof(buf)-1));
+ if (copy_from_user(buf, user_buf, buf_size))
+ return -EFAULT;
+
+ buf[buf_size] = '\0';
+
+ if (buf[0] == '0')
+ ath5k_tx99_cw_stop(ah);
+ else if (buf[0] == '1')
+ ath5k_tx99_cw_start(ah);
+
+ return count;
+}
+
+static const struct file_operations fops_tx99 = {
+ .read = read_file_tx99,
+ .write = write_file_tx99,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
void
ath5k_debug_init_device(struct ath5k_hw *ah)
{
@@ -1029,6 +1073,9 @@ ath5k_debug_init_device(struct ath5k_hw *ah)
debugfs_create_bool("32khz_clock", S_IWUSR | S_IRUSR, phydir,
&ah->ah_use_32khz_clock);
+
+ debugfs_create_file("tx99", S_IRUSR | S_IWUSR, phydir,
+ ah, &fops_tx99);
}
/* functions used in other places */
diff --git a/drivers/net/wireless/ath/ath5k/tx99.c b/drivers/net/wireless/ath/ath5k/tx99.c
new file mode 100644
index 0000000..3a88893
--- /dev/null
+++ b/drivers/net/wireless/ath/ath5k/tx99.c
@@ -0,0 +1,200 @@
+#include <net/mac80211.h>
+#include "ath5k.h"
+#include "base.h"
+#include "reg.h"
+
+/*
+ * Copyright (c) 2016 Bob Copeland <me@bobcopeland.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+static void ath5k_tx99_queue_frames(struct ath5k_hw *ah, int count)
+{
+ int i, j;
+ int frame_len = 1500;
+ __le16 fc;
+ u8 rate_idx;
+ u8 qnum = 3;
+ int max_loops = 1000, loop;
+ struct ieee80211_hdr *frame;
+ struct ieee80211_tx_info *info;
+
+ struct sk_buff *skb;
+ struct ieee80211_tx_control control = {
+ .sta = NULL
+ };
+
+ for (i = 0; i < count; i++) {
+ fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_FCTL_TODS);
+ skb = dev_alloc_skb(ah->hw->extra_tx_headroom + frame_len);
+ if (!skb)
+ continue;
+ skb_reserve(skb, ah->hw->extra_tx_headroom);
+
+ frame = (struct ieee80211_hdr *) skb_put(skb, frame_len);
+ memset(frame, 0, frame_len);
+ frame->frame_control = fc;
+ memcpy(frame->addr1, ah->common.macaddr, ETH_ALEN);
+ memcpy(frame->addr2, ah->common.macaddr, ETH_ALEN);
+ memcpy(frame->addr3, ah->common.macaddr, ETH_ALEN);
+ skb_set_queue_mapping(skb, IEEE80211_AC_VO);
+
+ info = IEEE80211_SKB_CB(skb);
+ memset(info, 0, sizeof(*info));
+ info->flags |= IEEE80211_TX_CTL_INJECTED;
+
+ /* use highest rate on whichever band we're on */
+ info->band = ah->curchan->band;
+ rate_idx = ah->sbands[info->band].n_bitrates - 1;
+
+ for (j=0; j < IEEE80211_TX_MAX_RATES; j++)
+ info->control.rates[j].idx = -1;
+
+ info->control.rates[0].idx = rate_idx;
+ info->control.rates[0].count = 15;
+
+ rcu_read_lock();
+ ath5k_tx_queue(ah->hw, skb, &ah->txqs[qnum], &control);
+ rcu_read_unlock();
+ }
+
+ /* wait for queued frames to be sent */
+ printk(KERN_INFO "ath5k: tx99: sending initial frames...\n");
+ loop = 0;
+ while (ath5k_hw_num_tx_pending(ah, qnum) > 0) {
+ msleep(10);
+ if (loop++ > max_loops)
+ break;
+ }
+ printk(KERN_INFO "ath5k: tx99: done sending initial frames\n");
+}
+
+void ath5k_tx99_cw_start(struct ath5k_hw *ah)
+{
+ u32 val, xpa_orig;
+ bool xpaa_active_high, xpab_active_high;
+
+ if (ah->tx99_active)
+ return;
+
+ printk(KERN_INFO "ath5k: entering tx99 mode on freq %d, txpower %d dBm\n",
+ ah->curchan->center_freq, ah->ah_txpower.txp_requested),
+ ah->tx99_active = true;
+
+ /*
+ * disable TX hang queue check -- if we don't do this then
+ * the tx watchdog will issue a reset eventually and we'll
+ * leave tx99 mode
+ */
+ clear_bit(ATH_STAT_STARTED, ah->status);
+
+ /* toggle XPA -- A for 5G or B for 2G */
+ ath5k_hw_reg_write(ah, 7, AR5K_PHY_PA_CTL);
+
+ val = ath5k_hw_reg_read(ah, AR5K_PHY_PA_CTL);
+ xpaa_active_high = !!(val & AR5K_PHY_PA_CTL_XPA_A_HI);
+ xpab_active_high = !!(val & AR5K_PHY_PA_CTL_XPA_B_HI);
+ xpa_orig = val;
+
+ if (ah->curchan->band == NL80211_BAND_5GHZ) {
+ val &= ~AR5K_PHY_PA_CTL_XPA_A_HI;
+ if (!xpaa_active_high)
+ val |= AR5K_PHY_PA_CTL_XPA_A_HI;
+ } else {
+ val &= ~AR5K_PHY_PA_CTL_XPA_B_HI;
+ if (!xpab_active_high)
+ val |= AR5K_PHY_PA_CTL_XPA_B_HI;
+ }
+ ath5k_hw_reg_write(ah, val, AR5K_PHY_PA_CTL);
+
+ /*
+ * baseband operates in receive mode in continuous wave mode so
+ * use non-transmitting antenna
+ */
+ ah->ah_tx_ant = 2;
+
+ /* send a few frames to ramp up output power */
+ ath5k_tx99_queue_frames(ah, 20);
+
+ mdelay(20);
+
+ /* disable interrupts */
+ ath5k_hw_set_imr(ah, 0);
+
+ /* force AGC clear */
+ AR5K_REG_ENABLE_BITS(ah, AR5K_PHY_TST2, AR5K_PHY_TST2_FORCE_AGC_CLR);
+ AR5K_REG_ENABLE_BITS(ah, 0x9864, 0x7f000);
+ AR5K_REG_ENABLE_BITS(ah, 0x9924, 0x7f00fe);
+
+ /* disable carrier sense */
+ AR5K_REG_ENABLE_BITS(ah, AR5K_DIAG_SW, AR5K_DIAG_SW_RX_CLEAR_HIGH | AR5K_DIAG_SW_IGNORE_CARR_SENSE);
+
+ /* disable receive */
+ ath5k_hw_reg_write(ah, AR5K_CR_RXD, AR5K_CR);
+
+ /* set constant values */
+ ath5k_hw_reg_write(ah, (0x1ff << 9) | 0x1ff, 0x983c);
+
+ /* enable testmode on the ADC */
+ AR5K_REG_MASKED_BITS(ah, AR5K_PHY_TST1, (1 << 7) | (1 << 1), 0xffffff7d);
+
+ /* turn on the ADC */
+ ath5k_hw_reg_write(ah, 0x80038ffc, AR5K_PHY_ADC_CTL);
+ mdelay(10);
+
+ /* turn on RF */
+ val = 0x10a098c2;
+ if (ah->curchan->band == NL80211_BAND_2GHZ) {
+ val |= 0x400000;
+ }
+ ath5k_hw_reg_write(ah, val, 0x98dc);
+ mdelay(10);
+ val |= 0x4000;
+
+ ath5k_hw_reg_write(ah, val, 0x98dc);
+}
+
+void ath5k_tx99_cw_stop(struct ath5k_hw *ah)
+{
+ if (!ah->tx99_active)
+ return;
+
+ printk(KERN_INFO "ath5k: leaving tx99 mode\n");
+ set_bit(ATH_STAT_STARTED, ah->status);
+ ah->tx99_active = false;
+
+ /* just reset the device */
+ ath5k_hw_reset(ah, ah->opmode, ah->curchan, false, false);
+}
--
2.9.0
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply related
* Re: [PATCH v6 1/3] Documentation: dt: net: add ath9k wireless device binding
From: Martin Blumenstingl @ 2016-09-18 21:51 UTC (permalink / raw)
To: Rob Herring
Cc: Oleksij Rempel, ath9k-devel, devicetree, linux-wireless,
ath9k-devel, mcgrof, mark.rutland, kvalo, chunkeey,
arend.vanspriel, julian.calaby, bjorn, nbd, arnd
In-Reply-To: <20160916124541.GB9689@rob-hp-laptop>
On Fri, Sep 16, 2016 at 2:45 PM, Rob Herring <robh@kernel.org> wrote:
> On Fri, Sep 09, 2016 at 10:57:06PM +0200, Martin Blumenstingl wrote:
>> On Fri, Sep 9, 2016 at 9:48 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> >> +Optional properties:
>> >> +- reg: Address and length of the register set for the device.
>> >> +- qca,clk-25mhz: Defines that a 25MHz clock is used
>> >
>> > Some SoCs even Atheros WiSoCs use WiFi clock for System Clock. In this
>> > case we need to use clock framework any way, so why not in this case too?
>> > Provide dummy static clock in DT and connect it with this node?
>> >
>> > osc25m: oscillator {
>> > compatible = "fixed-clock";
>> > #clock-cells = <0>;
>> > clock-frequency = <25000000>;
>> > clock-accuracy = <30000>;
>> > };
>> >
>> > acc: clock-controller@80040000 {
>> > compatible = "some-clock-controller";
>> > #clock-cells = <1>;
>> > clocks = <&osc25m>;
>> > reg = <0x80040000 0x204>;
>> > };
>> >
>> >
>> > &pci0 {
>> > ath9k@168c,002d {
>> > compatible = "pci168c,002d";
>> > reg = <0x7000 0 0 0 0x1000>;
>> > clocks = <&osc25m>;
>> > qca,disable-5ghz;
>> > };
>> > };
>> >
>> >
>> > driver will need to use clk_get and compare frequency instead of
>> > of_property_read_bool(np, "qca,clk-25mhz"). In this case you will need
>> > to define source clock only one time and reuse it by all affected DT
>> > nodes. If we have 40MHz clock you will only need to change it in
>> > fixed-clock.
>> that does sound like a good idea, thanks for that input!
>> However, I will remove the property for the first version because I am
>> trying to get PCI(e) devices supported. OF support for AHB (WiSoC)
>> needs more work (in other places, like ahb.c) anyways.
>> But this suggestion should be remembered!
>>
>> >> +- qca,no-eeprom: Indicates that there is no physical EEPROM connected to the
>> >> + ath9k wireless chip (in this case the calibration /
>> >> + EEPROM data will be loaded from userspace using the
>> >> + kernel firmware loader).
>> >> +- qca,disable-2ghz: Overrides the settings from the EEPROM and disables the
>> >> + 2.4GHz band. Setting this property is only needed
>> >> + when the RF circuit does not support the 2.4GHz band
>> >> + while it is enabled nevertheless in the EEPROM.
>> >> +- qca,disable-5ghz: Overrides the settings from the EEPROM and disables the
>> >> + 5GHz band. Setting this property is only needed when
>> >> + the RF circuit does not support the 5GHz band while
>> >> + it is enabled nevertheless in the EEPROM.
>> >
>> > This option can be reused for every WiFi controller. Not only for qca.
>> > So may be instead of adding vendor specific name, make it reusable for
>> > all vendors. Instead of qca,disable-5ghz and qca,disable-2ghz make
>> > disable-5ghz and disable-2ghz?
>
> Fine, but if you do this then document in a common location.
what about Documentation/devicetree/bindings/net/wireless/ieee80211-common.txt?
>> I am personally fine with anything that fits best into the grand
>> scheme of things.
>> There are three scenarios I can think of which may be influenced by
>> devicetree configuration:
>> a) let the driver decide automatically whether the 2.4GHz and/or 5GHz
>> band is/are enabled
>> b) explicitly disable either bands (because the driver thinks due to
>> whatever reason that a band is supported while in reality it isn't)
>> c) explicitly enable a band (for example because the driver cannot
>> automagically detect which band should be enabled)
>>
>> for ath9k we default to a) but also allow b): the EEPROM (device
>> specific calibration data) contains information about which bands are
>> enabled (or not). But some manufacturers are shipping devices for
>> example with the 5G band enabled, while the actual hardware doesn't
>> support it.
>
> And you can't determine that based on different device IDs? If you can
> use vendor/device ID, then you should. If not, then this is fine.
one example is the TP-Link TW-8970 which uses a AR9381. ath9k
identifies this chip as AR9380 (probably because both are *very*
similar). The former does not support the 5G band, the latter does
(but unfortunately - even though it's not supported - the EEPROM data
on the TW-8970 indicates that 5G is supported)
> Is it possible to have no EEPROM at all? If so, you might want to just
> put the raw EEPROM data into DT rather than a property for every field
> (I'm assuming there's more than just what you have properties for now).
In theory: yes
However, most devices we are talking about are legacy ones without
devicetree support in the bootloader (in other words: hand-written
.dts files).
^ permalink raw reply
* Re: [PATCH v2 6/9] cfg80211: Provide an API to report NAN function termination
From: Arend Van Spriel @ 2016-09-18 20:00 UTC (permalink / raw)
To: Luca Coelho, johannes
Cc: linux-wireless, Ayala Beker, Andrei Otcheretianski,
Emmanuel Grumbach, Luca Coelho
In-Reply-To: <c72fdae0-fa63-be83-62dc-9c7f409fcc61@broadcom.com>
On 18-9-2016 21:56, Arend Van Spriel wrote:
> On 16-9-2016 10:33, Luca Coelho wrote:
>> From: Ayala Beker <ayala.beker@intel.com>
>>
>> Provide a function that reports NAN DE function termination. The function
>> may be terminated due to one of the following reasons: user request,
>> ttl expiration or failure.
>> If the NAN instance is tied to the owner, the notification will be
>> sent to the socket that started the NAN interface only
>
> So the driver is supposed to use this function from the .rm_nan_func
> callback (or .del_nan_func). How should the driver use this together
> with cfg80211_free_nan_func() function.
Hit Send button too fast. Would it make sense to free the nan func
implicitly in cfg80211_nan_func_terminated() function or would there be
reasons to keep it.
Regards,
Arend
^ permalink raw reply
* Re: [PATCH v2 6/9] cfg80211: Provide an API to report NAN function termination
From: Arend Van Spriel @ 2016-09-18 19:56 UTC (permalink / raw)
To: Luca Coelho, johannes
Cc: linux-wireless, Ayala Beker, Andrei Otcheretianski,
Emmanuel Grumbach, Luca Coelho
In-Reply-To: <20160916083321.5840-7-luca@coelho.fi>
On 16-9-2016 10:33, Luca Coelho wrote:
> From: Ayala Beker <ayala.beker@intel.com>
>
> Provide a function that reports NAN DE function termination. The function
> may be terminated due to one of the following reasons: user request,
> ttl expiration or failure.
> If the NAN instance is tied to the owner, the notification will be
> sent to the socket that started the NAN interface only
So the driver is supposed to use this function from the .rm_nan_func
callback (or .del_nan_func). How should the driver use this together
with cfg80211_free_nan_func() function.
> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
> include/net/cfg80211.h | 16 ++++++++++++
> include/uapi/linux/nl80211.h | 15 ++++++++++++
> net/wireless/nl80211.c | 58 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 89 insertions(+)
>
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index a08d7da..81770d6 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -5676,6 +5676,22 @@ struct cfg80211_nan_match_params {
> void cfg80211_nan_match(struct wireless_dev *wdev,
> struct cfg80211_nan_match_params *match, gfp_t gfp);
>
> +/**
> + * cfg80211_nan_func_terminated - notify about NAN function termination.
> + *
> + * @wdev: the wireless device reporting the match
> + * @inst_id: the local instance id
> + * @reason: termination reason (one of the NL80211_NAN_FUNC_TERM_REASON_*)
> + * @cookie: unique NAN function identifier
> + * @gfp: allocation flags
> + *
> + * This function reports that the a NAN function is terminated.
> + */
> +void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
> + u8 inst_id,
> + enum nl80211_nan_func_term_reason reason,
> + u64 cookie, gfp_t gfp);
> +
> /* ethtool helper */
> void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
>
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index badb4a6..fd86be6 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -4978,6 +4978,21 @@ enum nl80211_nan_publish_type {
> NL80211_NAN_UNSOLICITED_PUBLISH = 1 << 1,
> };
>
> +/**
> + * enum nl80211_nan_func_term_reason - NAN functions termination reason
> + *
> + * Defines termination reasons of a NAN function
> + *
> + * @NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST: requested by user
> + * @NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED: timeout
> + * @NL80211_NAN_FUNC_TERM_REASON_ERROR: errored
> + */
> +enum nl80211_nan_func_term_reason {
> + NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST,
> + NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED,
> + NL80211_NAN_FUNC_TERM_REASON_ERROR,
> +};
> +
> #define NL80211_NAN_FUNC_SERVICE_ID_LEN 6
> #define NL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN 0xff
> #define NL80211_NAN_FUNC_SRF_MAX_LEN 0xff
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 4d37717..f817105 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -10945,6 +10945,64 @@ nla_put_failure:
> }
> EXPORT_SYMBOL(cfg80211_nan_match);
>
> +void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
> + u8 inst_id,
> + enum nl80211_nan_func_term_reason reason,
> + u64 cookie, gfp_t gfp)
> +{
> + struct wiphy *wiphy = wdev->wiphy;
> + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
> + struct sk_buff *msg;
> + struct nlattr *func_attr;
> + void *hdr;
> +
> + if (WARN_ON(!inst_id))
> + return;
> +
> + msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
> + if (!msg)
> + return;
> +
> + hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_RM_NAN_FUNCTION);
> + if (!hdr) {
> + nlmsg_free(msg);
> + return;
> + }
> +
> + if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
> + (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
> + wdev->netdev->ifindex)) ||
> + nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)))
> + goto nla_put_failure;
> +
> + if (nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie))
> + goto nla_put_failure;
> +
> + func_attr = nla_nest_start(msg, NL80211_ATTR_NAN_FUNC);
> + if (!func_attr)
> + goto nla_put_failure;
> +
> + if (nla_put_u8(msg, NL80211_NAN_FUNC_INSTANCE_ID, inst_id) ||
> + nla_put_u8(msg, NL80211_NAN_FUNC_TERM_REASON, reason))
> + goto nla_put_failure;
> +
> + nla_nest_end(msg, func_attr);
> + genlmsg_end(msg, hdr);
> +
> + if (!wdev->owner_nlportid)
> + genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy),
> + msg, 0, NL80211_MCGRP_NAN, gfp);
> + else
> + genlmsg_unicast(wiphy_net(&rdev->wiphy), msg,
> + wdev->owner_nlportid);
> +
> + return;
> +
> +nla_put_failure:
> + nlmsg_free(msg);
> +}
> +EXPORT_SYMBOL(cfg80211_nan_func_terminated);
> +
> static int nl80211_get_protocol_features(struct sk_buff *skb,
> struct genl_info *info)
> {
>
^ permalink raw reply
* Re: [PATCH v2 3/9] cfg80211: add add_nan_func / rm_nan_func
From: Arend Van Spriel @ 2016-09-18 19:54 UTC (permalink / raw)
To: Luca Coelho, johannes
Cc: linux-wireless, Ayala Beker, Andrei Otcheretianski,
Emmanuel Grumbach, Luca Coelho
In-Reply-To: <20160916083321.5840-4-luca@coelho.fi>
On 16-9-2016 10:33, Luca Coelho wrote:
> From: Ayala Beker <ayala.beker@intel.com>
>
> A NAN function can be either publish, subscribe or follow
> up. Make all the necessary verifications and just pass the
> request to the driver.
> Allow the user space application that starts NAN to
> forbid any other socket to add or remove functions.
>
> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Ayala Beker <ayala.beker@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
[...]
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index 7ab18c8..ab16c8e 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -847,6 +847,24 @@
> * After this command NAN functions can be added.
> * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
> * its %NL80211_ATTR_WDEV interface.
> + * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined
> + * with %NL80211_ATTR_NAN_FUNC nested attribute. When called, this
> + * operation returns the strictly positive and unique instance id
> + * (%NL80211_ATTR_NAN_FUNC_INST_ID) and a cookie (%NL80211_ATTR_COOKIE)
> + * of the function upon success.
> + * Since instance ID's can be re-used, this cookie is the right
> + * way to identify the function. This will avoid races when a termination
> + * event is handled by the user space after it has already added a new
> + * function that got the same instance id from the kernel as the one
> + * which just terminated.
> + * This cookie may be used in NAN events even before the command
> + * returns, so userspace shouldn't process NAN events until it processes
> + * the response to this command.
> + * Look at %NL80211_ATTR_SOCKET_OWNER as well.
> + * @NL80211_CMD_RM_NAN_FUNCTION: Remove a NAN function by cookie.
> + * This command is also used as a notification sent when a NAN function is
> + * terminated. This will contain a %NL80211_ATTR_NAN_FUNC_INST_ID
> + * and %NL80211_ATTR_COOKIE attributes.
This patch does not show the notification scenario as it is added in
patch 6. So those three lines could be added by that patch instead to
keep things logically together.
Regards,
Arend
^ 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