커밋 그래프

125 커밋

작성자 SHA1 메시지 날짜
Yue Ma
ac6b275768 qcacmn: Record caller and timestamp for pm_runtime_mark_last_busy
pm_runtime_mark_last_busy will extend the timer for runtime suspend.
Recording caller and timestamp can help to debug who may prevent
runtime PM suspend.

Change-Id: I4848a2558197e0fc9b7300421a5a1993817333e4
CRs-fixed: 2457803
2019-05-30 19:29:48 -07:00
Yue Ma
2bdc2baea6 qcacmn: Request runtime PM resume after receiving WAKE MSI
For PCIe DRV (L1SS sleep) suspend, firmware will trigger a WAKE MSI
to wake up host so that request runtime PM resume for this case.

Change-Id: I959d3b1053b7aef5fe80889553958cf9394c8c38
CRs-fixed: 2450284
2019-05-30 19:29:45 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00
Pamidipati, Vijay
37d107d2d1 qcacmn: HIF schedule latency measurement
Add support to measure interrupt latencies, store them
in different "bins" and display the constructed histogram
through user command.

Change-Id: I268be6b39745d550ac7db5d321c2d1fdb2d17d41
CRs-Fixed: 2365812
2019-04-09 04:00:32 -07:00
Akshay Kosigi
181b2f52e6 qcacmn: Clean up HIF module to remove CONFIG_WIN macros
Replace CONFIG_WIN macro definitions with feature based macros
for HIF module.

Change-Id: I31a3ef0f70d19f838e2dff0db345e765a0aeb84e
CRs-Fixed: 2407222
2019-03-14 19:27:51 -07:00
Pavankumar Nandeshwar
7eddeddb17 qcacmn: Make ce-debug lock per HIF
Make ce-debug buffer lock per HIF instead
of global. Rectify the #if conditional macros.

Change-Id: I0063014ed2fd9c7716386877dcbefec40e9fa2d9
2019-01-28 12:20:49 -08:00
Rakshith Suresh Patkar
ee84fbeea2 qcacmn: Use global variable for cpumask
Local variable is used to store cpumask to send it to
irq_set_affinity_hint and qdf_dev_set_irq_affinity APIs.
This memory is used by the kernel later outside the
current contect resulting in invalid memory access.

Fix this by using global variables to store cpumask.

Change-Id: I086f40bf1b3499d2c2ccb1ce18140b2dc2761d04
CRs-Fixed: 2373548
2019-01-02 03:53:07 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Pamidipati, Vijay
a59b5607c6 qcacmn: Split Tx and Rx indication handling
Add support to handle Tx completion processing and Rx processing into
different NAPI threads/contexts for Lithium DP

Change-Id: I4f5c6ef3ce969ce457e26cf3e8305df1ae782f09
2018-11-14 12:20:34 -08:00
jiad
a007ac831b qcacmn: Abstract BMI CE callbacks
As part of WIN BMI modularization, hif_bmi_register_callbacks
are removed from if_pci.c in qcacmn project. As a result,
MCL needs to invoke hif_bmi_register_callbacks in qcacld project.

Fix is to define hif_bmi_register_callbacks for SDIO and USB builds
so that SDIO and USB products can build when WLAN_FEATURE_BMI is
defined.

Change-Id: I559af0205dd4671214a8d7f2972fdba379e10b6a
CRs-Fixed: 2332250
2018-11-02 19:11:43 -07:00
Sathyanarayanan Esakkiappan
29c8fd48da qcacmn: Update Interrupt name list
Update Interrupt name list of dummy_irq handler.

Change-Id: I8e79f6e64a0fec2bb72d4c44cd8647669cbb44cf
2018-10-05 17:39:43 -07:00
Venkateswara Swamy Bandaru
dbacd5e70f qcacmn: Add hif support for qca8074v2
Add new target type for qca8074v2 and extend target
type checks of QCA8074 for QCA8074V2.

Change-Id: Ib3ff4505e2057fc843b492b9720004dcac042a65
CRs-Fixed: 2292271
2018-08-10 18:11:12 -07:00
Venkata Sharath Chandra Manchala
79860aa182 qcacmn: Enable QCA6390
1. Allocate and Initialize host and target copy engine configuration
   for QCA6390 based products.
2. Setup Copy engine service map for QCA6390.
3. Add conditional compilation flag QCA_WIFI_QCA6390 to support
   QCA6390 based products.

Change-Id: Ia4dd4d436b8ecae0e9f91faa0c1fe7dbd14f001f
CRs-Fixed: 2259312
2018-08-08 12:53:51 -07:00
Qiwei Cai
85cfe85c70 qcacmn: Featurize wlan BMI
Featurize wlan BMI to compile out in mission mode.

