Grafico dei commit

1098 Commit

Autore SHA1 Messaggio Data
Rakesh Pillai
c3b0114600 qcacld-3.0: Delete dp_link only after dp_vdev is freed
Currently the dp_link address is provided to CDP vdev
as a part of vdev register. Also, as per the vdev deletion
sequence, it is possible that dp_link can be destroyed
before CDP vdev is detached. This can lead to use-after-free
scenario when CDP vdev uses the osif_vdev handle (which is
the dp_link handle).

In order to fix this, do not free the dp_link till the CDP
vdev has been detached.

Change-Id: Ie5a1140a0d256b6115fa62e30e6bfd61d1dfc898
CRs-Fixed: 3696641
2024-01-17 03:09:56 -08:00
Yu Tian
f023bb3b27 qcacld-3.0: Separate Peer state get call from fast path
Peer state could be queried from both fast path and
slow path. Change separates this call and allows log
print from slow path call.

Change-Id: I888b67224752182b792e0165bd5cbacbb7e5f293
CRs-Fixed: 3691146
2024-01-17 00:37:08 -08:00
Karthik Kantamneni
8653d961c9 qcacld-3.0: Add null check before accessing soc
While selecting RX refill ring size soc is being
accessed without null check performed.
Add null check to avoid any invalid access.

Change-Id: If1111341b53903c4d00bb96da67af2f6b3cd2746
CRs-Fixed: 3642908
2023-10-19 14:42:11 -07:00
Karthik Kantamneni
89c1955cd1 qcacld-3.0: Reset nbuf data offset properly in RX fast path handling
Currently RX nbuf data pointer is reset considering
headroom reserve size of NET_SKB_PAD. So while reattaching
buffer back to H.W always data pointer is reset back to head plus
NET_SKB_PAD offset. But if skb is not allocated with head room
reserve then we should not reset data pointer taking NET_SKB_PAD
as consideration.

Fix this by pushing nbuf data pointer back to the state when
nbuf entered the host.

Change-Id: I1c3838a54f87f747e3695e86e54e0e663ba4f182
CRs-Fixed: 3582877
2023-08-10 14:42:00 -07:00
Karthik Kantamneni
72f846f20d qcacld-3.0: Fix nbuf user count logic for TSO packets TX
Current mechanism of maintaining nbuf user count to handle
TSO segments during transmission is not proper and causing
double free in corner cases.

Fix this logic by incrementing users count before HW send
and revert the users count if H.W send fails.

Change-Id: I47bd5d3b214705dc7ba12f5e482ee80447831bfe
CRs-Fixed: 3516215
2023-06-05 13:52:55 -07:00
Amit Mehta
e5679f29ad qcacld-3.0: Only allow connectivity logging for STA mode
Currently connectivity logging is done for all opmode
but logging should be done only for STA mode.

So to fix the issue add check for opmode and skip
connectivity logging if opmode is not STA

Change-Id: Iae225faa0fb7f141a46979c90ac4c2374f8a8832
CRs-Fixed: 3515363
2023-06-05 08:33:38 -07:00
Azmath Mohammed
e9ecff38ae qcacld-3.0: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.
modify the DMA direction parameter from
PCI_DMA_FROMDEVICE to DMA_FROM_DEVICE.
Added missing break statement.

Change-Id: I1a226b1c2ce92c7290a094b33a81968d27ff74b3
CRs-Fixed: 3505237
2023-05-24 23:43:26 -07:00
Srinivas Girigowda
b0fbbd3cc7 qcacld-3.0: Remove __func__ from the DP logs
Logging macros already takes care of adding function name.
Hence, delete the occurrence of __func__.

Change-Id: Iee88f5b9620a70a3707c254866201447c10dcbbd
CRs-Fixed: 3492707
2023-05-18 16:28:00 -07:00
Srinivas Girigowda
9325f4c7b8 qcacld-3.0: Remove trailing newline from the DP Logs
Remove trailing newline from the DP Logs.

Change-Id: I0a0f0952539443f9937591ebee1d8432b12ed506
CRs-Fixed: 3492704
2023-05-18 16:27:55 -07:00
Ben Wang
5c44ee5d35 qcacld-3.0: Fix SAP get peer state error in AP+AP mode
WLAN driver working on AP0+AP1 mode. After a ref STA move
connection from AP0(vdev0) to AP1(vdev1). vdev0 have release
peer STA. But it can get a peer state from ol_txrx_get_peer_state.
Actually, the state is from vdev1, not vdev0. If vdev0 have data
send to FW, it will cause FW crash.

