Graf commitů

13521 Commity

Autor SHA1 Zpráva Datum
Mohammed Ahmed
c775b5586a qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components.

Change-Id: I0289bf44753d3692468a12fbe7109e348c8e8957
CRs-Fixed: 3011167
2021-08-19 02:14:11 -07:00
Neha Bisht
942476d37d qcacmn: Fill peer Tx/Rx statistics from ppdu
Fill peer level statistics such as nss, mcs, etc. from ppdu descriptor

Change-Id: Ibc348b7fa1b6438adc06de74aeff36c882519a80
2021-08-18 21:04:11 -07:00
Shiva Krishna Pittala
b33b9d857d qcacmn: Populate Spectral detector list for SBS modes
In SBS modes, there are 3 detectors shared between 2 pdevs that are operate
in 5GHz band. Global number space is used for detectors across these pdevs.
Detector list should be following in SBS modes.
For the pdev that use PHYA0:
   detector 0 for normal mode
   detector 2 for agile mode
For the pdev that use PHYA1:
   detector 1 for normal mode
   detector 2 for agile mode
There is no direct way of knowing which pdevs are using PHYA0 or PHYA1.
We need to look at the phy_id of a given pdev and compare against other
pdevs on the same psoc to figure out whether the given pdev is operating
using PHYA1.  Add the necessary support for the same.

CRs-Fixed: 2993772
Change-Id: I034fe64a7a8988e327a60684a0d008f4b22ef395
2021-08-18 07:34:44 -07:00
Deeksha Gupta
bff0c0a961 qcacmn: Add QCA vendor attribute for TWT termination due to power save exit
Add QCA new status vendor attribute
QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE
to indicate the TWT session termination due to power save
exit request from userspace.

Change-Id: I515e4e8384b92b2556d72c4015252f075577f13c
CRs-Fixed: 3013360
2021-08-18 05:17:17 -07:00
Naveen S
d73851c8e5 qcacmn: update for new wmi cmd and evt
Support WMI command/events to dynamically enable/disable calibration in FW
command: set_halphy_cal
command usage: cfg80211tool set_halphy_cal <<value>> <<channel>>
value: bitmap value to be passed ( 0 - 1023)
channel: 0 (home), 1 (scan), 2 (both)

Change-Id: I1d3ab39cf24d0880bf5feac5749b5a93e6d03761
2021-08-18 05:17:12 -07:00
Sridhar Selvaraj
c9c8ccb8cb qcacmn: Adding multi vdev set param WMI API
Adding multi vdev set param WMI API support to send
vdev param update for multiple VAPs.

Change-Id: I6f331d4179afa2b331abef9b857365c60c0a64b3
2021-08-17 20:19:00 -07:00
Lin Bai
858a29eec9 qcacmn: Move unsafe info to regulator msg
If two channel avoid event reported by FW back to back, flag
psoc_priv_obj->ch_avoid_ind of 2nd event set by
reg_process_ch_avoid_event may be modified when processing
1st event in reg_call_chan_change_cbks, from
scheduler_thread context.

Copy chan avoid info to message post to scheduler to avoid
such timing issue.

Change-Id: I8fd5e7e8f2d9b2117a5c6a54fd8b64659e10f7d6
CRs-Fixed: 3012331
2021-08-17 18:03:27 -07:00
Jianmin Zhu
cc74d108d0 qcacmn: Fix array out of bounds issue
In qdf_mem_multi_page_link, pages->cacheable_pages is array with elem num
pages->num_pages, but pages->cacheable_pages[pages->num_pages] is read,
out of bounds error will report if KASAN enabled.

When ini dp_tx_ext_desc is 6144 and DP_TX_DESC_POOL_SIZE is 6144,
Size in bytes of TX TSO Num Seg Desc is 16, page size is 4096, so TX TSO
Num Seq Desc need 24 pages (6144*16/4096), each address need 8 bytes,
so TSO Num Seq Desc need kmalloc 192 bytes to save address of 24 pages.

