Commit Graph

1045 Commits

Author SHA1 Message Date
Dhanashri Atre
a98e024f86 qcacmn: Change due to R102 hardware headers for QCA6290
Changes needed to support the new definitions introduced
in the R102 hardware header files for QCA6290.

Change-Id: I4e3c27dfdc48b4d6a44f0f50f3e4a907be20e53d
CRs-Fixed: 1105853
2017-01-18 20:05:31 -08:00
Yingying Tang
8040436e3a qcacmn: Add new HW version for QCA9379
Propagate from qcacld-2.0 to qcacmn

Currently there is no QCA9379 1.1 infomation in wlan device id table.
Add QCA9379 version 1.1 in device id table.

CRs-Fixed: 1048598
Change-Id: Ie4b7d3e31db2f2b3cad116bb0e993f9f55a7d322
2017-01-11 22:15:19 -08:00
yeshwanth sriram guntuka
78ee68fa4a qcacmn: Remove redundant qdf_mem_zero calls
qcacmn to qcacmn-2.0 propagation

qdf_mem_zero is called after qdf_mem_malloc to set the memory
value to zero. qdf_mem_malloc uses kzalloc internally to allocate
memory which sets memory to zero.

Removing redundant qdf_mem_zero which are called after
qdf_mem_malloc.

Change-Id: I8e1faf6099f8fbc869c8af42b7511a13e66e6bed
CRs-Fixed: 1079697
2017-01-08 22:34:01 -08:00
Sarada Prasanna Garnayak
580f1c4ddf qcacmn: fix the runtime pm feature compilation error
Add missing semicolon in variable declaration.

CRs-Fixed: 1107859
Change-Id: If1c4841345eb0e5060dc4db71ce22ff139ec5015
2017-01-05 23:25:27 -08:00
Jeff Johnson
bf8ed0a7a2 qcacmn: Fix -Wmissing-prototypes in if_pci.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in if_pci.c that is generating warnings.  Fix
these warnings by making the following functions static:
	hif_enable_pci()
	hif_register_bmi_callbacks()
	hif_ce_interrupt_handler()

Change-Id: Iaf30be455ce537fabc85dc973ceb3f1b820d29d9
CRs-Fixed: 1107494
2017-01-05 09:51:21 -08:00
Karunakar Dasineni
c7033bcfa8 qcacmn: CE setup changes to fix copy failures
Increase number of entries in diag CE to 8 as per Lithium SRNG HW design constraints.

Change-Id: I07427e2ccd1da3b08a6f58d3dcca74b85a4fe84e
2017-01-05 08:36:12 -08:00
Jeff Johnson
0571813a2b qcacmn: Fix -Wmissing-prototypes in ce_service_srng.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in ce_service_srng.c that is generating
warnings.  Fix these warnings by making the following functions
static:
	ce_send_nolock_srng
	ce_sendlist_send_srng
	ce_recv_buf_enqueue_srng
	ce_recv_entries_done_nolock_srng
	ce_send_entries_done_nolock_srng
	ce_completed_recv_next_nolock_srng
	ce_revoke_recv_next_srng
	ce_completed_send_next_nolock_srng
	ce_cancel_send_next_srng
	ce_check_int_watermark_srng
	ce_get_desc_size_srng
	ce_srng_src_ring_setup
	ce_srng_dest_ring_setup
	ce_srng_status_ring_setup
	ce_ring_setup_srng

Change-Id: Iea59d7b65179ad2a0c6a45af6acf94663b41304c
CRs-Fixed: 1104119
2017-01-04 11:19:06 -08:00
Poddar, Siddarth
f176340b9e qcacmn: Fix to avoid skb buff leak when NBUF alloc fail
propagation from qcacld-2.0 to qcacmn.

If host fail to allocate receive packet bundle buffer
it will return no memory without freeing receive pkt queue.
Fix is to free the receive pkt queue before returning from message handler.
Also, fill the rx free list during driver load time itself with the
pre allocated memory so that Tx won’t take away this memory.

Change-Id: I4bf2aeb7bc85cc68cfa1314e6dbf5057665ba7ce
CRs-Fixed: 1079623
2017-01-04 04:02:46 -08:00
Kiran Venkatappa
a17e5e546f qcacmn: Fix for crash during unload of driver modules
Cleanup usage of irq_request_done flag. This flag is
set after registering irq. Irq register is skipped for emulation.
Setting this flag here causes detach path to release
irq even though it was not registered. Add new bitmap
ce_register_irq_done to track CE irqs.

Change-Id: I84cb4463b8ad51f22cb17c55dab36a398ccbaef0
CRs-Fixed: 1097695
2016-12-25 22:16:47 -08:00
Houston Hoffman
88c896f365 qcacmn: Support separate ce service map for qca6290
qca6290 family chips need a separate ce service map.
packet log service moved to CE5 to replace ipa ce
service.

