Commit Graph

562 Commits

Author SHA1 Message Date
Jianmin Zhu
7630ff783b qcacmn: Fix delay when request dp stats when RTPM suspended
When RTPM suspended, wlan_hdd_cfg80211_stats_ext_request and
dp_peer_rxtid_stats are called to get tx rx status, dp and ring
spin_lock_bh is held, if RTPM suspended, printk happens in
hif_pm_runtime_get which consumes 1 ms. In dp_peer_rxtid_stats,
REO cmd CMD_GET_QUEUE_STATS and CMD_FLUSH_CACHE are called for each of
17 tid, so total 34 printk delayed 34 ms.

To fix it, disable prink in hif_pm_runtime_get when called in
dp_peer_rxtid_stats.

Change-Id: If043d6772e337e42a5478de17480253f45d779c6
CRs-Fixed: 2858534
2021-01-28 04:18:14 -08:00
Pavankumar Nandeshwar
d6c9f3ad8a qcacmn: change qcn9100 to qcn6122 in data path
Change the name of target type qcn9100
to qcn6122 in data path.

Change-Id: Ia1463ca276b7c107ca4c1ebce4ffc8b517134a5e
CRs-Fixed: 2849577
2021-01-18 21:45:30 -08:00
Rakesh Pillai
6ee7aeb0bd qcacmn: Avoid logging in packet transmission path
Currently if the driver is in runtime suspend/suspending
state, any packet transmission will request for resume
via hif_pm_runtime_get.

Unfortunately there is a logging in the above API which
will lead to more time consumption in the NET_TX softirq
context. This can lead to other delay in processing other
softirqs in the system.

Fix this by skipping the logging in the packet transmission
path.

Change-Id: Icc9f5b67794f7666243eb059f2e07a06a987002e
CRs-Fixed: 2844126
2021-01-12 14:34:40 -08:00
Dustin Newman
2d1625aabe qcacmn: hal: Initialize hal_hw_txrx_ops for 5018
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 5018.

Change-Id: Ie04dc1ebaa4e4964a565416c900c55e309638261
CRs-Fixed: 2837917
2021-01-11 04:06:52 -08:00
Dustin Newman
2658dea9b0 qcacmn: hal: Initialize hal_hw_txrx_ops for 8074v2
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 8074v2.

Change-Id: I06f7aad41446623bd8f28cb4de84bfb4fc1bad24
CRs-Fixed: 2837917
2021-01-11 04:06:49 -08:00
Dustin Newman
d667adc719 qcacmn: hal: Initialize hal_hw_txrx_ops for 8074v1
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 8074v1.

Change-Id: I1c9657c3a7d642f676167a7ce1026acb6e8db056
CRs-Fixed: 2837917
2021-01-11 04:06:45 -08:00
Dustin Newman
05bc154f2a qcacmn: hal: Initialize hal_hw_txrx_ops for 6750
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 6750.

Change-Id: I6a6728eb9d5f7f9c3256a087726abd9a627fd14d
CRs-Fixed: 2837917
2021-01-11 04:06:41 -08:00
Dustin Newman
09bb264b52 qcacmn: hal: Initialize hal_hw_txrx_ops for 6390
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 6390.

Change-Id: I0dc5abcee8787977970a2956181a413eb44fa3cb
CRs-Fixed: 2837917
2021-01-11 04:06:37 -08:00
Dustin Newman
5ad75b2f38 qcacmn: hal: Initialize hal_hw_txrx_ops for 9000
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for qcn9000.

Change-Id: I3144d5f184d196365e49d6afae843316fef0f1e2
CRs-Fixed: 2837917
2021-01-11 04:06:33 -08:00
Dustin Newman
549f0d8015 qcacmn: hal: Initialize hal_hw_txrx_ops for 6290
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 6290.

Change-Id: I33f467b411c7695a838646bd7e370a75370b898c
CRs-Fixed: 2837917
2021-01-11 04:06:29 -08:00
Dustin Newman
b9ccb9248a qcacmn: hal: Initialize hal_hw_txrx_ops for 6490
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 6490.

Change-Id: Icd72cd5e20f1ba88920f4a2bc8e1bc714959e9b7
CRs-Fixed: 2837917
2021-01-11 04:06:25 -08:00
Dustin Newman
d3ac31aacc qcacmn: hal: Initialize hal_hw_txrx_ops for 9100
Change hal_hw_txrx_ops struct to designated initializer syntax for
struct for qcn 9100.