BUG: KASAN: slab-out-of-bounds in qdf_mem_multi_page_link+0x190/0x1f4
Read of size 8 at addr ffffff816b4d60c0 by task kworker/u16:0/8

CPU: 7 PID: 8 Comm: kworker/u16:0 Tainted: G S      W  O
Workqueue: cnss_driver_event cnss_driver_event_work
Call trace:
 dump_backtrace+0x0/0x204
 show_stack+0x18/0x24
 dump_stack+0xcc/0x11c
 print_address_description+0x88/0x578
 __kasan_report+0x1ac/0x20c
 kasan_report+0x14/0x20
 __asan_load8+0x98/0x9c
 qdf_mem_multi_page_link+0x190/0x1f4 [wlan]
 dp_tx_tso_num_seg_pool_init+0x84/0x170 [wlan]
 dp_soc_tx_desc_sw_pools_init+0xb4/0x128 [wlan]
 dp_soc_init+0xf78/0x18c8 [wlan]
 dp_soc_init_wifi3+0x14/0x20 [wlan]
 cds_open+0x7e8/0x15fc [wlan]
 hdd_wlan_start_modules+0x7d8/0xf10 [wlan]
 hdd_wlan_startup+0x17c/0xbd4 [wlan]
 wlan_hdd_pld_probe+0x234/0x370 [wlan]
 pld_pcie_probe+0x6c/0x88 [wlan]
 cnss_pci_call_driver_probe+0xd8/0x358
 cnss_bus_call_driver_probe+0x38/0x6c
 cnss_driver_event_work+0xf14/0x1188
 process_one_work+0x53c/0x8b8
 worker_thread+0x4f8/0x928
 kthread+0x1e8/0x200
 ret_from_fork+0x10/0x18

Allocated by task 8:
 __kasan_kmalloc+0x100/0x1c0
 kasan_kmalloc+0x10/0x1c
 __kmalloc+0x130/0x448
 kzalloc+0x14/0x20 [wlan]
 __qdf_mem_malloc+0xcc/0x120 [wlan]
 qdf_mem_multi_pages_alloc+0xc0/0x580 [wlan]
 dp_prealloc_init+0x1b0/0x48c [wlan]
 wlan_hdd_pld_probe+0x200/0x370 [wlan]
 pld_pcie_probe+0x6c/0x88 [wlan]
 cnss_pci_call_driver_probe+0xd8/0x358
 cnss_bus_call_driver_probe+0x38/0x6c
 cnss_driver_event_work+0xf14/0x1188
 process_one_work+0x53c/0x8b8
 worker_thread+0x4f8/0x928
 kthread+0x1e8/0x200
 ret_from_fork+0x10/0x18

The bad address belongs to the object
which belongs to the cache kmalloc-192 of size 192
The bad address is located 0 bytes to the right of
f816b4d60c0).

Change-Id: I6569c22bc8f900296f49a4426f085912a33aa452
CRs-Fixed: 3014390
2021-08-17 15:46:43 -07:00
Deeksha Gupta
cd01dad898 qcacmn: Add new TWT teardown status code
Add new TWT teardown status code to indicate host teared
down the TWT session due to PS disable.

Change-Id: I49c2d7bb1abc4ceb4f79b833cbafcb44e8b936fe
CRs-Fixed: 3013358
2021-08-17 13:18:01 -07:00
Jyoti Kumari
c9f9272c69 qcacmn: Fix OOB read issue in SSID ie
During beacon or probe response, if channel is dfs && frame type
is MGMT_SUBTYPE_BEACON, it would call "util_scan_add_hidden_ssid"
to deal with the packet. If the ie id matches with SSID then OOB
read may occur in ie_len as it is validated with upper bound of
ie_ssid.

Validate the ie length first. If it is more than 0 then copy
memory to SSID which are equivalent to ie length.

Change-Id: Ib5e2ab7f6f3337d4c3e5c240e3133d8f276be50a
CRs-Fixed: 3007473
2021-08-17 13:17:56 -07:00
Jeevan Kukkalli
0343109e97 qcacmn: Print buffered logs one line at a time
Print buffered wlan logs one line at a time to avoid
log split.

