提交線圖

8539 次程式碼提交

作者 SHA1 備註 日期
Linux Build Service Account
28e014d1ec Merge "qcacmn: Use to wakeup_source_register from 4.19.110 kernels" 2020-04-08 09:17:04 -07:00
Linux Build Service Account
782c0802c6 Merge "qcacmn: Enable SW2TCL_CMD ring for data" 2020-04-08 09:17:04 -07:00
Naman Padhiar
87be18b922 qcacmn: Use to wakeup_source_register from 4.19.110 kernels
As part of new kernels it is suggested to move to the upstreamed
wakelock apis for registration and unregistration.

Change-Id: I80b8dd85c6ad1b50951fff9da810e8e96a402752
CRs-Fixed: 2658888
2020-04-08 08:19:22 -07:00
Radha Krishna Simha Jiguru
bfbf27a6e6 qcacmn: Enable SW2TCL_CMD ring for data
Enable SW2TCL_CMD ring for data on QCN9000, QCA8074 V2/V1
and IPQ6018 targets.

Enabled 4th Tx ring for data enqueue to HW.
Transmit completions for packets from CPU0 and CPU3 are routed to
WBM2SW Completion ring 2.
WB2SW completion ring2 is mapped to CPU3.

Change-Id: Ied4c4704e1f8623e909ad45c547a611de26c7ec5
2020-04-08 08:19:05 -07:00
Tiger Yu
19c09f199a qcacmn: Use QDF_BUG instead of the qdf_assert
Use QDF_BUG instead of the qdf_assert. Since the qdf_assert is not
defined anymore.

Change-Id: I2bd46def51823829604b699321f9a02fcd3b07c6
CRs-Fixed: 2658545
2020-04-08 01:41:10 -07:00
Rongjing Liao
a70123f9a2 qcacmn: add argument sanity check to avoid OOB
In function 'target_if_vdev_mgr_multi_vdev_restart_get_ref',
'param->num_vdevs' may have chance to hold values larger than
WLAN_UMAC_PDEV_MAX_VDEVS which will result in OOB
when access array 'vdev_list' and array 'vdev_timer_started'.

This change add sanity check for 'param->num_vdevs'to avoid
OOB.

Change-Id: Iae431fdc7006fe8c80d15d400d8a0423e9284eb7
CRs-Fixed: 2644122
2020-04-08 01:40:40 -07:00
Rakesh Pillai
018b298dba qcacmn: Increase the wbm release ring size
The WBM release ring size of 64 is a bit too
small for bursty nature of inwards traffic.
In monitor mode, there can be a huge ingress
of packets and returning the link descriptors
back to the WBM can fail due to its small size.

Increase the WBM release ring size to match the
RXDMA buffer ring.

Change-Id: I41c755f29566cd8cb99520736d34304344a82776
CRs-Fixed: 2650480
2020-04-07 20:20:06 -07:00
Rakesh Pillai
962dd74800 qcacmn: Reap more monitor ring entries before rescheduling timer
Currently, in monitor mode, once the status ring is reaped
we do not check again if there are new entries added in the
ring during the monitor ring descriptor processing. This
can cause backpressure on monitor rings when there is very
high throughput or a bursty inflow of packets.

Add the logic to continue reaping the monitor rings, until
the work budget or a time quota is not exhausted.

Change-Id: Iee95ac8aec92eabb3a8037b1dd9cf0c6e1dbe10b
CRs-Fixed: 2650480
2020-04-07 20:19:53 -07:00
Rakesh Pillai
e0332f2ef5 qcacmn: Process only LMAC rings for monitor mode
Currently the timer handler, in monitor mode, is
try to process all the rings based on the mask. In
monitor mode only LMAC rings are to be processed
and the UMAC ring processing can be avoided.

Process only the LMAC rings for monitor mode.

Change-Id: Ie48722d80722350129b5c079b67ede06945f5849
CRs-Fixed: 2650480
2020-04-07 20:19:39 -07:00
Rakesh Pillai
590d880a1e qcacmn: Change the loglevel for link desc return failure
In monitor mode, the link descriptor return failure
can occur many times, due to the timer interval.
Logging each failure on the console floods it with
too many unnecessary logs.

