Commit gráf

77 Commit-ok

Szerző SHA1 Üzenet Dátum
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
Orhan K AKYILDIZ
5bfbc5b35b qcacmn: Make interrupt blacklisting robust
Interrupt blacklisting in kernel 4.4 happens through a user-space
entity. The kernel APIs irq_blacklist_on(off) essentially send
a message to the user space service(irq balancer) and
therefore are not synchronous and do not guarantee that blacklisting
has actually taken effect. It will be granted with some latency
(userspace entity's processing delay).

Make blacklisting more robust by:
a) move irq (if it has been moved around after blacklist_on call
has been made and not yet honored) to the designated CPU
on IRQ reception
b) stop cpu_isolation in blacklisting mode boost API
c) modify NAPI stats to indicate blacklisting mode

Change-Id: I13e478adbed1a6a66d320f69acdb012bee3dc1e8
CRs-Fixed: 1093770
2017-04-11 11:04:30 -07:00
Mohit Khanna
518eb5092e qcacmn: Add NAPI statistics to dumpstats
Currently NAPI stats are retrieved as a part of iwpriv getStats command.
The buffer available for this command is limited and NAPI stats get
trucncated.

Add a new dumpStats parameter (9) to dump NAPI stats.

Change-Id: Iaf52a3dcecac2f7b24fde2f8220fbfddc767965b
CRs-Fixed: 1076563
2017-04-11 11:04:27 -07:00
Yue Ma
9c6f84da99 qcacmn: Resume fastpath DP in correct place for runtime PM
Fastpath DP should be resumed after WOW is disabled from FW. Move
it to correct place.

Change-Id: I9108ee4393cc4ee5f8a232c3de14d68b47aa760e
CRs-fixed: 2023358
2017-04-03 18:02:13 -07:00
Houston Hoffman
cbcd8397ea qcacmn: Block non-wmi traffic in ce layer durring suspend
Upper layers are failing to block disallowed traffic durring suspend.
Hif can enqueue the messages on the ce rings without letting hardware
know they are there.  When fw is ready to recieve non wmi packets,
hif can inform hw of the queued packets.

Change-Id: I32810d9548416021c1da4f48a4ac539f75f1d907
CRs-Fixed: 2003582
2017-03-30 05:45:50 -07:00
Dustin Brown
6834d321d8 qcacmn: Fix IRQ disable for unit-test suspend on PCIe
pld_disable_irq is a no-op for PCI devices, causing unit-test resume
to fail in some cases. Define new IRQ disable/enable API's in HIF for
unit-test suspend/resume to use.

Change-Id: Ib3e6007025e791c867463c7d9f64512628c4ca0b
CRs-Fixed: 2023978
2017-03-24 15:16:59 -07:00
Himanshu Agarwal
846cf37306 qcacmn: Do IPA version based DMA coherent mask setting
In case of IPA hw version less than 3.0, only 32 bit DMA
address can be handled as it is only 32 bit compliant.
Because of this, setting DMA coherent mask of 37 when
IPA hw version is less than 3.0, crash is happening.

Do IPA version based DMA coherent mask setting such that
when IPA hw version is less than 3.0, set DMA coherent mask
as 32 only.

Change-Id: I8dec7da47766985ab0590f885b29f345f153cd08
CRs-Fixed: 1114605
2017-02-23 07:29:54 -08:00
Houston Hoffman
3c84105dc1 qcacmn: balance spin_lock_create (napi)
Adding lock stats print upon spinlock & mutex destroy.
Without the destroy api invoked the lock stats are not printed.

Change-Id: Id3c432e1f6982ea47bdf1de5c15f1a3568df4eb9
CRs-Fixed: 1100505
2017-01-31 18:53:02 -08:00
Nandha Kishore Easwaran
858a769d6b qcacmn: Fix and Clean up code under NAPI_YIELD_BUDGET_BASED
Enable interrupts after processing the available
rx buffers on CE5 or complete napi after reaching the budget.

NAPI_YIELD_BUDGET_BASED:
This flag enables napi to return once the budget is exceeded,
or after processing the available packets and re-enables
interrupt and this feature doesn't honor the napi
yeild time configured.Napi budget will be configured as
256 for this feature