Change-Id: Ie35bdee741e7dab430281bb18aea48325118bf23
CRs-Fixed: 2977844
2021-08-17 01:38:44 -07:00
Pavankumar Nandeshwar
2228afc5b4 qcacmn: Enable HW cookie conversion feature
Enable Hardware cookie conversion feature

Change-Id: I75299384ad7b795160b9cf04768326c74401b1ba
2021-08-16 23:14:14 -07:00
Kiran Kumar Lokere
60c442a689 qcacmn: QCA vendor attributes for BTWT and Rx ctrl frame to MBSS
Add QCA vendor attributes to configure the driver to enable/disable
the Broadcast TWT support and Rx Control Frame To MultiBSS support in
HE capabilities information field. This attribute is used for testing
purposes.

Change-Id: I22a2646b642d1e764e89b209e0c872ac113ca2ee
CRs-Fixed: 3012996
2021-08-16 12:53:09 -07:00
Yeshwanth Sriram Guntuka
d0abb772f0 qcacmn: Add support to get dp prealloc config
Add support to fetch datapath prealloc related
configuration params.

Change-Id: Iaeac3833fd8e13df6baa9452a7d7f194b86a8bd3
CRs-Fixed: 3012651
2021-08-16 10:34:49 -07:00
Chaithanya Garrepalli
f0c19cfc51 qcacmn: Fix compilation issue for hamilton
This changes fixes the compilation issue reported for
Hamilton

Change-Id: I96c514570ab5262117a05fafe5fb3ae5b8bc625f
2021-08-16 08:24:07 -07:00
Kiran Venkatappa
a41cb25122 qcacmn: Remove get API under QDF_TIMER_MULTIPLIER_FRAC
Set QDF_TIMER_MULTIPLIER_FRAC to default multiplier if it is defined.
Remove get API under this feature flag so that this can be modified using
set dynamically based on the emulation target detect.

Change-Id: If0743e6b571832ebf3319f9895350685a5cd53f0
CRs-Fixed: 2995514
2021-08-16 03:18:34 -07:00
Huashan Qu
83065ffe1e qcacmn: Fix multiple radar founds for a single burst
In dfs test mode, 18 pulses are injected in a single burst, the host
driver reports the radar found event two or three times to
upper layer. For a single burst of radar pulses, radar found event
should be reported only once.

Fix the multiple radar founds for a single burst by disabling radar
detection and flushing the existing radar pulses from all queues
while processing the current radar found indication event in dfs test
mode (usenol=0).

Change-Id: I70c7c15147a5cde038773fd97735c113ca385932
CRs-Fixed: 2981217
2021-08-16 03:18:29 -07:00
Chaithanya Garrepalli
81de2fc14d qcacmn: disable monitor rings for QCN9224
Add dedicated monitor flag at SOC level and do not
enable legacy monitor rings for QCN9224
Also add flag to disable rxdma2sw ring for QCN9224.

Change-Id: I399d22d6c3361bb75ebaad4e46b156db5e628d6b
2021-08-15 09:01:31 -07:00
Wu Gao
50f3c5d6a6 qcacmn: Correct VDEV state for channel switch disabled case
DUT as SAP and its VDEV change to UP state, since got radar event but
channel switch disabled. Then EV_DOWN is dropped and bss peer won't be
delete. Which cause unloading failure. This change moves VDEV to
UP-UP-ACTIVE state if got WLAN_VDEV_SM_EV_CHAN_SWITCH_DISABLED.

Change-Id: I9d3a47a66fd2281166f5106e0e7bfd36c3966ed0
CRs-Fixed: 3009264
2021-08-15 04:07:30 -07:00
Jeevan Kukkalli
8fd6fe32e8 qcacmn: Conditionally compile scan radio special vap stats
Conditionally compile scan radio special vap stats.
Also rename spcl_vap to scan_spcl_vap to better reflect
funtionality.

