Commit Graph

1045 Commits

Author SHA1 Message Date
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
Houston Hoffman
4f529982ce qcacmn: Add HOST_INTEREST_AREA defines for ap chips
These defines should eventually come from /target/inc.

Change-Id: I7e931049f4543352654b946c807a70b5f62656a4
CRs-Fixed: 1012824
2016-05-17 11:09:33 -07:00
Houston Hoffman
ec93ab0efa qcacmn: Remove qwlan_hw_list from hif_hw_version.h
Preparation to include hif_hw_version.h in ol_fw.h

Change-Id: If4395a9e05071f7b1239e1b2d7af2cc24b6d8339
CRs-Fixed: 1012824
2016-05-17 11:09:33 -07:00
Houston Hoffman
4849fcc9cd qcacmn: Fix CONFIG_CNSS ifdefery
Driver needs to support CONFIG_CNSS not defined.

Change-Id: I6c0112274fe5aa1ab3803a19efccee0381bc1964
CRs-Fixed: 1012824
2016-05-17 11:09:33 -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
Manjunathappa Prakash
32afe374d8 qcacmn: Fix lro dereg crash on driver unload
If lro_disable is called after  cds_close, which is the case
for module unloads, then many of the pointers used in dereg
sequence are NULL (CE_state, hif, txrx_pdev). There is a case,
when interfaces are removed, when these pointers are there.
Check pointers before using them in dereg code.
Update hif_map_service_to_pipe so that it will return E_INVAL if
the service is not in the table. Add logs for cases where either
leg information is not updated on return.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
Change-Id: I5b88a297134dcc1d7a6a68dd2a9879dfd1553a7e
CRs-Fixed: 1014428
2016-05-12 11:22:05 -07:00
Houston Hoffman
47808175d4 qcacmn: Use CE index register values during init
Shadow registers and DDR are not guaranteed to reflect
the actual copy engine register values before transactions
are performed.
Also adds debug code to verify that the register values
make sense.

Change-Id: Ied0352638765571545f92b2e0dc18b4ca7a399a7
CRs-Fixed: 1012744
2016-05-11 15:23:50 -07:00
Dhanashri Atre
42364947db qcacmn: Increase CE6 Ring Size
Increase the CE ring that is used by firmware for HIF memcpy.
Increase the size to 0x4000

Change-Id: I8a71c795469b7cd51c3c2609a8e22a3b19ab7e77
CRs-Fixed: 1006872
2016-05-06 13:09:27 -07:00
Yuanyuan Liu
ae38003449 qcacmn: Clean up OS wrapper functions
Use OS standard APIs instead of CNSS wrapper functions

Change-Id: Icd048f41864c33463f4bb582d8d184816fa77c5d
CRs-Fixed: 1000797
2016-05-06 13:09:08 -07:00
Houston Hoffman
735bb8def4 qcacmn: Define SLOTS_PER_DATAPATH_TX in ce_service.c
SLOTS_PER_DATAPATH_TX needs to be defined in the common project.

Change-Id: I9dd3cea3b9b2563960dd5d81a661c9ac1e61ac0d
CRs-Fixed: 1009290
2016-05-04 21:11:09 -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
fa260aa2eb qcacmn: Add event recording for fastpath & napi
Fastpath & napi did not have CE event recording.
This is a vital debug feature.

Change-Id: I73118f4fa5177158d6d489ea5b9ebf82f05c1229
CRs-Fixed: 1009273
2016-05-04 21:11:00 -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
75ef5a55f2 qcacmn: Use qdf macro for epping mode
Use QDF macro to check if we are in epping mode.
Hardcode the ce engine to use interrupts in
epping mode.

Change-Id: Ie58c2efffdced03f24905469319eabc0af4ed228
CRs-Fixed: 1003792
2016-05-04 21:10:36 -07:00
Houston Hoffman
4b7ebcfb01 qcacmn: Add static flag to cnss_wlan_pci_link_down definition
A definition of cnss_wlan_pci_link_down in a header file
did not have the static keyword.

