Commit Graph

472 Commits

Author SHA1 Message Date
Nisha Menon
7e8f67cfca qcacmn: Update Wifi netdevs for IPA exception path NAPI
Starting Kernel 4.19 IPA LAN RX supports NAPI polling
mechanism. Netdevs that hook into IPA need to call
netif_receive_skb() or similar to deliver the packet
to network stack instead of using netif_rx_ni().

IPA driver exports ipa_get_lan_rx_napi(void) API for
this purpose. If this API call returns true use
netif_receive_skb() or fallback on legacy api.

Add the changes under a feature flag IPA_LAN_RX_NAPI_SUPPORT
which is enabled under a linux kernel version check for 4.19
and above.

Change-Id: I449404e86e934fd6113cb71e494575e67602f678
CRs-Fixed: 2588500
2020-01-20 14:02:13 -08:00
Nisha Menon
4d77312b6d qcacmn: Check if FW or host in recovery before invoking assert
Force wake request is sent before register write. If this req
fails check if FW is down or host is in recovery before
asserting.

Change-Id: I6d31b1f95b68ae4e462f59ed32ed933de55cacae
CRs-Fixed: 2601364
2020-01-17 07:28:13 -08:00
Saket Jha
540da9a56c qcacmn: Add 6GHz Monitor Mode Support
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.

Change freq type to qdf_freq_t.

Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
2020-01-15 11:30:21 -08:00
Rakesh Pillai
374e7c25dc qcacmn: Support IPCI bus type in QDF
Add newly added IPCI bus type support in QDF.

CRs-Fixed: 2597341
Change-Id: I476556e831d41be9ee71f8083a95d8d9da6ceb85
2020-01-15 04:44:03 -08:00
Shwetha G K
21378e0c93 qcacmn: Support to disable the memory debug at load time
Disable the mem_debug when qdf argument mem_debug_disabled=1 is passed
through uci command "uci set wireless.qcawifi.mem_debug_disabled=1".

CRs-Fixed: 2572159
Change-Id: I6ab5e1f28ce4c58d46c7467bac3853054f4cf56c
2020-01-10 16:55:18 -08:00
Yu Wang
e7f177ac80 qcacmn: add new component id QDF_MODULE_ID_COEX
This new component COEX is added for coex related
configurations/operations.

CRs-Fixed: 2565088
Change-Id: I3faa2d18b341d91278268f52d9d7d05a1eba445f
2020-01-09 02:40:11 -08:00
aloksing
18f309c7f4 qcacmn: Add debug support for vdev/peer reference and release
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count

Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
2020-01-02 05:18:15 -08:00
Srinivas Dasari
5567f874e7 qcacmn: Define QDF_MAX_CONCURRENCY_PERSONA based on WLAN_MAX_VDEVS
Currently, QDF_MAX_CONCURRENCY_PERSONA allows a maximum of 4
MAC addresses to be assigned to different interfaces. NAN
discovery interface is a new interface and it needs a MAC address
to be assigned. QDF_MAX_CONCURRENCY_PERSONA needs to be increased
to 5 to provide the same.
WLAN_MAX_VDEVS defined in Kbuild already takes care of the
maximum no.of vdevs(6) supported. QDF_MAX_CONCURRENCY_PERSONA can
be made dependent of WLAN_MAX_VDEVS which caters the same purpose.
Define QDF_MAX_CONCURRENCY_PERSONA accordingly.

Change-Id: If5085703ab9c0cc70ce4fc0d20bedc20f382b4bd
CRs-Fixed: 2592018
2020-01-02 03:48:16 -08:00
Hangtian Zhu
7788a89ccd qcacmn: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
2019-12-18 23:55:00 -08:00
Mohit Khanna
63055510e0 qcacmn: Add IEEE 802.11 control frame type/subtypes
Add 802.11 CTRL frame type and subtype subfields.