Ratelimit the link descriptor return failure in monitor
mode and also change its log level to info.

Change-Id: I5709a33087c6d9271d4246f04ef1acd274fba0f1
CRs-Fixed: 2650480
2020-04-07 20:19:23 -07:00
Rakesh Pillai
726242759f qcacmn: Change the monitor mode timer interval to 5ms
The current time interval for monitor mode timer is
10 milliseconds. This time interval is a bit too high
in case of high throughput sniffing, thereby causes
the monitor rings to be full before the timer interrupt
comes and reaps the ring.

Decrease the timer interval to 5 milliseconds

Change-Id: Ib074ef0c09fde995a7481c056ad70eb809c5a89e
CRs-Fixed: 2650480
2020-04-07 20:19:16 -07:00
Pragaspathi Thilagaraj
42e7bb35d4 qcacmn: Introduce scan api to get scan entry ageout time
The driver doesn't ageout connected BSS from rrm scan
result after the scan default ageout time. This results
in connected AP information sent in beacon report request
in table mode always.

Introduce scan api to get the scan age out time configured
from scan module. This value will be used as the threshold
in rrm scan filter.

Change-Id: Ib3981538faf179cff53936770f705d41922dca66
CRs-Fixed: 2650914
2020-04-07 18:23:10 -07:00
Himanshu Batra
d7e15e64e0 qcacmn: Drop FCS error frames in mon dest ring in mcopy mode
In mon dest ring, for m_copy mode, MGMT packets are received with
FCS error.Due to which multiple skbs (Head_skb with
attached frag_list) for single MPDU are sent to upper stack.
Add fix to drop FCS error frames in mcopy mode.

Change-Id: I6fbf2ea2bfdc489b56a412ece3c644ba2ce87929
2020-04-07 07:46:27 -07:00
sumedh baikady
a8f35820f4 qcacmn: Change minidump API name
Change the following minidump API names:
1. fill_minidump_segments -> minidump_fill_segments
2. remove_minidump_segments -> minidump_remove_segments

Change-Id: I7340a09cc7d82f8470ecfc0b7b4532107a25aa54
2020-04-07 06:17:18 -07:00
Manjunathappa Prakash
25390a01c2 qcacmn: flow_ctrl_v2: decouple tx_desc from TCLring descs
Decouple software tx_descs from TCLring descriptors and Increase
TCLring descriptors max INI config limit to 2k to 32k.

Change-Id: I18d014cdb0c1e26b7661ff65aaa8dffe791d7163
CRs-Fixed: 2657056
2020-04-07 03:01:29 -07:00
Vivek
5ebf9cf853 qcacmn: Check if cmd present in serialization queue atomically
The current API to get if a command is present in the active
queue was executed without the lock acquired. Here, at times
we get the queue size as one, and when we actually get the command
from the active queue, we get nothing.

This could be that the command from the active queue was removed
in another context almost at the same time, when we trying to read
the command from the active queue.

To avoid this, we do the operation of reading the queue size and
reading from the active queue with the queue locks held, so no
other context could remove the command from the active queue while
we are reading the command from the active queue.

CRs-Fixed: 2644038
Change-Id: Icca019320b1ba2d7d751432142b9bad50519d701
2020-04-07 03:01:13 -07:00
Jingxiang Ge
e7d41574f3 qcacmn: Add dbgid for each runtime put/get
This is to enhance statics for runtime put/get, which is
to detect if there is mismatch for usage_count.

Change-Id: I24cddb9d10e4cb675c8375cbd0f589c7718bd680
CRs-Fixed: 2647972
2020-04-07 01:20:41 -07:00
Hariharan Basuthkar
2905d1d38f qcacmn: Add china_op_class table to the regulatory component
As per IEEE 802.11 2016 specification Annex E Table E-5, add a new
operating class table for China.

