Wykres commitów

9828 Commity

Autor SHA1 Wiadomość Data
phadiman
95b9a6e63a qcacmn: HOST Memory Optimizations (in NSS offload mode)
Number of DP rings used in HOST mode and NSS offload mode differ
and in current scenario the rings are allocated unconditionally.

Allocate only required number of rings based on the HOST mode and
NSS Wi-Fi offload mode and based on the number of radios supported
per SOC.

CRs-Fixed: 2790504
Change-Id: I20ce1908da47c197ea3b406f8704b964f3d8f7d1
2020-11-21 02:20:19 -08:00
Bapiraju Alla
b130521bd3 qcacmn: Process FW diag events in a separate worker thread
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.

To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.

Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
2020-11-21 00:20:27 -08:00
Lincoln Tran
8652562a87 qcacmn: Add API to check for passive frequency
Add new API to check if frequency is passive or not. The API checks
the channel flag against REGULATORY_CHAN_NO_IR.

Change-Id: I166a7a79517f81c23ff933d2657ef3f4c551c082
CRs-fixed: 2822205
2020-11-20 16:24:50 -08:00
Himanshu Batra
c8fc486dd6 qcacmn: Activate connect/disconnect from serialization via schedular
On completion of connect/disconnect request, the command is removed from
serialization queue. If there if any connect or disconnect request in
serialization pending queue for the same vdev, the command is moved from
pending to active queue in the same context.
All this operation happens under CM SM lock. As part of activation of
next command, the CM tries to acquire same lock to dispatch even to
connection SM. As a result, deadlock is observed.
Add fix to Activate connect/disconnect from serialization pending queue
via deferred context using scheduler

Change-Id: I7f2873ab6d2a639b55ccc54e37463a892d9aae94
CRs-fixed: 2820539
2020-11-20 10:43:47 -08:00
Tiger Yu
9fc47f763e qcacmn: Add cfg_dp_sg_enable to get ini key dp_sg_support
Add cfg_dp_sg_enable to get ini key dp_sg_support by cdp_cfg_get.
And add some comments for CFG_DP_SG to clarify more.

Change-Id: I34de242eacbdcf55398afe64b91f5534f205fa22
CRs-Fixed: 2822536
2020-11-20 10:43:43 -08:00
Nandha Kishore Easwaran
1a0bc1efc4 qcacmn: Data path changes for big endian platform
Add reo ring descrptor swap in case of big endian platform.
Convert msi_data into little endian format before writing into
MSI_DATA register. Also change into little endian format while accessing
the shared LMAC registers.

Change-Id: I07f4ae4e6df4608201b63d325c2cbc37436d1592
2020-11-20 08:35:22 -08:00
Paul Zhang
47c1479e3f qcacmn: Add test configuration attr to enable/disable full bandwidth UL MU-MIMO
Define a QCA vendor attribute
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FULL_BW_UL_MU_MIMO to
enable/disable full bandwidth UL MU-MIMO subfield in the HE PHY
capabilities information field for testing purposes.

Change-Id: I666abb2654603069140bd603ae0377ea01a720fa
CRs-Fixed: 2816951
2020-11-20 08:35:18 -08:00
Tiger Yu
36bf66878e qcacmn: Fix buffer overflow written in the dp_soc_interrupt_detach
Use sizeof instead of REG_BAND_UNKNOWN to fix buffer overflow written
in the dp_soc_interrupt_detach.

Change-Id: Iffad59346c487e34632f1c60b2c88e635f6e83a0
CRs-Fixed: 2822433
2020-11-20 04:03:42 -08:00
bings
7f63da092c qcacmn: Update NOL to platform even there is no nol channel
After clear nol channel, the number of nol channel is 0. We should update
this information to platform.

Change-Id: Ia39be9a2c53067629460ead6000c2661ead07f63
CRs-Fixed: 2818936
2020-11-19 22:46:18 -08:00
sandhu
f39a270b60 qcacmn: Add function to convert Hw to qdf status
Enhance qdf tx rx to hw tx completion status mapping .Function
to convert Hw to qdf status.Add a additional func arg to qdf_dp_trace_ptr.
Add dummy func argument to existing qdf_dp_trace_ptr func calls.

