Commit Graph

8983 Commits

Author SHA1 Message Date
Mainak Sen
219e27f9b2 qcacmn: Enable SG support in QCA5018
SG support in WBM release ring for QCA5018

Change-Id: I672b5fd3792c6712588c369bc4f15208c0a94004
2020-07-07 00:46:07 -07:00
Vevek Venkatesan
4196b69b64 qcacmn: add Runtime PM HIF changes for ipci interface
Add Runtime PM related HIF changes to enable it for
ipci interface.

Change-Id: I4af91c0e38130281cad3b39e555ec98716d027b8
CRs-Fixed: 2720823
2020-07-06 14:14:04 -07:00
Surabhi Vishnoi
20e9e49e70 qcacmn: Add support for WMI_VDEV_BCN_LATENCY event
Add interface changes for WMI_VDEV_BCN_LATENCY_EVENTID which
is sent by firmware to indicate the latency IE received from
connected AP in beacon.

Change-Id: Ia6cec01be89f13885b011414f0d77f64c6eb05ee
CRs-Fixed: 2723226
2020-07-06 11:23:14 -07:00
Ananya Gupta
5ecc8a6cbc qcacmn: Release peer ref count after handle usage is complete
Race condition is observed as dp_ipa_rx_intrabss_fwd is
accessing da_peer after releasing the ref count of the peer
while that peer is deleted parallelly.
To fix this, da_peer and sa_peer are only assigned if the
peers are found in the vdev.

Change-Id: Ib03835a509d656eb11946c075b820555b04934f8
CRs-Fixed: 2723448
2020-07-06 08:34:07 -07:00
Rakesh Pillai
2a46481ab9 qcacmn: Add vendor attribute to update QoS for UDP packets
Add a vendor command attribute to upgrade the QoS
for UDP packets

Change-Id: Ie29842bfe555aecce847b15f77493662ec491d55
CRs-Fixed: 2724039
2020-07-06 05:35:27 -07:00
gaolez
f4c326f721 qcacmn: Add length check in ndp event handler
qcacld-2.0 to qcacld-3.0 propagation

Add length check to prevent the data overflow the wmi buffer. The
length in the fixed_params and TLV hdr also need check.

Change-Id: I2bbf9f08b6c19062324dca420af08ff94835eaca
CRs-Fixed: 2248879
2020-07-03 15:00:41 -07:00
Samanth Manjunath
53ffdd36b9 qcacmn: WLAN SON related functions cleanup
Code clean up and removal of WLAN SON related functions
which were unused.

Change-Id: Icb4fddc9ca9dee8735e91f6772d9978b69a01726
CRs-Fixed: 2703210
2020-07-03 15:00:37 -07:00
Aniruddha Paul
96a1be4fcb qcacmn: Add histogram framework for DP path
A new framework added to calculate the per packet level
histogram

Change-Id: Iac52f7a672fa2afe1d6aec26931a8bc3115c6a98
2020-07-03 10:51:57 -07:00
Abhishek Singh
9cf786a2ab qcacmn: Use crypto APIs in scan filter
Use crypto APIs in scan filter to match the security.

Change-Id: I8b4d6f6085e3bfcdd8af2b4d9243c27e070cda78
CRs-Fixed: 2718079
2020-07-03 04:28:29 -07:00
Vevek Venkatesan
168fbbffe7 qcacmn: fix WOW wake up in suspend/resume for Moselle
Fix WOW wake up interrupt from WLAN FW, in system
suspend/resume for Moselle platform.

Change-Id: I5f71c65e0aa1eeef8225f3fcfae5410233df8b78
CRs-Fixed: 2724142
2020-07-03 04:28:26 -07:00
Disha Das
6320586a21 qcacmn: Enable qdf_get_keyed_hash() API
Enable qdf_get_keyed_hash() API in qdf_crypto.c

CRs-Fixed: 2721647
Change-Id: I2c051f79dce2e70c9fa7c25d171a69b60588d6b8
2020-07-03 04:28:23 -07:00
Wu Gao
7f96401451 qcacmn: Add QDF API for DRV support
Add QDF API to check platform capability if DRV is supported or not.
Then component enables wow support based on it.

Change-Id: I9045b1982acfc4ed4cdce724b48430cb20e03274
CRs-Fixed: 2722639
2020-07-02 18:23:36 -07:00
Subrat Dash
f5419dc428 qcacmn: Fix NULL pointer dereference in oem data command
Avoid pointer dereference before NULL check.

