Commit Graph

693 Commits

Author SHA1 Message Date
Sachin Ahuja
e03b460045 qcacld-3.0: Flush the recovery work as a part of idle shutdown
During idle shutdown(T1 Thread), Driver sends the PDEV
suspend command to FW. If ACK is not received, driver initiates
the work for self recovery. As a part of self recovery(T2 thread)
driver allocates  the memory and sends the force fw hang cmd and
wait for the event.
T1 thread continues and stop all the modules and check for mem leaks.
Since t2 thread is not completed and free the memory, the crash
happens as a part of mem leak check.

Fix this race condition by cancelling and flushing the recovery work
in cds close.

CRs-Fixed: 2730021
Change-Id: Ieffff621e0838b341531c5b7feda1277ee4f70fd
2020-07-27 18:02:19 -07:00
Yeshwanth Sriram Guntuka
e0fe1711e5 qcacld-3.0: Register STA tx completion cb to update stats
Register STA tx completion callback with dp as part of
vdev registration to update successful ack stats.

Change-Id: I27f36336f0e37d43cc2cdff204c0217667a48b13
CRs-Fixed: 2682020
2020-07-22 11:55:20 -07:00
Mohit Khanna
114f32b925 qcacld-3.0: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725394
Change-Id: Ib09ef7a0f118d181f4d358857eb960ee41af9e54
2020-07-12 01:49:28 -07:00
Arun Kumar Khandavalli
288bc9d412 qcacld-3.0: Disable the panic on the self-recovery ini disable
Currently once the gEnableSelfRecovery is disabled it is decided to panic
once the firmware complete firmware dump is collected, this has a 
side-effect when the normal SSR is triggered for testing purposes.
This reverts commit Ia184a265d0f76e43d1d5edc4bcc0849a05726dac.

Change-Id: Icec14a2afb902a275ffe0bf202ec75d8e58d9f58
CRs-Fixed: 2725430
2020-07-06 08:33:52 -07:00
Wu Gao
aa07f31e41 qcacld-3.0: Add change to check DRV support
Add change to check check DRV support by platform capability.

Change-Id: Ib0f245672fbba9655ce923dcaef8c4ae28bceff2
CRs-Fixed: 2722648
2020-07-02 18:23:22 -07:00
Sourav Mohapatra
584440c8d1 qcacld-3.0: Assert early on to enable dump info collection
Presently, in the host initiated recovery the handler checks whether
the support for recovery is enabled via the ini or triggers the panic.
Whenever the panic is triggered the irq's will be disabled,
this results in some targets not able to collect the important
MHI, PCI information on what caused the issue to root cause the issue.

So, for different targets check the ini at different places. In this
case, move PCI based check to the start.

Change-Id: Ia184a265d0f76e43d1d5edc4bcc0849a05726dac
CRs-Fixed: 2720999
2020-06-30 12:30:03 -07:00
Jianmin Zhu
faf92193d4 qcacld-3.0: Replace channel with frequency for 6G
Replace wlan_reg_is_24ghz_ch with wlan_reg_is_24ghz_ch_freq.
Replace channel with frequency in cds_get_vendor_reg_flags.

Change-Id: I72ffc5550e45be1edf460f9619fead8889cf2967
CRs-Fixed: 2714723
2020-06-23 04:01:03 -07:00
Arun Kumar Khandavalli
b6404b1bbb qcacld-3-0: Have bus specific recovery ini checks to get imp info
Presently, in the host initiated recovery the handler checks whether
the support for recovery is enabled via the ini or triggers the panic.
Whenever the panic is triggered the irq's will be disabled,
this results in some targets not able to collect the important
MHI, PCI information on what caused the issue to root cause the issue.

So, for different targets check the ini at different places.

Change-Id: I0d0e322610abd9f8ceaba4fe9688cdd099c381e5
CRs-Fixed: 2715603
2020-06-22 12:37:30 -07:00
Srinivas Girigowda
7678422000 qcacld-3.0: Replace obsolete WMA_LOGD() with wma_debug()
Replace obsolete WMA_LOGD() macro with wma_debug().

Change-Id: I41534dd1cc0321d0e5a77a8ba1f4fbe07ad7e6f3
CRs-Fixed: 2712788
2020-06-19 19:45:04 -07:00
Mohit Khanna
0bb3f018bf qcacld-3.0: Add NAN TX checksum offload INI entry
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.

Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.