Change-Id: I7d7f636209f6aa12cca0a3e808d7ae1fac9f397d
CRs-Fixed: 3009837
2021-08-15 01:53:08 -07:00
Srinivas Pitla
7469335fa4 qcacmn: MLO peer implementation
This change adds MLO support to Peer.
It implements,
1) MLO peer list management
2) AID allocation
3) MLO Peer creation/deletion
4) Notifying partner links on peer creation/deletion/assoc

Change-Id: Ie1b675dccdf0de1d79f6f32d9255cf3cca53fdf2
CRs-Fixed: 2967057
2021-08-15 01:53:04 -07:00
bings
7f36fdf121 qcacmn: Check bssid before creating bss peer
Add NULL pointer check when getting bssid

Change-Id: Ie8bba89b3b4125fe58329d2a5d56aba4a6d0bcb3
CRs-Fixed: 3010236
2021-08-14 23:07:09 -07:00
Vevek Venkatesan
6a3c9eaa85 qcacmn: add CDP interface support for pkt_log_exit
Add CDP interface API support for pkt_log_exit,
to cleanup pkt_log_init on failure.

Change-Id: Ib50efaed5997d341d3e76c2e1dbe42856df40191
CRs-Fixed: 3012201
2021-08-14 23:07:04 -07:00
Chaithanya Garrepalli
627c3c7ec3 qcacmn: Changes needed for E1.5 release
Below are the changes in HW headers for E1.5
1) WBM2SW release source enum changed back to lithium values
2) DSCP to tid table num is added in Bank register
3) MCAST ctrl value is moved from Bank to seperate register

Change-Id: I342c451d792b1618dcb62ca9d4c77dcf4d4beeac
2021-08-13 12:04:28 -07:00
Chaithanya Garrepalli
0702aaf463 qcacmn: initialize PPE rings
Changes to initialize PPE rings based on ini
configuration

Change-Id: Id6a26b557c45fd78ae17675b0292424e979958ad
2021-08-13 12:04:22 -07:00
Chaithanya Garrepalli
d5006a849b qcacmn: Add support for Waikiki HAL Tx
Added HAL Tx specific function to support Waikiki Tx.

Change-Id: I7ded253739c91ab19490425b3ddd333a86f237c8
2021-08-13 12:04:17 -07:00
Chaithanya Garrepalli
7ccb73b31f qcacmn: Add support for beryllium on WIN
Add support for split between lithium and beryllium
HAL files.
Add Wkk TLV support.

Change-Id: I7135e4061a4c3605d76c70c33320cbd533ea0c62
2021-08-13 12:04:12 -07:00
Chaithanya Garrepalli
6b09fa3913 qcacmn: Introduce new files for Waikiki
Add new files for qca9224 (Waikiki) to bring in
chip specific handlers.

Change-Id: Ibe20d613c656db3ad4f95125b20f748cfc948610
2021-08-13 12:04:07 -07:00
Chaithanya Garrepalli
49e18cfe2a qcacmn: DP Tx changes for QCN9224
Changes for DP tx for QCN9224

Change-Id: I7010aef55dc6e8bedfa1c44fe6baa1baa55c32c9
2021-08-13 12:04:02 -07:00
Himanshu Batra
9406f72b3d qcacmn: Update the correct bit index for ML IE
Update the correct bit index for ML IE control field

Change-Id: I8b2dcf70fd2ee83ae24eeba8359798499c0b7c74
2021-08-12 10:45:26 -07:00
Devender Kumar
c182e1e3e9 qcacmn: Use sw_peer_id instead of ast_index to get peer
In order to support flow overide feature,
AST table has to be split between RxPCU and DDR.
With this split, RX monitor cannot make use of
ast_index to fetch peer as it is not from DDR.
So make use of sw_peer_id to fetch peer.
This sw_peer_id is derived from RX_MPDU_STAT_START_TLV

Change-Id: Ib2a003a2640fded3287c318d2ad59fd3127af9b6
CRs-fixed: 3004363
2021-08-12 08:29:37 -07:00
Uraj Sasan
03827107ac qcacmn: Update CE id enums
Update CE id enums to include CE12 to CE15 for targets that support 16 CEs