Change-Id: I60d610d637c64df497c7c363a893b8f7efdc8a6c
CRs-Fixed: 2656789
2020-04-06 23:35:13 -07:00
Balaganapathy Palanisamy
9529e558f7 qcacmn: Skip freeze data processing if it is not valid
Skip the freeze data and capture type related processing
if freeze data is invalid.

CRs-Fixed: 2637644
Change-Id: I97da3b9dc0d655e47dec534d04e0897af57e33d8
2020-04-06 09:44:24 -07:00
gaurank kathpalia
3765db635c qcacmn: Add ini to enable/disable self roaming
Currently the driver allows roaming to the BSSID
which it is already connected, which can lead to
many unexpected behaviour, for eg. if the SAP
to which the DUT is connected turns off, then the
DUT would try to roam to other BSSID of the same
SSID, and in case the SAP turns on back in time,
then the DUT would re-associate to the same BSSID.
Now if the subnet may change, and since the DHCP
does not happen again in roaming, it would then
lead to NUD failure.

Fix is to introduce an ini to allow/disallow
roaming to the same BSSID.

Change-Id: I38887bbfb74c4856a06956591be4159734f7fbf0
CRs-Fixed: 2650346
2020-04-06 05:55:40 -07:00
Vignesh U
c1c90f6115 qcacmn: Sync PreCAC NOL with NOL
Problem:
1) When operating in 36VHT160 for example, if radar is hit without
bandwidth reduction dfs_radar_add_channel_list_to_nol_for_freq will add
only DFS channels (52,56,60,64) to NOL and disable them corresponding in
regulatory channel.
2)dfs_mark_precac_nol_for_freq will add all channel non-DFS(36,40,44,48)
and DFS (52,56,60,64) to preCAC nol. 3) after NOL expiry
non-DFS(36,40,44,48) will not be removed from the preCAC tree and
therefore cannot used (as part of the full 160Mhz channel) in future to
perform agile.

While processing RADAR the dfs_process_radar_ind() prepares the
list of frequencies (freq_list) to be added to NOL. This list
also contains the non-DFS channels.

Only DFS channels will be added to the NOL in
dfs_radar_add_channel_list_to_nol_for_freq() based on the channel state.
On adding to NOL, the channel state is also changed to disabled.

The subsequent APIs  that will need to process
NOL(dfs_mark_precac_nol_for_freq() for instance) will have only the
freq_list. Since the channel state is also changed for DFS channels in
freq_list, these APIs cannot differentiate a NOL channel and nonDFS
channel (as channel state is not DFS for both). Thus not adding
NOL channels to PreCAC NOL list.

Solution:
Use the NOL frequency list (nol_freq_list) that is the output
of dfs_radar_add_channel_list_to_nol_for_freq() to process NOL.

CRs-Fixed: 2655016
Change-Id: If3608405a5e8e63d93157914080dde4c01c1e0bb
2020-04-04 05:51:41 -07:00
bings
54a116dfa1 qcacmn: Add common wmi event path for wmi event from htc and qmi
Crash happens if wma_handle->link_stats_results is allocated and
freed by two threads at the same time.

WMI event should be handled uniformly whether it is from htc or qmi

Change-Id: I415fd228d15c1342944e77a74e564fe46dd9a5c5
CRs-Fixed: 2648865
2020-04-03 12:13:05 -07:00
Yeshwanth Sriram Guntuka
8cf020f44a qcacmn: Add support to register hif recovery notifier
Add support to register hif recovery notifier to log
hang event data.

Change-Id: I7e7ce2bacc88f00e68c2c347c3a578f377f8214f
CRs-Fixed: 2649147
2020-04-03 03:43:06 -07:00
Radha Krishna Simha Jiguru
1167fc9bd4 qcacmn: Restrict DMA Map/UnMap upto skb tail
Restrict DMA Map/UnMap upto tail of the packet during transmission
and transmit completion.