CRs-Fixed: 2698342
Change-Id: I56319095e6229d77ddb5c790d0af9c6ba0267611
2020-06-16 12:20:10 -07:00
Bapiraju Alla
2f20b939d1 qcacld-3.0: Specify exact size of the version string while coping
While coping version strings in cds_hang_event_notifier_call, specify
exact size of QWLAN_VERSIONSTR/QDF_HANG_EVENT_VERSION to avoid buffer
overflow.

Change-Id: Ie2203600a2c92bb78ba076b609375ca219773b19
CRs-Fixed: 2702069
2020-06-07 17:42:29 -07:00
Baowei Liu
78aa7bdfc1 qcacld-3.0: Skip recovering check if host assert target
In cds_trigger_recovery_handler, Host driver first set flag recovering
before cds_force_assert_target. For Rome, ol_target_failure run when
FW crash, Self-Recovery stop when detect flag recoverying be set

Add CDS_DRIVER_STATE_ASSERTING_TARGET to record Host asserting in
cds_force_assert_target. Skip recovering check in ol_target_failure
if detect this flag.

Change-Id: I290e2f21bd0bca6dc6d76de43de4f8dd801d7ff5
2020-05-28 21:07:32 -07:00
Abhishek Singh
3f29b6c7f2 qcacld-3.0: Use crypto API to fill and validate mmie
Use crypto API to fill and validate mmie for BC frames.

Change-Id: Ibe420f974c1f8fb3796168e6db976061f904d520
CRs-Fixed: 2664276
2020-05-04 03:50:06 -07:00
Vevek Venkatesan
dd3189d379 qcacld-3.0: introduce DP soc pdev init/deinit sequence
DP init/deinit flow to have dp_soc_init/dp_pdev_init
APIs where it takes care of initializing rings,
descriptors and DP data structures that was earlier
done as part of dp_soc_attach/dp_pdev_attach itself

This is to maintain symmetry across wifi load/unload

wifi load to call:
	1. dp_soc_attach
	2. dp_soc_init
	3. dp_pdev_attach
	4. dp_pdev_init

wifi unload to call:
	1. dp_pdev_deinit
	2. dp_pdev_detach
	3. dp_soc_deinit
	4. dp_soc_detach

Change-Id: I5889e0eafdb2fa6319c440725590e7a3014d8be0
CRs-Fixed: 2674081
2020-05-03 12:00:48 -07:00
Arun Kumar Khandavalli
c12256416b qcacld-3.0: Pass the function name for control path skb allocation
Presently whenever the control path is allocating the skb it is
passing the filename rather than than the function name required
by the qdf nbuf framework which is not much useful since when the
absolute path of the filename is considered and that can be truncated
leaving with only linenumber to understand the issue.

Pass the function name so it would help in root-causing the issue.

Change-Id: I998a88a3d22354500f3d01d09c91f0367755a179
CRs-Fixed: 2659490
2020-04-28 10:31:44 -07:00
Jingxiang Ge
638ff0c744 qcacld-3.0: Supsend fw firstly when ready event timeout
In case wait for ready event timeout from fw, need to
suspend fw firstly, otherwise fw is not aware host
will free resources.

Change-Id: Ifb7ab7fcf0cf468d59dc462dfdb27851fa4e596e
CRs-Fixed: 2669433
2020-04-23 13:12:24 -07:00
Arun Kumar Khandavalli
81f73d678b qcacld-3.0: update the hang data for the cds module
Update the hang data for the cds module, as part of the hang
data following information is filled:
	1) Hang Event version
	2) Wlan Driver version
	3) Reason for recovery

Change-Id: Ie5a008d1f9512f8e83a1d099fe333b0d2ce90abb
CRs-Fixed: 2650848
2020-04-01 12:39:19 -07:00
Sourav Mohapatra
9eb8bc01a0 qcacld-3.0: Modify cds_trigger_recovery as per modified QDF framework
The QDF framework for triggering self recovery is undergoing changes to
include support for multiple psoc driver. As the MCL host is still
multiple psoc agnostic, create dummy wrappers over the
cds_trigger_recovery so as to maintain compatibility with modified
qdf_trigger_self_recovery

Change-Id: I42163879c3e786a2b9ab2f9f5785be5531754e77
CRs-Fixed: 2617709
2020-03-27 10:17:47 -07:00
Liangwei Dong
1a4edd541e qcacld-3.0: Process request of send delba indication
Handle send delba indication from DP. It will help DP to
do aggregation tid management.