Change-Id: I3456903191e1439f6e965dc519cceb56b00d6f32
2021-08-12 05:32:57 -07:00
aloksing
be3cc56202 qcacmn: Add separate ID for Monitor trace prints
Add a separate module ID for Monitor error/debug Information.

Change-Id: Ie784430da8000b8a527f07261e039b6d3f903503
CRs-Fixed: 3006497
2021-08-12 05:32:52 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
Amruta Kulkarni
83e0741bf9 qcacmn: Fix compilation issue
Changes to fix compilation error seen on WIN side.

Change-Id: I28461a1950912700c9ce41d025197980b37c4b3a
CRs-Fixed: 3012157
2021-08-12 05:32:42 -07:00
Arun Kumar Khandavalli
09cd3e0dd9 qcacmn: fill htt peer data version as part of init cmd
With latest architecture there are different HTT peer
data versions supported by the firmware, supported htt peer
version will be sent in the service ready and need to feedback
to the firmware in the init command.

Change-Id: Icd0470843198387cd7e0192cbe3821d45ef0534e
CRs-Fixed: 3008706
2021-08-12 03:14:29 -07:00
Jinwei Chen
8cdc1875ae qcacmn: Set default value 7 for INI dp_reo_rings_map
Set default value 7 for INI dp_reo_rings_map, this is just
one WAR to not block HMT before reo_ring_remap and dp thread
issue is fixed.

Change-Id: Ib2c8ebab936951798112759e1ac0baba85996036
CRs-Fixed: 3005555
2021-08-12 00:56:00 -07:00
Will Huang
69f69de187 qcacmn: Enable check_6ghz_security by default
It is mandatory request to check security mode in 6Ghz band,
so enable check_6ghz_security by default. Keep default disable
for WIN as requested.

Change-Id: Idcc4cb9add98ad4bda8e4357e83460ca25221692
CRs-Fixed: 3006930
2021-08-12 00:55:56 -07:00
Paul Zhang
4b21f23fdd qcacmn: Align 8 bytes for qdf_mem_header address
In the function list_empty(), there is macro READ_ONCE() and
assembler instruction "ldar" will be used. It requests 8 byptes
alignment for qdf_mem_header address or data abort will happen.

To resolve this issue, align the qdf_mem_header address when
invoking function qdf_mem_dma_get_header().

CRs-Fixed: 2997107
Change-Id: I3d079c3c7e0f3634d85f891327284aefb7a65711
2021-08-11 22:38:41 -07:00
Jia Ding
b1ba62d8e2 qcacmn: Add 320MHz in enum mgmt_ch_width
Add BW_320MHz in mgmt_ch_width in host diag module.

Also remove WLAN_FEATURE_11BE feature flag within enum
mgmt_dot11_mode for 11BE related modes.

Change-Id: I2914735edd5aa21ad1d94b0e5fcf718b189fc432
CRs-Fixed: 3009301
2021-08-11 15:50:55 -07:00
lihual
bde0001eed qcacmn: Fix a memory leak during soc attach
hif_ext_group and soc->intr_ctx[i].lro_ctx are allocated
but not free while fail to register parts of ext_group in
hif_register_ext_group, which cause memory leak. Fix is
to detach according resource before return.

Change-Id: I03ecc37437d09bf9275f128b1f2b320124a7df64
CRs-Fixed: 2988891
2021-08-11 15:50:50 -07:00
Santosh Anbu
08c37be1d9 qcacmn: Add INI param to support max chan switch IE
Add change to support max channel switch IE as a INI config.
With this INI enabled, max channel switch IE will be used in scenario,
where client disconnection is to be avoided with CSA on CAC channel.

Change-Id: I786e7e12e12ebcb3fc7d0720ed02e01bff6c82b8
CRs-Fixed: 2949206
2021-08-11 01:33:30 -07:00
Abhijit Pradhan
53df6c1211 qcacmn: Refactor the opclass tables to optimize memory
Instead of using a fixed sized array of cfis for every operating class row,
which occupies a large amount of unused memory for many operating class
rows, use a pointer to an array and the length of the array so that each
row uses only the right amount of the memory required.