Change-Id: I2105d0ee52cf948f79b6614a063238312443fa6d
CRs-Fixed: 2580876
2019-12-16 14:19:57 -08:00
Nirav Shah
8f44a7e494 qcacmn: Add credit tracking for HL Data Path
Add credit tracking for HL Data Path in DPTRACE.

Change-Id: I6e2971209940c16a13a8ca7f1f0a3d7c1a26e305
CRs-Fixed: 2574057
2019-12-13 07:04:10 -08:00
Alok Kumar
3d15ae8780 qcacmn: Define CDP Ops for packet capture mode
Define CDP Ops for packet capture mode

Change-Id: If08191f47060210f4340940d01be8eb2cf8cc426
CRs-Fixed: 2528432
2019-12-09 17:29:15 -08:00
Abhijit Pradhan
a305445a5f qcacmn: Control the size of the freq and chan_num (QDF)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size:
When the frequency range is not very large, a smaller size
(e.g. 16bit integer) can be used. It saves a large amount of space
especially when many large arrays containing elements of this
type/size are defined in the driver.

Change-Id: I6c8fb2a4dc117e2535ef96009362923557cee398
CRs-Fixed: 2570456
2019-12-09 05:20:43 -08:00
Shwetha G K
29121213c8 qcacmn: Add debugfs support for DBR ring debug
For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.

CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
2019-12-02 00:42:54 -08:00
Kai Chen
a8cf59455e qcacmn: Add stats on OFDMA and MU-MIMO packet
Add MCS, NSS, MPDU FCS OK, MPDU FCS ERR stats
classified by SU, OFDMA and MU-MIMO.

Change-Id: I3ade03acc06bd924fdeb8dfcaf6b18fb01f01d68
2019-12-01 19:16:58 -08:00
Karunakar Dasineni
8e25a3077a qcacmn: Add qdf API to find last set bit
Add qdf wrapper for Linux fls() to find last set bit.

Change-Id: I089fee397d619515c768521bda1f4d4c35526fe0
2019-11-27 09:15:30 -08:00
Karunakar Dasineni
91da9dce36 qcacmn: QDF API for skb_copy_expand
Add QDF wrappers for skb_copy_expand

Change-Id: I401241259c87a067ed4773bee9fdfc7ee3cdcc23
2019-11-27 09:15:15 -08:00
Nandha Kishore Easwaran
bcf953583a qcacmn: Use multi window write and read for pine
Write into hal register using three floating windows instead of one.
This change is done to avoid frequent window changes for writing into
DP and CE registers. Instead 3 windows are used. One window is statically
mapped to CE block and another window is mapped statically to DP block.
Due to this design there is no need to change the window register to
write into these blocks and write can be done on corresponding window
with single iowrite32. Similar loginc is used for ioread32.

Also modified the hp_addr and tp_addr in initialisation stage so that
hal_write will not have multiple if checks.

Change-Id: Ibb99ec4da7f63323082e46a28afbe90e1f555545
CRs-fixed: 2507441
2019-11-26 02:15:26 -08:00
Jinwei Chen
08de3a02e5 qcacmn: add debugging code to detect duplicated hash_node
One hash_node is still left in hash bucket list while the memory
has been freed by normal operation, suspect that maybe two same
hash_node is existed in hash bucket list before, add debugging code
to detect this problem earlier.

Change-Id: I1497ae29c0e09e35dc140c7c37e228e02eb000e4
CRs-Fixed: 2562952
2019-11-18 20:00:15 -08:00
Shiva Krishna Pittala
5c0f59fd3c qcacmn: Route variable argument list logs through QDF
Currently, the variable argument list messages are going through vprintk.
As a result, these messages are appearing only on dmesg, but not on any
external logger. Use QDF logging functions instead to fix this.