Change-Id: I1ac98765e470749d372be508b1f4fcb2a9012cb9
CRs-Fixed: 2259801
2018-07-17 03:48:45 -07:00
Rajeev Kumar
49496d088a qcacmn: Enable CE scheduling logging feature
Enable CE schedulign logging feature such that each CE
activity can be recorded for debug purpose. Previous commit
I68a765c6219a2ff2a6a7adc7e8ed031f8957d243 has broken this
debug feature. Fix the CE scheduling logging feature properly
such that its available in SLUB debug enabled builds.

Change-Id: I24ca711378ecda8a8563fe3899fae16ca032f29d
CRs-Fixed: 2272459
2018-07-10 14:06:49 -07:00
Sriram Madhvapathi
6615d89b58 qcacmn: SDIO HIF Layer refactor
1. Modifications for SDIO HIF interface with stack.
 Mailbox based devices do not use the SDIO abstraction layer.
 So, devices like QCA6174, QCA9379 etc are to interface with
 the SDIO stack directly, even if the CNSS wrappers are used.
 ADMA based devices use the SDIO abstraction layer. So, devices
 like QCN7605 do not interface with the SDIO stack directly.

2. Remove redundant osdrv layer and refactor the functions
3. Propagate hif context to all the interface functions in hif
4. Remove duplicate hif object allocation (scn) in SDIO hif

Change-Id: I75cfe97b1ef913d1a3e6e556ec5eff796eb9f1d9
CRs-Fixed: 2271110
2018-07-09 12:58:31 -07:00
Nirav Shah
4c8b78a44c qcacmn: Add support for QCN7605(Genoa)
1. Copy engine assignment changes for Genoa.
2. Add support for QCN7605 device type.

Change-Id: I5cf6b765a51608c27f2ef2e6d3bf45b64875dd6c
CRs-Fixed: 2265278
2018-07-06 03:19:17 -07:00
Manjunathappa Prakash
617ff247dd qcacmn: Affine NAPIs based INI CPU mask
Affine NAPI CPUs based CPU mask specified in INI config.

Change-Id: I0bea3389a7565f8ec157d4587a442b5e11c33fb2
CRs-Fixed: 2255756
2018-07-02 12:23:36 -07:00
Sriram Madhvapathi
303c73c76d qcacmn: SDIO HIF layer refactor
1. Move mailbox transfer dma definitions to mailbox.h
2. hif_configure_device changes to make it more generic
3. Add address fixup function

Change-Id: I12bdf8b07350411093ba35071411525a8333cf93
CRs-Fixed: 2252417
2018-06-25 04:56:06 -07:00
c_cgodav
862541432b qcacmn: Add api for dumping the CE discriptors
API for dumping the CE descriptors copies all descriptors for
the given Copy engine id and also copies the SKB packet pointed
by the descriptors till smart_log_skb_sz bytes.

Change-Id: I511bda77319944c1ec2377f716087956ce0637ac
CRs-Fixed: 2008290
2018-06-21 05:22:22 -07:00
Jeff Johnson
5fb2e3d5f1 qcacmn: hif: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I5d1411d241cfed4f50759960d18e9220f6c0da39
CRs-Fixed: 2230684
2018-05-18 02:17:27 -07:00
Manjunathappa Prakash
56023f5649 qcacmn: Add GRO support to NAPI+Rx_thread processing model
GRO aggregations are hanging out of NAPI instance and we cannot use the
hif NAPI instance in Rx thread as gro_list inside NAPI is flushed out
at the start and end of NAPI poll, this will corrupt the gro_list on
which rx_thread is working. Address this concern by creating dummy
NAPI instances mapping to each hif NAPI and by not scheduling them.

Change-Id: I517c4c6158ed3ac073f5f617afde46c7ed07ff3e
CRs-Fixed: 2128457
2018-05-04 20:43:09 -07:00
Himanshu Agarwal
909eb2e46f qcacmn: Change ce_service_max_yield_time ini to us granularity
Change ce_service_max_yield_time ini to us granularity to have
yield time of us order as well.

Change-Id: Iae31be810dd42273a4f0546ba2b76e89e23b9329
CRs-fixed: 2086190
2018-04-28 12:57:34 -07:00
Poddar, Siddarth
1ea8292209 qcacmn: Add API to set ce service max rx indication flush
Add API to set ce service max rx indication flush num
during load time for handling of messages in CE based on
ini configured one.