Change-Id: I75ac75ede46124bc773e3625173f33ca29da8142
CRs-fixed: 1094034
2016-12-15 03:44:06 -08:00
Houston Hoffman
fec8ed1234 qcacmn: Remove cds from napi hot_plug_notifier functionality
Instead of using cds to get the hif context in the notifier callback
rely on the context_of semantics to traverse back to the hif context.

Change-Id: I7d57f9dcf8c09836c34ce16a4acaa8c3bc1624b9
CRs-Fixed: 1092842
2016-11-28 14:09:48 -08:00
Houston Hoffman
60af6759fb qcacmn: Stringify HW_VERSION value when HW UNKNOWN
When new hardware is not found in the lookup table
for human readable hardware names, print the hex
value of the hardware version info.

Change-Id: If821ba04c83f2d9b54587379d92bdc1918d7a094
CRs-Fixed: 1092353
2016-11-28 14:09:45 -08:00
Houston Hoffman
31b25ecbea qcacmn: Support QCA6290 target type
Add device id for QCA6290 emulation platform.
Add target def support for QCA6290
Needs HIF_TYPE_QCA6290 defined

Change-Id: I4edd5a5b600007ebe7416195648815d80025e768
CRs-Fixed: 1089874
2016-11-19 06:47:36 -08:00
Venkateswara Swamy Bandaru
814094e9c2 qcacmn: Change CONFIG_SLUB_DEBUG_ON define to HIF_CONFIG_SLUB_DEBUG_ON
Change CONFIG_SLUB_DEBUG_ON to HIF_CONFIG_SLUB_DEBUG_ON to differentiate
kernel CONFIG_SLUB_DEBUG_ON macro with hif specific debug option.

Change-Id: I8922d5c37363da382f3f0b23489f8fd3544eed7d
CRs-Fixed: 1088928
2016-11-16 06:38:41 -08:00
Manjunathappa Prakash
2146da30dd qcacmn: Add changes for per NAPI or per Rx CE LRO manager
Make changes for per per Rx context LRO manager, this addresses
all parallel Rx concurrency issues. There by removes all the contention.

Change-Id: I90604ffdf7b7fd930eee636426a4c7fc9b92c7d7
CRs-Fixed: 1079320
2016-11-15 00:35:31 -08:00
Kiran Venkatappa
7439befaf8 qcacmn: Add function prototype for hif_get_dev_ba in header file
Function prototype for hif_get_dev_ba is c file to avoid
warning. This should be ideally added in header file. Adding this
prototype in hif.h.

Change-Id: Ic61c5b8278e6e888931721e716de74c4703ace82
CRs-Fixed: 1079655
2016-11-13 23:59:33 -08:00
Govind Singh
861d5da41d qcacmn: Remove arch_get_cpu_efficiency references from hif napi layer
Compilation error is seen for 32 bit builds as arch_get_cpu_efficiency
is not exported in 64 bit architecture cpu.

Remove arch_get_cpu_efficiency references from hif napi layer as this
information is not used as of now.

Change-Id: I68c31b1008696fc84bc5a563d45eaa507ae92981
CRs-Fixed: 1071783
2016-10-27 02:26:37 -07:00
Venkateswara Swamy Bandaru
5432c1babc qcacmn: Add support for low memory platforms
For supporting low memory platforms, if fastpath is enabled, the number
of destinaton ring receive buffers are reduced from 512 to 64 for CE1.
Also when pktlog has been disabled, avoid allocating receive buffers
for CE8.

Change-Id: Ia4cd991ec14a5d69f13efee8e6f72db6da99f83a
Acked-by: Sahoo, Amarendra Kumar <c_aksah@qti.qualcomm.com>
CRs-Fixed: 1066302
2016-10-25 23:43:29 -07:00
Dustin Brown
6bdbda50fb qcacmn: Power offload unit test framework enhancements
Recently host power offload suspend/resume has switched to 3
stage process. Enhance power offload unit test framework accordingly, and
improve error handling. This is a companion change for
I8cc1e955fbaca631ee7fd76b0c907d1e68c836bf in qcacld-3.0.

Change-Id: I8c4e062d4a51a7a245500bc135571fc67cf1b4d0
CRs-Fixed: 1072424
2016-10-06 11:38:21 -07:00
Venkateswara Swamy Bandaru
772377c7df qcacmn: Enhance ce register dump and add hif_get_irq_num
Modify the CE register debug dump routine to print the read,
write indexes on the console.

