Commit Graph

670 Commits

Author SHA1 Message Date
Venkateswara Swamy Bandaru
f290a54316 qcacmn: Fix irq imbalance issue
irq imbalance issue happens when some irq is disabled or enabled multiple
times. For group interrupts enabling one interrut can cause irq to come.
By this time other interrupts in the group are not enabled. But the irq
will disable all group interrupts in qir context. Later those interrupts
will be enabled. This can cause race condition and in turn irq imbalance
issue. Fix this issue by protecting request_irq and free_irq of group
interrupts to avoid race condition.

Change-Id: Ic99e80600ef63c0d7aff45231d0dae6767cd084c
CRs-Fixed: 2262333
2018-07-04 08:45:52 -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
367a882dc9 qcacmn: Fix printk format error in SDIO HIF
sizeof() operator should be using %zu

Change-Id: Ia0f4938316cf32e9da4db63e3362aca892fc915b
CRs-Fixed: 2267624
2018-06-27 03:44:57 -07:00
Nirav Shah
fdfc25db7f qcacmn: Fix compilation error to enable genoa pcie
Fix compilation error while enabling QCA_WIFI_3_0_ADRASTEA
and HIF_PCIE flag for Genoa.

Change-Id: Ia8c44ae8623c22af415dc66061f38b59169f08a8
CRs-Fixed: 2266809
2018-06-26 02:56:29 -07:00
Nirav Shah
d250672acf qcacmn: Fix compilation error for NAPI disable
Fix compilation error for NAPI disable

Change-Id: I21116cfa061b2c804c3a4cedf106773d538294b3
CRs-Fixed: 2266765
2018-06-26 02:56:26 -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
Sriram Madhvapathi
12bcba2d71 qcacmn: SDIO HIF layer refactor
Redo the hif layer object for separating the transfer methods
1. Move swap_mailbox from hif_sdio_dev to hif_sdio_device
2. Move the mailbox registers to mailbox specific file
3. Send request flags to be populated per transfer method

Change-Id: Ia53ab2b8cd39875d1e7353a212057ff010e89db8
CRs-Fixed: 2252410
2018-06-25 04:56:04 -07:00
Sriram Madhvapathi
df25e2251d qcacmn: SDIO HIF layer refactor
Refactor the mailbox operations in a separate file mailbox.c
Collect common transfer functions in new file transfer.c
Remove redundant file hif_sdio_send.c
Remove redundant file hif_sdio_recv.c

Change-Id: I964970f4651a11000e9833ad21eef1b255682341
CRs-Fixed: 2252406
2018-06-25 04:56:02 -07:00
Madhvapathi Sriram
068bac1f4a qcacmn: SDIO HIF layer refactor
Refactor the quirks into a separate file.
Clean up hif_device_inserted by adding multiple functions.
Clean up startup and enable task.

Change-Id: I2199a1f355561e52fa06a82aa196e0eab2ab34c6
CRs-Fixed: 2252385
2018-06-25 04:56:00 -07:00
c_cgodav
e6f2f9ad64 qcacmn: Fix memory overrun issues in smartlog CE dump
Fix the memory over run by removing the extra "END" ascii print
as it overruns the available memory.

Tests Done:
Ran Pollux_ACFG_MIPS_3Radio_Channel_Change_120s_Rev_1.0.0.0 for ~20hrs
Ran PDT_Pollux_Reboot_Rev_1.0.0.1 for ~36hrs

Change-Id: Id71fe8c95a41369f55d53ece043a0b00e62c5d4f
2018-06-21 05:22:26 -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
Sathish Kumar
2318e0f0e7 qcacmn: Free napi context allocated during hif_napi_create
NAPI context allocated during hif_napi_create is freed in
qca_napi_destroy path based on the conditions that NAPI state
is enabled and NAPI context is created for the CE.

There can be cases when the NAPI context is created for the CE
but the current NAPI state not be enable. In such scenarios, NAPI
context is not getting freed in the destroy path.