Change-Id: I941121bf699b08f847865c511520520947ef60f4
CRs-fixed: 2722422
2020-07-02 18:23:33 -07:00
Yeshwanth Sriram Guntuka
90e1136afb qcacmn: Decrement peer ref cnt after dp_rx_deliver_to_stack
Ths issue scenario is that valid peer is fetched from
peer_id in dp_rx_process and peer ref count is released
prior to invoking dp_rx_deliver_to_stack. In parallel,
the peer is freed in a different context. This results in
use after free within dp_rx_check_delivery_to_stack since
stale peer is dereferenced to update stats.

Fix is to decrement peer ref cnt after dp_rx_deliver_to_stack

Change-Id: I145247f7795f926faba66c05927fdae0599f0cad
CRs-Fixed: 2720396
2020-07-02 08:48:21 -07:00
Uraj Sasan
307b78c912 qcacmn: Send "tx_max_mcs_nss" for tlv command
Add tx_max_mcs_nss for TLV command.
It is used in computing nss and mcs for tx path.

Change-Id: Id5d4e5ff5318582586d3e29609a9feaa52516fe0
2020-07-02 08:48:18 -07:00
Ashish Kumar Dhanotiya
737eb69429 qcacmn: Add new scan type SCAN_FOR_CONNECT for conn_manager infra
Add new scan type SCAN_FOR_CONNECT to support connection manager
infrastructure.

CRs-Fixed: 2713772
Change-Id: I631f3f0324e82ef6cd8b2befbed020649c80bc4c
2020-07-02 08:48:14 -07:00
Amar Singhal
07cc4bb4b1 qcacmn: Maintain wiphy init and de-init states
Wiphy is attached to pdev after pdev has been created, but before pdev
is opened. So maintain the state of wiphy in pdev open and close
callbacks. While calling regulatory callbacks, check the wiphy init
state.

Change-Id: I51243017ac24bc4473abddbfd0506b9e3490de4a
CRs-Fixed: 2718363
2020-07-02 05:55:54 -07:00
Himanshu Batra
6ca574196e qcacmn: Add TX support for Extended Mcopy mode
Currently, mcopy mode delivers first msdu per-ppdu to upper layer,
add support for Extended mcopy mode to deliver first
msdu per-MPDU.

Change-Id: I8f3f7fb023e9d9140d0be31520d34103a3505ebb
CRs-Fixed: 2701514
2020-07-02 05:55:51 -07:00
Surabhi Vishnoi
9762d883bc qcacmn: Add ucfg_cfr_capture_data api in CFR component
This API is used to parse the cfr capture metadata received in HTT msg
HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND from firmware. It reads the cfr dumps
from host allocated mem chunks for CFR using offset index received in
HTT msg, populates the CFR dumps into streamfs and updates the read
index of memory chunks allocated for CFR during init.

Change-Id: I2f49e308c3659779b8da7ae1baaceb5bfa968b4e
CRs-Fixed: 2687062
2020-07-02 05:55:48 -07:00
Manjunathappa Prakash
8fdb48014e qcacmn: Add fse_flush timer handler and fse_flush history handle
Add fse_flush timer handler and fse_flush history handle for
FISA FSE cache flush optimization.

Change-Id: I860301d6e3105fc547f241e9539fb67b8ea765a7
CRs-Fixed: 2719646
2020-07-02 05:55:45 -07:00
Wu Gao
fd40e399fb qcacmn: Add WIFI_POWER_EVENT_WAKELOCK_TDLS
Add wow support for TDLS, so add WIFI_POWER_EVENT_WAKELOCK_TDLS.

Change-Id: I0a7e4075f4fadde631559555f45696511757b819
CRs-Fixed: 2716903
2020-07-02 05:55:41 -07:00
Baowei Liu
f884be9f79 qcacmn: Improve 'Not set force_set if event completed'
Original changes have problems and have been reverted.
This is improved fix, the difference is set event done flag
before complete

Original submit is I31f947169153ccbeb8435c539faab1059c055c04
Revert submit is If8318b28883ae8ddd4fee36013f28c45f30fa426

Change-Id: I72814381a3ee932c9ff43fdae7d2dda5619baa48
2020-07-01 18:06:19 -07:00
Rakesh Pillai
94c0917f49 qcacmn: Monitor mode improvements
Move the srng history to hif context.

