Commit Graph

9006 Commits

Author SHA1 Message Date
Aditya Kodukula
b25366fa6f qcacmn: Check for NULL pointer before de-referencing it
Pointer 'hif_ctx' returned from call to function 'cds_get_context'
may be NULL. Check for NULL pointer before de-referencing it.

Change-Id: I6c909b2c62e1bf6945a4cc40315e8fdad4a0aa83
CRs-Fixed: 2726335
2020-07-10 01:43:25 -07:00
Kai Chen
2b3f9a1057 qcacmn: use host pdev id for wdi event handler
wdi event handler take host pdev id. Convert lmac/target pdev id to host
pdev id for wdi event handler.

Change-Id: Iaf1f3e77055be0178d810d960924ca618b334fd2
2020-07-10 01:43:22 -07:00
Ashish Kumar Dhanotiya
a54735abdd qcacmn: Change data type of the code for qdf trace to uint16_t
Currently for qdf trace api data type of code is uint8_t, some of
the modules are inserting message id of type uint16_t because of
which some information is getting lost and post processing cmm
script is not able to parse these messages correctly.

To address above issue, change the data type of code for
qdf trace function.

CRs-Fixed: 2719767
Change-Id: I4461dc9c2f45e691317d318870dfdbce93929e12
2020-07-09 21:39:40 -07:00
Basamma Yakkanahalli
81e70bb153 qcacmn: Enable Spectral feature for ipq5018 target
a. Enable DDMA support and FFT bin length adjustment SWARs
b. Similar to QCN9000,
Skip 16 bytes of unused padding added after Spectral summary report
FFT report header length is 24

Change-Id: I870f198511771dccbb0300ff62fc15ab0d64ee7f
2020-07-09 15:54:29 -07:00
Aniruddha Paul
915f53b12f qcacmn: Add INI support for peer ext stats
Add INI support for peer extended stats. The extended
stats as of now include per peer Tx/Rx delay per packet
path.

Change-Id: I20d3c7f81f65f4db5f111eb103945151a8cd83aa
2020-07-09 13:43:41 -07:00
Vevek Venkatesan
0b06fc4e7e qcacmn: fix the pointer access before NULL check errors
Fixing the errors of accessing pointer before NULL check.

Change-Id: Idaa4348e2f40b14eb391826cda37b027360fad72
CRs-Fixed: 2726351
2020-07-09 13:43:38 -07:00
Chaoli Zhou
7c40c9d475 qcacmn: Fix compile error while enable CONFIG_REMOVE_PKT_LOG
Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting

Change-Id: I493fbddec865fe20789022445b0f155201772119
2020-07-09 09:24:09 -07:00
syed touqeer pasha
f2d33c938b qcacmn: Handle insufficient headroom
If headroom is insufficient during ppdu metadata receive,
reallocate headroom.

Change-Id: Ib3c5295ce73eaab5a5ff6b37f0f37361e7135b9c
2020-07-09 03:03:49 -07:00
Abhishek Singh
60f7ef7fb1 qcacmn: Remove unused filter params from scan filter
Remove unused filter params from scan filter. Also
change the type of few, to decrease the memory required.

Change-Id: I3f86d416805174b56c8998f5a4a4723d9ebdd90b
CRs-Fixed: 2723220
2020-07-08 21:02:39 -07:00
Srinivas Dasari
4e5cfb2ac9 qcacmn: Add vdev param to configure NAN feature bitmap to firmware
Define a new vdev param to set corresponding bit to enable/disable
a particular NAN feature.
Currently, Framework configures NAN DW as 4 seconds when the
device is in sync role and the screen is off. But customers might
want this to be 512ms always irrespective of screen off/on.
Send the vdev param on NAN vdev by setting the "bit 0" to 0 to
indicate firmware to ignore framework configured DW value and
consider the firmware default value.

Change-Id: Idcbdae94bd6a96fbbe15ec103a0aa558cdfcd572
CRs-Fixed: 2721980
2020-07-08 18:55:57 -07:00
aloksing
093d940112 qcacmn: Add wmi support wifistats
Send WMI command to FW with provided tlv from wifistats

Change-Id: I80ac9f621c75429bdca18962423026c2008a71d0
2020-07-08 08:59:19 -07:00
Yu Tian
0b0c3e3c7a qcacmn: fix index overflow when tso seg large
In some cases, TSO segment may larger than 255.
If use uint8 as the loop index, tx logic will
overflow and sending the last segment repeatly,
then lead to buffer double free. Change index
variable to uint32

CRs-Fixed: 2722918