Add new function  to return vector used for specific radio.
WIN uses this routine to retrieve the irq and assign the same
to radio netdev irq field. Assign the radio netdev with
the right irq number which helps qrfs to steer to traffic
towards a specific core.

Change-Id: I94bdcc323afbee53946ea9e50a773ffe35224ae6
Acked-by: Balamurugan Mahalingam <bmahalin@codeaurora.org>
CRs-Fixed: 1066208
2016-10-06 07:32:11 -07:00
Venkateswara Swamy Bandaru
26f6f1ebae qcacmn: Add support for pipe specific callbacks
Packetlog framework needs pipe specific callbacks. Change is done to
support pipe specific callbacks.

Change-Id: Iabd442acc8bef19ad9b8ad9ff2660e273a859f54
CRs-Fixed: 1072220
2016-10-06 07:32:09 -07:00
Venkateswara Swamy Bandaru
31108f318c qcacmn: Add framework for external group interrupt handling
Change-Id: I68a3c597e452e1975a97f9262870e16538f6dc4c
CRs-Fixed: 1042915
2016-09-20 07:58:33 -07:00
Venkateswara Swamy Bandaru
9fd9af065c qcacmn: Interrupt handling support for chipset QCA8074
Changes to handle Interrupts for qca8074

Change-Id: I81d4b0722d56388cc7aca08484bd8957258621d1
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1042915
2016-09-20 20:27:31 +05:30
Pratik Gandhi
424c62e877 qcacmn: Address compilation issues for WIN new fw headers
Address compilation issues for WIN with new Lithium Firmware headers.
Also removed dependency on htt.h from header files, which may need to
add explicit dependency on htt.h in .c files.

Change-Id: Ia5027963837e645bc3f81a3db98c2ea06789aea8
CRs-Fixed: 1061096
2016-09-19 01:19:28 -07:00
Manjunathappa Prakash
21196d2578 qcacmn: Fix multi queue NAPI build errors
Fix build errors on the platform where multi queue NAPI is
not supported.

Change-Id: Id9916cff11f9337f279f9aed6dfe35e7a6beb1ed
CRs-Fixed: 1066020
2016-09-12 19:26:37 -07:00
Orhan K AKYILDIZ
7ce54e770f qcacmn: add multi-queue NAPI
Add CPU cluster management functionality. On low throughput,
the system works as normal. On high throughput, the driver gets
control of WLAN datapath interrupts and disperses them on different
CPUs and pegs them to maximize performance. Add init code, topology
table construction and hotplugin notifiers.

Change-Id: I247edb57003797ed6a04f70d15067072e22c2396
CRs-Fixed: 1065477
2016-09-12 18:02:29 -07:00
Venkateswara Swamy Bandaru
1633436e74 qcacmn: Added a member in qca_napi_info structure
To derive hif_ctx from napi pointer. This changes helps enable napi support
for WIN driver.

Change-Id: Idcb0775195665d60d4b1a9a010afcfab256d839f
Acked-by: Balamurugan Mahalingam <bmahalin@codeaurora.org>
2016-09-02 04:33:47 -07:00
Houston Hoffman
7fdff0c52f qcacmn: Use suspend_noirq callback instead of disabling irqs
Disabling the interrupts and setting them as wakeup sources does
not work as expected.  The pending interrupt gets trapped in sw
and kernel does not check for it before finishing the suspend.

Instead, use the suspend_noirq callback to guarantee that
wakeup messages don't get processed without rejecting the suspend.

Change-Id: I5ec5ce2a7e1b14c3d8477fe7aa0372c9ffd4dc0d
CRs-Fixed: 1060880
2016-09-01 22:08:57 -07:00
Mohit Khanna
440c5295c2 qcacmn: Add USB bus support (HIF Common)
Add module specific changes for USB bus support.

Change-Id: I98ca380567c279d3206aa4afc7a28c2feeb65993
CRs-Fixed: 1023663
2016-08-17 12:05:38 -07:00
Rajeev Kumar
5bac30f5e6 qcacmn: Add unit test framework to validate WLAN suspend/resume features
WLAN suspend/resume feature has tight dependency on APPS platform
suspend/resume support. On new targets APPS suspend/resume is not
supported until target is feature complete. In absence of APPS
suspend/resume support testing WLAN offload features become
difficult. Add unit test framework to test WLAN suspend/resume
features using private IOCTL command by simulating APPS
suspend/resume behaviour.