Change-Id: I701682486a8db2c0cfce839706aacb85757df616
CRs-Fixed: 1003817
2016-05-04 21:10:30 -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
Houston Hoffman
247f09b86a qcacmn: Remove icnss_dispatch_irq
icnss_dispatch_irq is a stub for a non-existent function.
Make a pci function that doesn't use a global data structure.

Change-Id: I636d59cb465acf1366269d96a5dcacf910f8d78c
CRs-Fixed: 1002083
2016-05-04 21:10:12 -07:00
Houston Hoffman
49f6c66ca7 qcacmn: Cleanup snoc interrupt controll
Remove interupt enable/disable at group level since
in register set 81, these registers are not provided.
Don't enable/disable the ce irqs at the qgic
since the interrupts are edge driven, enabling and disabling the interrupt
in the qgic should not be necessary.  Also remove an unneeded read
of a status register.

Change-Id: I2c20ea26c23dc672697d53cd5433d855d9332b13
CRs-Fixed: 997176
2016-05-04 21:10:08 -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
Hardik Kantilal Patel
c5dc5f291c qcacmn:: Use proper API to allocate 2 MB target shared memory
WLAN host driver is not using correct API to allocate 2 MB shared
memory for FW when QMI by pass is enabled. Use proper API to
allocate 2 MB shared memory for FW CE access.

Change-Id: I7efa4be2e703b32dc86fd660640881afa4ce2bcd
CRs-Fixed: 999278
2016-04-25 23:02:57 -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
Houston Hoffman
e633044237 qcacmn: Enable additional two HTT data services
Enable HTT_DATA2_MSG_SVC and HTT_DATA3_MSG_SVC, using only
rx legs, CE 9 and 10, respectively. Add required CE entries
to the map that gets sent to the FW, and define the latter
service.
Rename htc_endpoint to htc_tx_endpoint in htt_pdev to
represent the role better.

Acked-by: Orhan K AKYILDIZ <oka@codeaurora.org>

Change-Id: I81ae796bdb7e632aa24f15c63a2811791dd29d28
CRs-Fixed: 982728
2016-04-20 15:49:17 -07:00
Houston Hoffman
41d0231b87 qcacmn: Don't clear the interupt status when rx_pending
If there is rx pending, the per_engine_service caller should
not reenable interrupts.  If the caller does propper interrupt
mitigation, it will not enable interrupts, and the register
write is wasted.  If the caller does not do interrupt mitigation,
leaving the interupt status will prevent stuck packets.

Change-Id: I7a6315d3f0f3ade1b2d51ce15fab931a4864e643
CRs-Fixed: 998319
2016-04-20 15:49:13 -07:00
Houston Hoffman
eb2516c244 qcacmn: Make napi rely on rx_pending flag
Use the rx_pending flag to determine if there is more work.
hif_napi_poll should not rely on the amount of work done
to determine if there is more work to do.

Change-Id: Ibf83cfb8f9aed6fdc3400b6a6945156283f56485
CRs-Fixed: 998319
2016-04-20 15:49:04 -07:00
Houston Hoffman
c1d9a41415 qcacmn: Fix diag_ce initialization
With more copy engines, the diag ce was not moved to the end.
The diag_ce was being assigned a null value from the unitialized
index.

Change-Id: Ib0fc6450712af2dc5e38f00bb692cfb26982ddae
CRs-Fixed: 997175
2016-04-20 15:48:56 -07:00
Rajeev Kumar
6f8012b2aa qcacmn: Remove QDF_FTM_MODE from runtime pm code
QDF_FTM_MODE is deprecated. QDF_GLOBAL_FTM_MODE is the enum for the
ftm driver mode now.

Change-Id: I8783fb2d3748ed08995b3b13eaf69a7a1c40c22b
CRs-Fixed: 991822
2016-04-20 15:48:23 -07:00
Rajeev Kumar
74f7764f61 qcacmn: Fix epping mode ce attribute table size
Adrastea code expects a host ce table the have 12 entries.