Change-Id: Id2dda43e876f842dc969358c61c06cd85b800723
CRs-Fixed: 2837917
2021-01-11 04:06:21 -08:00
Shwetha G K
13349de3b8 qcacmn: Populate additional params to CFR info
HAL changes to populate agc gain info, CFO and rx_start_ts
parameters to CFR info

Change-Id: I71ae6bf94095e82053d59114a6ae4bdb6b4586d2
2021-01-07 08:18:03 -08:00
Yeshwanth Sriram Guntuka
871c29e8f2 qcacmn: Set IPA WBM2SW ring HP to DDR addr on disable pipes
WLAN HW can still access the IPA tx doorbell address post
disable pipes if there are any pending tx completions which
could result in a NOC error.

Fix is to reset the WBM2SW ring HP addr to shadow addr in
DDR before pipes are disabled.

Change-Id: I52900eb34530388487923a887354ef8839d8c728
CRs-Fixed: 2846421
2021-01-06 13:52:45 -08:00
Shiva Krishna Pittala
d692460e35 qcacmn: Add HAL srng access APIs that handle endianness conversions
Current implementation of hal_srng_access_start() reads the ring pointer
in the same byte-order as it is written by the target. This results in
byte-order mismatch on a big-endian Host because the WLAN target is
little-endian based. For most of the srngs, the target already takes of
this by converting the ring pointer to the host-order before writing to the
DDR. But for other srngs, the Host needs to handle the endianness
conversions. Add HAL APIs to do the same.

CRs-Fixed: 2844519
Change-Id: Ieb47391ac0acc3724e854f433915dd5b1219bebe
2020-12-28 13:07:03 -08:00
Pavankumar Nandeshwar
958652969d qcacmn: Enable cfr on QCN9100
HAL changes to fetch cfr information from
PHYRX_PPDU_END_TLV & RXPCU_PPDU_END TLV for QCN9100

Change-Id: Idf003d8be49b154cfe6e2e5e0628245ad9d7f499
2020-12-17 03:05:33 -08:00
Yeshwanth Sriram Guntuka
2ae7335604 qcacmn: Use the pld register window lock for Lahaina and Cedros
Use the pld register window lock for Lahaina and Cedros.

Change-Id: I34431dce6c5ed6e03f5805e36fd7df47754a8c14
CRs-Fixed: 2835825
2020-12-16 11:55:58 -08:00
Nandha Kishore Easwaran
1d68998d30 qcacmn: Use cache_inv instead of cache_sync
Use cache invalidate api instead of cache_sync since
cache_sync api is not available in MIPS platform.

Change-Id: I4b8e2fc3cb9055d1c392c2f6dbe7d6be7c66031b
2020-12-08 07:21:36 -08:00
Aniruddha Paul
b42ee01aec qcacmn: Change the DST_ALT_IND_0 to WBM from REO2TCL
Change the alternate indication_0 to WBM instead of
REO2TCL. This is done such that, WBM takes care of
the of the de-linking of the link descriptors and
release the buffers to the respective WBM rings.
WBM should take care of the NULL entries if present
in link descriptor as WBM internal errors.

Change-Id: Ie084e54861bb4611a45cd724bb32d211c62f4f21
2020-12-08 01:12:32 -08:00
Ananya Gupta
a550225eb1 qcacmn: Rate limit logs when wake request fails
Excessive logging is detected when force wake request
command fails.
Rate limit the logs in hif_force_wake_request and
hal_write32_mb.

Change-Id: I9b1166074dfdb2d58d811571c802a75a6dbc03c5
CRs-Fixed: 2823961
2020-11-23 21:57:39 -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
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
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
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
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
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
Jinwei Chen
56f94da675 qcacmn: Add reo destination indication info to skb
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.

Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
2020-11-01 23:14:06 -08:00
Nisha Menon
a377301c78 qcacmn: Add support to map generic shadow regs
Add apis to map generic registers to shadow region. Existing
logic includes mapping only srng based regs to the shadow
region.
Add support to map REO control regs and WBM2SW2 rel
ring HP reg address to the shadow region in case the direct
reg writes in IPA enable/disable autonomy fail due to UMAC
block being in a power collapsed state.
Shadow reg mapping for these regs is provided to FW during
init. Add stat shadow_reg_write_fail to track shadow reg
write failure and shadow_reg_write_succ to track successful
shadow writes.