Add hif_napi_created API to check if NAPI context is created for CE,
and use it in destroy path.

Also, NAPI object allocated is not freed after alloc during cases
when there is a failure in subsequent operations. Free NAPI object
aptly as required.

Change-Id: Ifcc21d70ba52ca309a913ac564406db627e11249
CRs-Fixed: 2256037
2018-06-18 16:33:45 -07:00
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Yuanyuan Liu
f40b2202d4 qcacmn: Add support for WCN3998
Add support for WCN3998.

CRs-Fixed: 2246597
Change-Id: I0c19c8d47d9480e427019e9bf219d95e1ced0614
2018-06-14 20:55:49 -07:00
Pamidipati, Vijay
cabd46d044 qcacmn: Set IRQ_DISABLE_UNLAZY flag for DP interrupts
Since DP interrupts are not disabled at source, and enabled and
disabled only at GIC level, set IRQ_DISABLE_UNLAZY flag to avoid
spurious interrupt detection

Change-Id: Ie935bee5bf31171d75342cd7607b0478d5e16906
CRs-Fixed: 2257162
2018-06-14 13:04:50 -07:00
Kiran Venkatappa
d4a55e0c77 qcacmn: Fix compilation error when FEATURE_NAPI disabled
Modify hif_update_napi_max_poll_time API to take ce_id instead of
pointer that is defined under feature flag to avoid compilation error.

Change-Id: Iec4a06e816ed1714ec5c00ecdc5a7c6d6eb217e3
CRs-Fixed: 2249802
2018-06-08 10:12:07 -07:00
Orhan K AKYILDIZ
3a7669bf6c qcacmn: Rate-limit excessive logs
Customer requests some CE logs to be rate limited as logs flood
the logs space.

Rate-limit the logs.

Change-Id: I922f5a737b967a62b557715c2d74f330fa47ca06
CRs-Fixed: 2179665
2018-06-06 18:56:31 -07:00
Zhang Qian
eb5dc5bd68 qcacmn: Add timeout for BMI message exchange
qcacld-2.0 to qcacmn propagation

Currently there is no timeout for BMI message exchange.
If HW interface is stuck, kernel thread for driver loading
will be blocked.

Change-Id: Ia7039f2939cf39af605a8ebec3278c5e1685bfbe
CRs-Fixed: 2228298
2018-06-01 18:24:29 -07:00
Pramod Simha
6417448381 qcacmn: Fix format specifier for printing kernel addr
Change the format specifier to print kernel
virtual addr from %p to %pK.

Change-Id: If87dc3b2bea4154ed2e077a70b258f92a0276aa2
CRs-Fixed: 2213180
2018-05-29 13:34:38 -07:00
Manjunathappa Prakash
a5a30867c4 qcacmn: cancel ce_tasklet workers during deinit sequence
Fix tasklet workers leak, make sure to cancel the ce tasklet workqueues
during driver unload/deinit sequence.

Change-Id: I48e0c60f1a8bd9dc5e9cb151e197b3e843eaa0f3
CRs-Fixed: 2244061
2018-05-24 11:13:59 -07:00
Venkateswara Swamy Bandaru
0927a44520 qcacmn: Fix return value of hif_exec_event
Fix return value of hif_exec_event when HIF_IRQ_AFFINITY is not defined.
return success in this case.