Change-Id: I49c3d6ebac34076cd5ad5e352e78d2fec7c8ee89
CRs-Fixed: 2068375
2018-04-28 12:57:31 -07:00
Himanshu Agarwal
d9d0e52555 qcacmn: Add APIs to set/get ce service max yield time
Add APIs to set/get ce service max yield time and update
max time taken in NAPI poll from the driver load time.

Change-Id: Idfd4a271ce13916f188c92ab3af32e1648f48c95
CRs-Fixed: 2055082
2018-04-26 13:12:16 -07:00
Sravan Kumar Kairam
58e0adfb53 qcacmn: Add support for WLAN-IPA WDI2 with SMMU Stage 1
Update WLAN-IPA WDI-2 datapath for DMA buffer sharing with SMMU
Stage 1 translation support. When SMMU Stage 1 is enabled DMA
APIs return IO virtual address(IOVA) instead of physical address.
This IOVA need to mapped to physical address by IPA module
before accessing them.

Change-Id: I33082bc74760b0f12c348238c6f48f5ce5750172
CRS-Fixed: 2072953
2018-03-19 09:34:39 -07:00
Dustin Brown
9a94c9a29d qcacmn: Rate limit logs based on elapsed time
QDF_TRACE_RATE_LIMITED() currently rate limits by only printing every
rate'th call to the function from the same location. Instead, prevent
logging messages more than some constant 'k' times per second. This
means any subsequent calls to the API from the same location within 1/k
seconds will be dropped.

Change-Id: I31a3f48f68fb6bc67f59f3157a635345943d3331
CRs-Fixed: 2205794
2018-03-16 21:51:48 -07:00
Balamurugan Mahalingam
3ab3633184 qcacmn: Add support for QCA6290 platform
Add support for QCA6290 platform and introduced an hif api to enable,
disable polled mode.

Change-Id: I16e210fef93251b33928788cf873117249c2d70f
2018-02-23 06:06:00 -08:00
c_cgodav
fda96ad28f qcacmn: Add additional CE Tx descriptor debug
Store the Tx data buffer of MAX_DATA_SIZE bytes as part of CE descriptor
debug information. Add sysfs API to dump the CE descriptor+data debug
information on console.
The CE descriptor and MAX_DATA_SIZE bytes are stored for Tx packets which
would be used to debug any CE related issues.

Change-Id: I68a765c6219a2ff2a6a7adc7e8ed031f8957d243
2018-02-07 02:15:30 -08:00
Pratik Gandhi
034cb7cb60 qcacmn: Define Host based TARGET_TYPE
fwhdr_abstrct: Use Host based TARGET_TYPE instead of firmware
defined TARGET_TYPE. It will abstract dependency on bmi_msg.h.

Change-Id: I76d744db27df730a3a91a243adfc07fc17d77487
CRs-Fixed: 2140921
2018-01-03 20:09:46 -08:00
wadesong
41f857eb31 qcacmn: Debug print rate limiting
Implement driver debug print rate limiting in HIF SDIO RX
path and QDF nbuf allocation path to avoid driver
inactivity watch dog time out when the platform is facing
great memory pressure.

Change-Id: Ifa4fe3e7027150fd1469df58049776fca8aa6f2f
CRs-Fixed: 2148314
2017-12-04 23:38:59 -08:00
chenguo
f254886c3d qcacmn: Mapping between NAPI budget and internal budget
There is a scale factor mapping between NAPI budget and internal
budget. Add logic for this dynamic translation.

CRs-Fixed: 2140049
Change-Id: Iac03bd431ab7a416a87e488b14bc8b5c1bb7869f
2017-11-27 22:40:17 -08:00
Dustin Brown
5d0d104798 qcacmn: Use qdf_cpuhp APIs for NAPI
Abstract NAPI's use of CPU hotplug events by using the new QDF CPU
hotplug APIs.

Change-Id: Iad590768476b4dc6bad63b3ee3b1b1bbf7698251
CRs-Fixed: 2141180
2017-11-15 15:53:37 -08:00
Dustin Brown
bbba9176f8 qcacmn: Set the initial wake flag on MSI resume
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
2017-11-01 13:57:00 -07:00
Manjunathappa Prakash
96713609aa qcacmn: Get rid of spinlock lro_unloading_lock
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
2017-10-26 23:48:06 -07:00
Govind Singh
bc679dc919 qcacmn: Do not allow CE register access when recovery is in progress
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
2017-10-12 14:22:34 -07:00
Sravan Kumar Kairam
bd20096931 qcacmn: At set DMA mask skip IPA version check
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
2017-10-01 23:41:13 -07:00
Venkateswara Swamy Bandaru
b3d6b4e446 qcacmn: remove module parameter from dp code
Remove napi_budget module parameter from dp code.