Change-Id: I7978b758e98a16993d16d53a55d67734aa896979
CRs-Fixed: 3477987
2023-05-13 14:44:23 -07:00
Venkateswara Naralasetty
3259b29030 qcacld-3.0: compile ol rx thread code only for legacy targets
Currently ol rx thread code is under QCA_CONFIG_SMP macro, which is
enabled for all the targets. But LI, BE and RH family targets don't
use this ol rx thread implementation. Hence, compile out ol rx thread
code for LI, BE and RH targets.

Change-Id: I1a1dfd09f5364ddb519c846e6c456d10f81e369c
CRs-Fixed: 3468499
2023-04-25 19:50:23 -07:00
Zhaoyang Liu
afa9a28c32 qcacld-3.0: change dutycycle level array size to correct value
As now throttle level is extended to THROTTLE_LEVEL_5,
previous array 'dutycycle_level' of size 4 may use index
value 4..5 during initialization. Change the array size to
THROTTLE_LEVEL_MAX to avoid out of bound accessing.

Change-Id: I5f9f8cb15e6fbdd8e5b4deccddca954fc73cd8e3
CRs-Fixed: 3433333
2023-03-22 10:29:31 -07:00
Jeff Johnson
6d3b419417 qcacld-3.0: Remove htt_pdev_t::tx_mgmt_desc_ctxt
The tx_mgmt_desc_ctxt member of struct htt_pdev_t has been unused
since the initial snapshot of the driver, so remove it along with the
unused underlying data structures.

Change-Id: Iebd73c0c9eb8f882ec6a0d01ad2979edb701cb80
CRs-Fixed: 3428241
2023-03-12 07:28:31 -07:00
Jeff Johnson
f23b5ba829 qcacld-3.0: Remove macro ol_ctrl_addba_req()
The original snapshot of the driver included the macro
ol_ctrl_addba_req(). However, this macro has never been used and,
since it references an unknown identifier ol_addba_req_reject, it
could never be used, so remove it.

Change-Id: Ib934617376ba241fc7502cfef49bc895e8cc4102
CRs-Fixed: 3428342
2023-03-12 07:28:26 -07:00
Jeff Johnson
6d3daec8a0 qcacld-3.0: Cleanup core/dp/txrx/ol_rx_fwd.h
Prototypes ol_rx_fwd_mcast_check_ap() and ol_rx_fwd_mcast_check_sta()
were part of the initial driver snapshot, but there was never an
actual implementation of these functions, so remove the prototypes.

The prototype for ol_rx_fwd_check() uses a legacy documentation
template, and the prototype for ol_get_intra_bss_fwd_pkts_count() has
no documentation, so make sure both of these have proper kernel-doc
documentation.

Change-Id: I80a9c6f61631dd509b9029312b1e35c235ac2aa9
CRs-Fixed: 3428364
2023-03-10 22:48:25 -08:00
Qun Zhang
5268464ab3 qcacld-3.0: Support TX OFF for LL legacy flow control
For QCA_LL_LEGACY_TX_FLOW_CONTROL data flow control,
currently it cannot support TX off for thermal mgmt.
Similar to thermal implementation in FW, refine
ol_tx_set_throttle_phase_time() to support thermal
mitigation TX off processing when INI throttle duty
cycle set to maximum 100.

Change-Id: I208288bda2ad7ca1a14be0b80a0d57361ce0ec8c
CRs-Fixed: 3413545
2023-03-06 16:00:06 -08:00
Jeff Johnson
b607e016e8 qcacld-3.0: Remove pktlog.h include
The header file pktlog.h is a legacy remnant that doesn't provide any
value, so remove the unnecessary #include. This is a precursor to
removing the actual file.

Change-Id: Ic9def32b2c800a9b05001eb3816d1b421f82288e
CRs-Fixed: 3420816
2023-03-02 16:28:23 -08:00
Venkateswara Naralasetty
0b73cf7d9b qcacld-3.0: Rename CE descriptor macros
Few of the CE descriptor related macros are moved from qdf to
ce_internal.h file. Hence rename the corresponding macros.

Change-Id: I64b74456fb3f349ab65b3c955461ef3693ca318d
CRs-Fixed: 3388380
2023-02-24 00:05:26 -08:00
Tiger Yu
33aef11cd3 qcacld-3.0: Add TX packet trace info for debugging for module QCA6574
Add TX packet trace for module qca6574 to get more info for debugging