Change-Id: Icf9d7d15b67aea987fba7be24f6037d67f7d6adf
CRs-Fixed: 2238090
2018-05-23 18:37:50 -07:00
Jeff Johnson
1002ca5ed9 qcacmn: hif: Fix misspellings
Address the following issues in the hif folder:
CHECK: 'controll' may be misspelled - perhaps 'control'?
CHECK: 'Implemenation' may be misspelled - perhaps 'Implementation'?
CHECK: 'intialize' may be misspelled - perhaps 'initialize'?
CHECK: 'occuring' may be misspelled - perhaps 'occurring'?
CHECK: 'reseting' may be misspelled - perhaps 'resetting'?
CHECK: 'stuct' may be misspelled - perhaps 'struct'?
CHECK: 'substract' may be misspelled - perhaps 'subtract'?
CHECK: 'successfull' may be misspelled - perhaps 'successful'?
CHECK: 'syncronize' may be misspelled - perhaps 'synchronize'?
CHECK: 'transfered' may be misspelled - perhaps 'transferred'?
CHECK: 'untill' may be misspelled - perhaps 'until'?
CHECK: 'wirte' may be misspelled - perhaps 'write'?

Change-Id: I80280ecb8ac8b0270a32add74429a8df89bedbcb
CRs-Fixed: 2241576
2018-05-19 19:41:05 -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
Lin Bai
e2137870de qcacmn: print the value of register fw_indicator
For legacy PCIe chip like Rome, FW will use register 'fw_indicator'
to indicate more info, when failure occurs.

Here to print its value for debug purpose.

CRs-Fixed: 2242094
Change-Id: I9037dc29091ec5d7571414bb9e135dfaaf0f6dd9
2018-05-17 15:43:46 -07:00
Jeff Johnson
c9e37ee940 qcacmn: Fix typo "initalizes"
Replace typo "initalizes" with correct spelling "initializes".

Change-Id: Ibe473a78e943c43ca50948ae95829504a8741d6b
CRs-Fixed: 2238309
2018-05-17 00:47:32 -07:00
Jeff Johnson
2d821eb0fe qcacmn: Fix typo "recieve"
Replace typo "recieve" with correct spelling "receive".

Change-Id: I7d88e57b97fa6d217630d4a5d5c365b56e714428
CRs-Fixed: 2238309
2018-05-17 00:47:23 -07:00
Jeff Johnson
ab0aeed501 qcacmn: Fix typo "aquired"
Replace typo "aquired" with correct spelling "acquired".

Change-Id: Iee18669cf648971e93965bea7ea0589f942c3af2
CRs-Fixed: 2238309
2018-05-17 00:47:11 -07:00
Jeff Johnson
d277f28dde qcacmn: Fix typo "occured"
Replace typo "occured" with correct spelling "occurred".

Change-Id: I1407965d96633b78e1f5d613b0eec3afb8f3b708
CRs-Fixed: 2238309
2018-05-17 00:47:05 -07:00
Jeff Johnson
dc9c55962d qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Jeff Johnson
4cee5cf7cc qcacmn: Fix typo "seperate"
Replace typo "seperate" with correct spelling "separate".

Change-Id: I742473a16b79c5b91722c3642c983a7fa6dfd252
CRs-Fixed: 2238309
2018-05-17 00:46:54 -07:00
Jeff Johnson
ae1b3de378 qcacmn: Fix typo "sucess"
Replace typo "sucess" with correct spelling "success"

Change-Id: Ieacb299890210d67848268a389a57168e2a2badd
CRs-Fixed: 2238309
2018-05-17 00:46:44 -07:00
Nirav Shah
77250fa1d7 qcacmn: Changes to compile out fastpath feature
Changes to compile out fastpath feature cleanly and
also disable unused code when Fastpath is enabled.

Change-Id: If6dc9d5c4d4441d5edded582747c783a10f8c8d4
CRs-Fixed: 2226921
2018-05-16 08:36:16 -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
Akshay Kosigi
0f345aee16 qcacmn: Fix for NULL check reference in hif_get_hal_handle()
Fixe for Null check dereferencing pointers

Change-Id: I706b5959a85ab381594d7cab7e7dba95435f85f5
CRs-Fixed: 2230161
2018-05-03 12:55:05 -07:00
Manjunathappa Prakash
c3aeffb5e9 qcacmn: add API to get NAPI instance corresponding to NAPI ID
Add API to get NAPI instance from NAPI ID. Handle to NAPI is required
for Rx processing via GRO.