Trigger WLAN suspend:
iwpriv wlan0 wlan_suspend 0 0

To resume WLAN run a ping test from access point side and very 1st
ping request unicast packet should trigger wake up.

If FW is not waking up APPS then use below command to do a manual
wake up:

Trigger WLAN resume:
iwpriv wlan0 wlan_resume 0 0

This framework is only for SNOC platform.

Change-Id: I177a0047f460aa2a305a9e4e46fbfaa94a81dced
CRs-Fixed: 1042205
2016-08-03 01:07:49 -07:00
Govind Singh
051a8c4457 qcacmn: Remove duplicate definition from hif layer
FW common files needs to be in sync with host and fw.
There are duplicate definition of target attach API when
latest copy of fw common files are used.
Remove duplicate definition of target attach from hif layer.

Change-Id: Ie4a80ba07bc3ec2d9d1466c32062c373c9759a94
CRs-Fixed: 1012542
2016-07-08 06:12:14 -07:00
Nirav Shah
b70bd731ec qcacmn: Add per CPU interrupt statistics
Add per CPU per copy engine interrupt statistics.

Change-Id: I1619f0db3314ae3d915284459f2b191f31fc2190
CRs-Fixed: 1017437
2016-06-30 03:11:34 -07:00
Nirav Shah
da0881a68f qcacmn: Datapath changes for WiSA specification
Datapath changes for WiSA specification.
 - Multicast packets with 50000 as destination
   port should go at 6Mbps.
 - Multicast packets with 50001 as destination
   port should go at 24Mbps.

Change-Id: I582b13fd85e2bdc0e49739a1c6f8d8a3b295902f
CRs-Fixed: 1010412
2016-06-14 13:48:41 -07:00
Poddar, Siddarth
e41943f3a8 qcacmn: Add hif layer changes for sdio bus (Part 3 - HIF SDIO)
Abstract bus related functionalies to respective bus layer.

CRs-Fixed: 969334
Change-Id: Ie14970d69c0a8bf545d136480e4571352f2d4a26
2016-06-14 13:48:17 -07:00
Govind Singh
4cc8213cc2 qcacmn: SDIO bus support (Part 1 - HIF SDIO)
Add legacy hif sdio code.
Implement new hif sdio interfaces with respect to new hif design.
Add datapath to HIF interfaces.
Refactor hif-sdio codebase.
Remove references to older kernel version.

Change-Id: Ieca3e512edca5f960d6f2b64d15121db6c8138c7
CRs-Fixed: 969334
2016-06-14 13:48:12 -07:00
Yuanyuan Liu
a5f0a396a2 qcacmn: Use PLD layer
Remove ICNSS_CONFIG dependency as it is taken care by PLD layer.

CRs-Fixed: 1013853
Change-Id: I7f174642a1d9053670b4544e0e37dee1d4849872
2016-05-23 11:33:41 -07:00
Houston Hoffman
8592507dfb qcacmn: nss wifi offload changes
Expose copy engine infrastructure for use by an nss subsystem.

Change-Id: Icad9dc056ecccf4029caa4b83d4c976dcfc232a4
Acked-by: Varsha Mishra <varsham@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 18:00:03 -07:00
Houston Hoffman
fb698efe55 qcacmn: Add support for AP chipsets
Add copy engine configuration, extended set_hia functionality,
htc_module credit flow control function and physical address calculations.

Change-Id: I5e4394bed39cc92bb8323d332dc124d948737322
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 17:59:48 -07:00
Houston Hoffman
c3c6bc1e5c qcacmn: Add support for Regtable convergence
Add regtable definitions for chipsets AR6004,AR6320,AR900B,
      AR9888,IPQ4019,QCA9888,QCA9984

Change-Id: Ic018a1396aa36f61ead6d8607feda4711e2a2b07
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 17:59:43 -07:00
Houston Hoffman
56e0d70c3c qcacmn: Introduce APIs needed by WIN
Added new APIs ce_batch_send and ce_send_single
only used by WIN.