Change-Id: I22887495a9994df65b61315fa8ff87f2bb4bcf50
CRs-Fixed: 989695
2016-04-20 15:48:20 -07:00
Vishwajith Upendra
70efc7576c qcacmn: Use epping specific shadow register config table
Update shadow register configuration for epping.

Acked-by: Aravind Narasimhan <aravindn@qca.qualcomm.com>

Change-Id: Ia975d2a651a7ff4fb5fcd6081b62c574457b016f
CRs-Fixed: 989695
2016-04-20 15:46:00 -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
Yuanyuan Liu
a7a282f1e3 qcacmn: Bypass GLINK/QMI for 8998 RUMI bring up
Bypass QMI for 8998 RUMI bring up as it doesn't support
QMI for now.
Increase regulatory timeout for slow RUMI setup.

Change-Id: Ie4d790a79aaa166731c876bdecf0f4f6970caae4
CRs-Fixed: 978953
2016-04-17 15:22:30 -07:00
Rajeev Kumar
8e73708b0e qcacmn: Fix compilation error caused by hif_disable_power_management
hif_disable_power_management is only defiend for PCI devices which is
causing compilation error for SNOC devices. Define empty definition of
hif_disable_power_management for SNOC devices.

Change-Id: I4da5e2346119626fd6478d3eb835bcb1ba9dd663
CRs-Fixed: 978810
2016-04-14 18:41:41 -07:00
Rajeev Kumar
cbbd7b2ee9 qcacmn: Fix compilation error caused by hif_enable_power_management
hif_enable_power_management is only defiend for PCI devices which is
causing compilation error for SNOC devices. Define empty definition of
hif_enable_power_management for SNOC devices

Change-Id: If6a4de93d18e8c5ca2a67f43a0eae69e781efa68
CRs-Fixed: 978802
2016-04-14 18:41:40 -07:00
Houston Hoffman
20968291c5 qcacmn: Reset the Runtime PM state when exiting
qcacld-2.0 to qcacld-3.0 propagation
Add prevent method to reset the Runtime PM state before driver
unload to ensure Runtime PM is recovered by driver load.

Change-Id: I5fccc345e5217d1a26c3c4f0cda1dca5ee71004c
CRs-Fixed: 899522
2016-03-31 22:47:12 -07:00
Houston Hoffman
b21a053526 qcacmn: Fix runtime pm compilation
Runtime PM compilation broke while it was disabled.

Change-Id: I1378e5a10c8982b11ccaaff3041223da94bf25ae
CRs-Fixed: 935300
2016-03-31 22:47:03 -07:00
Houston Hoffman
b4149dda4f qcacmn: pointerize hif power_management apis
Bus power management requirements are different for different busses.
Add them to the bus opps table.

Change-Id: Ia5a2500dc2f1db3be2ddbbaea6a5969420ec0c51
CRs-Fixed: 978810 978802
2016-03-31 22:46:46 -07:00
Rajeev Kumar
febbf6b9ec qcacmn: Clean-up log messages from data path
In data path per packet logging is overwriting previous useful
logs. Use HDD data module ID for WMM per packet logging with
debug log level such that by defualt per packet WMM debug log
messages are not logged.

Change-Id: I64053a6d5048a14277e01f35fcb6e0bbf6ac42b9
CRs-Fixed: 969712
2016-03-31 22:46:37 -07:00
Komal Seelam
7508012ea9 qcacmn: Rename hif_callbacks and remove unwanted header files in source files
Rename hif_callbacks structure to hif_driver_state_callbacks and remove
get_monotonic callback and use qdf API to get monotonic time.

Remove following unwanted header files in the hif source files.
osdep.h, athdefs.h, a_types.h, osapi_linux.h.

Change-Id: Ib7a03cab1b056a33b39247989fa3dfca41c85f77
CRs-Fixed: 967765
2016-03-31 13:35:33 -07:00
Houston Hoffman
3c017e7bcf qcacmn: Pointerize hif_dump_registers
Allow different busses to have different register sets to dump
in case of a crash.