Change-Id: I150d493df9e7fc910d5dbe44d99693345574a921
CRs-Fixed: 1103155
2016-12-24 15:25:32 -08:00
Houston Hoffman
d63cd7430c qcacmn: Disable fastpath for srng rings
Reject fastpath enable for srng based chips.

Change-Id: If1f3be9cb92a7620b27e040aa6da4b18ed4d19f7
CRs-Fixed: 1104685
2016-12-24 15:25:31 -08:00
Houston Hoffman
5caa32f957 qcacmn: Use disable_irq_nosync for ce srng msi mode
Implement interrupt mitigation for copy engines.
Implementation is not good if the CE msi vectors are shared,
since disable_irq_nosync will block all users of the given msi
vector.

When processing multiple CE interrupts while the tasklet is scheduled,
the the interrupts will increments the active_tasklet_cnt without
schduleing the tasklet (since it is allready scheduled).  This leads
to an imballance between the number of irq's processed and the number
of tasklets run.  This imballance leaks active_tasklet_cnt, and prevents
suspend from succeding.

interrupt mitigation fixes this problem by preventing the interrupt
from being processed untill its tasklet is finishing runing.

Change-Id: Idb3168d543481843b92327d302e7536e994e341e
CRs-Fixed: 1104481
2016-12-22 23:18:02 -08:00
Vijay Pamidipati
537d929e81 qcacmn: Enable DP support for 8074 M2M and SoC RUMI
Add RUMI Device IDs in CDP SoC Attach

CRs-Fixed: 1088985
Change-Id: Iac3feafbf7d4debeab3ff5ca038b03657818591b
2016-12-22 15:31:12 -08:00
Jeff Johnson
33a4c8c68f qcacmn: Remove unused ce_service_srng functions
The following functions in ce_service_srng.c are unused, so remove
them:
	ce_send_watermarks_set_srng
	ce_recv_watermarks_set_srng
	ce_send_entries_avail_srng
	ce_recv_entries_avail_srng

Change-Id: I76562daa1166eacc8fc9355187a77141294ee4c0
CRs-Fixed: 1104060
2016-12-22 15:27:35 -08:00
Kiran Venkatappa
55d3a20bb9 qcacmn: Fix for crash during unload of driver modules
Change ce_cancel API to return error status in srng implementation.
Since this feature is not yet added, it should return error status, zero
or success return value will result in a infinite loop causing access to
invalid memory.

Change-Id: I871cc16e2854aeca694c7538cc1e99ab24b04de6
CRs-Fixed: 1097695
2016-12-20 21:52:20 -08:00
Pamidipati, Vijay
30dc8f2e1c qcacmn: Fix few bugs in HIF DP Interrupt handling
Use disable_irq_nosync instead of disable_irq, as it is invoked
from handler for same IRQs which have to be disabled.
disable_irq waits for completion of IRQ thus causing a deadlock.
Initialize an unitialized variable in hif and fix the
DP interrupt names to match with the ones in dts file

CRs-Fixed: 1099955
Change-Id: I311eebb863fe3fb4d8c399e0817bc7d9af0b0e31
2016-12-16 10:56:23 -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
Dustin Brown
782a07e2bc qcacmn: Port 3-stage suspend/resume to PCI
SNOC bus suspend/resume uses a 3-stage process. Port the same process
to PCI code paths by adding a hif_pci_bus_suspend_noirq callback for
the suspend case and a dummy callback for the resume case.

Change-Id: I83d8c5e10aecde6812aa8164f93c8f1628a33101
CRs-Fixed: 1098552
2016-12-13 22:05:34 -08:00
Kiran Venkatappa
e516b08079 qcacmn: Fix compilation for r96 headers
Add HW verision check to access proper macros for host common interrupts.

Change-Id: I6cba4a17913c23f48c62b7917166b7c0db77c06b
CRs-Fixed: 1090092
2016-12-12 23:40:06 -08:00
Houston Hoffman
3aa074f338 qcacmn: override irq disable/enable for msi mode
irq_enable/disable may be different for legacy srng and msi
vs single line interrupts.  Provide a place to insert the interrupt
mitigation scheeme.

Change-Id: I66559a404b0c2105da143215203c04f2311a763a
CRs-Fixed: 1093364
2016-12-11 10:57:46 -08:00
Houston Hoffman
15010778ea qcacmn: Use pld msi allocation for CE
Use the msi vectors allocated by the platform driver
for the copy engine interrupts.

Change-Id: I3fa96daa3222524ffe31659c12b3c0f5a2725e18
CRs-Fixed: 1093364
2016-12-11 10:57:45 -08:00
Houston Hoffman
a15d0b0eae qcacmn: Do wlan_disable/enable for QCA6290
QCA6290 needs the platform QMI handshake to kick off
fw.  Platform will have logic to not do QMI for targets/
platforms that don't support QMI.