Change-Id: I226eb904d9a86a86f7ee4403da97445242b13909
CRs-Fixed: 3405782
2023-02-23 10:48:58 -08:00
Karthik Kantamneni
5b66893892 qcacld-3.0: Configure RX ring size based on supported data mode
Configure RX refill ring size based supported nss mode.
In 1x1 mode throughput supported will be less,
it does not require higher RX refill ring size so
in 1x1 mode use reduced refill ring configuration.

Change-Id: Iab1db3e99b1a30cf1dd3d584192363cbffa84ec1
CRs-Fixed: 3376948
2023-01-15 00:36:27 -08:00
Gangadhar Kavalastramath
ac42107b12 qcacld-3.0: Fix wlan idle timeout crash for genoa
Two different crashes are observed due to rtpm get/put count
mismatch for HIF_RTPM_ID_HTT dbgid.
1. During idle timeout shutdown: Missing rtpm related htc packet
   tags for htt_h2t_ver_req_msg(), htt_h2t_frag_desc_bank_cfg_msg()
   and htt_h2t_rx_ring_rfs_cfg_msg_ll() messages cause system crash.
2. During wlan connect: In ol_tx_completion_handler(), rtpm put is
   called without rtpm get.

Fix given:
1. Add relevant HTC_TX_PACKET_TAG_RUNTIME_PUT and
   HTC_TX_PACKET_TAG_RTPM_PUT_RC in the above functions to invoke
   missing rtpm put calls and call htc_dec_return_htt_runtime_cnt()
   to avoid calling rtpm put without rtpm get in htc_cleanup().
2. Remove extra htc_pm_runtime_put() from ol_tx_completion_handler().

Change-Id: Ia9163464af0fc0700046578633e9587c009841f5
CRs-Fixed: 3357909
2023-01-05 14:30:25 -08:00
Roopavathi Lingampalli
b81f52931c qcacld-3.0: Add Rx thread feature support for Dp component
Add Rx thread and Rx refill thread support for
DP componentization.

Change-Id: I2c0a0f7780280a0c2304f026d2580a81123de312
CRs-Fixed: 3316814
2022-12-06 07:35:08 -08:00
Chaoli Zhou
4cbca147ba qcacld-3.0: Fix ipa compile error for ROME
Fix the parameters missing issue for ipa
function for ROME.

Change-Id: I1dad21bfa0e6cf0f213a1259bd5cf116cccba9a5
CRs-Fixed: 3345055
2022-12-04 12:07:08 -08:00
Jeff Johnson
dc961a7522 qcacld-3.0: core: dp: Fix misspellings
Fix misspellings in core/dp/...

