Commit Graph

670 Commits

Author SHA1 Message Date
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
Nirav Shah
29beae0ab5 qcacmn: Enhance DPTRACE to support RX path
Enhance DPTRACE framework to support RX path.

Change-Id: I34594911aeb89cf36d87a7753f1e5c7261b4ceb9
CRs-Fixed: 1008087
2016-06-14 13:48:37 -07:00
Mohit Khanna
bda5d43e70 qcacmn: Add USB bus support (HIF USB)
Add HIF changes for USB bus support.

Change-Id: I06609db68d537ba7c7716f2926589e0dbe738e58
CRs-Fixed: 1023663
2016-06-14 13:48:33 -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
Nirav Shah
3573f9537b qcacmn: SDIO bus support (Part 2 - HIF Dispatcher)
Add HIF Dispatcher support for SDIO bus.

Change-Id: I953e1990cc14cbd07bc728f4cd4a8e8e20014158
CRs-Fixed: 969334
2016-06-14 13:48:15 -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
Houston Hoffman
047571e999 qcacmn: set the snoc dma mask to 37 bits
The driver and hardware should support 37 bit dma addresses.

Change-Id: Ic1dc48968ce925e4bc4f89d95feaf400cc32d2da
CRs-Fixed: 1024300
2016-06-09 22:18:18 -07:00
Houston Hoffman
77da347da9 qcacmn: remove duplicate definition of shadow_reg_cfg
shadow_reg_cfg is defined twice.

Change-Id: Ib073182e44a8360a21075057b420ed0f04b134be
CRs-Fixed: 1024345
2016-06-09 22:18:07 -07:00
Nirav Shah
eaa20d8751 qcacmn: Refactor DPTRACE to support new features
Refactor DPTRACE to support new data path features like
TSO and FASTPATH and add support to log DHCP, ARP and
EAPOL packets.

Change-Id: I7f9e4be12d82fbf419b2402284928144df6824f0
CRs-Fixed: 1008087
2016-06-06 18:52:25 -07:00
Nirav Shah
75cc5c83eb qcacmn: Use different copy engine for packetlog
Create new endpoint and use CE11 for packetlog
messages from target to host.

CRs-Fixed: 995628
Change-Id: I0df597468b0b7399dc545b5a4d4fd1a4c04a1df0
2016-06-06 18:52:23 -07:00
Govind Singh
8f7a1ff2c6 qcacmn: Abstract delta code of fw common to respective layer
FW common files needs to be in sync with host and fw.
Abstract extra definition of hia map internal to hif layer.
MSI_NUM_REQUEST is incorrectly overwritten, keep the original
change as MSI_ENABLE is false across all target versions.
These changes are incorrectly added in following change id.
Iced029073c2db9eb175adcebcad9163ab39443a9.

Change-Id: Ie38666f315067ae40676e3bdac9238e4b52e6be1
CRs-Fixed: 1012542
2016-05-23 11:33:47 -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
c8993b5509 qcacmn: Force unwake in ce_per_engine_service for fastpath
ce_per_engine_service fails to call Q_TARGET_ACCESS_END in fastpath
execution flow.

Change-Id: I0caed62a4775e6e1231fead6eaa1ad7f38bc9ba2
CRs-Fixed: 1017064
2016-05-23 11:33:35 -07:00
Houston Hoffman
5364165a30 qcacmn: Add yielding to ce_per_engine_service_fast
Prevent fastpath from hogging the cpu.

Change-Id: I26de5f3108ac690eae4ded956c2524a309b7353a
CRs-Fixed: 1017061
2016-05-23 11:33:32 -07:00
Houston Hoffman
3b252aa509 qcacmn: Re-indent ce_per_engine_service_fast
Remove an unneeded if check and re-indent

Change-Id: If09ec8133df267120953c94e156f745b84913621
CRs-fixed: 1017061
2016-05-23 11:33:28 -07:00
Houston Hoffman
056527220d qcacmn: per_engine_service yield based on timing
Yield based on timing instead of relying purely on packet count

Change-Id: Ie464f9344f39cba7cb1f95047ce8a160b050e503
CRs-Fixed: 1017059
2016-05-23 11:33:21 -07:00
Houston Hoffman
2bfb82fd6f qcacmn: make qdf_time_t synonymous with system ticks
Currently the use of qdf_time_t vs unsigned long is arbitrary.

Change-Id: I658b1e9169e50389f9054b9fe1d229e51e578461
CRs-Fixed: 1017055
2016-05-23 11:33:18 -07:00
Houston Hoffman
a757eda356 qcacmn: Mangle napi_poll return value when rescheduling
4.4 kernel NAPI implementation requires drivers to
return full work when they ask to be re-scheduled
or napi_complete and re-start with a fresh interrupt
Also takes care of the expectation that when not rescheduling
you return strictly less than budget.

Change-Id: I31b024d80b9941c539a9c9f89799a30dac2f5dfe
CRs-Fixed: 1017058
2016-05-23 11:33:12 -07:00
Houston Hoffman
056d452238 qcacmn: Add check for supported register
Register offsets have 2 possible invalid values.
need to check for both values.

Change-Id: I6168aa46c4af66169284b98dee26ab56e4ed12c5
CRs-Fixed: 1012824
2016-05-19 18:00:33 -07:00
Houston Hoffman
3db96a43b6 qcacmn: Support IPQ4019 driver probe and detach
Add AHB bus type support.

Change-Id: I968f3ae06bb63a2116a9d24d75957f397a0e8c50
Acked-by: Balamurugan Mahalingam <bmahalin@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 18:00:25 -07:00
Houston Hoffman
abd0077413 qcacmn: Address win specific compilation issues
Fixing compliation issues due to fw common files which
are not yet converged.

Change-Id: I60c2045c0807e2700b548f3dfb9f07fe04eede46
Acked-by: Varsha Mishra <varsham@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 18:00:13 -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
f241eb09ae qcacmn: Fix for wifi reload
Disable the PCI during wifi down.
Pass correct values when target awake is checked.

Change-Id: Iaf8e03056d6cfdba19350adac9085e6ac2d4e58c
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 17:59:55 -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
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