Change-Id: I2b0665f276594dfb29ca34fe3f363c2f414cd2e7
CRs-Fixed: 986480
2016-03-16 13:49:56 -07:00
Houston Hoffman
162164c8cd qcacmn: Unify hif_bus_get_context_size
Since the open logic needs to allocate the bus context
before initializing the bus ops table, we need a single
function that is aware of the bus context size for all
busses.

Change-Id: I681e91ed1a792da7e753b477f869ee415ea8f3c7
CRs-Fixed: 986480
2016-03-16 13:49:52 -07:00
Houston Hoffman
795299c42c qcacmn: Resolve duplicate hif_get_target_type definition
Duplicate deffinitions of hif_get_target_type prevented compilation
of snoc and pci functionality at the same time.

Change-Id: I44cdca79c6f296c4294a54a4e1bfb459a519f46b
CRs-Fixed: 986480
2016-03-16 13:49:47 -07:00
Houston Hoffman
8f239f67a2 qcacmn: Pointerize more HIF apis
Pointerizing these apis is easier than removing external
references or unifying them.  Support multibus by
pointerizing them.

Change-Id: Iab86adf2076a082b75d9ba393123798e16f5b82e
CRs-Fixed: 986480
2016-03-16 13:49:43 -07:00
Houston Hoffman
4411ad4d0c qcacmn: Replace A_TARGET_ACCESS_BEGIN/END_RET_PTR
Macros should not alter the execution of function bodies.
Fix possible memory leaks that this cleanup exposed.

Change-Id: I546c5822d7c28e0c9dd77094a5bb0f7e3e7544d4
CRs-Fixed: 986480
2016-03-16 13:49:38 -07:00
Houston Hoffman
987ab445de qcacmn: Fix return codes from A_TARGET_ACCESS_BEGIN_RET
A_TARGET_ACCESS_BEGIN_RET hid nonsensical return values.
Replace nonsensical return values with sensible ones.
In many cases, the returned value is changed and not
just renamed.

Change-Id: I8bf1d4a44d4ebd76e3aa60bc4d24416ce0d45d61
CRs-Fixed: 986480
2016-03-16 13:49:33 -07:00
Houston Hoffman
2c32cf6dd1 qcacmn: Replace A_TARGET_ACCESS_BEGIN/END_RET apis
Macros should not alter the execution of function bodies.

Change-Id: I54c90230c5c0f43cb20412110f4eb7aa568e654d
CRs-Fixed: 986480
2016-03-16 13:45:20 -07:00
Houston Hoffman
bac9454390 qcacmn: Replace A_TARGET_ACCESS_BEGIN/END apis
Macros should not alter the execution of function bodies.

Change-Id: I444caccd93ec7e0fa766acce5149d0f322e837c7
CRs-Fixed: 986480
2016-03-16 13:45:16 -07:00
Houston Hoffman
54ef87d3aa qcacmn: Dummy sleep_state_adjust for epping mode
Epping mode is a test mode and wants the target to be forced
awake at all times.  The sleep state adjust calls to keep
the target awake while the driver is loading and to keep
the driver awake in max perf mode are converted to the
pci specific function so that they won't get dummied out.

This fixes the logic for MAX PERF mode by avoiding the dummy
for the keep awake call and correctly avoiding the sleep ok
call when power management is re-enabled after driver load.

This removes a discrepancy where some sleep state adjusts
were missing the epping mode check. (Q_TARGET_ACCESS_BEGIN...)

Change-Id: I4e546f12703bcee21a76f42c12b59dd7fd1ab1a9
CRs-Fixed: 986480
2016-03-16 13:45:10 -07:00
Houston Hoffman
0b48913237 qcacmn: Unify A_TARGET_ACCESS_LIKELY
Sleep state adjust has been added the the bus_ops table and the
macros using it can be unified.

Change-Id: Ib788800c83457919ae7eee01f6687cbb57c84a4b
CRs-Fixed: 986480
2016-03-16 13:45:03 -07:00