Process the monitor ring only for the lmac
corresponding to the configured monitor channel.

Add the timer and srng history for monitor mode.

Change-Id: I4e5e49ad5e657b55bfafbb40ef5f59496277cb40
CRs-Fixed: 2690530
2020-07-01 07:50:55 -07:00
Neha Bisht
e3876720a2 qcacmn: Add ini config to remap reo destination rings used by host
Adding support for enabling ini config to remap reo destination rings
for HK v1, HK v2, maple and pine platforms.

Change-Id: Id9d304521f32497e3acd845ddd2973b96b641516
2020-07-01 05:42:51 -07:00
Tallapragada Kalyan
0ee16f8b94 qcacmn: use proper printk specifier for printing 261 stats
change the printk specifier from %d to %u to print
261 (rx_stats) stats

CRs-Fixed: 2722219
Change-Id: I714b5f018446911d57b34b21b3b4dd7595671a7a
2020-07-01 05:42:48 -07:00
Abhishek Singh
e2097ddb09 qcacmn: Replace different struct of SISD with struct wlan_ssid
There are different version of SSID structure used in driver, replace
them with struct wlan_ssid.

Also move struct element_info from scan module to generic structures.

Change-Id: Ia32f82d943980c23b4ff478f5a06c5c053036de5
CRs-Fixed: 2721872
2020-07-01 00:26:20 -07:00
Chaithanya Garrepalli
bd70ec6350 qcacmn: Rearrange fields in dp_tx_desc to avoid padding
Current dp_tx_desc structure size is 136 bytes,
re-arranged the fields to fit in exactly 128 bytes to
align with number of descriptor per page and page offset
bit maps

Also add a compilation assert on tx desc size

Change-Id: Ifcb18a9da637cb71c0427b56ad4054d2206ddfbb
2020-07-01 00:26:16 -07:00
Ashish Kumar Dhanotiya
e7e012dc4d Revert "qcacmn: Update freq range 5170-5250 to indoor only for APL9"
This reverts commit I7c52fc76b5a8d6a47d515025d05b110332347246.

Change-Id: I3e24134e02a5a1a3f4a0f901b1c0742c21bd52fa
CRs-Fixed: 2719624
2020-06-30 14:58:25 -07:00
Mohammed Siddiq
61d47a3695 qcacmn: Use IS_ENABLED for the definition of kernel module
Add code to use IS_ENABLED for CONFIG_WCNSS_MEM_PRE_ALLOC
kernel modules and remove inclusion of reduntant header
file cnss.h.

Change-Id: If1d098c7c6f326d12700f06318909a7fc0e7895a
CRs-fixed: 2702368
2020-06-30 12:30:17 -07:00
phadiman
c90e1dc372 qcacmn: Fix incorrect verbose level debug print
If QDF_TRACE is called with wrong verbose level then
the actual print is supressed and a error log will be
printed indicating wrong verbose level

This change is introduced because of an issue wherein
the prints flooded with wrong verbose level and could
not identify the incorrect caller

Add change to concatenate the actual print along with
failure message to help identify such incorrect callers

CRs-Fixed: 2716564
Change-Id: I19c4e80958c1ab5d621eea3a6d32308ce4c51558
2020-06-30 12:30:13 -07:00
Abhishek Singh
62fb09b241 qcacmn: Fix race between ser psoc close and vdev destroy handler
In wlan_serialization_psoc_disable the timers are freed without
holding lock and at the same time the
wlan_serialization_cleanup_vdev_timers from vdev destroy handler
is accessing the timers, this result in cleanup_vdev_timers
accessing freed timer memory resulting in assert.

Fix is to free timer memory while holding timer lock. Also as the
lock can be used by vdev delete handler after freeing in
psoc_disable, move the init and deinit of the lock to psoc create
and destroy handlers respectively.

Change-Id: Idf822a91022de6b51c7ee1895f71b6fb94fedd72
CRs-Fixed: 2721064
2020-06-30 02:34:01 -07:00
Guisen Yang
4676e72c02 qcacmn: Change nbuf unmap API when free rx nbuf
The DMA Map/Unmap was restricted to buffer size in rx process.
But the Unmap API was not changed when free nbuf in rx desc,
apply the new unmap API.