Change-Id: Ib48d08044977da9091f1a1264d219420d7f53962
CRs-Fixed: 2096650
2017-09-21 16:41:57 -07:00
psimha
a079b8c678 qcacmn: Deregister HIF ext groups on rmmod
- Deregister & free the hif ext ctx when detaching DP interrupts.
- Unregister the hotcpu_notifier during rmmod.

Change-Id: Icbd3c6cee70b6b224059a4b301b9840485a96d11
CRs-Fixed: 2086729
2017-09-08 19:40:02 -07:00
Venkateswara Swamy Bandaru
ed15e74a87 qcacmn: Add support to pass napi budget as module parameter
Add module parameter to pass napi budget for dp interrupts. Default value is
set to 128.

Change-Id: I6b3761c6908ed9cec4e40118a657b39da6ac2532
CRs-Fixed: 2095242
2017-09-01 23:17:18 -07:00
Prashanth Bhatta
65b0eaa24b qcacmn: Change semantics of Runtime Lock APIs
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
2017-08-15 13:27:07 -07:00
Houston Hoffman
817ff7fc72 qcacmn: Add target type for adrastea chip
Add adrastea target type definitions to hif.h.

Change-Id: Id3183287ecd749577cfc1b71a0cfd96210073612
CRs-Fixed: 2066361
2017-08-11 19:38:21 -07:00
psimha
61b1a36f72 qcacmn: Add NAPI stats
Add basic stats to track NAPI polls & schedules.

Change-Id: Iea8f21fc08d4a5de62e00f32ffdc020f8364ced1
CRs-Fixed: 2083867
2017-08-04 15:35:43 -07:00
Houston Hoffman
def86a361b qcacmn: Introduce hif_exec_context
hif_exec_context extends hif_ext_groups to support napi and tasklet models.
Some of the rename and enahancements have been done to support merging of
the execution context management code between the CE and DP contexts, as
well as supporting irq affinity for both napi & tasklet contexts.

Change-Id: I82c8abf2e906f027ec80faf7353a7685536bb79b
CRs-Fixed: 2051902
2017-07-13 03:37:59 -07:00
Pamidipati, Vijay
3d8e1e8655 qcacmn: Enable interrupts for DP Rx Error release and REO status rings
Initialize correct mask values to enables Rx error and status ring interrupts

Change-Id: I717fbea492f12d983fb57d964996f4b79c73cb38
CRs-Fixed: 2004658
2017-06-16 17:12:19 -07:00
Dustin Brown
ccf859d9f5 qcacmn: Refactor Unit-Test Suspend
Unit-Test suspend needs to be decoupled from the copy engine
implementation in HIF. Split the HIF portion of Unit-Test suspend into
their own files, and clean up naming, etc.

Change-Id: Ic36c5b98c505f6b62ddf94336838a9e53fe8aa78
CRs-Fixed: 2055328
2017-06-16 09:49:14 -07:00
Houston Hoffman
eab19b3b61 qcacmn: Allocate hif_napi_info structures dynamically
The hif_napi_info structure has a dummy netdev included.
The dummy netdev is large.  Avoiding unneeded allocation
save 30kb of memory.  Dynamically allocating the
hif_napi_info structures also reduces the size of
the contiguous memory needed for the parent structure.

Change-Id: I58044e5b1d0a834b3b6d17f66d6f4b2462873f2a
CRs-Fixed: 2016355
2017-06-08 15:23:21 -07:00
Dhanashri Atre
991ee4defc qcacmn: Modify legacy LRO implementation to use QDF
Modify the legacy LRO implementation to use the implementation
in QDF instead. This is to avoid code duplication and to unify
the LRO implementations for Napier and Helium.

CRs-Fixed: 2042812
Change-Id: I38e9da3b54392a1c5781133916361aac3875d43d
2017-05-26 16:11:22 -07:00
Manikandan Mohan
bd0ef8a249 qcacmn: Fix kernel module check patch warnings in HIF files
Fix kernel module check patch warnings in HIF files

Change-Id: I3ddc76399004f15f325b56709e4f2e96bf4cda96
CRs-fixed: 2033001
2017-05-02 13:29:28 -07:00
Venkateswara Swamy Bandaru
61824944ab qcacmn: Add API to support configuring external group interrupts
Added API to support configuring external group interrupts for AHB bus.

Change-Id: If65984183db808e68dea680c585692e1533e4c7a
CRs-Fixed: 2018655
2017-04-12 04:02:03 -07:00