CRs-Fixed: 2561051
Change-Id: I9cfc6aaa7b81de4945f7cfd5f7cd15540c3fc1f2
2019-11-14 00:55:16 -08:00
Tiger Yu
987de79182 qcacmn: Wake up system for early interrupt wakeup during suspending
During system suspending, the target might request wakeup early to the
host. The host will wakeup the system directly to abort current suspend
to avoid mismatching PM state between host & target.

Change-Id: Icf6e58ff24cbe072ef56aa22820432efb2ca1932
CRs-Fixed: 2559306
2019-11-13 06:53:29 -08:00
Rakesh Pillai
534a143d8f qcacmn: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
2019-11-01 00:18:13 -07:00
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Chaithanya Garrepalli
45ecf4361c qcacmn: Fix false alarm of double nbuf allocation
In qdf_nbuf_unshare do not add new debug record when
allocation fails

Change-Id: Icece871a9e75af19841cf6824f286735660b09e3
2019-10-23 10:32:38 -07:00
Sourav Mohapatra
20bc724ca1 qcacmn: Add qdf wrapper for hash_for_each_safe
Add qdf wrapper API for hash_for_each_safe which iterates over a
hashtable safe against removal of hash entry

Change-Id: I89d8b6520a4bee583d44a771b4359ed287d0c2fa
CRs-Fixed: 2528484
2019-10-15 00:49:24 -07:00
Sravan Kumar Kairam
aedfbffdfd qcacmn: Add qdf abstraction for ipa uc bw monitor
Add qdf abstraction for ipa uc bandwidth monitor for
wlan client.

Change-Id: I64718f118dd4982b060c72e2a2e7bd3e317bdb73
CRs-Fixed: 2526548
2019-10-14 05:47:45 -07:00
Sravan Kumar Kairam
3a37692ec1 qcacmn: Add qdf abstraction for ipa wdi stats api
Add qdf abstraction for ipa wlan wdi stats api.

Change-Id: If325950f7151199cf1f720ac0da05274bb307786
CRs-Fixed: 2517709
2019-10-14 05:47:41 -07:00
Saket Jha
d8d9d99f94 Revert "qcacmn: Enable EAPOL/DHCP message tracing in Wifi driver"
This reverts commit I010c9295fd6ca42a950f84f0d7a19b00d8b0c0da due to
crash caused by excessive logging.

Change-Id: I38701eb5be9a25f38e4cb5738824b635a2b0442c
CRs-Fixed: 2535471
2019-10-03 12:34:48 -07:00
Manikandan Mohan
9b1b93cfcd qcacmn: Add support for WMI over QMI
Add support for WMI over QMI to reduce power consumption for
periodic stats report.

Change-Id: Ic57b2bd18be803c97ffeea2e0073751d31e02202
CRs-fixed: 2521835
2019-09-19 18:56:11 -07:00
Linux Build Service Account
fb263dc4bd Merge "qcacmn: Replace printk with qdf_nofl_info" 2019-08-30 05:36:51 -07:00
Paul Zhang
1275896960 qcacmn: support msdu rx retry statistics
Add the interface to support the rx retry statistics.

Change-Id: I02bbf2e69eefbd7ef61ab2540c1aacabb4ce3aef
CRs-Fixed: 2505486
2019-08-28 12:43:06 -07:00
Vivek
7a14b44b75 qcacmn: Replace printk with qdf_nofl_info
Replace printk with qdf_nofl_info in qdf folder.
So if we wish to change from printing on console
to other location, based on a logging daemon, we
can do that by only changing at the implementation
of QDF print API's

Change-Id: I27fa7dbd6081c2869d1f1782f34cdd0bb5a02fb4
CRs-Fixed: 2442689
2019-08-27 11:32:27 +05:30
Shashikala Prabhu
ec527358c2 qcacmn: Fix issues in qdf aligned memory alloc function
1. Alloc size should be passed as input and output parameter since we need
   to pass the exact alloc_size while freeing the memory.

2. use qdf_align() to calculate the aligned physical address.