Change-Id: I5659d1bff967e529bb4408b5a7be5e6737726a32
2020-04-03 01:48:03 -07:00
Vignesh U
67f4d02569 qcacmn: Add 165MHz channel check for PreCAC done
Since the precac tree now supports until 165MHz, the APIs to check
if the channel has done precac or not,
dfs_is_precac_done_on_ht20_40_80_chan_for_freq() and
dfs_is_precac_done_on_ht8080_ht160_chan() needs to be updated.

Change dfs_is_precac_done_on_ht20_40_80_chan_for_freq() to
dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq() which can
check if precac is done on a 20/40/80/160/165MHz channel.

Change dfs_is_precac_done_on_ht8080_ht160_chan() to
dfs_is_precac_done_on_ht8080_chan() which can check if precac is done
on a given 80P80MHz channel other than the restricted 80P80MHz
(165MHz) channel.

Change-Id: I90312f968547d16b2d93783138c0f870439c6c26
CRs-Fixed: 2653171
2020-04-03 01:47:46 -07:00
gaurank kathpalia
f1f9621603 qcacmn: Flush the blacklist BSSIDs in FW
Currently, the expectation from the BLM is to flush
all the BSSIDs which are present in the blacklist
when the user does an explicit on-off, which is
meeting the expectation, but the FW does not flush
this info which leads to async between the two.

Fix is to send zero blacklist BSSID to FW during
Wifi-off so that it also flushes the list.

Change-Id: I0b7c10a31c1e47dc40d0390697efe41232c61cb1
CRs-Fixed: 2654183
2020-04-02 23:55:38 -07:00
Arun Kumar Khandavalli
48063f9d05 qcacmn: Move to Use wakeup_source_register from 4.19 kernels
As part of new kernels it is suggested to move to the upstreamed
wakelock apis for registration and unregistration.

Change-Id: Icc2bdeb6201fc65d351f75c5b49968fd23e2bba8
CRs-Fixed: 2639311
2020-04-02 22:16:57 -07:00
Karthik Kantamneni
765d5e27ed qcacmn: Make DMA coherent mask macro independent of IPA offload
Macro DMA_COHERENT_MASK_IPA_VER_3_AND_ABOVE is used in non
IPA offload case also so bring this macro definition out of
IPA offload feature and change it to DMA_COHERENT_MASK_DEFAULT.

Change-Id: Ib03aa8ae2938e1de1a957660923a711d452a9337
CRs-Fixed: 2649909
2020-04-02 22:16:38 -07:00
Sourav Mohapatra
1929eefb7f qcacmn: Reset vdev_resp->timer_status to properly handle timers
The vdev_resp timer status is a persistent variable that is not reset
after a cycle of send/timeout is completed. This causes the old value to
induce faulty behavior for the next cycle.

For example in the case when vdev_start response is dropped, the timer
status is set to TIMEDOUT and this status remains as such for the next
time vdev_start response is received successfully. In this case, instead
of deleting the timer, as the status is a faulty TIMEOUT - no action is
taken. This causes the kernel to assert.

To resolve the above issue, reset the vdev_resp->timer_status after
stopping the timer.

Change-Id: I8632c117753a7bb1f041d00c4d9395163732f5d9
CRs-Fixed: 2654040
2020-04-02 12:44:56 -07:00
Yu Tian
8abdbcc616 qcacmn: Implement send DELBA per HTT event
Is some cases, FW wants to adjust BA session parameters
FW sends a HTT event and HOST helps to send out DELBA
and modify BA win size in the next round of ADDBA req/resp
exchange to reduce following RX AMPDU aggr-size

Change-Id: I97777ff59a18346f2cd4e2e562c8ae6acdcd69d7
CRs-Fixed: 2644641
2020-04-02 00:12:42 -07:00
Bapiraju Alla
d5d364a58d qcacmn: Add new WMI API for OCL command
Currently there is no provision to configure OCL mode in FW during
driver bootup.

To enable this configuration add a new WMI API wmi_unified_send_ocl_cmd.

Change-Id: Idb936172612ff2ed8ea029d8a363b758625eb97d
CRs-Fixed: 2647631
2020-04-02 00:12:29 -07:00
Arun Kumar Khandavalli
1f76b82659 qcacmn: update the hang data for htc
whenever there is a wmi command timeout and recovery is triggered,
the htc credit history gives insight into whether host had the credits
to send the command to firmware. Add the credit history from the
htc module.