Change-Id: I18455107ef8d042644efc8ce549a104612eec05c
CRs-Fixed: 2637485
2020-03-24 19:57:06 -07:00
Jingxiang Ge
7cca7f52ae qcacld-3.0: Use workqueue for recovery when suspend/resume timeout
When suspend/resume timeout, it will trigger recovery,
current as it direcly trigger assert to fw, which will
take more time to dump ramdump, so DPM WD timer expired.

To avoid DPM WD timer expired, trigger ramdump in a
separate workqueue, so it will not block DPM WD timer.

Change-Id: I1a9349a05a37544329946270065037cd90172fc7
CRs-Fixed: 2645163
2020-03-21 07:08:53 -07:00
Manjunathappa Prakash
9d37c64121 qcacld-3.0: Enable SMMU S1 for Lahaina platform
Enable IPA SMMU S1 translation feature flag for
Lahaina target.
asm/dma-iommu.h file is removed in latest 5.4 kernel,
resulting in include failure. Remove as it is unused
for version 5.4 and above.

Change-Id: Ie2147f2fc2debad4d700fae5414d1d3becb28f13
CRs-Fixed: 2638580
2020-03-19 01:35:53 -07:00
Dundi Raviteja
56eec3d519 qcacld-3.0: Remove packet capture ini's in cds
Remove packet capture ini's in cds.

Change-Id: Ice4765c7eb697743b1dccc8a70be1b7ce766e037
CRs-Fixed: 2619322
2020-02-20 16:23:37 -08:00
Abhishek Singh
6d5bac846a qcacld-3.0: Optimize logs in STA disconnect path
Optimize logs in STA disconnect path

Change-Id: I3534f3ab89ebbdd919c02120328013e42d2894f4
CRs-Fixed: 2623124
2020-02-18 01:53:50 -08:00
Vulupala Shashank Reddy
a7e26ef49f qcacld-3.0: Resume/suspend of mon thread for packet capture
Resume/suspend of mon thread for packet capture mode.

Change-Id: Ib814de13f82181aef923bdc739d018027ea9a173
CRs-Fixed: 2618657
2020-02-16 04:01:45 -08:00
Alok Kumar
66f247de8c qcacld-3.0: Configure pktlog buffer size from INI
Configure buffer size for packet log through INI

Change-Id: I8102aefbd154da9f8db7e9065ccb6d7da2d27e5e
CRs-Fixed: 2611411
2020-01-31 02:33:31 -08:00
Rakesh Pillai
ed73605fe2 qcacld-3.0: Remove usage of datapath handles in outer layers
Currently many layers store the datapath handles i.e.
pdev and vdev handles and use them for passing as an
argument to the CDP APIs. This gives way to possible
race conditions, where the datapath handle provided by
the outer layer might be a stale pointer, which in turn
leads to unexpected results.

Remove the storage and usage of all the datapath handles
from the layers currently using them.
- cds_context
- vdev objmgr
- pdev objmgr

Change-Id: Icf24bd3792af203d1a06e153f0badd6e7405559f
CRs-Fixed: 2602199
2020-01-23 14:27:28 -08:00
Arun Kumar Khandavalli
bdba410daa qcacld-3.0: Selectively reduce cds logs
Reduce the cds logs from info to debug.

Change-Id: I2b69dd1c03f6823254098b2ab22532b956001e1e
CRs-Fixed: 2607010
2020-01-23 10:57:03 -08:00
Abhinav Kumar
58f72636d0 qcacld-3.0: Update proper copyright years
Update proper copyright years in
core/cds/inc/cds_regdomain.h

Change-Id: Ia013943c33d6143c58def6a5ed5e3126a2e412da
CRs-Fixed: 2605822
2020-01-23 07:55:32 -08:00
Alan Chen
6569f97e67 qcacld-3.0: Use QDF API to check driver unload in DSC
Use newly defined QDF API in CMN qdf_is_driver_unloading() to check
if driver unload is in progress in DSC.

Change-Id: I2958c6cc3ee6f2ac4302e2dbbf1c68d986fea175
CRs-Fixed: 2605706
2020-01-21 18:19:54 -08:00
Alok Kumar
2107a96e37 qcacld-3.0: Add driver support for QCA6750
Add driver support for QCA6750