Change-Id: I9643d778f25e4059baae903876d44dd2c77d9aaa
CRs-Fixed: 1097382
2016-12-10 18:07:31 -08:00
Houston Hoffman
d0620a35b3 qcacmn: Support CONFIG_PLD_PCIE_INIT
CONFIG_PLD_PCIE_INIT indicates that pcie initialization
and io remap have allready been done by the platform driver,
and should not be re-done by the wlan driver.
This is to facilitate shared controll between the MHI & wlan
drivers.

Removes a call to pci_disable_msi that might be needed in the
normal case.

Change-Id: I5c1eb72d998f53e3bb2e6751008d8a0c5c46a516
CRs-Fixed: 1097340
2016-12-10 18:07:29 -08:00
Houston Hoffman
6a5fff6bec qcacmn: Conditionaly compile hif_pci_probe_tgt_wakeup
hif_pci_probe_tgt_wakeup has been made static, so the compilation
must follow its conditional use.

Change-Id: I4c289ed7c7bb8c5b6fbde265c37dc0c3665b81fa
CRs-Fixed: 1096402
2016-12-10 18:07:28 -08:00
Srinivas Girigowda
c606ed04ef qcacmn: Fix header include bug
This is a qcacld-2.0 to qcacld-3.0 propagation.

In file ar9888def.h error: '_AR9888DEF_H_' is used as a header guard here,
followed by #define of a different macro [-Werror,-Wheader-guard]

ar9888def.h: note: 'AR9888__AR9888DEF_H_' is defined here; did you mean '_AR9888DEF_H_'?

Fix the header file include guard properly.

Change-Id: Ic05a829eadbf974598370c494a5cff10201ec600
CRs-Fixed: 1091052
2016-12-09 17:51:50 -08:00
Yingying Tang
d89217468d qcacmn: Add support for QCA9379 SDIO & USB boards
Propagate from qcacld-2.0 to qcacmn

This change add the corresponding support for QCA9379 which has new chip ID.

Change-Id: I252b75d9ae7b760a6a8f6931b4db753f50d3baba
CRs-Fixed: 990755
2016-12-07 03:09:10 -08:00
Pamidipati, Vijay
dfe618e3b5 qcacmn: Add a new version of hal_srng API does not update HW pointer
Add hal_srng unlock API to be  used in completions reap funtion (CE) in
which HW head pointer/tail pointers need not be updated

CRs-Fixed: 1088985
Change-Id: Ia54b144e5dfd0b37bbabf992c764697928ddf76d
2016-12-06 14:50:53 -08:00
Karunakar Dasineni
8a8afe2b47 qcacmn: E4.1 M2M emulation base address change
PCI base address should be offset by 0x0c000000
to access WLAN registers from E4.1 emulation release.

Change-Id: I022184398a457271bb495ac11421de59bc3d3857
CRs-Fixed: 1090092
2016-12-02 01:39:26 -08:00
Karunakar Dasineni
f61cb0725e qcacmn: Changes to enable PCI based Hawkeye M2M
Include Hawkeye emulation PCI device ids in probe list. This is required
to enable PCI based emulation platform to probe device and load driver
succesfully.

Change-Id: If6e750a2add334794e2d62085007fc300600f853
CRs-Fixed: 1090092
2016-12-02 01:39:25 -08:00
Samuel Ahn
388b9a5c1e qcacmn: Add support for multiple instances of the host driver
Propagation from qcacld-2.0 to qca-wifi-host-cmn.

If the module name is changed to something other than wlan in
Makefile or Kbuild, then MULTI_IF_NAME is defined to be the module name.
When MULTI_IF_NAME is defined, the names for the config files, log files,
and firmware files are prepended or appended with MULTI_IF_NAME. This
prevents file name collisions allowing multiple instances of this driver
to be loaded with different module names.

Change-Id: Id880c5fe423eb0b2a2c01677d8fa7c4a784c74df
CRs-Fixed: 946520
2016-12-01 01:41:23 -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
59fd245eae qcacmn: Add WCN3990_V2 to hw names
Print out hw name WCN3990_V2.2 when soc version is 0x40010001.

Change-Id: I78c8cf5cf8917174fe95b8a8eefe608363a49e49
CRs-Fixed: 1092353
2016-11-28 14:09:43 -08:00
Houston Hoffman
710af5a21e qcacmn: Use 9 copy engines for QCA6290
Reserve CE9-11 for the MHI driver.