Change-Id: Iaa760981296862f8af496a23e3c24bc2fda0fb55
CRs-Fixed: 2651744
2020-04-01 21:16:54 -07:00
Bapiraju Alla
acf898a145 qcacmn: Fix return type for scheduler_msg callbacks
This fixes a CFI failure in callback assignment

Change-Id: I760b41b81c006187efb162d410390e1c11878b82
CRs-Fixed: 2643320
2020-04-01 12:40:45 -07:00
gaurank kathpalia
dfbe7d4fd0 qcacmn: Add support for STA+NAN+NDI+NDI
Add support for four port concurrency STA +
NAN discovery + NDI +NDI

Change-Id: I2db59c9c467a7211342c48aa61a2b9faf30a1ea5
CRs-Fixed: 2633983
2020-04-01 10:47:17 -07:00
Rongjing Liao
ed684a92f9 qcacmn: add pointer NULL check in spectral module
Add pointer NULL check before use in spectral module.

Change-Id: I018c52a175157605463c23cce95d78ffea23b867
CRs-Fixed: 2643196
2020-04-01 09:06:17 -07:00
Yu Tian
22eed0e6af qcacmn: Limit the REO cmd number in batch operate
MCL path add the desc back to freelist when FLUSH
failed. It may cause the CMD pending in free list
is even larger than REO_CMD_RING max size and lead CMD
flood then cause REO HW in an unexpected condition.
So it's needed to limit the number REO cmds in a batch
operation.

Change-Id: Ib6b97f0693feb7bb5829bda4683248b495b6c7b3
CRs-Fixed: 2642516
2020-04-01 07:36:33 -07:00
Aditya Kodukula
6a4676ec03 qcacmn: HIF_INFO to log the linkstate_vote in hif_main.c
Add HIF_INFO to log the linkstate_vote value in the hif_vote_link_up()
and hif_vote_link_down() functions in order to log the occurences of
the rare event when we vote for link up/down.

Change-Id: I7549b3400977583bd2cd4ec4fcb3f16dd0865ce7
CRs-Fixed: 2648860
2020-04-01 07:36:25 -07:00
Edayilliam Jayadev
12b6e9d07f qcacmn: Initialize FFT bin boundaries in 165 MHz
Initialize FFT bin boundaries of primary 80 MHz, 5 MHz
and secondary 80 MHz based on the relative position of
primary 80 MHz and secondary 80 MHz segment.

CRs-Fixed: 2653675
Change-Id: I0c9f1fbb55d1023b437c9787e753f3e154b5e08e
2020-04-01 04:15:54 -07:00
Yeshwanth Sriram Guntuka
0ffde7142a qcacmn: Add support to track per peer no ack counts
Add support to track no ack count for different protocol
packets per peer.

Change-Id: I32f04eb3817c1b6c4806c8bb0230db3a71fadb5e
CRs-Fixed: 2643532
2020-04-01 00:21:41 -07:00
Yeshwanth Sriram Guntuka
2a4239d3e9 qcacmn: Move definition of qdf_proto_subtype to different file
Move definition of qdf_proto_subtype to different file.

Change-Id: Ie897ccafbe1a4e1fe0a43399673ecce686bfb7bc
CRs-Fixed: 2653765
2020-04-01 00:21:25 -07:00
Yue Ma
e3c95fdc04 qcacmn: Enhance runtime PM enablement check
Currently HIF runtime PM APIs will check runtime PM enablement using
pm_runtime_enabled() by checking for disable_depth which can be changed
at any time. This may cause usage count imbalance since the HIF API may
skip calling the corresponding runtime PM framework API to increase or
decrease usage count. Enhance runtime PM enablement check so that it
will always honor WLAN ini config first.