Acked-by: Varsha Mishra <varsham@codeaurora.org>
Change-Id: I55d86d692455be118734f6e0a13e0e58c227b1a0
CRs-Fixed: 1009050
2016-05-19 17:57:57 -07:00
Prakash Manjunathappa
82b8996739 qcacmn: Make MAX_NUM_RECEIVES same for all cases
MAX_NUM_RECEIVES, the maximum number of messages to be processed
by the bottom-half before control is returned to kernel was
defined as different (but close) numbers for NAPI and non-NAPI
cases (based on NAPI feature flag), 100/1000 for non-NAPI and
128/1024 for NAPI cases.
With this update the value is set to 128/1024 regardless of NAPI
feature being compiled or not.

Change-Id: I152afd30b302d52426c07ae39a95af388ba0ae52
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-Fixed: 1012336
2016-05-12 11:22:38 -07:00
Houston Hoffman
127467f040 qcacmn: Add hif_ctx to fastpath_cb_register api
Hif apis can't rely on a global context.

Change-Id: I2cad80573fc0102f210bb0f7c3f9e22c5f8e16f9
CRs-Fixed: 1009274
2016-05-04 21:11:05 -07:00
Houston Hoffman
d6f946ce21 qcacmn: Default CE_COUNT_MAX to 12
CE_COUNT_MAX should be the maximum number of CE's supported.
Set it to 12 to support all chipsets dynamically.

Change-Id: Id65278ee452a4ca2e3b0dcfe5c082a7e7a286347
CRs-Fixed: 1002084
2016-05-04 21:10:55 -07:00
Komal Seelam
6ee559010d qcacmn: Remove unwanted header files in transport layer
Rename OL_TARGET_STATUS as HIF_TARGET_STATUS and move the enum to hif.h

Change-Id: Ib84514aa65404b4340b1be06a4adefff27bfdc6d
CRs-Fixed: 998536
2016-05-04 21:10:51 -07:00
Houston Hoffman
f789c661a8 qcacmn: Remove support for QCA6180
This is deprecated emulation hardware.

Change-Id: Ibafc2e55a26bcac28e88a325689a419e058997b5
CRs-Fixed: 1003804
2016-05-04 21:10:27 -07:00
Nirav Shah
d7f9159cf2 qcacmn: Update htc_endpoint only for htt tx endpoint
Update htc_endpoint only for htt tx endpoint to avoid
double freeing of Tx Queue packets as it will be
freed in htt_htc_misc_pkt_pool_free.
Rename htc_endpoint to htc_htt_tx_endpoint to reflect
it's appropriate use.

Change-Id: I736ba08505acc829eb15be30538553dd945695f6
CRs-Fixed: 1006498
2016-04-25 23:03:05 -07:00
Yuanyuan Liu
4e3feeb40b qcacmn: Fix compilation errors for msmcobalt
Fix compilation errors when building for msmcobalt.

CRs-Fixed: 1006068
Change-Id: I26af2637ca95df0765055e7909905babce6a09cb
2016-04-21 20:32:15 -07:00
Manjunathappa Prakash
4a9c3a8fb6 qcacmn: Cleanup fastpath changes
Do following cleanup on fastpath code changes:
1) Do not reap off Tx HIF buffers in Rx handling, instead handle
   reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
   packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.

Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
2016-04-17 15:23:37 -07:00
Manjunathappa Prakash
7399f148b5 qcacmn: Add fastpath Rx support
With dedicated CE for Rx and Tx completion HTT messages, skip processing
in Host Target Communication layer.
Do special handling in HIF-CE and HTT layer, this optimization results
in 3-4% CPU utilization gain.

Change-Id: I400148a0e24ac62dd09e2a95d5f35d94d83fe2df
CRs-Fixed: 987182
2016-04-17 15:23:32 -07:00
Houston Hoffman
c7d5429428 qcacmn: Support multiple RX CEs for NAPI/LRO/FastPath
Make changes so that LRO and FastPath can check whether a
given CE is a datapath RX CE. This is done through new
flags in CE_state which indicate whether or not a given
CE is a htt_[tr]rx CE.
Also add support to enable multi-queue NAPI.
Note that the paths are not yet parallel-execution protected,
but this should be OK as all NAPI instances are processing
the same interrupt now and as such as serialized.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>

Change-Id: I57125b3e1fbad0345b6e1f4ed25e71babaf4f520
CRs-Fixed: 982728
2016-04-17 15:23:26 -07:00