Change-Id: Ibafb9996aeec83ff18fdad269c2ee918afcb397f
CRs-Fixed: 3303628
2022-10-06 02:12:24 -07:00
Jeff Johnson
1e348b3026 qcacld-3.0: Remove calls to qdf_exit_thread()
Since Linux Kernel commit 63706172f332 ("kthreads: rework
kthread_stop()"), made in 2009 in Linux Kernel v2.6.31-rc1, it has not
been necessary for kernel threads to call do_exit(). Since we do not
support kernels earlier than that, remove the calls to
qdf_exit_thread(), the abstraction function for do_exit().

See Change-Id I22f27692fa8766df080630b9b0640c259285557c for more
information on why this call is being removed.

Change-Id: I5fa0e404e782edc04034bef8412acd0ca2f83097
CRs-Fixed: 3300457
2022-10-01 11:35:11 -07:00
sandhu
27a7d9060f qcacld-3.0: fix compilation issue
fix compilation issue by removing stdarg.h and include qdf_types.h

Change-Id: I30ae0aed3fc28c3b9db8b2ce4450211e102b06fa
CRs-Fixed: 3295173
2022-09-29 18:45:58 -07:00
Azmath Mohammed
aacfd1d3d0 qcacld-3.0: Implement DP component for FISA feature
Add FISA feature support for DP componentization.

Change-Id: I748a20ec44d1c299aab8d31facd059eb2e35e680
CRs-Fixed: 3243693
2022-09-28 22:31:29 -07:00
Roopavathi Lingampalli
6d4df6c2da qcacld-3.0: Modify Pre_alloc memory support for Dp component
Modify Pre_alloc memory support for DP componentization.

Change-Id: I274e3163bc6623a7a4e08f8ce30d3bc17a0b444b
CRs-Fixed: 3285947
2022-09-16 11:52:08 -07:00
Rakesh Pillai
4419bf30e6 qcacld-3.0: Update prealloc size for srng from CFG
Update the prealloc size for RXDMA_BUF and REO_DST
rings using the ini values which have been configured.

Change-Id: Idc53bf8626017dd234767da65e131557f3a5600d
CRs-Fixed: 3283991
2022-09-12 00:27:52 -07:00
Rakesh Pillai
93e61d43ec qcacld-3.0: Add pre-alloc entries for fragmented history
Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Ia725cf5d061a53009f02bddd67967360404f2f1c
CRs-Fixed: 3283778
2022-09-08 04:37:39 -07:00
Yu Tian
1a68a41dfa qcacld-3.0: Add additional check for dp thread deinit
In DP thread create failure path, thread de-init logic
doesn't check thread is really running or not, but sends
an shutdown event and wait for completion. This will cause
completion timeout and lead crash. Change adds additional
check for theard stats before sending event.

Change-Id: Ie8e07ba3b6f992a34e9b4b3bbc36b8080157a408
CRs-Fixed: 3280401
2022-09-06 13:46:21 -07:00
Jeff Johnson
155dea7b77 qcacld-3.0: Fix misspellings of "return"
Fix misspellings of "return":
Retrun ==> Return
Reture ==> Return
retrun ==> return
reutrns ==> returns

Change-Id: Iad8bc9f4e9d94b05ed47fd91a591ea0dbc92fde2
CRs-Fixed: 3274605
2022-08-29 14:55:28 -07:00
Rakesh Pillai
dbe1cf2b01 qcacld-3.0: Validate fse metadata before aggregation of FISA flow
When aggregation of a flow is in progress, there can be case
when the HW flow table entry match may fail for few packets.
Such packets, even though belong to a flow already present in
flow table, are routed independently to any RX ring.

When software checks this rx ring ID, from the independently routed
packet and compares the ring ID against the one which is assigned
for the flow, there will be a mismatch leading to unwanted behaviour.

Hence, always validate the fse_metadata before taking any
action on the basis of rx ring ID mismatch. The non-matching
packets, with invalid fse metadata can be submitted to network
stack independently.

Change-Id: Ia95f20ef1050bc981b2d22571b612fd2af6f6a65
CRs-Fixed: 3272353
2022-08-27 22:57:22 -07:00
Jeff Johnson
adc9857a94 qcacld-3.0: Fix misspelling "recevied"
Multiple instances of the misspelling "recevied" are present, so
replace them with the correct spelling "received."

Change-Id: Ie0421bc472d5c25f1fbcc5e8c9333e0283a6e129
CRs-Fixed: 3271103
2022-08-22 13:14:39 -07:00
Ming Jiang
5ba58f5e9c qcacld-3.0: Initialize page size of DP cacheable resource
Set DP_BLOCKMEM_SIZE for cacheable dp multipage prealloc resource

Change-Id: I610cb3b78f8413dfbc52eee9d8b690c7bac38db0
CRs-Fixed: 3240041
2022-08-16 21:38:46 -07:00
Ananya Gupta
9b6a5c2bfc qcacld-3.0: Release spinlock if bypassing fisa
Spinlock recursion is occured as dp_rx_fisa_add_ft_entry() is
returning without releasing the spinlock and from another CPU,
same process is trying to acquire the spinlock.
To fix this, if fisa is being bypassed, release spinlock before
returning.

Change-Id: I93a59a727683e1235b0ead96df5cd30f6c56d5a1
CRs-Fixed: 3257174
2022-08-02 08:54:20 -07:00
Namita Nair
a1c50a9788 qcacld-3.0: Support same link/mld peer mac address
Handle build errors in legacy chipsets, to support
same link/mld peer mac address handling for MLO.

Change-Id: I8b4e323481c6d327ee579a6b8143215c94341b8e
CRs-Fixed: 3228926
2022-07-29 05:56:46 -07:00
Roopavathi Lingampalli
865eaba7f4 qcacld-3.0: Implement DP component for SWLM feature
Implement SWLM feature support in DP componentization
model.

Change-Id: I4cd03c768fe9d9bd66d484a8c5e2f2613e55f4e6
CRs-Fixed: 3243889
2022-07-27 13:25:56 -07:00
Bing Sun
dc90fbafd4 qcacld-3.0: Use qdf_hrtimer_data_t instead of __qdf_hrtimer_data_t
We should use qdf_hrtimer_data_t, which is QDF abstraction of hr_timers.
We should use QDF_HRTIMER_NORESTART instead of __QDF_HRTIMER_NORESTART.

Change-Id: I02b83a23c94d1acde955313ed39e1b5cc44f76f2
CRs-Fixed: 3253137
2022-07-27 07:22:29 -07:00
Rakesh Pillai
8e45e437f0 qcacld-3.0: Bypass FISA aggregation for packets from DNS server
Currently FISA flows are added for packets received
from DNS server. The connection to DNS server are short
exchanges to resolve any URL, hence there is no need
to create FISA flows for such short lived flows.

Bypass FISA for packets from DNS server.

Change-Id: Ifd4f15f2c0b131148ccff7fd450d536ac029788d
CRs-Fixed: 3249810
2022-07-26 08:03:35 -07:00
Rakesh Pillai
2421447f6d qcacld-3.0: Do not attempt to print FISA stats when its disabled
Currently the handler which dumps FISA stats, does not
check if the FISA feature has been enabled/disabled via
the INI. Accessing FST table when FISA has been disabled
via INI leads to unexpected assertion.

Fix this by checking if the FISA feature has been enabled
via INI, before accessing the FST table.

Change-Id: I5345138c5af03e3dd777bfe36004c477cff0ab7d
CRs-Fixed: 3249827
2022-07-24 12:09:19 -07:00
Jinwei Chen
d7e0ec3e67 qcacld-3.0: check memory size in dp_prealloc_get_context_memory
check memory size in dp_prealloc_get_context_memory, if memory size
needed > pre-allocated, then fall back to dynamic memory allocation.

Change-Id: I2727feef066046b54dff9206a1f6699ef4455fe8
CRs-Fixed: 3222594
2022-07-19 13:49:29 -07:00
Amit Mehta
e5e83b4185 qcacld-3.0: Update HDD to use DP component APIs
All the DP specific code logic is moved out of HDD to
new DP component. So update HDD module to use newly
introduced DP component APIs for DP specific operations.

Changes were backed out because of association issue
introduced by MLO adapter to DP interface mapping issue
and to avoid any further regression.
Re-introduce changes after preforming complete sanity
to vet out any regression which might be introduced
by these changes.

Change-Id: I377aecc4343e75dd17d279a2eb84fc49e737e784
CRs-Fixed: 3198619
2022-07-18 03:21:04 -07:00
Amit Mehta
c87481282c qcacld-3.0: Fix return value
Currently in some cases we are returning
enum of type rx_pkt_fate instead of qdf_dp_tx_rx_status

Fix issue by returning correct enum type.

Change-Id: I97c67003178fd5347de57c1b78602177696e0973
CRs-Fixed: 3234233
2022-07-02 23:11:05 -07:00
Rakesh Pillai
b87648dd65 qcacld-3.0: Enable Monitor status buffer tracking history
Enable monitor status buffer tracking history.
Also enable the allocation of memory for the monitor
status buffer tracking history via prealloc.

Change-Id: Iafec8e68c85b3f2d9b0bf0523a19b7a32869e20a
CRs-Fixed: 3229689
2022-07-02 11:28:04 -07:00
Xiaoning Ma
a41c89dd02 qcacld-3.0: Fix compile error for incompatible function pointer types
Fix compile error with '-Werror,-Wincompatible-function-pointer-types'

Change-Id: Iba97ead4e8d5b940463a3786a0b375cbbecf503f
CRs-Fixed: 3226016
2022-06-30 23:28:18 -07:00
David Oladunjoye
ad41728f81 qcacld-3.0: dp: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Ie320d97a2df018fb0ad1a39c3fb2683e564d1808
CRs-Fixed: 3217418
2022-06-24 20:06:08 -07:00
Amit Mehta
58a1587cdb qcacld-3.0: Make changes to use QDF status and type
Make changes in packet logging to send QDF status
and type instead of packet log type and status.

Change-Id: I8c1d04a78272159f7d34d6034c41d52e1e44b61d
CRs-Fixed: 3224876
2022-06-23 07:03:36 -07:00
Ananya Gupta
346a64fc9c qcacld-3.0: Register PM QOS and bus suspend module
With restructuring in hif runtime pm module, modules are
required to register with the hif runtime pm module. Also,
link states are depreciated.
This change registers PM QOS and bus suspend modules which
use runtime PM module and replace link state with resuming
link up state in PMO resume.

Change-Id: I0df48e3d31a1fb0f03faaa0617b48937c9bc224b
CRs-Fixed: 3169425
2022-06-18 23:11:04 -07:00
Prakash Manjunathappa
1cf7befc57 qcacld-3.0: Add support for Kiwi flow search table in CMEM
For KIWI platform FST reside in CMEM. CMEM address is known at the
init time from platform driver. Use 16K of CMEM address for FST.
Increase MAX FISA FST entry size to 256, which is allowed max size with
16K of CMEM allocation for FISA FST.

Change-Id: I395ab884b9cc761ed3c4438434475d6f9908a62b
CRs-Fixed: 3199251
2022-05-27 19:36:52 -07:00