Change-Id: I4b2863ef7fa0dcd6fd61b776e6cb0ab109ffb3ec
CRs-fixed: 2647986
2020-03-31 21:03:38 -07:00
Arun Kumar Khandavalli
2982c3a17a qcacmn: update the hang data for wmi
whenever there is a wmi timeout and recovery is triggered, the
wmi history gives insight into reason for the recovery, hence save
the last 5 commands/events to understand the reason for the hang
recovery.

Change-Id: Ie4e0431a8fa6971e6b25b20a6f267341d3f3f4fd
CRs-Fixed: 2650340
2020-03-31 18:16:18 -07:00
Abhishek Singh
6c39710274 qcacmn: Add DPP, CCKM, OSEN and OWE AKM in osif_akm_type_crypto_mapping
In osif_akm_type_crypto_mapping DPP, CCKM, OSEN and OWE AKMs are not
added. So AKM are not added in crypto module.

So add DPP, CCKM, OSEN and OWE enums in osif_akm_type_crypto_mapping.

Change-Id: Ie9e092f591ea03026cbf360abe40c663bdd078fd
CRs-Fixed: 2650380
2020-03-31 15:05:43 -07:00
Arun Kumar Khandavalli
551fd3f134 qcacmn: add the tags for the various hang event
As part of the hang event data population by various TLV format
is used, define tags for all the modules which can be used
while populating the data.

Change-Id: Ie9c53a8781a902ad687a78d1333053b6fae67021
CRs-Fixed: 2651729
2020-03-31 13:26:22 -07:00
Tiger Yu
33bf405da4 qcacmn: Use dp_info_rl instead of QDF_TRACE to avoid aggressive logging
There might be aggressive error logging in the dmesg if wbm_desc_rel_ring
is hang. So use the dp_info_rl instead of QDF_TRACE to reduce aggressive
logging to avaoid spin lock huge delay when processing the
reo_exception_ring.

Change-Id: I4622f28cd6d8771cf27643a867892b62860d1ddc
CRs-Fixed: 2648149
2020-03-31 11:39:39 -07:00
Arun Kumar Khandavalli
2bfa222e36 qcacmn: Add the hang event infrastructure
As part of the new requirement to understand the reason for the
wifi hang the data need to be collected from the required modules
which will help in root-causing the reason for the hang.

Add the infrastructure so that the required modules can register for
this hang event notifier chain.

Change-Id: I32f1365eec1ad7d6e19be95e8faf9a980d054b76
CRs-Fixed: 2648304
2020-03-31 11:39:01 -07:00
Arun Kumar Khandavalli
cf6efc2a39 qcacmn: Add the notifier chain infrastructure
Notifier chains are simple function list executed when an event
occurs. In qdf block and atomic notifier chains are defined.
Blocking notifier chains can be used to invoke a list of functions
based on event in a process context wherein atomic notifier chain
can be used in an interrupt context.

Change-Id: I9020b9f19915e084b017932fb6d0bfad792d745c
CRs-Fixed: 2648224
2020-03-31 11:38:44 -07:00
Ramanathan Choodamani
1f9ff8a62c qcacmn: Add radiotap_num_to_freq() for correct Channel frequency
Function added to convert given channel number to correct
channel frequency using the Channel center frequency and
populate it correctly inside the radiotap header

Change-Id: Iea2a9ee7d496b2aa0dbf8d6741a32d2dbfa3503d
CRs-fixed: 2637424
2020-03-31 04:11:16 -07:00
aloksing
4b45241915 qcacmn: Add check for NULL pointer
Pointer rx_msdu_link_desc returned from call to function
dp_rx_cookie_2_mon_link_desc which may be NULL and may be
de-referenced latter

CR-Fixed: 2645199
Change-Id: I9ccba61df9571fcc99c5d5493194d5ae43a71a7f
2020-03-31 04:11:00 -07:00
Padma Raghunathan
e7d986e168 qcacmn: Avoid to use WIN only APIs
Avoid to use WIN only APIs. This is part of moving CFR to hostcmn.

Change-Id: Ib6be520657b5e6d42eaed4d9c3a3940c691e9d84
CRs-Fixed: 2637130
2020-03-31 00:43:55 -07:00