Change-Id: Id10d746776aa9e41ef3425e166ba0207851358d6
CRs-Fixed: 2716690
2020-06-30 02:33:58 -07:00
gaurank kathpalia
9fa7cd067f qcacmn: Update the Copyright year in bss score files
Update the Copyright year in new bss score file.

Change-Id: Iaafcd74fe7f4b2c1d71e98c2884333d14f5777ff
CRs-Fixed: 2720551
2020-06-29 23:46:59 -07:00
gaurank kathpalia
92354bad4d qcacmn: Update the Copyright year in new connection manager files
Update the Copyright year in new connection manager file.

Change-Id: I599d9fb56ac74d6147774f03683fbef19598d637
CRs-Fixed: 2720551
2020-06-29 23:46:56 -07:00
Vevek Venkatesan
d04ad531c8 qcacmn: fix format specifier in qdf_dpt_dump_stats_debugfs
Fix proper format specifier for qdf_debugfs_printf in
qdf_dpt_dump_stats_debugfs.

Change-Id: I3d357cb677c6419e13c3c2333b43d4cae2f2df41
CRs-Fixed: 2717408
2020-06-29 21:35:31 -07:00
Surabhi Vishnoi
d2c2a6aec6 qcacmn: Add support for CFR in adrastea target
Add the init and deinit CFR pdev api for adrastea target type.
cfr_adrastea_init_pdev api enables the CFR feature if both host and
firmware supports the feature, initialises the cfr pdev structure
and streamfs.

Also during allocation of memory requested by firmware, skip smaller
chunks memory allocation for CFR capture requested memory as firmware
expects contiguous memory.

Change-Id: Ib893dc8a845fea990a11e95e98d8a656f7df12ba
CRs-Fixed: 2687057
2020-06-29 19:15:56 -07:00
Debasis Das
dd686ad391 qcacmn: Enable EWMA for appropriate kernel version
EWMA-related macros are available from version 4.3.0 onwards.

Change-Id: I94ffae3a72894e7494903445f752e926942f9af7
2020-06-29 07:44:00 -07:00
Debasis Das
a4ea8ba2ec qcacmn: Use 0 as pci_id for kernel version 4.18 and beyond
From kernel version 4.18 onward, the API to fetch pci_id
is deprecated.Assign "0" to pci_id for such case.

Change-Id: Ifb370999402ddc0889d982e251a7f8dea877b17d
2020-06-29 04:59:55 -07:00
Aniruddha Paul
ea81d9ac47 qcacmn: Add qdf API wrapper for ktime_real_get
Add qdf wrapper API to the ktime_real(). This gives the
current wallclock in ktime format.

Change-Id: If869985007225606075fb936593d5798ea0746e9
2020-06-29 02:38:43 -07:00
Chaithanya Garrepalli
eb6c7aa478 qcacmn: decrement num ast entries in hash clean up
In wifi down path decrement the ast count while force
freeing AST hash table

Change-Id: If98785eada2866c860ad4769fa744ca29d93dfbe
2020-06-29 02:38:40 -07:00
Hariharan Basuthkar
5816c50032 qcacmn: 11ax draft 6.1 6G channelization update
In 11ax draft 6.1, the 6G starting frequency has been shifted by 10 MHz
to the right from 5940 to 5950. Make the following changes in various
variables and structures in the regulatory component:

1. Add a macro SIX_GHZ_NON_ORPHAN_START_FREQ.
2. Add an orphan channel frequency - 5935 MHz to the chan enum.
3. Shift every enum in channel_enum by 10 MHz to the right.
4. Shift MIN_CHANNEL_6GHZ and MAX_CHANNEL_6GHZ by 10 MHz on the right.
5. Shift every center frequeny by 10 MHz on the right in
   bonded_chan_40mhz_list_freq, bonded_chan_80mhz_list_freq,
   bonded_chan_160mhz_list_freq.
6. Shift every center frequeny by 10 MHz on the right in channel_map_us,
   channel_map_eu, channel_map_japan, channel_map_global and
   channel_map_china channel maps.
7. Change 6G starting frequency from 5940 to 5950 for operating class
   131 to 135 in the global_op_class table.
   table.
8. Add operating class 136 in the global_op_class table.

Change-Id: I3c82e2eb98cdaf0ff8754bd990529a1833276304
CRs-Fixed: 2704977
2020-06-27 22:45:43 -07:00
Arun Kumar Khandavalli
49f2ec70bc qcacmn: Remove load/unload log in diag reporting
There are multiple places in the driver where the diag events
are reported and if the unload has started these diag events
are logged and dropped if there is storm of diag events because
of some thread message flushing this logging of the message will
cause excessive logging.