Change-Id: I04790765a3de80047689657e2cad0b73123440b9
CRs-Fixed: 2790321
2020-10-20 15:05:51 -07:00
Aniruddha Paul
1719814f01 qcacmn: Change miscellaneous control register val
In IPQ501x/QCN9100, the REO fragement destination ring
has moved from the REO GENERAL register to REO MISCELLANEOUS
register. Changes are added int HAL_REO_R0_CONFIG to set
the fragmentaion destination value for IPQ501x/QCN9100.

Change-Id: I868dd0ac5c24217f9778ab9da5c2a3d98d3ea302
2020-10-19 07:07:55 -07:00
Varsha Mishra
807a1944f2 qcacmn: Update dscp tid mapping table for IPQ5018/QCN9100
IPQ5018/QCN9100 dscp tid mapping table is reduced to 32.

Change-Id: Iec19814722b574a28eac66558240efa38313f07b
2020-10-16 13:46:40 -07:00
Karthik Kantamneni
081912efd0 qcacmn: Add API to get reo destination indication for QCA6750
Add hal_rx_msdu_get_reo_destination_indication API for QCA6750
target. Add NULL check to avoid possible null pointer dereference
for targets API is not supported.

Change-Id: I2c78e16a6796b0b09834cb91749244357f3de753
CRs-Fixed: 2793284
2020-10-10 11:41:39 -07:00
Saket Jha
a64da56134 qcacmn: Stop FISA if frame rings mismatch
If frames from the same FISA flow goes into different REO2SW rings, it
will result in an unexpected FISA behavior. This can happen if the
frames have been reinjected from FW offload module since FW will select
REO2SW1 ring. If the same flow frames hash to other REO2SW rings, then
the same flow UDP frames will do to different rings.
Reo_destination_indication of 6 indicates if the frame has been
reinjected from FW. If so, then continue to deliver the packet without
FISA.

Change-Id: I14a17a10d04909adfb30557d58beb1610e59bf70
CRs-Fixed: 2790292
2020-10-06 23:57:02 -07:00
Yeshwanth Sriram Guntuka
0907c4679d qcacmn: Initialize the HW FST memory to zero
HW flow search table memory is not initialized to
zero due to incorrect argument order to qdf_mem_set.
This results in the possibility of HW flow entry
to be not configured properly even though SW flow
entry is configured properly.

Fix is to use the appropriate argument order to
qdf_mem_set so that HW FST memory is initialized
to zero.

Change-Id: If24f50c507392bd8d4974232d48d3af6f4f29b43
CRs-Fixed: 2773951
2020-09-29 13:23:28 -07:00
Shivani Soni
f1392936e6 qcacmn: Reserve 128 bytes headroom in monitor status buffer
Reserve 128 bytes headroom for monitor status buffer
to accomadate feature specific radiotap header or any other info
in the headroom.

CRs-Fixed: 2775118
Change-Id: I2b1aba26e565b58c48a2e24ad17965aacd6b4526
2020-09-18 10:38:14 -07:00
Manikanta Pubbisetty
3433cf4974 qcacmn: add HAL APIs to configure FSE in CMEM
Adding HAL APIs for adding and reading flow search entries(FSEs)
in CMEM.

Change-Id: If8282c8be38a85e2344bb55ffa4e63a7577daa20
CRs-Fixed: 2771198
2020-09-17 10:18:26 -07:00
Manikanta Pubbisetty
1a4e3a96c7 qcacmn: add APIs to access CMEM
Adding write/read APIs for accessing the CMEM.

Currently in QCA6750, UMAC and CE windows are statically mapped,
a new static window for CMEM is added for CMEM transactions.

Change-Id: Ie10b33a6f468c6e4db314ea85856414962ef29e3
CRs-Fixed: 2771193
2020-09-17 10:18:23 -07:00
Jinwei Chen
4fdb9be461 qcacmn: Retry reo_dst_ctrl register writing if fails
If reo_dst_ctrl register writing failed, this is a fatal error for
IPA pipe going to down case as RX frames will still be routed to
IPA rings then hit NOC error. retry register writing to see any
chance to write successfully, if fail always, trigger SSR or panic.