Change-Id: Ifc9974b7dc7c71b2e51b2a93a8d5c08f4fa89dfc
CRs-Fixed: 3009346
2021-08-10 23:24:43 -07:00
Subrat Dash
9a6927e4ed qcacmn: Add check to discard multicast echo packets
The bridge forwards the multicast packets to all the
interfaces attached the bridge.

When the STA network interface receives such packets
from bridge and send it to the AP, it is echoed back
from the BSS.

These packets are not intended for the bridge as it
will lead to looping.

Add a check to detect and drop such packets when
received back from the BSS.

Change-Id: I5a4a2a3e015df2b9c78de405d7d917216baed051
CRs-Fixed: 2997189
2021-08-10 15:39:32 -07:00
Ashish Kumar Dhanotiya
518f0daeb1 qcacmn: Add aliasing for INI names
Currently driver has only one name for an INI, with
this change add second name as well for few INIs based on
new requirement.

Change-Id: I67bd50652c3be7912c516b81d40f6a1ea7a7b90a
CRs-Fixed: 3007172
2021-08-10 15:39:24 -07:00
Jingxiang Ge
7e7d768c71 qcacmn: check linkstate_vote in hif_vote_link_down
It is not right that linkstate_vote is 0 when entering
hif_vote_link_down, this indicates there is a mismatch
for vote up/down.

Enable debug to catch such case at first time.

Change-Id: I128bc42917ca5de949ee0d0b657579c14dd96eac
CRs-Fixed: 3009469
2021-08-10 09:07:39 -07:00
Gururaj Pandurangi
f5673aa2a4 qcacmn: Avoid calling qdf_timer_mod after qdf_timer_stop
Avoid calling qdf_timer_mod after qdf_timer_stop as the
node is deleted after timer is stopped and qdf_timer_mod
dereferences the deleted node leading to data abort.

Replace 'qdf_timer_mod' by the sequence
'qdf_timer_sync_cancel, qdf_timer_start' to be SMP safe.
If a timer is being started for the first time, use only
'qdf_timer_start' and not the sequence
'qdf_timer_sync_cancel, qdf_timer_start'

Change-Id: Ida5440d4a54d49aa97f57fbda57ab1ef2cce16e6
CRs-Fixed: 3005699
2021-08-10 06:14:47 -07:00
Aditya Kodukula
6ad64c3532 qcacmn: QCA vendor command for mDNS offload
Define a new vendor command for enabling/disabling mDNS offload.

Change-Id: Id0245a8fe76e0d7c6e15ec5f91db67ee30a6325c
CRs-Fixed: 3008553
2021-08-10 01:47:38 -07:00
Harsh Kumar Bijlani
43da5b8892 qcacmn: Add API for unmap with physical and virtual addr of nbuf
Tx data transfer in host mode with nbuf map_unmap debug frmwk
enabled and enhanced stats disabled results in an assert.
This is because on Tx completion path, nbuf unmap is done using API
qdf_mem_unmap_nbytes_single which takes physical address of nbuf
for unmap and does not remove nbuf from map_unmap tracking list and
when nbuf is freed, it results in assert as the tracking list still
contains that nbuf entry.

In order to fix this, define a new API for nbuf unmap passing physical
and virtual address of nbuf as arguments. Physical address is passed
as an argument in order to avoid cache miss in per packet path which
eventually helps in improving the KPI.

Change-Id: I77ab6ac3ac98556b9caff8aa3ee82bc23cd26de7
CRs-Fixed: 3006671
2021-08-09 22:25:29 -07:00
Ashish Kumar Dhanotiya
c96d5d2592 qcacmn: Add support to parse multiple ini names
Currently driver supports only one name for an ini parameter,
there is no aliasing support for ini names.

With this change add support for  multiple ini names for the
same ini parameter.

Change-Id: Ib16a258975f5c3d152fa1dfbbdb6b3e6cc222784
CRs-Fixed: 3007156
2021-08-09 22:25:25 -07:00