Remove the log as driver is unloading and it won't be sending it
userspace logging either.

Change-Id: Ie4c5caf44ad509da213f1bc76ff6ef6dfeecde2d
CRs-Fixed: 2716899
2020-06-27 17:31:14 -07:00
Lincoln Tran
a86b23ee68 qcacmn: Update scheduler_msg callback type
This fixes a CFI failure in callback assignment.

Currently, the callbacks in scheduler_msg are void function
pointers. Update them to have a defined type as
scheduler_msg_process_fn_t to catch type mismatch during
compilation.

Other changes to conform to this new type include:
	1. Cast callback to qdf_mc_timer_callback_t when
	   referencing, and back when assigning
	2. Cast wlan_serialization_generic_timer_cb to
	   take fit into scheduler_msg
	3. Cast target_if_vdev_mgr_rsp_timer_cb to fit
	   into scheduler_msg

Change-Id: I052bc54826d377ae92f5bcc80ca08afb6f5e01e3
CRs-fixed: 2719975
2020-06-27 06:18:28 -07:00
Pragaspathi Thilagaraj
acc60e6ede qcacmn: Add support to send WMI_VDEV_SET_PCL_CMDID command
For STA + STA roaming, instead of WMI_PDEV_SET_PCL_CMDID, the
WMI_VDEV_SET_PCL_CMDID needs to be sent.
Declare the corresponding send_vdev_set_pcl_cmd wmi tlv ops for
sending the WMI_VDEV_SET_PCL_CMDID command.
Also add changes to read the peer create confirmation and dual
sta roam feature support firmware capability.

Change-Id: I21456cb2e4c0b2bb66bf341539d2070677c49d16
CRs-Fixed: 2702849
2020-06-27 06:18:25 -07:00
Alok Kumar
f90dff9449 qcacmn: Fix compilation issue due to uninitialized variables
After enabling FISA, getting compilation issue in WHUNT due to
-Werror=maybe-uninitialized.

Fix this issue by initializing the uninitialized variables.

Change-Id: I4bdb76ba445630fb09df440f587291f0c3e382ec
CRs-Fixed: 2717632
2020-06-27 03:57:39 -07:00
gaurank kathpalia
9375922ab2 qcacmn: Add basic infra for connection manager
Add basic infra for connection mgr state machine
to handle connect and disconnect requests.

Change-Id: I671f62f66ab511912886c1da84c3a69be0032872
CRs-Fixed: 2707901
2020-06-26 22:48:35 -07:00
Arun Kumar Khandavalli
6d768494e5 qcacmn: Ignore sched watchdog timeout incase of recovery
For some targets, whenever the recovery is triggered in the scheduler
thread context, in the same context the firmware dump collection
could also happen and can more time than the watchdog timeout for
the same.

So check and ignore watchdog timeout when the recovery is already
inprogress.

Change-Id: I0e74e73139a83c6361407fe2eef8d6d0cf2a5d8c
CRs-Fixed: 2718984
2020-06-26 20:18:46 -07:00
Lincoln Tran
a6029b9c59 qcacmn: Add case when to disable burst scan
Currently, file transfer from DUT to comp device is slower
than expected. Disable burst scan in STA+GO/CLI scenario to
resolve this.

Change-Id: Ieded4aaa54f233cc288d6b6f3ef7051bfe5ec81f
CRs-fixed: 2703285
2020-06-26 20:18:43 -07:00
Alan Chen
fd5e8cd07c qcacmn: Define a new attribute for Optimized Power Management
Define a new attribute for Optimized Power Management.

Change-Id: Id7480be9ff9c8aa2c9a20ea890b9ae0fd2b52f19
CRs-Fixed: 2705539
2020-06-26 20:18:39 -07:00
Utkarsh Bhatnagar
2ebcbdbe31 qcacmn: Add boot time log print in scm_add_update_entry
Add boot time log print in scm_add_update_entry so that it
should be printed for every beacon/probe response.
This will be useful in getting the value filled in
NL80211_BSS_LAST_SEEN_BOOTTIME.

Change-Id: I0d348db551ffc9f765d0b6d8e8654573b7b70654
CRs-Fixed: 2716941
2020-06-26 16:48:47 -07:00