Change-Id: I38865d63dc7383c55686d2d0187a262b3b6d5acc
CRs-Fixed: 2810601
2020-11-19 20:39:12 -08:00
Yeshwanth Sriram Guntuka
ca3d4fecef qcacmn: Add PCIe link status sanity before enabling CE IRQ
Check for PCIe link status and enable the CE IRQ only
if link is active.

Change-Id: I767a467a4b70435037f5ccce9e740f95f8b6112a
CRs-Fixed: 2821406
2020-11-19 18:23:25 -08:00
Jianmin Zhu
c6aee5cbd6 qcacmn: Fix assert when connect WEP AP
When 5G open mode AP and 2G WEP mode AP use same ssid,  and WEP mode AP is
selected to connect on UI, 5G open mode AP will be candidate in driver
too for wrong security filter(WLAN_CRYPTO_CIPHER_NONE is supported by
default, WEP match isn't checked at all for open AP).
Since 5G is preferred, 5G open mode AP is selected and connected at last,
peer is set as authenticated without waiting for key install.
But WEP mode AP is assumed connected in wpa supplicant, so WEP key is sent
to driver and F/W later. If peer is set as authenticated before PTK is
installed, data may be sent without encryption, so F/W add assert for such
order.

To fix this issue, when reset cipher and auth set in vdev, don't keep
WLAN_CRYPTO_CIPHER_NONE and WLAN_CRYPTO_AUTH_OPEN, just set to 0,
all cipher and auth set should be get from connect request,
scm_check_wep can be called for open mode AP in scm_is_security_match,
when only WEP cipher is set in filter, open mode AP won't be selected.

Change-Id: I48f9e74d0e8e31e789f33d038b11614d6b2ee6d0
CRs-Fixed: 2820129
2020-11-19 18:23:21 -08:00
Tallapragada Kalyan
b9d5c7d2b7 qcacmn: move the TX notify comp flag to MCL specific cb structure
The TX notify comp flag is used only by MCL, hence moving
to the MCL this field to the MCL specific cb private structure.

Change-Id: I707ab9252dea705552df9678eedd8501f479672e
2020-11-19 06:58:26 -08:00
Nisha Menon
4677d5bdf5 qcacmn: Memory stats for SKB usage and Tx desc cnt in datapath
Add sysfs node for DP level memory stats:
/sys/kernel/wifi/wlan/wlan_dp_mem_stats
These include Tx, Rx SKB memory allocated, Tx/Rx
buffer count, outstanding Tx desc count.

Change-Id: I839a5f2ec4e763ca11cdea2093368ca6dc52d8cf
CRs-Fixed: 2724460
2020-11-18 16:23:53 -08:00
Nisha Menon
3db73f1414 qcacmn: Add memory stats pertaining to DP usage
Add sysfs node for DP level memory stats:
/sys/kernel/wifi/wlan/wlan_dp_mem_stats
These include Tx, Rx SKB memory allocated, Tx/Rx
buffer count, outstanding Tx desc count.
Add and subtract the skb memory for Rx/Tx when
the map/unmap functions are invoked.

Change-Id: If62cc47bb60f7eb63f60e861f755f3417248677f
CRs-Fixed: 2724482
2020-11-18 16:23:49 -08:00
Hariharan Basuthkar
3824548f38 qcacmn: Add reg_rx_ops for wlan_reg_is_range_overlap_6g
Add reg_rx_ops for wlan_reg_is_range_overlap_6g, to use the API
outside the umac.ko module.

Change-Id: Iac64d9f15d5d5bed00b2656571dfba34e9933bc4
CRs-Fixed: 2818160
2020-11-18 12:04:11 -08:00
Hariharan Basuthkar
fb1b1fe407 qcacmn: Fix compilation error when CONFIG_BAND_6GHZ is disabled
Add a static inline definition for wlan_reg_is_range_overlap_6g
when CONFIG_BAND_6GHZ is disabled, to fix the compilation error, that
is seen when CONFIG_BAND_6GHZ is disabled.

Change-Id: I26cf77c029d7d27887c242a1c7c300219c125256
CRs-Fixed: 2817943
2020-11-18 12:04:07 -08:00
Rakesh Pillai
904ad769a0 qcacmn: Skip setting rx tids for monitor mode self peer
Currently the rx tids are getting setup for the
self peer in monitor mode. This leads to sending
commands to the reorder-hw and the hardware generates
its responses.
In Monitor mode, none of these rings are reaped, since
the reorder-hw is not used. This opens up a possibility
of backpressure on the reorder-hw rings.

Skip setting up the rx tids for monitor mode
self peer, since they are not used.

Change-Id: I37bade9ef5c8bd536a01371cc059ebbcfb85ee5a
CRs-Fixed: 2815866
2020-11-18 12:04:04 -08:00
Yeshwanth Sriram Guntuka
1df1553343 qcacmn: Use only shadow writes for REO remap and WBM HP reg
REO remap register direct writes as part of SAP stop could
result in a NOC error if the UMAC is in low power state.

Fix is to use shadow register writes for REO remap and
WBM HP registers.

Change-Id: Ie515c3d28f4ccdd99a3757808f1ab6c5cf373e3d
CRs-Fixed: 2813105
2020-11-18 09:54:55 -08:00
Debasis Das
e85ef5624f qcacmn: Add resource config flag for VoW
Add support to use resource-config flag to
enable/disable optimization for VoW.

Change-Id: Iff20f09ad3b8f21d49d269ec2eeb3f8b70704c6f
2020-11-18 07:46:34 -08:00
Jhalak Naik
04188da78f qcacmn: Cap the FFT bin values to 255
FFT bin values can span 10 bits for HKv1, HKv2 and Pine.
This change is to cap the values to 8 bits for such case
on these platforms.

Change-Id: I144b00b1ed21a3281f79050bb1ab63bd857e47b1
CRs-Fixed: 2804192
2020-11-18 07:46:30 -08:00
Amir
df60a16001 qcacmn: Disable rxdma1 functionality for LM256 profile
As monitor mode is not supported on LM256 profile,
disable rxdma1 functionality on same

Change-Id: I64e5de02d56801bfd46e32a6c64a1286e4d7ecb0
CRs-Fixed: 2819904
2020-11-18 05:40:30 -08:00
gaurank kathpalia
7a2fd984a7 qcacmn: Fix unused params in 6Ghz security check APIs
Remove few unused params in 6Ghz security check APIs.

Change-Id: I2b88b72d18145d7b537520c30e499ba40c86f5f3
CRs-Fixed: 2820363
2020-11-18 03:38:13 -08:00
Saket Jha
b46ee401e1 qcacmn: Enable monitor mode in mission mode
While in mission mode, add support for monitor mode to be created as
another interface to support STA + monitor mode. Create a new
mon_vdev_timer to be started during vdev_attach and calling
dp_mon_vdev_timer to reap monitor rings while in this mode.

CRs-Fixed: 2815653
Change-Id: I631deb5121d7997cded524befd11883079a23aaf
2020-11-17 23:18:52 -08:00
Ankit Kumar
8f311b08dd qcacmn: Drop frame if msdu len received is Zero
In monitor destination ring, sometime buffer with
msdu_len zero is observed.
Drop frame if msdu len is zero.

Change-Id: I327e180a52ec5f4e0d9fc2d0391262cba0dbe09d
2020-11-17 23:18:49 -08:00
Himanshu Batra
5d68a204f0 qcacmn: Resolve compilation issues for CM
Resolve compilation issues for CM

Change-Id: I5f652c568479aef94e6e22ecada496471c3cdb75
CRs-Fixed: 2820487
2020-11-17 14:06:37 +05:30
Tallapragada Kalyan
c0396e72ea qcacmn: use qdf_nbuf_headlen API to get the length in TX path
currently qdf_nbuf_len is being used to get the length of
the tx pkt, but this API also interprets the nbuf CB field
to adjust the length if extra_frags are present.
The concept of extra_frags is applicable only for legacy
drivers but in lithium as cb is not reset in the driver the
qdf_nbuf_len API is mis-calculating the length if extra_frag
field in cb is set by any network stack protocol.
To avoid this qdf_nbuf_headlen API is used to get the length
of the TX pkt.

Change-Id: Ie1e0b4b2168daf93ae77f4c995f5c3476a27b433
2020-11-15 23:15:52 -08:00
Tallapragada Kalyan
c0d82e2d46 qcacmn: remove the additional intra-bss check for NAWDS in tx path
remove the additional intra-bss check for NAWDS in tx path
as it is a redundant check.

Change-Id: I92be5c615ac396939e2a6542af41aea158ffc05f
2020-11-15 23:15:48 -08:00
Mohit Khanna
a939d20dbf qcacmn: Move delayed-reg-work active_work_cnt decrement
Currently, we decrement active_work_cnt in a while loop in delayed
register worker and later on make a "allow_l1" call to enable L1ss.
The bus suspend routine depends on the value of active_work_cnt to
determine if any register writes are pending. In case there are, bus
suspend is rejected.
As a result its possible that when bus suspend happens, the
delayed worker while processing the last remaining enqueued
write,  makes the active_work_cnt to 0. This will allow the bus suspend
routine to continue to disable the bus, even before the
delayed-reg-worker has called allow_l1 and run to completion. This may
lead to a NOC error while calling "allow_l1" API from
delayed-reg-worker.

Hence, move the decrement of active_work_cnt to the very end in
hal_reg_write_work function.

Change-Id: Iec602f97c953df1c6a018310fd02ab458547ce3a
CRs-fixed: 2813733
2020-11-14 20:04:04 -08:00
Rakesh Pillai
98f8f751dc qcacmn: Add INI support to enabling sending ICMP to FW
Add INI support to enable the feature of sending
ICMP packets to FW at regular intervals.

Change-Id: I888bb2f65e8a497c3e6541f213def905d6dd0727
CRs-Fixed: 2813169
2020-11-13 15:09:15 -08:00
Saket Jha
af0f724da2 qcacmn: Add support to handle BAR frames in host
Due to recent FW changes not filtering out BAR frames, redirect these
frames to REO exception ring and handle as normal data packets.

Change-Id: I4540929fddab14de57a23f6364fc916a70057cbe
CRs-Fixed: 2795499
2020-11-13 13:09:14 -08:00
Balaganapathy Palanisamy
0d9dc04d48 qcacmn: Stop wmi sequence check during SOC stop
Skip wmi sequence check during SOC stop and enable after
initializing wmi handle. It is required to skip sequence check
during soc stop as the endpoint flush is preceding CE flush.

CRs-Fixed: 2813341

Change-Id: Ieb821483e9786471d033773dc2365ab456345f83
2020-11-12 10:13:15 -08:00
Mainak Sen
9f9dfdc2b4 qcacmn: Get dp vdev from HTT vdev id in MEC notify
In HTT MEC notification, wifi vdev should be mapped from
vdev_id provided in HTT WBM completion status word

Change-Id: Ic0a440efdbdc1ee99f27fb4797ee068599d06268
2020-11-12 08:08:02 -08:00
Vevek Venkatesan
cad7c21002 qcacmn: add MCS 12/13 stats support for 4K QAM mode
Add MCS 12/13 stats support for 4K QAM mode.

Change-Id: Ib4c0a216f2201d4b7cecc010d65bbebc07cfb3b4
CRs-Fixed: 2786348
2020-11-12 05:40:32 -08:00
Nandha Kishore Easwaran
12104fad28 qcacmn: WMI changes for big endian platform
Swap each word of beacon and mgmt frame for big endian platform.
This is needed since copy engine swap is enabled but beacon and mgmt frame
needs to be given in same order to FW in order to get transmitted in the
intended network byte order.

Change-Id: I09290f3beef5f0cde33a5543c2778473b35d232c
2020-11-12 05:40:27 -08:00
Abhishek Singh
1853c161d2 qcacmn: Add logic to ignore 6Ghz AP if security is not valid
Add logic to
- Check if connect req freq is 6Ghz and security
  is not allowed for 6Ghz, reject connect.
- Ignore 6Ghz APs if connect req security is invalid
  for 6Ghz

Also added user config key_mgmt_mask_6ghz mask
to allow specific AKMs, by default all are allowed.

Add added user config check_6Ghz_security to enable
security checks as per spec.

Change-Id: I37518731faa4de67a49853e5ac544efa3b3ce1d6
CRs-Fixed: 2813013
2020-11-12 03:28:37 -08:00
Wu Gao
32cab9b00c qcacmn: Fix compilation issue on arch32 by gcc 9.3
This change fixed compilation error about implicit-fallthrough and
pointer to in cast.

Change-Id: Iea2c25d97d8a039ed0f8083078427a8f8de70cd1
CRs-Fixed: 2814658
2020-11-11 10:23:54 -08:00
Himanshu Batra
50324c2260 qcacmn: Resolve compilation issues for CM
Resolve compilation issues for CM.

Change-Id: I3dc32cb327032ce59786e0d9ab922a8914e13ec3
CRs-Fixed: 2816317
2020-11-11 10:23:51 -08:00
Xueqiang Gong
f8ab86bb69 qcacmn: support GENOA PCIE Global Reset
Correct the address of ADRASTEA_PCIE_LOCAL_REG_BASE_ADDRESS
to support PCIE Global Reset for Genoa Chip.
This feature is only used at 3rd party platform which
do not support reset WLAN chip by toggle WLAN_EN pin.
To use this feature, please add
"CONFIG_QCN7605_PCIE_GOLBAL_RESET_SUPPORT" in makefile.

Change-Id: Ia75b567bd305d73d17a7cec3a39cbc36b1ae737d
2020-11-11 02:50:35 -08:00
Lihua Liu
04e2005263 qcacmn: Avoid massive logging when diagLog socket absent
netlink_broadcast() will return -ESRCH when diagLog socket in
userspace is not present, then massive and repetitive error log
shown as below will be print. To address this, don't print
error log if netlink socket is absent.

"Ptt Socket error sending message to the app!!"
"ptt_sock_send_msg_to_app:Failed sending Msg Type [0x5050] to pid"

CRs-Fixed: 2801137
Change-Id: I14858625732c06442561e9a2e76fe2cfb6dabc12
2020-11-10 21:27:10 -08:00
Shashikala Prabhu
9cd113574d qcacmn: Add vdev_id to peer_chan_width_switch_params structure
Add vdev_id variable to peer_chan_width_switch_params structure.

Change-Id: I9a2f5598a6e5d946e7e8546c925306b85c910d2f
CRs-Fixed: 2812110
2020-11-10 07:03:28 -08:00
gaurank kathpalia
fe1cbc425d qcacmn: Filter out the 6ghz chan freq from valid freq list
Currently the driver does not have a support to
filter out the 6ghz frequencies from the valid freq
list, and hence there is a high chance of selecting
the 6ghz freq as an operating freq for SAP, which
the legacy clients won't be able to scan.

Fix is to add a support for filtering out the 6ghz
frequencies from the valid freq list.

Change-Id: I8e3552a254e2b79cc1fc09da3e1e06ac378cbb07
CRs-Fixed: 2801414
2020-11-10 04:57:42 -08:00
Himanshu Batra
f7d6997020 qcacmn: Update queue size from pending queue after command activation
As part of activaiton of serialization command from pending to
active queue, the lock is released. In the activation API, the
same API to move non scan cmds from pending to active queue can
be called if activation fails. This reentrant API may modify the
pending queue even before the control is given back to the caller
API leading to random behavior when accesing the next cmd from pending
queue via local variables.

Add fix to update queue size from pending queue after command activation

Change-Id: I8082e2a9dd3410369967ab20196853ddfa0639a7
CRs-Fixed: 2801956
2020-11-10 00:58:30 -08:00
Ananya Gupta
0973853fd4 qcacmn: Change log level of null check for peer
Update log level of peer null check from err to info
in dp_tx_comp_process_tx_status as excessive logging
is detected.

CRs-Fixed: 2811236
Change-Id: I1b0ae723adb90b4b915f11479b5408fde147864c
2020-11-10 00:58:25 -08:00
Vignesh Mohan
bc861d1193 qcacmn: Add zeroCAC(legacy) check before assigning cfreq2
While getting the bonded channels during radar, if preCAC timer
is running, we use the zeroCAC frequency as the secondary frequency.

Consider a device with agile DFS enabled and the home channel as
160MHz/80P80MHz. If radar is injected on the secondary segment of
the home channel, since agile preCAC is running, the zeroCAC frequency
is considered as the secondary center. This results in wrong
channels being added to NOL/failure (depending on the zeroCAC channels).

Use the zeroCAC frequency as secondary segment center during radar,
only if legacy preCAC is enabled.

Change-Id: I9a99b1c9968e622ffe55c662fd21586cfc587281
2020-11-10 00:58:20 -08:00
Mohit Khanna
98181d9ccc qcacmn: Flush reg write work before bus suspend
Delayed register write work needs to be flushed before bus suspend to
make sure there are on pending writes after driver's bus suspend routine
exits. In case delayed work context is not able to finish before the bus
(PCI) is suspended (DRV), it may lead to a NOC error.

Change-Id: I40cbcec5d23ddd75ec87aed69ac45d95510fa880
CRs-Fixed: 2813733
2020-11-09 22:57:51 -08:00
Vignesh Mohan
dc6fecf304 qcacmn: Do not use preCAC timer check for Rolling CAC
While checking for the radar source, the status of preCAC timer
is used to check if rolling CAC is active or not.

However, rolling CAC uses a different timer which results in
radar during rolling CAC to be treated as radar in home channel.
Check for preCAC timer only if agile preCAC is enabled.

CRs-Fixed: 2811313
Change-Id: I1f41e4fb83213abb8fd93531174063fad339f3b7
2020-11-09 22:57:47 -08:00
Yu Ouyang
ee22cac551 qcacmn: Also update passive scan dwell in concurrent mode
In concurrent mode active scan, both active and passive scan dwell
time should be updated. Because FW will use passive scan dwell for
DFS channel scan. If it still is default value 110ms, DFS channel
scan will spend much time. AP KPI will drop much.

So, for active scan, update passive and active scan dwell together
in concurrent mode.

Change-Id: I9ceb4ece6da2a794fff3b87c7be3214a9dbc46ab
CRs-Fixed: 2790910
2020-11-09 09:16:59 -08:00
Ananya Gupta
ea977dc41c qcacmn: Count htc packets failed or not freed in misclist
HTC packets were mapped but not unmapped or freed. As part of
hdd_wlan_stop_modules(), all nbufs will be freed in misclist
and TxQueue.
Adding debug change to count number of htc packets failed to
send and count number of nbufs in misclist are skipped when
freeing them.

Change-Id: I868621a67cf89d9b84e202843990f576973ec334
CRs-Fixed: 2807407
2020-11-09 00:57:56 -08:00
Santosh Anbu
a958936486 qcacmn: Set bssid hint config in INI/CFG
Add change to enable bssid hint scoring for candidate selection in
connection manager.

Change-Id: I40a120781c93bf8fb09ec9591a94ee1484bb1a0c
CRs-Fixed: 2801397
2020-11-08 22:53:17 -08:00