Change-Id: I3c03faa28e6cc93f396944579a360d5405c8138e
CRs-Fixed: 2774789
2020-09-15 04:59:41 -07:00
Srinivas Girigowda
5040a3b6ed qcacmn: hal: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: I6b5beea990e78486e1e5aab5a8df5fc2f1e5ab51
CRs-Fixed: 2774457
2020-09-15 02:45:57 -07:00
Debasis Das
59d63401a5 qcacmn: Use next link_desc instead of msdu_count
MSDU count is not reliable in all cases.Hence it is better
to check whether next_link_desc is valid or not and then
free the MSDUs in the next descriptor and subsequently
release both the current and next link descriptor back to HW.

Change-Id: Ie5ea3be547f9aed6673293221f6b47661cd92cce
2020-09-11 11:50:20 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -07:00
Pavankumar Nandeshwar
a50e6800e9 qcacmn: Use correct headers for qcn9100
Use right headers files for qcn9100

Change-Id: I743b32e9fa1c7c3377462d55ca2b6d737af5f713
2020-09-01 01:50:01 -07:00
Pavankumar Nandeshwar
6756b1a5aa qcacmn: Data path changes for QCN9100 bringup
Initial changes made for bring up of
QCN9100 in data path and hal

Change-Id: I6cbe90428b552b6ff5733bc0f60bfb9f7933bc9a
2020-09-01 01:49:51 -07:00
Pavankumar Nandeshwar
52ea4c89d9 qcacmn: Add hal files for QCN9100
Create hal specific files for QCN9100

Change-Id: Ia752fc6bae8948184894d37984f54f8931b66d58
2020-09-01 01:49:48 -07:00
Amir
376724d4f9 qcacmn: Add WAR to skip status ring entry
STATUS_BUFFER_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFER_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happnen that HW will not write STATUS_BUFFER_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.
If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

CRs-Fixed: 2740988
Change-Id: Ieef667f0bb4a47e74fc320c93243c637409f47f0
2020-08-26 14:32:13 -07:00
Neha Bisht
8ae1b8a9e3 qcacmn: Provide SON with per peer qos stats
Providing per peer QoS stats to SON via WDI event

Change-Id: Idd3cfbfec332269fdc8ad0ef273674e81d6ee92f
2020-08-24 05:55:22 -07:00
Adwait Nayak
d4ef2e3959 qcacmn: Fetch cfr info from PHYRX & RXPCU ppdu end tlv
HAL changes to fetch cfr information from
PHYRX_PPDU_END_TLV & RXPCU_PPDU_END TLV

Change-Id: I5817fdc5d17ebea3f2376b7bef9e58981198d1ec
CRs-Fixed: 2752943
2020-08-18 14:43:32 -07:00
Shivani Soni
c4c0a179f6 qcacmn: Monitor Status ring memory optimization
Memory optimization of monitor status ring by allocating buffers during
replenish using alloc_skb (linux API).
It creates buffer of required size rather than 4k size(dev_alloc_skb)

Change-Id: I3ae5e403de28c4570f8ac3b50d3ca878a9e4b2f9
CRs-Fixed: 2733931
2020-08-12 06:42:13 -07:00
Ankit Kumar
1f948cbb6b qcacmn: Process mon dest buffer via nr_frag
Process mon destination buffer via nr_frags
if RX_MON_MEM_FRAG is enabled.

Change-Id: If49132b129e01f6a248544134ac9d9457aa2072d
CRs-Fixed: 2741789
2020-08-11 16:08:03 -07:00
Harsh Kumar Bijlani
c58c061890 qcacmn: Add error print for matching ppdu_id during HAL processing
When matching ppdu_id is detected during HAL processing, then print the
error message instead of going for assert.

Change-Id: I8f58359a66fbeaf2ebc98477f65bab446c0a784b
CRs-Fixed: 2747953
2020-08-07 02:53:28 -07:00
Harsh Kumar Bijlani
cc9f9c7c1f qcacmn: VHT/HE info in radiotap header of mgmt & control frames
In monitor mode, radiotap header contains VHT/HE information in management
and control frames after association of STA to AP.For this,reset of
ppdu_info is required before processing of ppdu in order to avoid reuse
of ppdu_info.

Change-Id: Ia36ec2664f79d645ff76db016f986dfb92ec8bbd
CRs-Fixed: 2734804
2020-08-02 04:57:31 -07:00