Abstract NAPI's use of CPU hotplug events by using the new QDF CPU
hotplug APIs.
Change-Id: Iad590768476b4dc6bad63b3ee3b1b1bbf7698251
CRs-Fixed: 2141180
Document where register writes are for legacy vs srng devices.
With the target access begin/end calls being associated with
the register writes and the register writes being associated to
specific HW, we avoid performing unneeded force wakes on common
code paths shared by legacy & srng based hardware.
Change-Id: Id91399d03298bfc5df56f0c5d5d14b648b665279
CRs-Fixed: 2117144
qcacld-2.0 to qcacmn propagation
There is a memory leak if fail to process the rx packet header in the HIF
layer. Add sanity checking to free all resources if failure hit.
Change-Id: Ifa443dcec0a31ae39356ac1ddf7cfe652d8968ce
CRs-Fixed: 2137736
This ensures scn->ce_count is less than CE_COUNT_MAX without having to
check all the constants it could be initialized to based on device
type.
Change-Id: I8482b5d7c455366d69dcda2b13785b305f192b3f
CRs-Fixed: 2128347
hif_device_inserted may be failed when installing sdio wlan module,
which causes memory leak.
To fix this memory leak, free the hif_sdio_dev and its related DMA
buffers when sdio driver fails in hif_device_inserted.
Change-Id: I6ee53cd2a55fbb1492c66caa260ba8b3681526e6
CRs-Fixed: 2131539
Athdiag procfs entry does not have address sanity check, this is
resulting in invalid ioread32/iowrite32 if out of PCIE BAR address
is used.
Fix this by allowing address with in PCIE BAR range.
Change-Id: I8365eacca7ccc4f489b7d0bda6c998384d0fec7b
CRs-Fixed: 2112270
When the wlan driver is suspending, the last thing it does is check to
see if the firmware has indicated a wakeup during the suspend process.
This is done by checking the initial wakeup flag, which is set when a
specific copy engine payload is received from firmware. For the new
dedicated wake MSI, only the wake signal is received, no payload. When
the wake MSI is toggled, set the initial wakeup flag to prevent race
conditions during the suspend process.
Change-Id: Id53cc7884431a437136d8dca068449bc5a25b87c
CRs-Fixed: 2133469
There is a memory leak for RX path of SDIO WLAN if skb allocation
fails. Add condition check and free all resources for scenario.
Change-Id: Ic4a58d3d4e93f1d6d57bfb045dfdeb131b24f72a
CRs-Fixed: 2128051
Add "static" before some functions which only be used in 1 file to
resolve the compilation error.
Change-Id: I5bf80fe2e124bf4258c9bfdc997a5423773ca474
CRs-Fixed: 2010227
Currently in interrupt handler of per CE, spin lock is taken for
send or receive and returns with out releasing the lock held if
target register access is not allowed. This condition will lead
to kernel panic if some other context is trying for the same lock.
Change-Id: I115f6fbb006d28097168342aa4add3526ad3939d
CRs-Fixed: 2077464
Spinlock "lro_unloading_lock" was required to synchronize the LRO
instance being deleted when there is LRO packet inflight.
With LRO moved to qdf and LRO is tied to hif_napi, LRO instance is
active with life time of the driver. So no need to protect via lock.
Change-Id: I06f7b43e80ddf0ce5e096351b38ce954eb634a95
CRs-Fixed: 2028318
When BMI failed in sdio, hif_sdio_dev->claimed_ctx is not set as valid
value. Then scn, ol_sc can't be freed through hif_disable_bus as usual.
To fix this memory leak, free scn, ol_sc in hif_sdio_close.
Change-Id: I96b9b7c86ea6e84a32eec1c57c27ef042673e2e1
CRs-Fixed: 2131452
Currently, Shadow registers is not implemented for all registers.
This can lead to unclocked access and followed by NOC errors.
In Rx path Interrupt Status and src/dst read index are directly
accessed without shadow block. Target may execute
reset sequence due to PDR/SSR while rx path is active.
Avoid direct access to below registers if target is crashed due
to PDR/SSR.
HOST_IE_ADDRESS
HOST_IS_ADDRESS
CURRENT_DRRI_ADDRESS
CURRENT_SRRI_ADDRESS
Return from ISR without scheduling the bottom half if target is
crashed due to PDR/SSR.
Change-Id: Ifa993e978579b4d061d21281338494292e19700a
CRs-Fixed: 2123967
A recent change added NAPI yield stats update call for all CEs.
With another receent change that shortened the yield time, we see
a lot of logs complaining about CEs where this particular stats
are not applicable to. Limit the stats update to NAPI CEs.
Change-Id: Ia17a4ddf53ce52116f30d48190f47914721a548e
CRs-Fixed: 2092084
Currently there is no indication when calls into pld_wlan_pm_control
fail. Add an error log in such situations to improve debugging.
Change-Id: Ic061a1735878930a5ab55711da58f8bad1a6a8a6
CRs-Fixed: 2119173
Some of the HIF API's that do buffer allocations and operations
return either 0 or 1 as return status. Information is lost since
the same value is returned in case of buffer allocation failures,
queue operation failure or anything else. Caller can't decide if
to perform recovery, graceful failure or BUG_ON.
Return the appropriate error status to the callers.
Change-Id: Idccd3968231d030311fa5581aed78849b729227d
CRs-Fixed: 2105913
Currently while setting DMA mask based on IPA HW version DMA
address bit mask is set. So when IPA is disabled at HW wrong
DMA bit mask is set which leads to allocation failures.
In this change skip IPA version check if IPA HW support is
absent.
Change-Id: I8e438ea012ca889f9d38f22b64207b2a9532a99b
CRs-Fixed: 2067774
HIF close is not freeing RRI memory allocated during HIF initialization
resulting in memory leak of RRI memory after driver unload
To mitigate the issue, freeing RRI memory in HIF close.
Change-Id: Ib3daba8de0cabc1d8e303d7148448d21c47905e7
CRs-Fixed: 2019147
There is a dead loop when nbuf allocation failed for SDIO WLAN.
Do not change the status back to OK when E_RESOURCE is triggered.
CRs-Fixed: 2112323
Change-Id: I50b8fff99707cdccb1e5e837558131d6777ec9c0
current pci version of sleep_state_adjust is not supported on srng based targets.
Change-Id: I6ff0c78681cc15c677b6458b3a7d8b571a051925
CRs-Fixed: 2090590
Stats printing with excessive loops should not go to the console.
Avoids watch-dog bites.
Change-Id: I7b0f9d73139dff97c16f492cbd1cb2d255255b3e
CRs-Fixed: 2091039
Using the same MSI for wake and copy engines has a number of negative
side effects. Instead, set aside a whole MSI just for the wake
notification from firmware.
Change-Id: If871b88ca255ad970dabb4a7773d2b4d3b71c3fe
CRs-Fixed: 2055359
With SLUB build in Low memory condition rx processing is taking
more time, reduce CE msg flush count for fastpath in SLUB build.
Change-Id: I8901bd770ca01997299f882394bbe99871d2400e
CRs-Fixed: 2043999
Add module parameter to pass napi budget for dp interrupts. Default value is
set to 128.
Change-Id: I6b3761c6908ed9cec4e40118a657b39da6ac2532
CRs-Fixed: 2095242
Add a new entry for PACKET_LOG_SVC. FW needs this entry
for initializing packet log CE pipe.
CRs-Fixed: 2094058
Change-Id: I496a2bdf78dd79cc17a60b4f0d227d4e570c93e6
Interrupt was constantly firing because the low_threshold was
improperly configured. The low threshold needs to be 1 less than
the number of buffers posted when the CE is fully posted. The
srng backed CE's are setup with nentries - 2 buffers as the fully
posted amount, therefore the threshold needs to be nentries - 3.
Also fixes a bug where a reused variable is not cleared. This
bug could result in the threshold being set to a garbages value.
Change-Id: Iac840bfd6677683bf2feb42d8bdbd050f42e895d
CRs-Fixed: 2090603
Use srng based runtime check to bypass legacy register based fw handshakes.
Also remove deprecated emulation based io_remap hack
Change-Id: Idc599bec69a191131e866a2db36d6df3e8e8057f
Do not enable interrupts and continue polling when there is pending work
group napi poll function.
Change-Id: I51184bc5b97f44a65e0883eb614bc47b2b5ca428
CRs-Fixed: 2094313
Add missing qdf_spinlock_destroy() to destroy spin lock debug cookie
for SLUB build. For normal builds, qdf_spinlock_destroy() is a NO-OP
function.
Change-Id: If5a3843a468e460952dc64f0e6b5b1fba05ebbb3
CRs-Fixed: 2078940
Add macro protection for HIF CE, it shouldn't include the ce head file
when the module is usb or sdio.
Change-Id: Icc38ffaa24581141f86d41afe2db7c5aa944a1cd
CRs-Fixed: 2090621
Runtime PM lock init API right now returns pointer to a context
but this would cause confusion to the caller if feature is not
defined and dummy function return NULL as caller can't find real
failure versus dummy function returning because feature not being
enabled.
Fix declaring a data structure in QDF layer that caller can use
but it hides the internal details of HIF implementation for
Runtime PM locks.
CRs-fixed: 1116509
Change-Id: I4dcba604e803faa0e14fac6403610391895e382e
WIN side code already uses the address FW interface header file.
No impact on MCL side as these are addresses are for WIN chips.
Change-Id: I540de3adf749d02aa9e56cca3f1f1baa39052dc7
CRs-Fixed: 2066361
Because of wrongly using #ifdef instead of #if, DEBUG_BUNDLE is
always on after enable bus bunlde for SDIO bus WLAN.
CRs-Fixed: 2073795
Change-Id: I7b94dbc0a63dbea2384a455eed1e46d0eb60c530
Add lock before disabling and enabling group interrups to avoid race
condition between enabling and disabling group interrupts. Avoid mutiple
enabling/disabling of interrupts by maintaining the irq enabled information.
Change-Id: I79afc987e3853de84aaa05321cfcee72cdc0acb0
CRs-Fixed: 2087792
Pointer tbuffer is allocated from heap or get from other module, it
is checked in some if branch but not every possible NULL branch.
Adding NULL check of tbuffer in every possible branch.
Change-Id: Id3c9f941623995ff73a993e29c53f3b9ce66f10e
CRs-Fixed: 2064350
Release napi spinlock only after performing napi state
comparison to avoid any race condition.
Change-Id: Icd7b713e474a818dfc6d0fa402496bbe06a3af66
CRs-Fixed: 2078294
sync_completion_queue pass to function hif_dev_issue_recv_packet_bundle
may be NULL when asyncProc is true, and this queue pointer will be
dereferenced in HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE.
Add checking before dereference this pointer.
Change-Id: I7e6f7923c819a7af8ed5444853ee74ffe1dd1a76
CRs-Fixed: 2071228