Change-Id: I9e6716d5ed9f91532aba422c32b46b43760a0e88
CRs-Fixed: 2602141
2020-01-20 01:10:01 -08:00
Abhinav Kumar
30874c3ac7 qcacld-3.0: Modify the MAX_TX_PWR_CAP to 24dbm
Modify the max tx power value from 30db to 24db
to pass certification test cases.

Change-Id: Idf9c3ca10d3216f0f4b1cf78f87586c6bd3c2c39
CRs-Fixed: 2601405
2020-01-15 01:29:42 -08:00
Tiger Yu
0da98c48ee qcacld-3.0: Refine RX GRO flush when detach the vdev device
There might be race condition when doing RX GRO flush between dp_rx_thread
and vdev detach thread.

Only doing RX GRO flush in the dp_rx_thread context, and use the events to
sync with dp_rx_thread and vdev detach thread.

Change-Id: I2dbf92c2c11e950ca790dd7429c8bb235c239d0c
CRs-Fixed: 2601826
2020-01-14 02:01:44 -08:00
Alok Kumar
f1d581361d qcacld-3.0: Open a mon thread for packet capture mode
Create a mon thread to process the packets for pktcapture
mode only if packet capture mode is enabled.

Change-Id: I64e3687d08acd0d27019ed9e11b5b92b13fcd878
CRs-Fixed: 2528545
2020-01-10 02:46:55 -08:00
Alok Kumar
45b9e9c730 qcacld-3.0: Add CDS API to update parameter for pkt capture mode
Update packet capture mode param in the HDD context
after reading the INI parameter.

Change-Id: I3ea88e376f1ad8ebc96715d08395331470c23d4a
CRs-Fixed: 2528536
2020-01-08 23:38:43 -08:00
Vevek Venkatesan
0ac759fc1c qcacld-3.0: cdp: Converge cdp_cmn_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- txrx_data_tx_cb_set
- txrx_mgmt_tx_cb_set
- txrx_mgmt_send_ext
- txrx_pdev_attach_target
- txrx_pdev_detach
- txrx_vdev_attach
- txrx_vdev_register
- txrx_vdev_detach
- txrx_peer_create
- txrx_peer_delete
- txrx_peer_delete_sync
- txrx_fw_stats_get
- txrx_get_vdev_from_vdev_id
- txrx_pdev_set_ctrl_pdev
- txrx_pdev_attach
- txrx_get_vdev_mac_addr
- txrx_pdev_post_attach
- txrx_pdev_pre_detach
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: Ib8b0b1edd63e7c3f8813b11ca26b50ec121fe255
CRs-Fixed: 2541459
2019-12-27 03:24:09 -08:00
Arun Kumar Khandavalli
3801c4f263 qcacld-3.0: Use stop adapter during SSR
Presently, during Subsystem Restart(SSR) the object references
are not released cleanly, invoke stop adapter during the SSR
to have common functionality between the netdevice going down
and SSR.

Change-Id: I2980379022f62ef27dea92868c8033c087544d50
CRs-Fixed: 2587443
2019-12-23 11:42:51 -08:00
Mohit Khanna
6c21d623e2 qcacld-3.0: Add 80211 BAR frame
Add IEEE 80211 Block ACK frame format.

CRs-Fixed: 2583857
Change-Id: Ib697a3146389c7d787df18a8c21cccc658ef383d
2019-12-13 20:39:05 -08:00
Vevek Venkatesan
31a38dc0df qcacld-3.0: cdp: Converge stats API
Currently cdp_host_get_vdev_stats API provided
with vdev handle as its arguments, which is
directly accessed in that API. This can cause
a race-condition in access of the respective
handle if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the vdev_id which will be used to get the
respective handles and hence avoiding unwanted
access of the handle if it has been deleted.

Change-Id: I4cc959b9244f5c22dea71194c86c583cd9c2a071
CRs-Fixed: 2583358
2019-12-10 19:39:12 -08:00
Rajeev Kumar
c4d3a19760 qcacld-3.0: Use QDF API qdf_set_wake_up_idle in rx thread
To avoid conditional compilation inside function body use QDF API
qdf_set_wake_up_idle in RX thread startup api.

Change-Id: Ibe78fb19893c6a942cfbdde2f33684ea402af47b
CRs-Fixed: 2580958
2019-12-09 15:58:00 -08:00
Will Huang
136ca8d298 qcacld-3.0: Adjust tx retries stats on some platforms
On some platforms with TQM, target don't know packet number of
successfully transmitted after more than one retransmission attempt,
and after TQM retry, host data path will be notified.