Change-Id: If09c749293f98e9d0d97e73c3720eb5d8800070f
CRs-Fixed: 1093513
2016-11-26 13:35:38 -08:00
Nandha Kishore Easwaran
cbff9c9090 qcacmn: Enable napi to re-enable interrupts
When NAPI is busy processing Rx, interrupt is not re-enabled
and this causes CE2 and other pipes to become full and target asserts.
This patch enables napi to return after processing half of the descriptors.

Change-Id: I2ba443c388f1a9d36331c632bfb2fbbbe876228f
Crs-fixed: 1094034
2016-11-25 11:00:24 -08:00
Jeff Johnson
6950fdbedd qcacmn: Fix -Wmissing-prototypes in HIF
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in hif.

Change-Id: I342360f48f73a1e5ef42ebc4ca38366669eea0e0
CRs-Fixed: 1091702
2016-11-23 14:44:52 -08:00
Sarada Prasanna Garnayak
8d9eba1470 qcacmn: Fix compilation error for msmcobalt_32
In hnc_link_clusters function, few local variables left
uninitialized. Initialize them with zero as they will get
overwritten during the processing of the cluster for first time.

CRs-Fixed: 1085510
Change-Id: I04af509bdc1a63eeb215c5ec854b55a8bc45aba9
2016-11-20 22:33:04 -08:00
Houston Hoffman
6fe6059965 qcacmn: Dummy hif_hal_attach when hal not supported
If hal_api.h is not available do not use its api's.
Avoid "implicit declaration of function" compilation error.

Change-Id: I8458bde4ce862adeeda5c8d3892ce439be068c06
CRs-Fixed: 1089874
2016-11-19 19:32:14 -08:00
Houston Hoffman
b522bdc3cc qcacmn: sync qca6290def.c with fw_common
Use UMAC_CE_COMMON_CE_HOST_IE_0 instead of
UMAC_CE_COMMON_WFSS_CE_COMMON_R0_CE_HOST_IE_0

Change-Id: I70e92ca4b86329b562e84261d8911f52f7d64cd0
CRs-Fixed: 1089874
2016-11-19 19:32:13 -08:00
Houston Hoffman
2d8ee28971 qcacmn: changes in pcie path to bypass for emulation builds
Changes include skipping of legacy interrupt routing,
target probe and target sleep state adjust

Change-Id: I36b7f627e7ca6970a73ffbc85b7f0e7a6ce40325
CRs-Fixed: 1089874
2016-11-19 19:32:12 -08:00
Houston Hoffman
74109127d0 qcacmn: write DEST_MAX_LENGTH for CE rings
Change that allows configuration of max buffer
size for SRNG rings in the receive direction

Change-Id: Ib857f1fdf43c849078f9470ec029fe627379fcb4
CRs-Fixed: 1089874
2016-11-19 19:32:11 -08:00
Houston Hoffman
f7bc308404 qcacmn: use my_io_remap to map 13MB for pcie space
This remap is needed temporarily for emulation builds

Change-Id: I6662eeba32dc5847aac730928ed72db77ff1d42c
CRs-Fixed: 1089874
2016-11-19 19:32:10 -08:00
Houston Hoffman
202425d1a5 qcacmn: Set intr_timer_thres_us to 0
intr_timer_thres_us minimum step size is 8us. So anything
less than 8 will not enable the hardware timer.  Set the
value to 0 to avoid confusion.  A strong warning message
should also be added.

Change-Id: I9286d2988930df8577e46e5a753cc6f68c71d180
CRs-Fixed: 1089874
2016-11-19 19:32:09 -08:00
Houston Hoffman
9a1b391970 qcacmn: Add direction to srng DPTRACE call
DPTRACE has been enhanced to record send and recive packets.
Update the missed call site

Change-Id: If1554b31add1df00f98b6d3eed8e5f752ca4722c
CRs-Fixed: 1089874
2016-11-19 06:48:38 -08:00
Houston Hoffman
6c0c3f95fa qcacmn: skip bmi for srng based chips
SRNG based chips will use MHI based firmware download

Change-Id: I4125578a33315011075677a0ea7e4b48c914037f
CRs-Fixed: 1089874
2016-11-19 06:48:13 -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
Houston Hoffman
a57184e5ef qcacmn: remove pci_set_drvdata
pci_set_drvdata stores a pointer in the pci driver device structure.
Since we do not use this pointer any more we do not need to set it.

Change-Id: I36452aaf2a4c218a3d3891626406e4693d968bba
CRs-Fixed: 1071958
2016-11-19 06:47:10 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Kai Liu
af427fe54c qcacmn: Adjust buffer size for fw dump
qcacld-2.0 to qcacmn propagation

In platform using usb interface, when fw assert, buffer alloc for fw
dump is smaller than the actual fw dump size, so adjust the buffer size.

Change-Id: I4706c57e8c1b684bfe164b23fc0902c376d4d80a
CRs-Fixed: 1043805
2016-11-17 14:00:28 -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