3. In DBR component, pass correct arguments to qdf_aligned_malloc() to fix
   the compilation errors.
   Alloc size should be passed as input and output parameter since we need
   to pass the exact alloc_size while freeing the DMA memory.

Change-Id: I83051b8aa54bbf3bb663902d8f17f2c3c55e57bf
CRs-Fixed: 2462441
2019-08-26 00:26:56 -07:00
Mohit Khanna
c42d8036c9 qcacmn: Donot forward MDNS packets for NAN vdev
MDNS packets if forwarded for a NAN vdev can lead to potential flooding
of the air interface. Hence donot forward them.

Change-Id: Idfdedfb0b5b553745440587448230013f3b56a7d
CRs-Fixed: 2503360
2019-08-16 08:23:00 -07:00
Chaithanya Garrepalli
1f89b97be2 qcacmn: Read 256 fcs_ok bitmap from user ext TLV
Read extra bits of fcs okay bit map from
RX_PPDU_END_USER_STATS_EXT TLV and use the same
to send first fcs okay packet in case of M COPY

CRs-Fixed: 2499150
Change-Id: I1a25971ea789dd7fddddb312af8a18a4cccdc178
2019-08-10 05:10:36 -07:00
Gyanranjan Hazarika
8e0ae99446 qcacmn: Add target_if changes for dynamic hw-mode config
This feature enables a user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Primary target_if changes are:

1. Add structure definition wlan_psoc_host_hal_reg_cap_ext
to parse and store the new extended regulatory capability
info in WMI_MAC_PHY_CAPABILITIES tlv sent in EXT service
ready WMI event
2. Add API target_psoc_get_num_radios_for_mode to retrieve
the number of radios corresponding to a hw-mode
3. Add API target_psoc_get_mac_phy_cap_for_mode to retrieve
the pointer to the mac_phy_cap info of the first radio
corresponding to the input hw-mode.

Change-Id: Ia10f0fd5e50c0ce0cbe99f9281147266aedce4e9
CRs-fixed: 2490212
2019-08-09 11:18:45 -07:00
Vignesh Viswanathan
7c974c29d3 qcacmn: Add support for separate FTM Coldboot Calibration mode
Add support for separate Coldboot calibration mode (10) for Coldboot
Calibration in FTM Mode.

Change-Id: I8e4e2c370053b55c3755339d7ead863ba950856e
CRs-Fixed: 2497548
2019-08-08 11:38:07 -07:00
Sumeet Rao
5664251726 qcacmn: Add utility functions to set/get flow tag from skb cb
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2475913
Change-Id: I534a633b99a8b1c4c9aab71fbf5857710d7977a1
2019-08-07 04:58:01 -07:00
nobelj
1453164d24 qcacmn: add per user RX stats in Rx PPDU struct
1)Add per user RX stats in Rx PPDU struct
2)Add per RU size counters in wifistats/iwpriv txrx_stats 10
3)Modified RX ppdu indication structure.

CRs-fixed: 2458732
Change-Id: Id8f3d6cce97503c0529642c4f5d66f3bbc59785d
2019-08-05 23:27:05 -07:00
Alan Chen
8fbc8c2941 qcacmn: Add QDF timer multiplier for all timers on host
Some QDF timers on host do not use the QDF timer multiplier. Add QDF timer
multiplier so that all timers on host have it.

Change-Id: I57acb28240ea815aaed685b5a193e492332cad69
CRs-Fixed: 2498149
2019-08-01 05:13:48 -07:00
Kai Chen
93f7e1be90 qcacmn: Add support for OFDMA UL per user info
Add support for OFDMA UL per user info such as
nss, mcs, ofdma RU start and ofdma RU size

