2019-02-19 17:45:26 +00:00
|
|
|
/* SPDX-License-Identifier: ISC */
|
2013-06-12 17:52:10 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2005-2011 Atheros Communications Inc.
|
2017-12-22 16:31:13 +00:00
|
|
|
* Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
|
2019-06-03 14:41:33 +00:00
|
|
|
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
2013-06-12 17:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CORE_H_
|
|
|
|
#define _CORE_H_
|
|
|
|
|
|
|
|
#include <linux/completion.h>
|
|
|
|
#include <linux/if_ether.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/pci.h>
|
2014-08-25 05:37:32 +00:00
|
|
|
#include <linux/uuid.h>
|
|
|
|
#include <linux/time.h>
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2013-07-05 13:15:14 +00:00
|
|
|
#include "htt.h"
|
2013-06-12 17:52:10 +00:00
|
|
|
#include "htc.h"
|
|
|
|
#include "hw.h"
|
|
|
|
#include "targaddrs.h"
|
|
|
|
#include "wmi.h"
|
|
|
|
#include "../ath.h"
|
|
|
|
#include "../regd.h"
|
2013-11-20 07:59:41 +00:00
|
|
|
#include "../dfs_pattern_detector.h"
|
2014-08-02 06:12:54 +00:00
|
|
|
#include "spectral.h"
|
2014-12-17 10:22:07 +00:00
|
|
|
#include "thermal.h"
|
2015-03-23 15:32:53 +00:00
|
|
|
#include "wow.h"
|
2015-06-18 07:01:09 +00:00
|
|
|
#include "swap.h"
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
#define MS(_v, _f) (((_v) & _f##_MASK) >> _f##_LSB)
|
|
|
|
#define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
|
|
|
|
#define WO(_f) ((_f##_OFFSET) >> 2)
|
|
|
|
|
|
|
|
#define ATH10K_SCAN_ID 0
|
2018-05-23 08:09:09 +00:00
|
|
|
#define ATH10K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD 10 /* msec */
|
2013-06-12 17:52:10 +00:00
|
|
|
#define WMI_READY_TIMEOUT (5 * HZ)
|
2016-04-13 11:13:21 +00:00
|
|
|
#define ATH10K_FLUSH_TIMEOUT_HZ (5 * HZ)
|
|
|
|
#define ATH10K_CONNECTION_LOSS_HZ (3 * HZ)
|
2018-01-03 00:51:01 +00:00
|
|
|
#define ATH10K_NUM_CHANS 41
|
|
|
|
#define ATH10K_MAX_5G_CHAN 173
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
/* Antenna noise floor */
|
|
|
|
#define ATH10K_DEFAULT_NOISE_FLOOR -95
|
|
|
|
|
2018-04-10 15:01:05 +00:00
|
|
|
#define ATH10K_INVALID_RSSI 128
|
|
|
|
|
2013-11-14 08:01:15 +00:00
|
|
|
#define ATH10K_MAX_NUM_MGMT_PENDING 128
|
2013-09-26 15:47:12 +00:00
|
|
|
|
2015-03-19 14:03:29 +00:00
|
|
|
/* number of failed packets (20 packets with 16 sw reties each) */
|
|
|
|
#define ATH10K_KICKOUT_THRESHOLD (20 * 16)
|
2014-01-20 09:01:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Use insanely high numbers to make sure that the firmware implementation
|
|
|
|
* won't start, we have the same functionality already in hostapd. Unit
|
|
|
|
* is seconds.
|
|
|
|
*/
|
|
|
|
#define ATH10K_KEEPALIVE_MIN_IDLE 3747
|
|
|
|
#define ATH10K_KEEPALIVE_MAX_IDLE 3895
|
|
|
|
#define ATH10K_KEEPALIVE_MAX_UNRESPONSIVE 3900
|
|
|
|
|
2016-09-02 16:46:09 +00:00
|
|
|
/* NAPI poll budget */
|
|
|
|
#define ATH10K_NAPI_BUDGET 64
|
|
|
|
|
ath10k: search SMBIOS for OEM board file extension
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
board data file is identified, among others, by device and sybsystem ids.
The problem, however, can occur when the (default) board data file cannot
fulfill with the vendor requirements and it is necessary to use a different
board data file.
To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name
Extension to specify the extension/variant name. The driver will take the
extension suffix into consideration and will load the right (non-default)
board data file if necessary.
If it is unnecessary to use extension board data file, please leave the
SMBIOS field blank and default configuration will be used.
Example:
If a default board data file for a specific board is identified by a string
"bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
subsystem-device=0310"
then the OEM specific data file, if used, could be identified by variant
suffix:
"bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
subsystem-device=0310,variant=DE_1AB"
If board data file name extension is set but board-2.bin does not contain
board data file for the variant, the driver will fallback to the default
board data file not to break backward compatibility.
This was first applied in commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM
board file extension") but later reverted in commit 005c3490e9db ("Revert
"ath10k: Search SMBIOS for OEM board file extension"". This patch is now
otherwise the same as commit f2593cb1b291 except the regression fixed.
Signed-off-by: Waldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-02-24 22:30:03 +00:00
|
|
|
/* SMBIOS type containing Board Data File Name Extension */
|
|
|
|
#define ATH10K_SMBIOS_BDF_EXT_TYPE 0xF8
|
|
|
|
|
|
|
|
/* SMBIOS type structure length (excluding strings-set) */
|
|
|
|
#define ATH10K_SMBIOS_BDF_EXT_LENGTH 0x9
|
|
|
|
|
|
|
|
/* Offset pointing to Board Data File Name Extension */
|
|
|
|
#define ATH10K_SMBIOS_BDF_EXT_OFFSET 0x8
|
|
|
|
|
|
|
|
/* Board Data File Name Extension string length.
|
|
|
|
* String format: BDF_<Customer ID>_<Extension>\0
|
|
|
|
*/
|
|
|
|
#define ATH10K_SMBIOS_BDF_EXT_STR_LENGTH 0x20
|
|
|
|
|
|
|
|
/* The magic used by QCA spec */
|
|
|
|
#define ATH10K_SMBIOS_BDF_EXT_MAGIC "BDF_"
|
|
|
|
|
2019-02-11 16:47:49 +00:00
|
|
|
/* Default Airtime weight multipler (Tuned for multiclient performance) */
|
|
|
|
#define ATH10K_AIRTIME_WEIGHT_MULTIPLIER 4
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k;
|
|
|
|
|
2014-10-13 06:40:47 +00:00
|
|
|
static inline const char *ath10k_bus_str(enum ath10k_bus bus)
|
|
|
|
{
|
|
|
|
switch (bus) {
|
|
|
|
case ATH10K_BUS_PCI:
|
|
|
|
return "pci";
|
ath10k: add basic skeleton to support ahb
qca4019 uses ahb instead of pci where it slightly differs in device
enumeration, clock control, reset control, etc. Good thing is that
ahb also uses copy engine for the data transaction. So, the most of
the stuff implemented in pci.c/ce.c are reusable in ahb case too.
Device enumeration in ahb case comes through platform driver/device
model. All resource details like irq, memory map, clocks, etc for
qca4019 can be fetched from of_node of platform device.
Simply flow would look like,
device tree => platform device (kernel) => platform driver (ath10k)
Device tree entry will have all qca4019 resource details and the same
info will be passed to kernel. Kernel will prepare new platform device
for that entry and expose DT info to of_node in platform device.
Later, ath10k would register platform driver with unique compatible name
and then kernels binds to corresponding compatible entry & calls ath10k
ahb probe functions. From there onwards, ath10k will take control of it
and move forward.
New bool flag CONFIG_ATH10K_AHB is added in Kconfig to conditionally
enable ahb support in ath10k. On enabling this flag, ath10k_pci.ko
will have ahb support. This patch adds only basic skeleton and few
macros to support ahb in the context of qca4019.
Signed-off-by: Raja Mani <rmani@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-01-27 09:54:25 +00:00
|
|
|
case ATH10K_BUS_AHB:
|
|
|
|
return "ahb";
|
2017-04-26 09:17:55 +00:00
|
|
|
case ATH10K_BUS_SDIO:
|
|
|
|
return "sdio";
|
2017-07-28 12:15:37 +00:00
|
|
|
case ATH10K_BUS_USB:
|
|
|
|
return "usb";
|
2017-12-21 16:05:20 +00:00
|
|
|
case ATH10K_BUS_SNOC:
|
|
|
|
return "snoc";
|
2014-10-13 06:40:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return "unknown";
|
|
|
|
}
|
|
|
|
|
2015-11-18 05:59:20 +00:00
|
|
|
enum ath10k_skb_flags {
|
|
|
|
ATH10K_SKB_F_NO_HWCRYPT = BIT(0),
|
|
|
|
ATH10K_SKB_F_DTIM_ZERO = BIT(1),
|
|
|
|
ATH10K_SKB_F_DELIVER_CAB = BIT(2),
|
2015-11-18 05:59:21 +00:00
|
|
|
ATH10K_SKB_F_MGMT = BIT(3),
|
2015-11-18 05:59:22 +00:00
|
|
|
ATH10K_SKB_F_QOS = BIT(4),
|
ath10k: add dynamic vlan support
Multicast/broadcast traffic destined for a particular vlan group will
always be encrypted in software. To enable dynamic VLANs, it requires
driver support for sending software encrypted packets.
In ath10k, sending software encrypted frames is allowed only when we insmod
the driver with cryptmode param set to 1, this configuration disables
hardware crypto and enables RAW mode implicitly. Since, enabling raw
mode has performance impact, this cannot be considered as an ideal
solution for supporting VLANs in the driver.
As an alternative take, in this approach, cryptographic keys for
unicast traffic (per peer PTKs) and keys for non-vlan group traffic
will be configured in hardware, allowing hardware encryption for unicast
and non-vlan group traffic. Only vlan group traffic will be encrypted in
software and pushed to the target with encap mode set to RAW in the TX
descriptors.
Not all firmwares can support this type of key configuration(having few
keys installed in hardware and few only in software); for this purpose a
new WMI service flag "WMI_SERVICE_PER_PACKET_SW_ENCRYPT" is introduced to
advertise this support.
Also, adding the logic required to send sw encrypted frames in raw mode.
Hardwares Tested : QCA9984, QCA988X
Firmwares Tested : 10.4-3.5.3-00057, 10.2.4-1.0-00042
Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-11 16:47:56 +00:00
|
|
|
ATH10K_SKB_F_RAW_TX = BIT(5),
|
2015-11-18 05:59:20 +00:00
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k_skb_cb {
|
|
|
|
dma_addr_t paddr;
|
2015-11-18 05:59:20 +00:00
|
|
|
u8 flags;
|
2014-11-27 10:09:37 +00:00
|
|
|
u8 eid;
|
2015-11-18 05:59:23 +00:00
|
|
|
u16 msdu_id;
|
2019-02-11 16:47:52 +00:00
|
|
|
u16 airtime_est;
|
2015-11-18 05:59:22 +00:00
|
|
|
struct ieee80211_vif *vif;
|
2016-03-06 14:14:39 +00:00
|
|
|
struct ieee80211_txq *txq;
|
2013-06-12 17:52:10 +00:00
|
|
|
} __packed;
|
|
|
|
|
2015-01-24 10:14:47 +00:00
|
|
|
struct ath10k_skb_rxcb {
|
|
|
|
dma_addr_t paddr;
|
2015-01-24 10:14:48 +00:00
|
|
|
struct hlist_node hlist;
|
2015-01-24 10:14:47 +00:00
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb)
|
|
|
|
{
|
|
|
|
BUILD_BUG_ON(sizeof(struct ath10k_skb_cb) >
|
|
|
|
IEEE80211_TX_INFO_DRIVER_DATA_SIZE);
|
|
|
|
return (struct ath10k_skb_cb *)&IEEE80211_SKB_CB(skb)->driver_data;
|
|
|
|
}
|
|
|
|
|
2015-01-24 10:14:47 +00:00
|
|
|
static inline struct ath10k_skb_rxcb *ATH10K_SKB_RXCB(struct sk_buff *skb)
|
|
|
|
{
|
|
|
|
BUILD_BUG_ON(sizeof(struct ath10k_skb_rxcb) > sizeof(skb->cb));
|
|
|
|
return (struct ath10k_skb_rxcb *)skb->cb;
|
|
|
|
}
|
|
|
|
|
2015-01-24 10:14:48 +00:00
|
|
|
#define ATH10K_RXCB_SKB(rxcb) \
|
|
|
|
container_of((void *)rxcb, struct sk_buff, cb)
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
static inline u32 host_interest_item_address(u32 item_offset)
|
|
|
|
{
|
|
|
|
return QCA988X_HOST_INTEREST_ADDRESS + item_offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ath10k_bmi {
|
|
|
|
bool done_sent;
|
|
|
|
};
|
|
|
|
|
2013-09-26 15:47:11 +00:00
|
|
|
struct ath10k_mem_chunk {
|
|
|
|
void *vaddr;
|
|
|
|
dma_addr_t paddr;
|
|
|
|
u32 len;
|
|
|
|
u32 req_id;
|
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k_wmi {
|
|
|
|
enum ath10k_htc_ep_id eid;
|
|
|
|
struct completion service_ready;
|
|
|
|
struct completion unified_ready;
|
2016-08-19 10:37:42 +00:00
|
|
|
struct completion barrier;
|
2018-05-15 09:09:49 +00:00
|
|
|
struct completion radar_confirm;
|
2013-09-13 12:16:54 +00:00
|
|
|
wait_queue_head_t tx_credits_wq;
|
2014-11-27 09:11:17 +00:00
|
|
|
DECLARE_BITMAP(svc_map, WMI_SERVICE_MAX);
|
2013-09-26 15:47:05 +00:00
|
|
|
struct wmi_cmd_map *cmd;
|
2013-09-26 15:47:15 +00:00
|
|
|
struct wmi_vdev_param_map *vdev_param;
|
2013-09-26 15:47:16 +00:00
|
|
|
struct wmi_pdev_param_map *pdev_param;
|
2014-12-03 08:10:54 +00:00
|
|
|
const struct wmi_ops *ops;
|
2015-10-29 12:27:37 +00:00
|
|
|
const struct wmi_peer_flags_map *peer_flags;
|
2013-09-26 15:47:11 +00:00
|
|
|
|
2018-07-25 07:59:45 +00:00
|
|
|
u32 mgmt_max_num_pending_tx;
|
|
|
|
|
|
|
|
/* Protected by data_lock */
|
|
|
|
struct idr mgmt_pending_tx;
|
|
|
|
|
2013-09-26 15:47:11 +00:00
|
|
|
u32 num_mem_chunks;
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
u32 rx_decap_mode;
|
2014-09-18 13:21:24 +00:00
|
|
|
struct ath10k_mem_chunk mem_chunks[WMI_MAX_MEM_REQS];
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2014-09-25 10:33:48 +00:00
|
|
|
struct ath10k_fw_stats_peer {
|
2014-09-25 10:33:50 +00:00
|
|
|
struct list_head list;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
u8 peer_macaddr[ETH_ALEN];
|
|
|
|
u32 peer_rssi;
|
|
|
|
u32 peer_tx_rate;
|
2014-03-28 12:35:15 +00:00
|
|
|
u32 peer_rx_rate; /* 10x only */
|
2019-02-26 09:53:16 +00:00
|
|
|
u64 rx_duration;
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2016-06-30 12:23:47 +00:00
|
|
|
struct ath10k_fw_extd_stats_peer {
|
|
|
|
struct list_head list;
|
|
|
|
|
|
|
|
u8 peer_macaddr[ETH_ALEN];
|
2019-03-12 11:17:50 +00:00
|
|
|
u64 rx_duration;
|
2016-06-30 12:23:47 +00:00
|
|
|
};
|
|
|
|
|
2015-02-15 14:50:40 +00:00
|
|
|
struct ath10k_fw_stats_vdev {
|
|
|
|
struct list_head list;
|
|
|
|
|
|
|
|
u32 vdev_id;
|
|
|
|
u32 beacon_snr;
|
|
|
|
u32 data_snr;
|
|
|
|
u32 num_tx_frames[4];
|
|
|
|
u32 num_rx_frames;
|
|
|
|
u32 num_tx_frames_retries[4];
|
|
|
|
u32 num_tx_frames_failures[4];
|
|
|
|
u32 num_rts_fail;
|
|
|
|
u32 num_rts_success;
|
|
|
|
u32 num_rx_err;
|
|
|
|
u32 num_rx_discard;
|
|
|
|
u32 num_tx_not_acked;
|
|
|
|
u32 tx_rate_history[10];
|
|
|
|
u32 beacon_rssi_history[10];
|
|
|
|
};
|
|
|
|
|
2018-03-28 09:40:24 +00:00
|
|
|
struct ath10k_fw_stats_vdev_extd {
|
|
|
|
struct list_head list;
|
|
|
|
|
|
|
|
u32 vdev_id;
|
|
|
|
u32 ppdu_aggr_cnt;
|
|
|
|
u32 ppdu_noack;
|
|
|
|
u32 mpdu_queued;
|
|
|
|
u32 ppdu_nonaggr_cnt;
|
|
|
|
u32 mpdu_sw_requeued;
|
|
|
|
u32 mpdu_suc_retry;
|
|
|
|
u32 mpdu_suc_multitry;
|
|
|
|
u32 mpdu_fail_retry;
|
|
|
|
u32 tx_ftm_suc;
|
|
|
|
u32 tx_ftm_suc_retry;
|
|
|
|
u32 tx_ftm_fail;
|
|
|
|
u32 rx_ftmr_cnt;
|
|
|
|
u32 rx_ftmr_dup_cnt;
|
|
|
|
u32 rx_iftmr_cnt;
|
|
|
|
u32 rx_iftmr_dup_cnt;
|
|
|
|
};
|
|
|
|
|
2014-09-25 10:33:50 +00:00
|
|
|
struct ath10k_fw_stats_pdev {
|
|
|
|
struct list_head list;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
/* PDEV stats */
|
|
|
|
s32 ch_noise_floor;
|
2016-09-26 18:56:26 +00:00
|
|
|
u32 tx_frame_count; /* Cycles spent transmitting frames */
|
|
|
|
u32 rx_frame_count; /* Cycles spent receiving frames */
|
|
|
|
u32 rx_clear_count; /* Total channel busy time, evidently */
|
|
|
|
u32 cycle_count; /* Total on-channel time */
|
2013-06-12 17:52:10 +00:00
|
|
|
u32 phy_err_count;
|
|
|
|
u32 chan_tx_power;
|
2014-03-28 12:35:16 +00:00
|
|
|
u32 ack_rx_bad;
|
|
|
|
u32 rts_bad;
|
|
|
|
u32 rts_good;
|
|
|
|
u32 fcs_bad;
|
|
|
|
u32 no_beacons;
|
|
|
|
u32 mib_int_count;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
/* PDEV TX stats */
|
|
|
|
s32 comp_queued;
|
|
|
|
s32 comp_delivered;
|
|
|
|
s32 msdu_enqued;
|
|
|
|
s32 mpdu_enqued;
|
|
|
|
s32 wmm_drop;
|
|
|
|
s32 local_enqued;
|
|
|
|
s32 local_freed;
|
|
|
|
s32 hw_queued;
|
|
|
|
s32 hw_reaped;
|
|
|
|
s32 underrun;
|
2015-10-28 19:38:33 +00:00
|
|
|
u32 hw_paused;
|
2013-06-12 17:52:10 +00:00
|
|
|
s32 tx_abort;
|
|
|
|
s32 mpdus_requed;
|
|
|
|
u32 tx_ko;
|
|
|
|
u32 data_rc;
|
|
|
|
u32 self_triggers;
|
|
|
|
u32 sw_retry_failure;
|
|
|
|
u32 illgl_rate_phy_err;
|
|
|
|
u32 pdev_cont_xretry;
|
|
|
|
u32 pdev_tx_timeout;
|
|
|
|
u32 pdev_resets;
|
|
|
|
u32 phy_underrun;
|
|
|
|
u32 txop_ovf;
|
2015-10-28 19:38:33 +00:00
|
|
|
u32 seq_posted;
|
|
|
|
u32 seq_failed_queueing;
|
|
|
|
u32 seq_completed;
|
|
|
|
u32 seq_restarted;
|
|
|
|
u32 mu_seq_posted;
|
|
|
|
u32 mpdus_sw_flush;
|
|
|
|
u32 mpdus_hw_filter;
|
|
|
|
u32 mpdus_truncated;
|
|
|
|
u32 mpdus_ack_failed;
|
|
|
|
u32 mpdus_expired;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
/* PDEV RX stats */
|
|
|
|
s32 mid_ppdu_route_change;
|
|
|
|
s32 status_rcvd;
|
|
|
|
s32 r0_frags;
|
|
|
|
s32 r1_frags;
|
|
|
|
s32 r2_frags;
|
|
|
|
s32 r3_frags;
|
|
|
|
s32 htt_msdus;
|
|
|
|
s32 htt_mpdus;
|
|
|
|
s32 loc_msdus;
|
|
|
|
s32 loc_mpdus;
|
|
|
|
s32 oversize_amsdu;
|
|
|
|
s32 phy_errs;
|
|
|
|
s32 phy_err_drop;
|
|
|
|
s32 mpdu_errs;
|
2015-10-28 19:38:33 +00:00
|
|
|
s32 rx_ovfl_errs;
|
2014-09-25 10:33:50 +00:00
|
|
|
};
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2014-09-25 10:33:50 +00:00
|
|
|
struct ath10k_fw_stats {
|
2016-06-30 12:23:47 +00:00
|
|
|
bool extended;
|
2014-09-25 10:33:50 +00:00
|
|
|
struct list_head pdevs;
|
2015-02-15 14:50:40 +00:00
|
|
|
struct list_head vdevs;
|
2014-09-25 10:33:50 +00:00
|
|
|
struct list_head peers;
|
2016-06-30 12:23:47 +00:00
|
|
|
struct list_head peers_extd;
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2015-10-05 14:56:38 +00:00
|
|
|
#define ATH10K_TPC_TABLE_TYPE_FLAG 1
|
|
|
|
#define ATH10K_TPC_PREAM_TABLE_END 0xFFFF
|
|
|
|
|
|
|
|
struct ath10k_tpc_table {
|
|
|
|
u32 pream_idx[WMI_TPC_RATE_MAX];
|
|
|
|
u8 rate_code[WMI_TPC_RATE_MAX];
|
|
|
|
char tpc_value[WMI_TPC_RATE_MAX][WMI_TPC_TX_N_CHAIN * WMI_TPC_BUF_SIZE];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_tpc_stats {
|
|
|
|
u32 reg_domain;
|
|
|
|
u32 chan_freq;
|
|
|
|
u32 phy_mode;
|
|
|
|
u32 twice_antenna_reduction;
|
|
|
|
u32 twice_max_rd_power;
|
|
|
|
s32 twice_antenna_gain;
|
|
|
|
u32 power_limit;
|
|
|
|
u32 num_tx_chain;
|
|
|
|
u32 ctl;
|
|
|
|
u32 rate_max;
|
|
|
|
u8 flag[WMI_TPC_FLAG];
|
|
|
|
struct ath10k_tpc_table tpc_table[WMI_TPC_FLAG];
|
|
|
|
};
|
|
|
|
|
2018-03-14 10:14:08 +00:00
|
|
|
struct ath10k_tpc_table_final {
|
|
|
|
u32 pream_idx[WMI_TPC_FINAL_RATE_MAX];
|
|
|
|
u8 rate_code[WMI_TPC_FINAL_RATE_MAX];
|
|
|
|
char tpc_value[WMI_TPC_FINAL_RATE_MAX][WMI_TPC_TX_N_CHAIN * WMI_TPC_BUF_SIZE];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_tpc_stats_final {
|
|
|
|
u32 reg_domain;
|
|
|
|
u32 chan_freq;
|
|
|
|
u32 phy_mode;
|
|
|
|
u32 twice_antenna_reduction;
|
|
|
|
u32 twice_max_rd_power;
|
|
|
|
s32 twice_antenna_gain;
|
|
|
|
u32 power_limit;
|
|
|
|
u32 num_tx_chain;
|
|
|
|
u32 ctl;
|
|
|
|
u32 rate_max;
|
|
|
|
u8 flag[WMI_TPC_FLAG];
|
|
|
|
struct ath10k_tpc_table_final tpc_table_final[WMI_TPC_FLAG];
|
|
|
|
};
|
|
|
|
|
2013-11-20 07:59:41 +00:00
|
|
|
struct ath10k_dfs_stats {
|
|
|
|
u32 phy_errors;
|
|
|
|
u32 pulses_total;
|
|
|
|
u32 pulses_detected;
|
|
|
|
u32 pulses_discarded;
|
|
|
|
u32 radar_detected;
|
|
|
|
};
|
|
|
|
|
2018-05-15 09:09:49 +00:00
|
|
|
enum ath10k_radar_confirmation_state {
|
|
|
|
ATH10K_RADAR_CONFIRMATION_IDLE = 0,
|
|
|
|
ATH10K_RADAR_CONFIRMATION_INPROGRESS,
|
|
|
|
ATH10K_RADAR_CONFIRMATION_STOPPED,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_radar_found_info {
|
|
|
|
u32 pri_min;
|
|
|
|
u32 pri_max;
|
|
|
|
u32 width_min;
|
|
|
|
u32 width_max;
|
|
|
|
u32 sidx_min;
|
|
|
|
u32 sidx_max;
|
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
#define ATH10K_MAX_NUM_PEER_IDS (1 << 11) /* htt rx_desc limit */
|
|
|
|
|
|
|
|
struct ath10k_peer {
|
|
|
|
struct list_head list;
|
2016-03-06 14:14:30 +00:00
|
|
|
struct ieee80211_vif *vif;
|
|
|
|
struct ieee80211_sta *sta;
|
|
|
|
|
2017-01-12 15:14:30 +00:00
|
|
|
bool removed;
|
2013-06-12 17:52:10 +00:00
|
|
|
int vdev_id;
|
|
|
|
u8 addr[ETH_ALEN];
|
|
|
|
DECLARE_BITMAP(peer_ids, ATH10K_MAX_NUM_PEER_IDS);
|
2014-11-25 06:16:59 +00:00
|
|
|
|
|
|
|
/* protected by ar->data_lock */
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
|
2019-04-26 06:41:07 +00:00
|
|
|
union htt_rx_pn_t tids_last_pn[ATH10K_TXRX_NUM_EXT_TIDS];
|
|
|
|
bool tids_last_pn_valid[ATH10K_TXRX_NUM_EXT_TIDS];
|
|
|
|
union htt_rx_pn_t frag_tids_last_pn[ATH10K_TXRX_NUM_EXT_TIDS];
|
|
|
|
u32 frag_tids_seq[ATH10K_TXRX_NUM_EXT_TIDS];
|
|
|
|
struct {
|
|
|
|
enum htt_security_types sec_type;
|
|
|
|
int pn_len;
|
|
|
|
} rx_pn[ATH10K_HTT_TXRX_PEER_SECURITY_MAX];
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2016-03-06 14:14:34 +00:00
|
|
|
struct ath10k_txq {
|
|
|
|
struct list_head list;
|
2016-03-06 14:14:41 +00:00
|
|
|
unsigned long num_fw_queued;
|
2016-03-06 14:14:43 +00:00
|
|
|
unsigned long num_push_allowed;
|
2016-03-06 14:14:34 +00:00
|
|
|
};
|
|
|
|
|
2018-03-14 10:14:06 +00:00
|
|
|
enum ath10k_pkt_rx_err {
|
|
|
|
ATH10K_PKT_RX_ERR_FCS,
|
|
|
|
ATH10K_PKT_RX_ERR_TKIP,
|
|
|
|
ATH10K_PKT_RX_ERR_CRYPT,
|
|
|
|
ATH10K_PKT_RX_ERR_PEER_IDX_INVAL,
|
|
|
|
ATH10K_PKT_RX_ERR_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ath10k_ampdu_subfrm_num {
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_10,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_20,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_30,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_40,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_50,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_60,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_MORE,
|
|
|
|
ATH10K_AMPDU_SUBFRM_NUM_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ath10k_amsdu_subfrm_num {
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_1,
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_2,
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_3,
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_4,
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_MORE,
|
|
|
|
ATH10K_AMSDU_SUBFRM_NUM_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_sta_tid_stats {
|
2019-02-19 12:11:43 +00:00
|
|
|
unsigned long rx_pkt_from_fw;
|
|
|
|
unsigned long rx_pkt_unchained;
|
|
|
|
unsigned long rx_pkt_drop_chained;
|
|
|
|
unsigned long rx_pkt_drop_filter;
|
|
|
|
unsigned long rx_pkt_err[ATH10K_PKT_RX_ERR_MAX];
|
|
|
|
unsigned long rx_pkt_queued_for_mac;
|
|
|
|
unsigned long rx_pkt_ampdu[ATH10K_AMPDU_SUBFRM_NUM_MAX];
|
|
|
|
unsigned long rx_pkt_amsdu[ATH10K_AMSDU_SUBFRM_NUM_MAX];
|
2018-03-14 10:14:06 +00:00
|
|
|
};
|
|
|
|
|
2018-09-04 06:45:15 +00:00
|
|
|
enum ath10k_counter_type {
|
|
|
|
ATH10K_COUNTER_TYPE_BYTES,
|
|
|
|
ATH10K_COUNTER_TYPE_PKTS,
|
|
|
|
ATH10K_COUNTER_TYPE_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ath10k_stats_type {
|
|
|
|
ATH10K_STATS_TYPE_SUCC,
|
|
|
|
ATH10K_STATS_TYPE_FAIL,
|
|
|
|
ATH10K_STATS_TYPE_RETRY,
|
|
|
|
ATH10K_STATS_TYPE_AMPDU,
|
|
|
|
ATH10K_STATS_TYPE_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_htt_data_stats {
|
|
|
|
u64 legacy[ATH10K_COUNTER_TYPE_MAX][ATH10K_LEGACY_NUM];
|
|
|
|
u64 ht[ATH10K_COUNTER_TYPE_MAX][ATH10K_HT_MCS_NUM];
|
|
|
|
u64 vht[ATH10K_COUNTER_TYPE_MAX][ATH10K_VHT_MCS_NUM];
|
|
|
|
u64 bw[ATH10K_COUNTER_TYPE_MAX][ATH10K_BW_NUM];
|
|
|
|
u64 nss[ATH10K_COUNTER_TYPE_MAX][ATH10K_NSS_NUM];
|
|
|
|
u64 gi[ATH10K_COUNTER_TYPE_MAX][ATH10K_GI_NUM];
|
2018-10-12 06:03:28 +00:00
|
|
|
u64 rate_table[ATH10K_COUNTER_TYPE_MAX][ATH10K_RATE_TABLE_NUM];
|
2018-09-04 06:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_htt_tx_stats {
|
|
|
|
struct ath10k_htt_data_stats stats[ATH10K_STATS_TYPE_MAX];
|
|
|
|
u64 tx_duration;
|
|
|
|
u64 ba_fails;
|
|
|
|
u64 ack_fails;
|
|
|
|
};
|
|
|
|
|
2014-02-14 13:49:48 +00:00
|
|
|
struct ath10k_sta {
|
|
|
|
struct ath10k_vif *arvif;
|
|
|
|
|
|
|
|
/* the following are protected by ar->data_lock */
|
|
|
|
u32 changed; /* IEEE80211_RC_* */
|
|
|
|
u32 bw;
|
|
|
|
u32 nss;
|
|
|
|
u32 smps;
|
2016-03-06 14:14:27 +00:00
|
|
|
u16 peer_id;
|
2016-11-23 14:58:10 +00:00
|
|
|
struct rate_info txrate;
|
2018-12-20 07:53:28 +00:00
|
|
|
struct ieee80211_tx_info tx_info;
|
2019-02-11 16:47:52 +00:00
|
|
|
u32 last_tx_bitrate;
|
2014-02-14 13:49:48 +00:00
|
|
|
|
|
|
|
struct work_struct update_wk;
|
2017-12-05 13:31:23 +00:00
|
|
|
u64 rx_duration;
|
2018-09-04 06:45:15 +00:00
|
|
|
struct ath10k_htt_tx_stats *tx_stats;
|
2015-01-12 12:07:27 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
|
|
|
/* protected by conf_mutex */
|
|
|
|
bool aggr_mode;
|
2018-03-14 10:14:06 +00:00
|
|
|
|
|
|
|
/* Protected with ar->data_lock */
|
|
|
|
struct ath10k_sta_tid_stats tid_stats[IEEE80211_NUM_TIDS + 1];
|
2015-01-12 12:07:27 +00:00
|
|
|
#endif
|
2018-09-18 06:34:27 +00:00
|
|
|
/* Protected with ar->data_lock */
|
|
|
|
u32 peer_ps_state;
|
2014-02-14 13:49:48 +00:00
|
|
|
};
|
|
|
|
|
2019-06-03 14:41:33 +00:00
|
|
|
#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5 * HZ)
|
|
|
|
#define ATH10K_VDEV_DELETE_TIMEOUT_HZ (5 * HZ)
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2015-01-29 12:29:52 +00:00
|
|
|
enum ath10k_beacon_state {
|
|
|
|
ATH10K_BEACON_SCHEDULED = 0,
|
|
|
|
ATH10K_BEACON_SENDING,
|
|
|
|
ATH10K_BEACON_SENT,
|
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k_vif {
|
2013-10-16 12:44:45 +00:00
|
|
|
struct list_head list;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
u32 vdev_id;
|
2016-03-06 14:14:27 +00:00
|
|
|
u16 peer_id;
|
2013-06-12 17:52:10 +00:00
|
|
|
enum wmi_vdev_type vdev_type;
|
|
|
|
enum wmi_vdev_subtype vdev_subtype;
|
|
|
|
u32 beacon_interval;
|
|
|
|
u32 dtim_period;
|
2013-09-13 12:16:56 +00:00
|
|
|
struct sk_buff *beacon;
|
2014-01-23 11:48:21 +00:00
|
|
|
/* protected by data_lock */
|
2015-01-29 12:29:52 +00:00
|
|
|
enum ath10k_beacon_state beacon_state;
|
2014-09-18 08:18:02 +00:00
|
|
|
void *beacon_buf;
|
|
|
|
dma_addr_t beacon_paddr;
|
2015-03-31 10:26:23 +00:00
|
|
|
unsigned long tx_paused; /* arbitrary values defined by target */
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
struct ath10k *ar;
|
|
|
|
struct ieee80211_vif *vif;
|
|
|
|
|
2014-01-23 10:38:25 +00:00
|
|
|
bool is_started;
|
|
|
|
bool is_up;
|
2014-08-02 06:12:54 +00:00
|
|
|
bool spectral_enabled;
|
2015-02-13 12:30:16 +00:00
|
|
|
bool ps;
|
2014-01-23 10:38:25 +00:00
|
|
|
u32 aid;
|
|
|
|
u8 bssid[ETH_ALEN];
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1];
|
2015-01-29 11:50:38 +00:00
|
|
|
s8 def_wep_key_idx;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
u16 tx_seq_no;
|
|
|
|
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
u32 uapsd;
|
|
|
|
} sta;
|
|
|
|
struct {
|
2015-06-22 14:52:21 +00:00
|
|
|
/* 512 stations */
|
|
|
|
u8 tim_bitmap[64];
|
2013-06-12 17:52:10 +00:00
|
|
|
u8 tim_len;
|
|
|
|
u32 ssid_len;
|
|
|
|
u8 ssid[IEEE80211_MAX_SSID_LEN];
|
|
|
|
bool hidden_ssid;
|
|
|
|
/* P2P_IE with NoA attribute for P2P_GO case */
|
|
|
|
u32 noa_len;
|
|
|
|
u8 *noa_data;
|
|
|
|
} ap;
|
|
|
|
} u;
|
2014-01-08 08:08:33 +00:00
|
|
|
|
2014-03-11 10:58:00 +00:00
|
|
|
bool use_cts_prot;
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
bool nohwcrypt;
|
2014-03-11 10:58:00 +00:00
|
|
|
int num_legacy_stations;
|
2014-10-21 07:40:15 +00:00
|
|
|
int txpower;
|
2019-02-11 16:47:54 +00:00
|
|
|
bool ftm_responder;
|
2015-01-19 08:53:41 +00:00
|
|
|
struct wmi_wmm_params_all_arg wmm_params;
|
2015-03-05 14:02:17 +00:00
|
|
|
struct work_struct ap_csa_work;
|
2015-03-10 14:22:01 +00:00
|
|
|
struct delayed_work connection_loss_work;
|
2015-04-21 17:42:58 +00:00
|
|
|
struct cfg80211_bitrate_mask bitrate_mask;
|
ath10k: fix failure to set multiple fixed rate
Currently, below fixed rate commands are broken,
iw wlanx set bitrates legacy-<2.4|5> ht-mcs-<2.4|5> vht-mcs-<2.4|5> \
<NSS:MCSx>
iw wlanx set bitrates legacy-<2.4|5> <legacy rate> ht-mcs-<2.4|5> \
vht-mcs-<2.4|5> <NSS:MCSx>
There are two methods to set fixed rate, both failed,
- Use vdev fixed rate command
This command only support one single rate, but it's broken due to
mac80211 change commit e8e4f5280ddd ("mac80211: reject/clear user
rate mask if not usable"), which requires user to specify at least
one legacy rate. So we can't use this command to set ht/vht single
rate any more.
- Use peer_assoc command
This command can update rx capability for multiple rates, it will
work fine for ht mcs rates, as each supported mcs can be advertised
in ht_mcs index mask. But this will not work with vht rates because,
as per the vht mcs capability advertisement, there are only two bits
to indicate the supported mcs. E.g. only support 0-7, 0-8, 0-9.
So introduced new WMI command: WMI_PEER_PARAM_FIXED_RATE. After peer
assoc, the peer fixed rate cmd will work for that specific peer.
Remaining peers will use auto rate. If both vdev fixed rate and peer
fixed rates are given, peer fixed rate will take effect to peers for
which this cmd is given. Remaining peers in that vdev, will use vdev
fixed rate.
Tested HW: QCA9984
Tested FW: 10.4-3.9.0.2-00035
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-05-29 08:13:28 +00:00
|
|
|
|
|
|
|
/* For setting VHT peer fixed rate, protected by conf_mutex */
|
|
|
|
int vht_num_rates;
|
|
|
|
u8 vht_pfr;
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_vif_iter {
|
|
|
|
u32 vdev_id;
|
|
|
|
struct ath10k_vif *arvif;
|
|
|
|
};
|
|
|
|
|
2017-01-16 15:31:08 +00:00
|
|
|
/* Copy Engine register dump, protected by ce-lock */
|
|
|
|
struct ath10k_ce_crash_data {
|
|
|
|
__le32 base_addr;
|
|
|
|
__le32 src_wr_idx;
|
|
|
|
__le32 src_r_idx;
|
|
|
|
__le32 dst_wr_idx;
|
|
|
|
__le32 dst_r_idx;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_ce_crash_hdr {
|
|
|
|
__le32 ce_count;
|
|
|
|
__le32 reserved[3]; /* for future use */
|
|
|
|
struct ath10k_ce_crash_data entries[];
|
|
|
|
};
|
|
|
|
|
2017-12-22 13:39:32 +00:00
|
|
|
#define MAX_MEM_DUMP_TYPE 5
|
|
|
|
|
2014-08-25 05:37:32 +00:00
|
|
|
/* used for crash-dump storage, protected by data-lock */
|
|
|
|
struct ath10k_fw_crash_data {
|
2017-08-02 13:57:25 +00:00
|
|
|
guid_t guid;
|
2017-11-27 11:49:51 +00:00
|
|
|
struct timespec64 timestamp;
|
2014-08-25 05:37:32 +00:00
|
|
|
__le32 registers[REG_DUMP_COUNT_QCA988X];
|
2017-01-16 15:31:08 +00:00
|
|
|
struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];
|
2017-12-22 13:39:32 +00:00
|
|
|
|
|
|
|
u8 *ramdump_buf;
|
|
|
|
size_t ramdump_buf_len;
|
2014-08-25 05:37:32 +00:00
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k_debug {
|
|
|
|
struct dentry *debugfs_phy;
|
|
|
|
|
2014-09-25 10:33:48 +00:00
|
|
|
struct ath10k_fw_stats fw_stats;
|
|
|
|
struct completion fw_stats_complete;
|
2014-09-25 10:33:50 +00:00
|
|
|
bool fw_stats_done;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2013-09-03 08:44:10 +00:00
|
|
|
unsigned long htt_stats_mask;
|
2019-02-27 11:24:42 +00:00
|
|
|
unsigned long reset_htt_stats;
|
2013-09-03 08:44:10 +00:00
|
|
|
struct delayed_work htt_stats_dwork;
|
2013-11-20 07:59:41 +00:00
|
|
|
struct ath10k_dfs_stats dfs_stats;
|
|
|
|
struct ath_dfs_pool_stats dfs_pool_stats;
|
2014-01-03 10:59:31 +00:00
|
|
|
|
2015-10-05 14:56:38 +00:00
|
|
|
/* used for tpc-dump storage, protected by data-lock */
|
|
|
|
struct ath10k_tpc_stats *tpc_stats;
|
2018-03-14 10:14:08 +00:00
|
|
|
struct ath10k_tpc_stats_final *tpc_stats_final;
|
2015-10-05 14:56:38 +00:00
|
|
|
|
|
|
|
struct completion tpc_complete;
|
|
|
|
|
2014-10-03 05:02:33 +00:00
|
|
|
/* protected by conf_mutex */
|
2016-08-23 10:05:36 +00:00
|
|
|
u64 fw_dbglog_mask;
|
2015-01-29 09:06:52 +00:00
|
|
|
u32 fw_dbglog_level;
|
2014-11-25 10:24:33 +00:00
|
|
|
u32 reg_addr;
|
2014-12-02 11:07:14 +00:00
|
|
|
u32 nf_cal_period;
|
2016-10-10 16:00:04 +00:00
|
|
|
void *cal_data;
|
2018-09-04 06:45:14 +00:00
|
|
|
u32 enable_extd_tx_stats;
|
2019-06-03 15:14:52 +00:00
|
|
|
u8 fw_dbglog_mode;
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2013-07-16 07:38:52 +00:00
|
|
|
enum ath10k_state {
|
|
|
|
ATH10K_STATE_OFF = 0,
|
|
|
|
ATH10K_STATE_ON,
|
2013-07-16 07:54:35 +00:00
|
|
|
|
|
|
|
/* When doing firmware recovery the device is first powered down.
|
|
|
|
* mac80211 is supposed to call in to start() hook later on. It is
|
|
|
|
* however possible that driver unloading and firmware crash overlap.
|
|
|
|
* mac80211 can wait on conf_mutex in stop() while the device is
|
|
|
|
* stopped in ath10k_core_restart() work holding conf_mutex. The state
|
|
|
|
* RESTARTED means that the device is up and mac80211 has started hw
|
|
|
|
* reconfiguration. Once mac80211 is done with the reconfiguration we
|
2017-02-20 14:38:50 +00:00
|
|
|
* set the state to STATE_ON in reconfig_complete().
|
|
|
|
*/
|
2013-07-16 07:54:35 +00:00
|
|
|
ATH10K_STATE_RESTARTING,
|
|
|
|
ATH10K_STATE_RESTARTED,
|
|
|
|
|
|
|
|
/* The device has crashed while restarting hw. This state is like ON
|
|
|
|
* but commands are blocked in HTC and -ECOMM response is given. This
|
|
|
|
* prevents completion timeouts and makes the driver more responsive to
|
2017-02-20 14:38:50 +00:00
|
|
|
* userspace commands. This is also prevents recursive recovery.
|
|
|
|
*/
|
2013-07-16 07:54:35 +00:00
|
|
|
ATH10K_STATE_WEDGED,
|
2014-09-10 15:23:30 +00:00
|
|
|
|
|
|
|
/* factory tests */
|
|
|
|
ATH10K_STATE_UTF,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ath10k_firmware_mode {
|
|
|
|
/* the default mode, standard 802.11 functionality */
|
|
|
|
ATH10K_FIRMWARE_MODE_NORMAL,
|
|
|
|
|
|
|
|
/* factory tests etc */
|
|
|
|
ATH10K_FIRMWARE_MODE_UTF,
|
2013-07-16 07:38:52 +00:00
|
|
|
};
|
|
|
|
|
2013-08-09 08:13:33 +00:00
|
|
|
enum ath10k_fw_features {
|
|
|
|
/* wmi_mgmt_rx_hdr contains extra RSSI information */
|
|
|
|
ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0,
|
|
|
|
|
2014-12-03 08:10:08 +00:00
|
|
|
/* Firmware from 10X branch. Deprecated, don't use in new code. */
|
2013-09-26 15:47:05 +00:00
|
|
|
ATH10K_FW_FEATURE_WMI_10X = 1,
|
|
|
|
|
2013-09-26 15:47:12 +00:00
|
|
|
/* firmware support tx frame management over WMI, otherwise it's HTT */
|
|
|
|
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2,
|
|
|
|
|
2013-12-10 15:20:40 +00:00
|
|
|
/* Firmware does not support P2P */
|
|
|
|
ATH10K_FW_FEATURE_NO_P2P = 3,
|
|
|
|
|
2014-12-03 08:10:08 +00:00
|
|
|
/* Firmware 10.2 feature bit. The ATH10K_FW_FEATURE_WMI_10X feature
|
|
|
|
* bit is required to be set as well. Deprecated, don't use in new
|
|
|
|
* code.
|
2014-07-25 11:32:17 +00:00
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_WMI_10_2 = 4,
|
|
|
|
|
2015-02-13 12:30:16 +00:00
|
|
|
/* Some firmware revisions lack proper multi-interface client powersave
|
|
|
|
* implementation. Enabling PS could result in connection drops,
|
|
|
|
* traffic stalls, etc.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_MULTI_VIF_PS_SUPPORT = 5,
|
|
|
|
|
2015-03-23 15:32:53 +00:00
|
|
|
/* Some firmware revisions have an incomplete WoWLAN implementation
|
|
|
|
* despite WMI service bit being advertised. This feature flag is used
|
|
|
|
* to distinguish whether WoWLAN is really supported or not.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_WOWLAN_SUPPORT = 6,
|
|
|
|
|
2015-04-28 17:19:30 +00:00
|
|
|
/* Don't trust error code from otp.bin */
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
ATH10K_FW_FEATURE_IGNORE_OTP_RESULT = 7,
|
2015-04-28 17:19:30 +00:00
|
|
|
|
2015-05-19 12:09:34 +00:00
|
|
|
/* Some firmware revisions pad 4th hw address to 4 byte boundary making
|
|
|
|
* it 8 bytes long in Native Wifi Rx decap.
|
|
|
|
*/
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
ATH10K_FW_FEATURE_NO_NWIFI_DECAP_4ADDR_PADDING = 8,
|
2015-05-19 12:09:34 +00:00
|
|
|
|
2015-05-29 14:51:53 +00:00
|
|
|
/* Firmware supports bypassing PLL setting on init. */
|
|
|
|
ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT = 9,
|
|
|
|
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
/* Raw mode support. If supported, FW supports receiving and trasmitting
|
|
|
|
* frames in raw mode.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_RAW_MODE_SUPPORT = 10,
|
|
|
|
|
2015-10-21 08:49:18 +00:00
|
|
|
/* Firmware Supports Adaptive CCA*/
|
|
|
|
ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA = 11,
|
|
|
|
|
2015-10-29 12:27:42 +00:00
|
|
|
/* Firmware supports management frame protection */
|
|
|
|
ATH10K_FW_FEATURE_MFP_SUPPORT = 12,
|
|
|
|
|
2016-01-21 13:13:25 +00:00
|
|
|
/* Firmware supports pull-push model where host shares it's software
|
|
|
|
* queue state with firmware and firmware generates fetch requests
|
|
|
|
* telling host which queues to dequeue tx from.
|
|
|
|
*
|
|
|
|
* Primary function of this is improved MU-MIMO performance with
|
|
|
|
* multiple clients.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_PEER_FLOW_CONTROL = 13,
|
|
|
|
|
2016-05-27 14:45:58 +00:00
|
|
|
/* Firmware supports BT-Coex without reloading firmware via pdev param.
|
|
|
|
* To support Bluetooth coexistence pdev param, WMI_COEX_GPIO_SUPPORT of
|
|
|
|
* extended resource config should be enabled always. This firmware IE
|
|
|
|
* is used to configure WMI_COEX_GPIO_SUPPORT.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_BTCOEX_PARAM = 14,
|
|
|
|
|
2016-11-09 01:40:57 +00:00
|
|
|
/* Unused flag and proven to be not working, enable this if you want
|
|
|
|
* to experiment sending NULL func data frames in HTT TX
|
2016-08-26 08:12:20 +00:00
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR = 15,
|
|
|
|
|
2016-11-23 14:58:11 +00:00
|
|
|
/* Firmware allow other BSS mesh broadcast/multicast frames without
|
|
|
|
* creating monitor interface. Appropriate rxfilters are programmed for
|
|
|
|
* mesh vdev by firmware itself. This feature flags will be used for
|
|
|
|
* not creating monitor vdev while configuring mesh node.
|
|
|
|
*/
|
|
|
|
ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST = 16,
|
|
|
|
|
2017-10-04 09:22:57 +00:00
|
|
|
/* Firmware does not support power save in station mode. */
|
|
|
|
ATH10K_FW_FEATURE_NO_PS = 17,
|
|
|
|
|
2017-12-11 14:22:53 +00:00
|
|
|
/* Firmware allows management tx by reference instead of by value. */
|
|
|
|
ATH10K_FW_FEATURE_MGMT_TX_BY_REF = 18,
|
|
|
|
|
2017-12-21 16:16:49 +00:00
|
|
|
/* Firmware load is done externally, not by bmi */
|
|
|
|
ATH10K_FW_FEATURE_NON_BMI = 19,
|
|
|
|
|
2018-10-17 11:20:03 +00:00
|
|
|
/* Firmware sends only one chan_info event per channel */
|
|
|
|
ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL = 20,
|
|
|
|
|
ath10k: fix failure to set multiple fixed rate
Currently, below fixed rate commands are broken,
iw wlanx set bitrates legacy-<2.4|5> ht-mcs-<2.4|5> vht-mcs-<2.4|5> \
<NSS:MCSx>
iw wlanx set bitrates legacy-<2.4|5> <legacy rate> ht-mcs-<2.4|5> \
vht-mcs-<2.4|5> <NSS:MCSx>
There are two methods to set fixed rate, both failed,
- Use vdev fixed rate command
This command only support one single rate, but it's broken due to
mac80211 change commit e8e4f5280ddd ("mac80211: reject/clear user
rate mask if not usable"), which requires user to specify at least
one legacy rate. So we can't use this command to set ht/vht single
rate any more.
- Use peer_assoc command
This command can update rx capability for multiple rates, it will
work fine for ht mcs rates, as each supported mcs can be advertised
in ht_mcs index mask. But this will not work with vht rates because,
as per the vht mcs capability advertisement, there are only two bits
to indicate the supported mcs. E.g. only support 0-7, 0-8, 0-9.
So introduced new WMI command: WMI_PEER_PARAM_FIXED_RATE. After peer
assoc, the peer fixed rate cmd will work for that specific peer.
Remaining peers will use auto rate. If both vdev fixed rate and peer
fixed rates are given, peer fixed rate will take effect to peers for
which this cmd is given. Remaining peers in that vdev, will use vdev
fixed rate.
Tested HW: QCA9984
Tested FW: 10.4-3.9.0.2-00035
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-05-29 08:13:28 +00:00
|
|
|
/* Firmware allows setting peer fixed rate */
|
|
|
|
ATH10K_FW_FEATURE_PEER_FIXED_RATE = 21,
|
|
|
|
|
2013-08-09 08:13:33 +00:00
|
|
|
/* keep last */
|
|
|
|
ATH10K_FW_FEATURE_COUNT,
|
|
|
|
};
|
|
|
|
|
2013-11-20 07:59:47 +00:00
|
|
|
enum ath10k_dev_flags {
|
|
|
|
/* Indicates that ath10k device is during CAC phase of DFS */
|
|
|
|
ATH10K_CAC_RUNNING,
|
2014-05-23 10:28:47 +00:00
|
|
|
ATH10K_FLAG_CORE_REGISTERED,
|
2014-10-28 09:34:38 +00:00
|
|
|
|
|
|
|
/* Device has crashed and needs to restart. This indicates any pending
|
|
|
|
* waiters should immediately cancel instead of waiting for a time out.
|
|
|
|
*/
|
|
|
|
ATH10K_FLAG_CRASH_FLUSH,
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
|
|
|
|
/* Use Raw mode instead of native WiFi Tx/Rx encap mode.
|
|
|
|
* Raw mode supports both hardware and software crypto. Native WiFi only
|
|
|
|
* supports hardware crypto.
|
|
|
|
*/
|
|
|
|
ATH10K_FLAG_RAW_MODE,
|
|
|
|
|
|
|
|
/* Disable HW crypto engine */
|
|
|
|
ATH10K_FLAG_HW_CRYPTO_DISABLED,
|
2015-10-31 09:07:21 +00:00
|
|
|
|
|
|
|
/* Bluetooth coexistance enabled */
|
|
|
|
ATH10K_FLAG_BTCOEX,
|
2016-03-16 12:43:32 +00:00
|
|
|
|
|
|
|
/* Per Station statistics service */
|
|
|
|
ATH10K_FLAG_PEER_STATS,
|
2013-11-20 07:59:47 +00:00
|
|
|
};
|
|
|
|
|
2014-10-13 06:40:59 +00:00
|
|
|
enum ath10k_cal_mode {
|
|
|
|
ATH10K_CAL_MODE_FILE,
|
|
|
|
ATH10K_CAL_MODE_OTP,
|
2014-12-02 08:55:54 +00:00
|
|
|
ATH10K_CAL_MODE_DT,
|
2016-03-18 09:44:22 +00:00
|
|
|
ATH10K_PRE_CAL_MODE_FILE,
|
|
|
|
ATH10K_PRE_CAL_MODE_DT,
|
2016-06-02 14:59:50 +00:00
|
|
|
ATH10K_CAL_MODE_EEPROM,
|
2014-10-13 06:40:59 +00:00
|
|
|
};
|
|
|
|
|
ath10k: enable raw encap mode and software crypto engine
This patch enables raw Rx/Tx encap mode to support software based
crypto engine. This patch introduces a new module param 'cryptmode'.
cryptmode:
0: Use hardware crypto engine globally with native Wi-Fi mode TX/RX
encapsulation to the firmware. This is the default mode.
1: Use sofware crypto engine globally with raw mode TX/RX
encapsulation to the firmware.
Known limitation:
A-MSDU must be disabled for RAW Tx encap mode to perform well when
heavy traffic is applied.
Testing: (by Michal Kazior <michal.kazior@tieto.com>)
a) Performance Testing
cryptmode=1
ap=qca988x sta=killer1525
killer1525 -> qca988x 194.496 mbps [tcp1 ip4]
killer1525 -> qca988x 238.309 mbps [tcp5 ip4]
killer1525 -> qca988x 266.958 mbps [udp1 ip4]
killer1525 -> qca988x 477.468 mbps [udp5 ip4]
qca988x -> killer1525 301.378 mbps [tcp1 ip4]
qca988x -> killer1525 297.949 mbps [tcp5 ip4]
qca988x -> killer1525 331.351 mbps [udp1 ip4]
qca988x -> killer1525 371.528 mbps [udp5 ip4]
ap=killer1525 sta=qca988x
qca988x -> killer1525 331.447 mbps [tcp1 ip4]
qca988x -> killer1525 328.783 mbps [tcp5 ip4]
qca988x -> killer1525 375.309 mbps [udp1 ip4]
qca988x -> killer1525 403.379 mbps [udp5 ip4]
killer1525 -> qca988x 203.689 mbps [tcp1 ip4]
killer1525 -> qca988x 222.339 mbps [tcp5 ip4]
killer1525 -> qca988x 264.199 mbps [udp1 ip4]
killer1525 -> qca988x 479.371 mbps [udp5 ip4]
Note:
- only open network tested for RAW vs nwifi performance comparison
- killer1525 (qca6174 hw2.2) is 2x2 device (hence max 866mbps)
- used iperf
- OTA, devices a few cm apart from each other, no shielding
- tcpX/udpX, X - means number of threads used
Overview:
- relative Tx performance drop is seen but is within reasonable and
expected threshold (A-MSDU must be disabled with RAW Tx)
b) Connectivity Testing
cryptmode=1
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br OK
ap=iwl6205 sta1=qca988x crypto=open topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wep1 topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa topology-1ap1sta2br1vlan OK
ap=iwl6205 sta1=qca988x crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=open topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wep1 topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa topology-1ap1sta2br1vlan OK
ap=qca988x sta1=iwl6205 crypto=wpa-ccmp topology-1ap1sta2br1vlan OK
Note:
- each test takes all possible endpoint pairs and pings
- each pair-ping flushes arp table
- ip6 is used
c) Testbed Topology:
1ap1sta:
[ap] ---- [sta]
endpoints: ap, sta
1ap1sta2br:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
endpoints: veth0, veth2, br0, br1
note: STA works in 4addr mode, AP has wds_sta=1
1ap1sta2br1vlan:
[veth0] [ap] ---- [sta] [veth2]
| | | |
[veth1] | \ [veth3]
\ / \ /
[br0] [br1]
| |
[vlan0_id2] [vlan1_id2]
endpoints: vlan0_id2, vlan1_id2
note: STA works in 4addr mode, AP has wds_sta=1
Credits:
Thanks to Michal Kazior <michal.kazior@tieto.com> who helped find the
amsdu issue, contributed a workaround (already squashed into this
patch), and contributed the throughput and connectivity tests results.
Signed-off-by: David Liu <cfliu.tw@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Tested-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-07-24 17:25:32 +00:00
|
|
|
enum ath10k_crypt_mode {
|
|
|
|
/* Only use hardware crypto engine */
|
|
|
|
ATH10K_CRYPT_MODE_HW,
|
|
|
|
/* Only use software crypto engine */
|
|
|
|
ATH10K_CRYPT_MODE_SW,
|
|
|
|
};
|
|
|
|
|
2014-10-13 06:40:59 +00:00
|
|
|
static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)
|
|
|
|
{
|
|
|
|
switch (mode) {
|
|
|
|
case ATH10K_CAL_MODE_FILE:
|
|
|
|
return "file";
|
|
|
|
case ATH10K_CAL_MODE_OTP:
|
|
|
|
return "otp";
|
2014-12-02 08:55:54 +00:00
|
|
|
case ATH10K_CAL_MODE_DT:
|
|
|
|
return "dt";
|
2016-03-18 09:44:22 +00:00
|
|
|
case ATH10K_PRE_CAL_MODE_FILE:
|
|
|
|
return "pre-cal-file";
|
|
|
|
case ATH10K_PRE_CAL_MODE_DT:
|
|
|
|
return "pre-cal-dt";
|
2016-06-02 14:59:50 +00:00
|
|
|
case ATH10K_CAL_MODE_EEPROM:
|
|
|
|
return "eeprom";
|
2014-10-13 06:40:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return "unknown";
|
|
|
|
}
|
|
|
|
|
2014-08-05 12:54:44 +00:00
|
|
|
enum ath10k_scan_state {
|
|
|
|
ATH10K_SCAN_IDLE,
|
|
|
|
ATH10K_SCAN_STARTING,
|
|
|
|
ATH10K_SCAN_RUNNING,
|
|
|
|
ATH10K_SCAN_ABORTING,
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline const char *ath10k_scan_state_str(enum ath10k_scan_state state)
|
|
|
|
{
|
|
|
|
switch (state) {
|
|
|
|
case ATH10K_SCAN_IDLE:
|
|
|
|
return "idle";
|
|
|
|
case ATH10K_SCAN_STARTING:
|
|
|
|
return "starting";
|
|
|
|
case ATH10K_SCAN_RUNNING:
|
|
|
|
return "running";
|
|
|
|
case ATH10K_SCAN_ABORTING:
|
|
|
|
return "aborting";
|
|
|
|
}
|
|
|
|
|
|
|
|
return "unknown";
|
|
|
|
}
|
|
|
|
|
2015-03-31 10:26:23 +00:00
|
|
|
enum ath10k_tx_pause_reason {
|
|
|
|
ATH10K_TX_PAUSE_Q_FULL,
|
|
|
|
ATH10K_TX_PAUSE_MAX,
|
|
|
|
};
|
|
|
|
|
2016-04-20 16:44:51 +00:00
|
|
|
struct ath10k_fw_file {
|
|
|
|
const struct firmware *firmware;
|
|
|
|
|
2016-04-20 16:45:05 +00:00
|
|
|
char fw_version[ETHTOOL_FWVERS_LEN];
|
|
|
|
|
2016-04-20 16:45:18 +00:00
|
|
|
DECLARE_BITMAP(fw_features, ATH10K_FW_FEATURE_COUNT);
|
|
|
|
|
2016-04-20 16:45:33 +00:00
|
|
|
enum ath10k_fw_wmi_op_version wmi_op_version;
|
2016-04-20 16:45:47 +00:00
|
|
|
enum ath10k_fw_htt_op_version htt_op_version;
|
2016-04-20 16:45:33 +00:00
|
|
|
|
2016-04-20 16:44:51 +00:00
|
|
|
const void *firmware_data;
|
|
|
|
size_t firmware_len;
|
|
|
|
|
|
|
|
const void *otp_data;
|
|
|
|
size_t otp_len;
|
|
|
|
|
|
|
|
const void *codeswap_data;
|
|
|
|
size_t codeswap_len;
|
2016-08-19 10:37:39 +00:00
|
|
|
|
|
|
|
/* The original idea of struct ath10k_fw_file was that it only
|
|
|
|
* contains struct firmware and pointers to various parts (actual
|
|
|
|
* firmware binary, otp, metadata etc) of the file. This seg_info
|
|
|
|
* is actually created separate but as this is used similarly as
|
|
|
|
* the other firmware components it's more convenient to have it
|
|
|
|
* here.
|
|
|
|
*/
|
|
|
|
struct ath10k_swap_code_seg_info *firmware_swap_code_seg_info;
|
2016-04-20 16:44:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ath10k_fw_components {
|
|
|
|
const struct firmware *board;
|
|
|
|
const void *board_data;
|
|
|
|
size_t board_len;
|
ath10k: support extended board data download for dual-band QCA9984
To support dual-band variant of QCA9984, new extended board data (eBDF)
is introduced since existing board data ran out of space.
Below is the brief implementation & design detail,
----------------------------------------------------
1. New OTP changes to inform eBDF support in existing OTP download to
fetch board ID and chip ID. This is backward compatible and older
card sends 0 by default for eBDF support bit (bit 18 of OTP response) we
check in ath10k driver.
2. If eBDF is supported, then we need to fetch eBDF ID which is bundled
in downloaded board data. So again OTP is executed for knowing the eBDF ID.
This is done once we set 'board_data_initialized' bit. If eBDF ID
returned is zero, we continue booting with previous board data downloaded.
3. Based on the eBDF ID fetched, ath10k driver tries to download the
extended board data to a new offset ahead of already downloaded board
data address.
4. A new BD IE type, ATH10K_BD_IE_BOARD_EXT is added to differentiate in
bundling eBDF separately in board-2.bin and also to parse through
board bundle for eBDF download in ath10k boot.
5. If eBDF is not present in the board-2.bin bundle or when board ID is
zero, we do a fallback boot to "eboard.bin" in the same QCA9984/hw1.0 dir.
This is same as done to existing "board.bin" if board ID is not present
in board-2.bin bundle.
Current design is that eBDF size will be 2KB and eBDF ID will be
byte value.
Tested the above changes with dual-band variant of QCA9984 card. OTP
update needed for the test will be part of next FW release 10.4-3.6-xxxx.
Below are the logs with ath10k BOOT debugs enabled.
First OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for board id
boot get otp board id result 0x00040400 board_id 1 chip_id 0 ext_bid_support 1
..
Second OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for ext board id
boot get otp ext board id result 0x00000005 ext_board_id 5
boot using eboard name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
..
Extended board data download:
------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 65 62 6f 61 72 64 -id=0,bmi-eboard
00000020: 2d 69 64 3d 35 -id=5
boot found match for name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
boot found eboard data for 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
using board api 2
boot writing ext board data to addr 0xc3000
..
Fallback Extended board data download from "eboard.bin":
---------------------------------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 62 6f 61 72 64 2d -id=0,bmi-board-
00000020: 69 64 3d 31 30 id=10
failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-eboard-id=5 from ath10k/QCA9984/hw1.0/board-2.bin
boot fw request 'ath10k/QCA9984/hw1.0/eboard.bin': 0
using board api 1
boot writing ext board data to addr 0xc3000
..
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-03 17:07:53 +00:00
|
|
|
const struct firmware *ext_board;
|
|
|
|
const void *ext_board_data;
|
|
|
|
size_t ext_board_len;
|
2016-04-20 16:44:51 +00:00
|
|
|
|
|
|
|
struct ath10k_fw_file fw_file;
|
|
|
|
};
|
|
|
|
|
2016-11-23 14:58:10 +00:00
|
|
|
struct ath10k_per_peer_tx_stats {
|
|
|
|
u32 succ_bytes;
|
|
|
|
u32 retry_bytes;
|
|
|
|
u32 failed_bytes;
|
|
|
|
u8 ratecode;
|
|
|
|
u8 flags;
|
|
|
|
u16 peer_id;
|
|
|
|
u16 succ_pkts;
|
|
|
|
u16 retry_pkts;
|
|
|
|
u16 failed_pkts;
|
|
|
|
u16 duration;
|
|
|
|
u32 reserved1;
|
|
|
|
u32 reserved2;
|
|
|
|
};
|
|
|
|
|
2018-09-04 12:03:44 +00:00
|
|
|
enum ath10k_dev_type {
|
|
|
|
ATH10K_DEV_TYPE_LL,
|
|
|
|
ATH10K_DEV_TYPE_HL,
|
|
|
|
};
|
|
|
|
|
2018-09-04 12:03:19 +00:00
|
|
|
struct ath10k_bus_params {
|
|
|
|
u32 chip_id;
|
2018-09-04 12:03:44 +00:00
|
|
|
enum ath10k_dev_type dev_type;
|
2019-02-08 12:55:33 +00:00
|
|
|
bool link_can_suspend;
|
2019-04-19 07:28:54 +00:00
|
|
|
bool hl_msdu_ids;
|
2018-09-04 12:03:19 +00:00
|
|
|
};
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k {
|
|
|
|
struct ath_common ath_common;
|
|
|
|
struct ieee80211_hw *hw;
|
2016-07-18 20:22:18 +00:00
|
|
|
struct ieee80211_ops *ops;
|
2013-06-12 17:52:10 +00:00
|
|
|
struct device *dev;
|
|
|
|
u8 mac_addr[ETH_ALEN];
|
|
|
|
|
2015-01-24 10:14:49 +00:00
|
|
|
enum ath10k_hw_rev hw_rev;
|
2015-08-13 12:32:26 +00:00
|
|
|
u16 dev_id;
|
2013-09-01 08:22:14 +00:00
|
|
|
u32 chip_id;
|
2018-09-04 12:03:44 +00:00
|
|
|
enum ath10k_dev_type dev_type;
|
2013-06-12 17:52:10 +00:00
|
|
|
u32 target_version;
|
|
|
|
u8 fw_version_major;
|
|
|
|
u32 fw_version_minor;
|
|
|
|
u16 fw_version_release;
|
|
|
|
u16 fw_version_build;
|
2015-04-01 19:53:21 +00:00
|
|
|
u32 fw_stats_req_mask;
|
2013-06-12 17:52:10 +00:00
|
|
|
u32 phy_capability;
|
|
|
|
u32 hw_min_tx_power;
|
|
|
|
u32 hw_max_tx_power;
|
2016-09-28 12:11:58 +00:00
|
|
|
u32 hw_eeprom_rd;
|
2013-06-12 17:52:10 +00:00
|
|
|
u32 ht_cap_info;
|
|
|
|
u32 vht_cap_info;
|
2013-07-24 10:36:46 +00:00
|
|
|
u32 num_rf_chains;
|
2015-06-22 14:52:26 +00:00
|
|
|
u32 max_spatial_stream;
|
2015-03-19 11:08:00 +00:00
|
|
|
/* protected by conf_mutex */
|
2017-02-23 13:18:22 +00:00
|
|
|
u32 low_5ghz_chan;
|
|
|
|
u32 high_5ghz_chan;
|
2015-03-19 11:08:00 +00:00
|
|
|
bool ani_enabled;
|
2018-09-18 06:34:27 +00:00
|
|
|
/* protected by conf_mutex */
|
|
|
|
u8 ps_state_enable;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2018-10-04 05:45:31 +00:00
|
|
|
bool nlo_enabled;
|
2013-06-12 17:52:10 +00:00
|
|
|
bool p2p;
|
|
|
|
|
|
|
|
struct {
|
2014-10-13 06:40:47 +00:00
|
|
|
enum ath10k_bus bus;
|
2013-06-12 17:52:10 +00:00
|
|
|
const struct ath10k_hif_ops *ops;
|
|
|
|
} hif;
|
|
|
|
|
2014-02-10 16:14:23 +00:00
|
|
|
struct completion target_suspend;
|
2018-10-12 05:53:39 +00:00
|
|
|
struct completion driver_recovery;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2015-01-24 10:14:49 +00:00
|
|
|
const struct ath10k_hw_regs *regs;
|
2017-06-06 09:05:41 +00:00
|
|
|
const struct ath10k_hw_ce_regs *hw_ce_regs;
|
2015-06-18 07:01:01 +00:00
|
|
|
const struct ath10k_hw_values *hw_values;
|
2013-06-12 17:52:10 +00:00
|
|
|
struct ath10k_bmi bmi;
|
2013-07-05 13:15:14 +00:00
|
|
|
struct ath10k_wmi wmi;
|
2013-07-05 13:15:13 +00:00
|
|
|
struct ath10k_htc htc;
|
2013-07-05 13:15:14 +00:00
|
|
|
struct ath10k_htt htt;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2016-09-09 14:25:13 +00:00
|
|
|
struct ath10k_hw_params hw_params;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2016-04-20 16:44:51 +00:00
|
|
|
/* contains the firmware images used with ATH10K_FIRMWARE_MODE_NORMAL */
|
|
|
|
struct ath10k_fw_components normal_mode_fw;
|
2013-09-27 16:55:01 +00:00
|
|
|
|
2016-04-20 16:44:51 +00:00
|
|
|
/* READ-ONLY images of the running firmware, which can be either
|
|
|
|
* normal or UTF. Do not modify, release etc!
|
|
|
|
*/
|
|
|
|
const struct ath10k_fw_components *running_fw;
|
2013-07-16 07:38:58 +00:00
|
|
|
|
2016-04-07 06:37:29 +00:00
|
|
|
const struct firmware *pre_cal_file;
|
|
|
|
const struct firmware *cal_file;
|
2014-10-13 06:40:59 +00:00
|
|
|
|
2015-10-09 08:55:58 +00:00
|
|
|
struct {
|
|
|
|
u32 vendor;
|
|
|
|
u32 device;
|
|
|
|
u32 subsystem_vendor;
|
|
|
|
u32 subsystem_device;
|
2015-10-09 08:55:59 +00:00
|
|
|
|
|
|
|
bool bmi_ids_valid;
|
2018-10-11 10:11:45 +00:00
|
|
|
bool qmi_ids_valid;
|
|
|
|
u32 qmi_board_id;
|
2015-10-09 08:55:59 +00:00
|
|
|
u8 bmi_board_id;
|
ath10k: support extended board data download for dual-band QCA9984
To support dual-band variant of QCA9984, new extended board data (eBDF)
is introduced since existing board data ran out of space.
Below is the brief implementation & design detail,
----------------------------------------------------
1. New OTP changes to inform eBDF support in existing OTP download to
fetch board ID and chip ID. This is backward compatible and older
card sends 0 by default for eBDF support bit (bit 18 of OTP response) we
check in ath10k driver.
2. If eBDF is supported, then we need to fetch eBDF ID which is bundled
in downloaded board data. So again OTP is executed for knowing the eBDF ID.
This is done once we set 'board_data_initialized' bit. If eBDF ID
returned is zero, we continue booting with previous board data downloaded.
3. Based on the eBDF ID fetched, ath10k driver tries to download the
extended board data to a new offset ahead of already downloaded board
data address.
4. A new BD IE type, ATH10K_BD_IE_BOARD_EXT is added to differentiate in
bundling eBDF separately in board-2.bin and also to parse through
board bundle for eBDF download in ath10k boot.
5. If eBDF is not present in the board-2.bin bundle or when board ID is
zero, we do a fallback boot to "eboard.bin" in the same QCA9984/hw1.0 dir.
This is same as done to existing "board.bin" if board ID is not present
in board-2.bin bundle.
Current design is that eBDF size will be 2KB and eBDF ID will be
byte value.
Tested the above changes with dual-band variant of QCA9984 card. OTP
update needed for the test will be part of next FW release 10.4-3.6-xxxx.
Below are the logs with ath10k BOOT debugs enabled.
First OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for board id
boot get otp board id result 0x00040400 board_id 1 chip_id 0 ext_bid_support 1
..
Second OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for ext board id
boot get otp ext board id result 0x00000005 ext_board_id 5
boot using eboard name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
..
Extended board data download:
------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 65 62 6f 61 72 64 -id=0,bmi-eboard
00000020: 2d 69 64 3d 35 -id=5
boot found match for name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
boot found eboard data for 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
using board api 2
boot writing ext board data to addr 0xc3000
..
Fallback Extended board data download from "eboard.bin":
---------------------------------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 62 6f 61 72 64 2d -id=0,bmi-board-
00000020: 69 64 3d 31 30 id=10
failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-eboard-id=5 from ath10k/QCA9984/hw1.0/board-2.bin
boot fw request 'ath10k/QCA9984/hw1.0/eboard.bin': 0
using board api 1
boot writing ext board data to addr 0xc3000
..
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-03 17:07:53 +00:00
|
|
|
u8 bmi_eboard_id;
|
2015-10-09 08:55:59 +00:00
|
|
|
u8 bmi_chip_id;
|
ath10k: support extended board data download for dual-band QCA9984
To support dual-band variant of QCA9984, new extended board data (eBDF)
is introduced since existing board data ran out of space.
Below is the brief implementation & design detail,
----------------------------------------------------
1. New OTP changes to inform eBDF support in existing OTP download to
fetch board ID and chip ID. This is backward compatible and older
card sends 0 by default for eBDF support bit (bit 18 of OTP response) we
check in ath10k driver.
2. If eBDF is supported, then we need to fetch eBDF ID which is bundled
in downloaded board data. So again OTP is executed for knowing the eBDF ID.
This is done once we set 'board_data_initialized' bit. If eBDF ID
returned is zero, we continue booting with previous board data downloaded.
3. Based on the eBDF ID fetched, ath10k driver tries to download the
extended board data to a new offset ahead of already downloaded board
data address.
4. A new BD IE type, ATH10K_BD_IE_BOARD_EXT is added to differentiate in
bundling eBDF separately in board-2.bin and also to parse through
board bundle for eBDF download in ath10k boot.
5. If eBDF is not present in the board-2.bin bundle or when board ID is
zero, we do a fallback boot to "eboard.bin" in the same QCA9984/hw1.0 dir.
This is same as done to existing "board.bin" if board ID is not present
in board-2.bin bundle.
Current design is that eBDF size will be 2KB and eBDF ID will be
byte value.
Tested the above changes with dual-band variant of QCA9984 card. OTP
update needed for the test will be part of next FW release 10.4-3.6-xxxx.
Below are the logs with ath10k BOOT debugs enabled.
First OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for board id
boot get otp board id result 0x00040400 board_id 1 chip_id 0 ext_bid_support 1
..
Second OTP response :
---------------------
..
boot upload otp to 0x1234 len 9478 for ext board id
boot get otp ext board id result 0x00000005 ext_board_id 5
boot using eboard name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
..
Extended board data download:
------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 65 62 6f 61 72 64 -id=0,bmi-eboard
00000020: 2d 69 64 3d 35 -id=5
boot found match for name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
boot found eboard data for 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
using board api 2
boot writing ext board data to addr 0xc3000
..
Fallback Extended board data download from "eboard.bin":
---------------------------------------------------------
..
board name
00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip
00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 62 6f 61 72 64 2d -id=0,bmi-board-
00000020: 69 64 3d 31 30 id=10
failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-eboard-id=5 from ath10k/QCA9984/hw1.0/board-2.bin
boot fw request 'ath10k/QCA9984/hw1.0/eboard.bin': 0
using board api 1
boot writing ext board data to addr 0xc3000
..
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-03 17:07:53 +00:00
|
|
|
bool ext_bid_supported;
|
ath10k: search SMBIOS for OEM board file extension
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
board data file is identified, among others, by device and sybsystem ids.
The problem, however, can occur when the (default) board data file cannot
fulfill with the vendor requirements and it is necessary to use a different
board data file.
To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name
Extension to specify the extension/variant name. The driver will take the
extension suffix into consideration and will load the right (non-default)
board data file if necessary.
If it is unnecessary to use extension board data file, please leave the
SMBIOS field blank and default configuration will be used.
Example:
If a default board data file for a specific board is identified by a string
"bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
subsystem-device=0310"
then the OEM specific data file, if used, could be identified by variant
suffix:
"bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
subsystem-device=0310,variant=DE_1AB"
If board data file name extension is set but board-2.bin does not contain
board data file for the variant, the driver will fallback to the default
board data file not to break backward compatibility.
This was first applied in commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM
board file extension") but later reverted in commit 005c3490e9db ("Revert
"ath10k: Search SMBIOS for OEM board file extension"". This patch is now
otherwise the same as commit f2593cb1b291 except the regression fixed.
Signed-off-by: Waldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-02-24 22:30:03 +00:00
|
|
|
|
|
|
|
char bdf_ext[ATH10K_SMBIOS_BDF_EXT_STR_LENGTH];
|
2015-10-09 08:55:58 +00:00
|
|
|
} id;
|
2015-04-17 09:19:17 +00:00
|
|
|
|
2013-09-27 16:55:07 +00:00
|
|
|
int fw_api;
|
2015-10-09 08:55:58 +00:00
|
|
|
int bd_api;
|
2014-10-13 06:40:59 +00:00
|
|
|
enum ath10k_cal_mode cal_mode;
|
2013-09-27 16:55:07 +00:00
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct {
|
|
|
|
struct completion started;
|
|
|
|
struct completion completed;
|
|
|
|
struct completion on_channel;
|
2014-08-05 12:54:44 +00:00
|
|
|
struct delayed_work timeout;
|
|
|
|
enum ath10k_scan_state state;
|
2013-06-12 17:52:10 +00:00
|
|
|
bool is_roc;
|
|
|
|
int vdev_id;
|
|
|
|
int roc_freq;
|
2015-07-09 11:08:36 +00:00
|
|
|
bool roc_notify;
|
2013-06-12 17:52:10 +00:00
|
|
|
} scan;
|
|
|
|
|
|
|
|
struct {
|
2016-04-12 13:56:15 +00:00
|
|
|
struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
|
2013-06-12 17:52:10 +00:00
|
|
|
} mac;
|
|
|
|
|
|
|
|
/* should never be NULL; needed for regular htt rx */
|
|
|
|
struct ieee80211_channel *rx_channel;
|
|
|
|
|
|
|
|
/* valid during scan; needed for mgmt rx during scan */
|
|
|
|
struct ieee80211_channel *scan_channel;
|
|
|
|
|
2014-01-23 10:38:25 +00:00
|
|
|
/* current operating channel definition */
|
|
|
|
struct cfg80211_chan_def chandef;
|
|
|
|
|
2016-03-08 17:27:23 +00:00
|
|
|
/* currently configured operating channel in firmware */
|
|
|
|
struct ieee80211_channel *tgt_oper_chan;
|
|
|
|
|
2014-09-23 21:17:16 +00:00
|
|
|
unsigned long long free_vdev_map;
|
2015-03-31 10:26:21 +00:00
|
|
|
struct ath10k_vif *monitor_arvif;
|
2014-04-08 06:45:47 +00:00
|
|
|
bool monitor;
|
2013-06-12 17:52:10 +00:00
|
|
|
int monitor_vdev_id;
|
2014-04-08 06:45:47 +00:00
|
|
|
bool monitor_started;
|
2013-06-12 17:52:10 +00:00
|
|
|
unsigned int filter_flags;
|
2013-11-20 07:59:47 +00:00
|
|
|
unsigned long dev_flags;
|
2015-09-26 22:04:07 +00:00
|
|
|
bool dfs_block_radar_events;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2014-04-08 06:56:09 +00:00
|
|
|
/* protected by conf_mutex */
|
|
|
|
bool radar_enabled;
|
|
|
|
int num_started_vdevs;
|
|
|
|
|
2014-05-16 14:15:38 +00:00
|
|
|
/* Protected by conf-mutex */
|
|
|
|
u8 cfg_tx_chainmask;
|
|
|
|
u8 cfg_rx_chainmask;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct completion install_key_done;
|
|
|
|
|
2018-09-06 16:46:20 +00:00
|
|
|
int last_wmi_vdev_start_status;
|
2013-06-12 17:52:10 +00:00
|
|
|
struct completion vdev_setup_done;
|
2019-06-03 14:41:33 +00:00
|
|
|
struct completion vdev_delete_done;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
struct workqueue_struct *workqueue;
|
2015-07-29 08:40:38 +00:00
|
|
|
/* Auxiliary workqueue */
|
|
|
|
struct workqueue_struct *workqueue_aux;
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
/* prevents concurrent FW reconfiguration */
|
|
|
|
struct mutex conf_mutex;
|
|
|
|
|
ath10k: perform crash dump collection in workqueue
Commit 25733c4e67df ("ath10k: pci: use mutex for diagnostic window CE
polling") introduced a regression where we try to sleep (grab a mutex)
in an atomic context:
[ 233.602619] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
[ 233.602626] in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/0
[ 233.602636] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.1.0-rc2 #4
[ 233.602642] Hardware name: Google Scarlet (DT)
[ 233.602647] Call trace:
[ 233.602663] dump_backtrace+0x0/0x11c
[ 233.602672] show_stack+0x20/0x28
[ 233.602681] dump_stack+0x98/0xbc
[ 233.602690] ___might_sleep+0x154/0x16c
[ 233.602696] __might_sleep+0x78/0x88
[ 233.602704] mutex_lock+0x2c/0x5c
[ 233.602717] ath10k_pci_diag_read_mem+0x68/0x21c [ath10k_pci]
[ 233.602725] ath10k_pci_diag_read32+0x48/0x74 [ath10k_pci]
[ 233.602733] ath10k_pci_dump_registers+0x5c/0x16c [ath10k_pci]
[ 233.602741] ath10k_pci_fw_crashed_dump+0xb8/0x548 [ath10k_pci]
[ 233.602749] ath10k_pci_napi_poll+0x60/0x128 [ath10k_pci]
[ 233.602757] net_rx_action+0x140/0x388
[ 233.602766] __do_softirq+0x1b0/0x35c
[...]
ath10k_pci_fw_crashed_dump() is called from NAPI contexts, and firmware
memory dumps are retrieved using the diag memory interface.
A simple reproduction case is to run this on QCA6174A /
WLAN.RM.4.4.1-00132-QCARMSWP-1, which happens to be a way to b0rk the
firmware:
dd if=/sys/kernel/debug/ieee80211/phy0/ath10k/mem_value bs=4K count=1
of=/dev/null
(NB: simulated firmware crashes, via debugfs, don't trigger firmware
dumps.)
The fix is to move the crash-dump into a workqueue context, and avoid
relying on 'data_lock' for most mutual exclusion. We only keep using it
here for protecting 'fw_crash_counter', while the rest of the coredump
buffers are protected by a new 'dump_mutex'.
I've tested the above with simulated firmware crashes (debugfs 'reset'
file), real firmware crashes (the 'dd' command above), and a variety of
reboot and suspend/resume configurations on QCA6174A.
Reported here:
http://lkml.kernel.org/linux-wireless/20190325202706.GA68720@google.com
Fixes: 25733c4e67df ("ath10k: pci: use mutex for diagnostic window CE polling")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-03-26 20:57:28 +00:00
|
|
|
/* protects coredump data */
|
|
|
|
struct mutex dump_mutex;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
/* protects shared structure data */
|
|
|
|
spinlock_t data_lock;
|
|
|
|
|
2013-10-16 12:44:45 +00:00
|
|
|
struct list_head arvifs;
|
2013-06-12 17:52:10 +00:00
|
|
|
struct list_head peers;
|
2016-03-06 14:14:30 +00:00
|
|
|
struct ath10k_peer *peer_map[ATH10K_MAX_NUM_PEER_IDS];
|
2013-06-12 17:52:10 +00:00
|
|
|
wait_queue_head_t peer_mapping_wq;
|
|
|
|
|
2014-11-25 14:16:04 +00:00
|
|
|
/* protected by conf_mutex */
|
2014-01-02 13:38:33 +00:00
|
|
|
int num_peers;
|
2014-11-25 14:16:05 +00:00
|
|
|
int num_stations;
|
|
|
|
|
|
|
|
int max_num_peers;
|
|
|
|
int max_num_stations;
|
2014-12-17 10:20:45 +00:00
|
|
|
int max_num_vdevs;
|
2015-03-30 06:51:52 +00:00
|
|
|
int max_num_tdls_vdevs;
|
2015-06-22 14:40:15 +00:00
|
|
|
int num_active_peers;
|
|
|
|
int num_tids;
|
2014-01-02 13:38:33 +00:00
|
|
|
|
2015-07-29 08:40:38 +00:00
|
|
|
struct work_struct svc_rdy_work;
|
|
|
|
struct sk_buff *svc_rdy_skb;
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
struct work_struct offchan_tx_work;
|
|
|
|
struct sk_buff_head offchan_tx_queue;
|
|
|
|
struct completion offchan_tx_completed;
|
|
|
|
struct sk_buff *offchan_tx_skb;
|
|
|
|
|
2013-09-26 15:47:12 +00:00
|
|
|
struct work_struct wmi_mgmt_tx_work;
|
|
|
|
struct sk_buff_head wmi_mgmt_tx_queue;
|
|
|
|
|
2013-07-16 07:38:52 +00:00
|
|
|
enum ath10k_state state;
|
|
|
|
|
2014-05-23 10:28:47 +00:00
|
|
|
struct work_struct register_work;
|
2013-07-16 07:54:35 +00:00
|
|
|
struct work_struct restart_work;
|
|
|
|
|
2013-07-31 08:32:40 +00:00
|
|
|
/* cycle count is reported twice for each visited channel during scan.
|
2017-02-20 14:38:50 +00:00
|
|
|
* access protected by data_lock
|
|
|
|
*/
|
2013-07-31 08:32:40 +00:00
|
|
|
u32 survey_last_rx_clear_count;
|
|
|
|
u32 survey_last_cycle_count;
|
|
|
|
struct survey_info survey[ATH10K_NUM_CHANS];
|
|
|
|
|
2015-05-25 12:06:19 +00:00
|
|
|
/* Channel info events are expected to come in pairs without and with
|
|
|
|
* COMPLETE flag set respectively for each channel visit during scan.
|
|
|
|
*
|
|
|
|
* However there are deviations from this rule. This flag is used to
|
|
|
|
* avoid reporting garbage data.
|
|
|
|
*/
|
|
|
|
bool ch_info_can_report_survey;
|
2016-04-27 10:53:22 +00:00
|
|
|
struct completion bss_survey_done;
|
2015-05-25 12:06:19 +00:00
|
|
|
|
2013-11-20 07:59:41 +00:00
|
|
|
struct dfs_pattern_detector *dfs_detector;
|
|
|
|
|
2015-03-31 10:26:23 +00:00
|
|
|
unsigned long tx_paused; /* see ATH10K_TX_PAUSE_ */
|
|
|
|
|
2013-06-12 17:52:10 +00:00
|
|
|
#ifdef CONFIG_ATH10K_DEBUGFS
|
|
|
|
struct ath10k_debug debug;
|
2014-08-02 06:12:54 +00:00
|
|
|
struct {
|
|
|
|
/* relay(fs) channel for spectral scan */
|
|
|
|
struct rchan *rfs_chan_spec_scan;
|
|
|
|
|
|
|
|
/* spectral_mode and spec_config are protected by conf_mutex */
|
|
|
|
enum ath10k_spectral_mode mode;
|
|
|
|
struct ath10k_spec_scan config;
|
|
|
|
} spectral;
|
2016-04-26 15:24:36 +00:00
|
|
|
#endif
|
2014-08-07 09:03:27 +00:00
|
|
|
|
2017-12-05 13:31:24 +00:00
|
|
|
u32 pktlog_filter;
|
2017-12-22 13:38:59 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_DEV_COREDUMP
|
|
|
|
struct {
|
|
|
|
struct ath10k_fw_crash_data *fw_crash_data;
|
|
|
|
} coredump;
|
|
|
|
#endif
|
|
|
|
|
2014-09-10 15:23:30 +00:00
|
|
|
struct {
|
|
|
|
/* protected by conf_mutex */
|
2016-04-20 16:44:51 +00:00
|
|
|
struct ath10k_fw_components utf_mode_fw;
|
|
|
|
|
2014-09-10 15:23:30 +00:00
|
|
|
/* protected by data_lock */
|
|
|
|
bool utf_monitor;
|
|
|
|
} testmode;
|
|
|
|
|
2014-09-29 11:41:46 +00:00
|
|
|
struct {
|
|
|
|
/* protected by data_lock */
|
|
|
|
u32 fw_crash_counter;
|
|
|
|
u32 fw_warm_reset_counter;
|
|
|
|
u32 fw_cold_reset_counter;
|
|
|
|
} stats;
|
|
|
|
|
2014-12-17 10:22:07 +00:00
|
|
|
struct ath10k_thermal thermal;
|
2015-03-23 15:32:53 +00:00
|
|
|
struct ath10k_wow wow;
|
2016-11-23 14:58:10 +00:00
|
|
|
struct ath10k_per_peer_tx_stats peer_tx_stats;
|
2014-12-17 10:22:07 +00:00
|
|
|
|
2016-09-02 16:46:09 +00:00
|
|
|
/* NAPI */
|
|
|
|
struct net_device napi_dev;
|
|
|
|
struct napi_struct napi;
|
|
|
|
|
2016-09-28 12:11:58 +00:00
|
|
|
struct work_struct set_coverage_class_work;
|
|
|
|
/* protected by conf_mutex */
|
|
|
|
struct {
|
|
|
|
/* writing also protected by data_lock */
|
|
|
|
s16 coverage_class;
|
|
|
|
|
|
|
|
u32 reg_phyclk;
|
|
|
|
u32 reg_slottime_conf;
|
|
|
|
u32 reg_slottime_orig;
|
|
|
|
u32 reg_ack_cts_timeout_conf;
|
|
|
|
u32 reg_ack_cts_timeout_orig;
|
|
|
|
} fw_coverage;
|
|
|
|
|
2017-07-28 12:15:36 +00:00
|
|
|
u32 ampdu_reference;
|
|
|
|
|
2019-02-08 12:55:26 +00:00
|
|
|
const u8 *wmi_key_cipher;
|
2017-06-28 04:48:26 +00:00
|
|
|
void *ce_priv;
|
|
|
|
|
2018-03-14 10:14:06 +00:00
|
|
|
u32 sta_tid_stats_mask;
|
|
|
|
|
2018-05-15 09:09:49 +00:00
|
|
|
/* protected by data_lock */
|
|
|
|
enum ath10k_radar_confirmation_state radar_conf_state;
|
|
|
|
struct ath10k_radar_found_info last_radar_info;
|
|
|
|
struct work_struct radar_confirmation_work;
|
2019-02-08 12:55:33 +00:00
|
|
|
struct ath10k_bus_params bus_param;
|
2019-06-03 14:41:51 +00:00
|
|
|
struct completion peer_delete_done;
|
2018-05-15 09:09:49 +00:00
|
|
|
|
2014-08-07 09:03:27 +00:00
|
|
|
/* must be last */
|
|
|
|
u8 drv_priv[0] __aligned(sizeof(void *));
|
2013-06-12 17:52:10 +00:00
|
|
|
};
|
|
|
|
|
2016-03-16 12:43:32 +00:00
|
|
|
static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
|
|
|
|
{
|
|
|
|
if (test_bit(ATH10K_FLAG_PEER_STATS, &ar->dev_flags) &&
|
|
|
|
test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-22 13:39:15 +00:00
|
|
|
extern unsigned long ath10k_coredump_mask;
|
|
|
|
|
2014-08-07 09:03:27 +00:00
|
|
|
struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
|
2014-10-13 06:40:47 +00:00
|
|
|
enum ath10k_bus bus,
|
2015-01-24 10:14:49 +00:00
|
|
|
enum ath10k_hw_rev hw_rev,
|
2013-06-12 17:52:10 +00:00
|
|
|
const struct ath10k_hif_ops *hif_ops);
|
|
|
|
void ath10k_core_destroy(struct ath10k *ar);
|
2015-06-15 11:46:40 +00:00
|
|
|
void ath10k_core_get_fw_features_str(struct ath10k *ar,
|
|
|
|
char *buf,
|
|
|
|
size_t max_len);
|
2016-04-20 16:46:01 +00:00
|
|
|
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
|
|
|
struct ath10k_fw_file *fw_file);
|
2013-06-12 17:52:10 +00:00
|
|
|
|
2016-04-20 16:44:51 +00:00
|
|
|
int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
|
|
|
|
const struct ath10k_fw_components *fw_components);
|
2014-02-10 16:14:24 +00:00
|
|
|
int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt);
|
2013-07-16 07:38:51 +00:00
|
|
|
void ath10k_core_stop(struct ath10k *ar);
|
2018-09-04 12:03:19 +00:00
|
|
|
int ath10k_core_register(struct ath10k *ar,
|
|
|
|
const struct ath10k_bus_params *bus_params);
|
2013-06-12 17:52:10 +00:00
|
|
|
void ath10k_core_unregister(struct ath10k *ar);
|
2018-10-11 10:16:26 +00:00
|
|
|
int ath10k_core_fetch_board_file(struct ath10k *ar, int bd_ie_type);
|
|
|
|
void ath10k_core_free_board_files(struct ath10k *ar);
|
2013-06-12 17:52:10 +00:00
|
|
|
|
|
|
|
#endif /* _CORE_H_ */
|