Change-Id: I156a5d8b8a3895e4f7bfc53cf5561f51ca8b06ca
2020-07-08 08:59:16 -07:00
Tallapragada Kalyan
b1a2f9fbad qcacmn: remove additional reap logic for SG buffers
remove additional reap logic for SG buffers, as we
are also maintaining a state for SG buffers in dp_soc
structure

CRs-Fixed: 2722245
Change-Id: Ibec3007036e78a2ec1c5055244b6518f889e16a4
2020-07-08 06:51:52 -07:00
Shwetha G K
1e31344702 qcacmn: Profile scan APIs to debug scheduler watch dog bite
Profile the scan APIs to debug the scheduler watch dog bite
due to callback scm_scan_event_handler exceeded its allotted
time of 10s

CRs-Fixed: 2713584
Change-Id: I494ce9df4cd6c7458c367527c8e5d47a9262739a
2020-07-08 00:09:47 -07:00
Pragaspathi Thilagaraj
81b14a586e qcacmn: Add API to get FILS pmksa entry cache id and SSID
Add new API to lookup the pmksa entry by fils cache id
and SSID.

Change-Id: I654d2b29b97a3b02ab6da7d2cfa0884bb8e5d2a1
CRs-Fixed: 2719643
2020-07-07 21:38:43 -07:00
Jinwei Chen
56060bf997 qcacmn: add more FISA related variable
Add last_hal_aggr_count, cur_aggr_gso_size, head_skb_udp_hdr
to FISA SW entry structure.

Change-Id: Ic26101d191ec5fbceb04861523aae000cd5dbe94
CRs-Fixed: 2724925
2020-07-07 18:58:33 -07:00
Ashish Kumar Dhanotiya
eba983ed1e qcacmn: Fix return type of auth type and akm
Currently api osif_nl_to_crypto_auth_type is trying to convert
the nl specific auth types to driver specific auth types but
it does not return the correct value, this api always returns
auth type as none as it never updates the return value after
the initialization.

While parsing WPA and WAPI, open authmode and cipher and akm are
set as none by default.

Thus return converted value of the auth type. Also fix the
return type of the akm conversion. Also avoid setting
open authmode and cipher and akm as none while parsing WPA
and WAPI ie.

Change-Id: I260e58a28ddbf6b20a290488e205586a624c9b46
CRs-Fixed: 2725323
2020-07-07 16:23:18 -07:00
phadiman
1fe461c320 qcacmn: Add WMI LOG for Set Peer parameter
Add WMI LOG for set peer parameter for debug
purposes like set peer_nss, peer_nss_160

CRs-Fixed: 2726041
Change-Id: Ib1a3d22cd101b76efc07121fc333d303b1a26377
2020-07-07 14:16:54 -07:00
Yeshwanth Sriram Guntuka
199e1831ab qcacmn: Rate limit rxdma decrypt error related log
Rxdma decrypt errors are observed when the association
is in progress as AP sends encrypted data packets to
DUT-STA. As part of the rxdma error handling, excessive
prints are logged to console resulting in an assert.

Fix is to rate limit rxdma decrypt error related log

Change-Id: I2ef28c635d77e3acafd067b921cdb13c277756c7
CRs-Fixed: 2725335
2020-07-07 14:16:50 -07:00
Surya Prakash Raajen
c4d6b4d9c5 qcacmn: Move support_11ax macro to buildcaps
Move support_11ax macro to buildcaps to remove dependency
on legacy FW headers and add it on Buildcaps to fix
redefine error.

CRs-Fixed: 2719782
Change-Id: Ic2902663083cda10e0a9e9b2da85ee1b267b6b7c
2020-07-07 07:25:06 -07:00
Surya Prakash Raajen
7e56ece9a9 qcacmn: Decouple legacy FW headers
Decouple legacy FW headers for lithium builds since
its not required for the same

CRs-Fixed: 2719782
Change-Id: Ibdfdec51c5379fe42e23bf04a228ae6fb1a3eac9
2020-07-07 07:25:03 -07:00
Lin Bai
21e9784822 qcacmn: Use sync method to wake device
Use sync wake when trying to awake device for register
accessing.
This can avoid device re-enter low power mode after
device_wake asserted.

Change-Id: Iba62f5753ccb7e11d9746a445db4cce48e5e3a14
CRs-Fixed: 2703609
2020-07-07 07:25:00 -07:00
Shwetha G K
7b80d55849 qcacmn: HAL change to fetch cfr info from PHYRX & RXPCU ppdu end tlv
HAL change to fetch cfr info from PHYRX_PPDU_END_TLV & RXPCU_PPDU_END TLV

Change-Id: I5fa52e9de776a0ea8394dacffac8331fac75eda2
2020-07-07 02:53:34 -07:00
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