Change-Id: Ibb4397f262d1a5df5b01d80a8a741a9b193168e7
2019-07-31 19:43:56 -07:00
Vivek
63891b3eb2 qcacmn: Move qdf_trace API declarations to qdf_trace header file
The qdf_trace_msg and qdf_vtrace_msg related API's declaration
are in qdf_types.h but the definition is in qdf_trace.c

Move the declaration to i_qdf_trace.h

Change-Id: I098540347446078bc6d43fd2377d197b2575da1a
CRs-Fixed: 2497779
2019-07-29 22:21:01 -07:00
Amir Patel
5a8bbbe05d qcacmn: Add support for rx evm and rx antenna
Add Host support for rx evm and rx antenna

CRs-Fixed: 2493515
Change-Id: I6c6e3edd8d6650eabb69cea08ec275da7067f37d
2019-07-27 09:53:29 -07:00
Karunakar Dasineni
af64fd1868 qcacmn: QDF wrapper to remove minidump entries
As part of minidump support, add QDF wrapper to remove
previously added entries.

Change-Id: Iae5ed874d6dbd2f6701f174b54d839fb0a13989c
2019-07-24 17:10:02 -07:00
Himanshu Batra
bcb10e6676 qcacmn: Add ascii dump support to qdf hex dump API
The existing hex dump API dumps hex data only.
Add API so that the ascii data can also be
dumped along with hex dump

Change-Id: Icbe74b26f47601a249e3d7ac701f2a19d70fb83b
CRs-Fixed: 2464738
2019-07-17 02:15:41 -07:00
Saket Jha
316c0fdb45 qcacmn: Define QDF API for cpumask abstraction
Defines QDF APIs for abstraction of cpumask_clear, cpumask_set_cpu,
and cpumask_setall.

Change-Id: I1678c600c7043b1d4a19e0479ceab9af0ce83d01
CRs-Fixed: 2478893
2019-07-16 17:15:19 -07:00
Uraj Sasan
37b2c4d198 qcacmn: Support live dump feature
Target firmware Assert are at times related to Host Driver
interaction with the firmware. To debug these issues, host
driver dump is mandatory. The feature provides memory dump
of data structures registed with this framework. The dumps
are saved which can later be loaded using gdb and analysed.

Add apis support for the feature.

Change-Id: I41c5126a49a698969f24b17187f78f4b4db7a51e
CRs-Fixed: 2478139
2019-07-16 15:54:03 -07:00
Ashish Kumar Dhanotiya
e2ff8ee254 qcacmn: Add support to parse a string into uint16 array
Currently there is no api to parse a string to uint16 array.

Write an api to parse a string to uint16 array.

Change-Id: Idbde9d70c64bc131813f5789c0453c9b3736228b
CRs-Fixed: 2478267
2019-07-03 08:56:13 -07:00
Mohit Khanna
c8bcf201ef qcacmn: Add QDF API to set thread cpu mask
Add QDF API to set cpu mask - qdf_thread_set_cpus_allowed_ptr.
Linux version of this API is implemented using set_cpus_allowed_ptr
linux API.

Change-Id: I3122e2b30c6d3f02e9c874c19db610e5f09ec064
CRs-Fixed: 2474323
2019-06-28 18:07:58 -07:00
Shiva Krishna Pittala
1529d99839 qcacmn: Add debug version of qdf_mem_multi_pages_alloc/free
Under memory debug, qdf_mem_multi_pages_alloc function is getting
reported as the culprit of memory leaks when there is no associated
qdf_mem_multi_pages_free call. qdf_mem_multi_pages_alloc is
just an allocator function which uses qdf_mem_malloc internally to
serve the requested allocation and is not the actual source of the leak.
As there are multiple users of qdf_mem_multi_pages_alloc in the code base,
add memory debug versions of qdf_mem_multi_pages_alloc/free to track the
actual users of the allocations.

Change-Id: I8b2159de842a3c5d7f9cdb244ca148cf6df37d0d
CRs-Fixed: 2474749
2019-06-27 17:16:07 -07:00