Change-Id: I15535827a03953231670d4138235c4876b16e045
CRs-Fixed: 2062180
2018-05-02 04:35:02 -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
Yun Park
c60a22b88d qcacmn: Fix use after free of SKB in DP trace path
qdf_dp_trace could access nbuf already freed after sending to CE ring.
Move trace log before sending skb and add error log when fail to send.

Change-Id: I8ce36b9d196b7d44e0e9f7dcfe05db404a77e32f
CRs-Fixed: 2090277
2018-04-18 21:02:21 -07:00
Venkateswara Swamy Bandaru
3b16ea52b5 qcacmn: Fix kernel warning in free irq path
Free irq only if it is requested based on CE_ATTR_DISABLE_INTR flag.

Change-Id: I606b4099dd5f61aef94c1eaaee9a283f731b1a57
CRs-fixed: 2219495
2018-04-06 14:47:16 -07:00
Karunakar Dasineni
9ff1ef9798 qcacmn: Disable CE6 interrupts for Hawkeye
CE6 is used for autonomous HIF_memcpy by FW, but interrupts
are coming to host since there is no separate HW control to
turn off host interrupts. Avoid requesting these interrupts.

Change-Id: I7b09b7c6e39d37e111e6e7a4292f605b3fb602e0
2018-04-04 04:02:11 -07:00
Aditya Sathish
61f7fa32c4 qcacmn: Fix Static Code Analysis Issues
Fixes static code analysis issues relating to null pointer
dereferencing and array bound issues.

Change-Id: I365277d9e690ca92351530f01162094ad2bca6ad
CRs-Fixed: 2208294
2018-03-29 22:30:33 -07:00
Vivek
2b109825ac qcacmn: Replace A_UINT with appropriate types
There are instances of use of older A_UINT/A_INT.
Replace all such instances with the qdf u_int*_t/int*_t.

Change-Id: I7ce29b03f29a0d1a0cf87cfd3c846f4694da4c2a
CR's-Fixed: 2210869
2018-03-26 04:58:12 -07:00
Rajeev Kumar
19735e75ce qcacmn: Rate limit CE access log to avoid watchdog bark
Rate limit CE access log to avoid watch dog bark because of
excessive console logging.

Change-Id: I460a39f02206f651eafc26febd5628766e471483
CRs-Fixed: 2207647
2018-03-21 15:29:48 -07:00
Nandha Kishore Easwaran
ac0b96edf9 qcacmn: Add Pktlog service msg in ce config
Add pktlog service message for CE5 in CE configuration.

Change-Id: I49dddd11ca1805a9f519b881d573e8ff4b7ffeb2
CRs-fixed: 2209371
2018-03-21 03:39:35 -07:00
Dustin Brown
f02993c7ec qcacmn: Rename QDF_TRACE_RATE_LIMITED
Change Ie062ada403f8a31aebcde691396987ad9e5352b5 introduced level-
specific logging wrappers. Instead of using QDF_TRACE_RATE_LIMITED
directly, consumers should use the level-specific versions instead.
To prevent new consumers of QDF_TRACE_RATE_LIMITED in the future,
rename this API to __QDF_TRACE_RATE_LIMITED.

Change-Id: I06d35f5277fe2e11fbcc0e7e00b6fa99a84bda78
CRs-Fixed: 2208564
2018-03-20 20:02:18 -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
Nirav Shah
d9dce6e18c qcacmn: [HIF] Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I1192e47f6ca186bbcaa6d1fb28d40cb16d6dfe0b
CRs-Fixed: 2181012
2018-03-12 04:15:00 -07:00
Pratik Gandhi
7846150f2b qcacmn: Fix compilation issues for FW header abstraction
fwhdr_abstrct: Fix compilation issues for WIN firmware header abstraction.

Change-Id: Id76a6f29fd41ae559cf377029428224d59bd03fb
CRs-Fixed: 2140921
2018-03-09 07:28:50 -08:00