Adjust tx retries stats number from data path, and indicate to upper
layer when query by wlan_hdd_cfg80211_get_station() on these platforms,
other platforms keep tx retries from wmi vdev stats.

Change-Id: Ie4b9a9f3b9241a59452e3f21f68757f3638b1a19
CRs-Fixed: 2574368
2019-12-06 07:15:37 -08:00
Alok Kumar
68127f6594 qcacld-3.0: Affine RX thread to big cluster during uplink
During uplink traffic, affine RX thread to big cluster if
throughput is high and rx_packet counts above threshold.

Change-Id: I34034e79ee07c229966a279919acc11d1942b890
CRs-Fixed: 2557745
2019-12-05 18:05:10 -08:00
Vevek Venkatesan
b4016095ae qcacld-3.0: remove control path handles from cdp ops
Currently control path handles of pdev/vdev/peer
are given as arguments to cdp ops, which are
directly accessed by dp layer. This can cause a
race-condition in access of the handle if it
has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the psoc handle which can be accessed all over
to retrieve objmgr_pdev from psoc.

- rx_mic_error
- txrx_pdev_attach
- txrx_vdev_attach
- txrx_peer_create

Change-Id: Iaec8b913810f9035faa0010117cdff19bdded37f
CRs-Fixed: 2541431
2019-12-04 07:43:42 -08:00
Nirav Shah
fb9b1df409 qcacld-3.0: Add logic to bundle packets for HL
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.

Change-Id: Ib00135ca59b4c5f0f05edc93dca115bf17174a36
CRs-Fixed: 2561671
2019-12-01 17:40:55 -08:00
Arun Kumar Khandavalli
4f6a5bd519 qcacld-3.0: Send vdev create to fw from object create notification
Send vdev create to firmware when the mlme vdev create handler
is invoked as part of the vdev object create.

Change-Id: Ibba02f6b5885d7b3a62529ef51768f520395513e
CRs-Fixed: 2555943
2019-11-21 09:13:20 -08:00
Rakesh Pillai
6a36b0a26a qcacld-3.0: cdp: Convergence of cdp misc ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume

CRs-Fixed: 2539735
Change-Id: I2baad09fde29d439ae2099e01e4e68ed6b94196d
2019-11-21 06:11:43 -08:00
Liangwei Dong
897b439b3c qcacld-3.0: Add policy_mgr_is_hw_dbs_required_for_band API
policy_mgr_is_hw_dbs_required_for_band is for any HW where
PHYA/MAC0 doesn't support the given band. We need to switch
to DBS mode to support the band. So far we have
overloaded policy_mgr_is_hw_dbs_2x2_capable to achieve above.
Need a cleaner API to work in a generic way
(for 2x2, 1x1 or any chain mask configuration).

Change-Id: I1cb28bece1242fc749a0a6a56fadca0502850c43
CRs-Fixed: 2565939
2019-11-21 00:44:19 -08:00
Rakesh Pillai
84714471df qcacld-3.0: cdp: Convergence of cdp_ocb_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged ocb_ops
- set_ocb_chan_info
- get_ocb_chan_info

CRs-Fixed: 2539745
Change-Id: I7de53c48ec6b7f0c09be7c9cf642d8cf4f8eae78
2019-11-11 23:07:52 -08:00
Ashish Kumar Dhanotiya
94ffbd1079 qcacld-3.0: Remove cds_queue.h and queue.h from driver code
Currently MCL and WIN both have separate queue.h
files with the same declarations and definitions.
As part of cleanup single queue.h is created in cmn code,
use this newly created queue.h file instead of MCL
specific queue.h file.

Change-Id: I91619e5fff2040cb588cd0413cb42d5d7469f41f
CRs-fixed: 2505800
2019-11-05 02:12:22 -08:00
Rakesh Pillai
6c5af2fc0a qcacld-3.0: Use pdev_id instead of global dp handle
As a part of cdp convergence the pdev_id
is used to obtain the pdev handle on need
basis.

Instead of the pdev handle, use the pdev_id to
retrieve datapath pdev handle.

CRs-Fixed: 2539733
Change-Id: I887ea2f1a312207cbb642b33435f4e7111068c62
2019-10-24 21:41:42 -07:00
Ashish Kumar Dhanotiya
ca5d922263 qcacld-3.0: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: Ib063070738ecdb4f83379eafe50629778a490aae
CRs-fixed: 2522693
2019-10-18 02:55:17 -07:00