Commit Graph

805 Commits

Author SHA1 Message Date
Houston Hoffman
bee3aab26f qcacmn: Remove list traversal from qdf_mem_free in successfull case
Make O(1) checks for corruption and list state to rule out
suspicion of double free and memory corruption.  Only traverse
the memory tracking list to differentiate between memory corruption
and freeing an untracked pointer.

Since we check for corruption before traversing the list, the qdf_mem_free
api may crash with a use after free signature before printing out the
double free error message.

Change-Id: I0862822a65634dc68d8146f44f0474b672b6fc0a
CRs-Fixed: 1049430
2016-08-13 14:49:04 -07:00
Arun Khandavalli
75ea891eca qcacmn: Add bus_id memeber to qdf_device
With Load once unload never architecture, the cds modules
will be opened/closed several times. As part of configuration
of modules bus id needs to passed. So, add a new member to save
the bus_id passed by the platform driver during the driver
intialization,

Change-Id: Ic580e03076e5e8c557dde1879e223606a14f79b8
CRs-Fixed: 1049224
2016-08-04 10:34:22 +05:30
Hardik Kantilal Patel
343739296c qcacmn: Address 32 bit specific compilation issues
Fixing 32 bit compliation issues due to improper type
casting and shift operation.

CRs-Fixed: 1043823
Change-Id: I2c05a0c0940c5d65c40aefdc80dc2888fbe87be1
2016-07-25 00:41:12 -07:00
Yuanyuan Liu
26476b51eb qcacmn: Add workqueue APIs in QDF
Add qdf workqueue APIs for schedule_delayed_work, cancel_work_sync,
cancel_delayed_work_sync and flush_delayed_work

Change-Id: Idb4de3c30c9c8cfdeb9af5b92f40a6e3dc954a6d
CRs-Fixed: 1009560
2016-07-13 18:49:41 -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
Anurag Chouhan
8f7d421854 qcacmn: Fix qdf_wait_single_event api to wait for infinite timeout
qdf_wait_single_event have contradicting impelmentation
when timeout value is set to 0.
The fix provides an implementation that works when timeout is
to zero aswell.

Change-Id: I1f03bd79227988b76fc9eb0fe9db3cf41542bd71
CRs-Fixed: 1035161
2016-06-29 21:02:49 -07:00
Deepak Dhamdhere
987c1fa61b qcacmn: Add messaging interface to support NAN data path
This is qcacmn portion of qcacld-2.0 to qcacld-3.0 propagation
Add commonly used definitions for NAN datapath, like QDF_NDI_MODE.

CRs-Fixed: 962367
Change-Id: I1f42c8dab17b3a300db61756c29fc02d3d3bc504
2016-06-29 19:42:14 -07:00
Anurag Chouhan
2d2a380688 qcacmn: Add WIN Driver Kbuild
Add Kbuild file into qdf, fix for win driver .

Change-Id: I9d1e1b5be5c6669f9e0327c2727c59284790c9d0
CRs-Fixed: 1012511
2016-06-28 10:45:20 -07:00
Anurag Chouhan
ced2345f71 qcacmn: Define qdf_mempool_t for non kernel users
Fix implicit declaration error when qdf_mem.h is included from userspace

Change-Id: I88ccec9c53abb8d5844f42984af3f8693c1d3000
CRs-Fixed: 1012511
2016-06-28 10:45:01 -07:00
Manishekar Chandrasekaran
be11624671 qcacmn: Use mandatory channel list during SAP operation
Ensure that the SAP operations make use of the mandatory
channel list during SAP channel selection and update the
INI option 'gWlanMccToSccSwitchMode' to include the value
of '4' which will make use of the mandatory channel list
while trying to avoid MCC scenario .

Change-Id: Ia43ee1d2c598c81a5ef0add9246c400577f6f694
CRs-Fixed: 1014128
2016-06-28 10:43:36 -07:00
Nirav Shah
cede289aad qcacmn: Enhance data path related statistics
Enhance data path related statistics.
- Add per reason pause time
- Enahnce TSO stats
- clear DPTRACE buffer

Change-Id: Ic884e5a2ba9da34651f524a5b099c20d3b7f83a1
CRs-Fixed: 1017437
2016-06-24 16:48:07 -07:00
Abhishek Singh
06c3f0a7a8 qcacmn: Reduce the info level logs in STA/SAP
qcacld-2.0 to qcacmn propagation

Reduce the info level logs in STA/SAP

Change-Id: I5918ea8e9dd2f7654e5a994ad366f92d2ca3cd77
CRs-Fixed: 988195
2016-06-23 12:32:50 -07:00
Nirav Shah
4cc0ba809c qcacmn: Fix to avoid redefination error in AP code
Fix to avoid redefination error in AP code.

Change-Id: Ib57e7e2936aefe6abf0945b249ae1cd44e50aceb
CRs-Fixed: 1008087
2016-06-15 11:26:39 -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
Nirav Shah
31d694b25a qcacmn: Remove PROTO_TRACE feature
Remove PROTO_TRACE feature and add MGMT packet
logging in DPTRACE

Change-Id: I0437a2100554628607c561b0e815c0009f1c5606
CRs-Fixed: 1008087
2016-06-14 13:48:39 -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
Nirav Shah
ae6a0b31d2 qcacmn: Add ini support for DPTRACE
Add ini support and feature flag for
DPTRACE to enable/disable as per requirement.

Change-Id: I22c614460f4c95539e9183935be0d2057379c6d4
CRs-Fixed: 1008087
2016-06-14 13:48:35 -07:00
Manjunathappa Prakash
5693051379 qcacmn: Enable DEBUG_Rx_RING_BUFFER to keep track of posted buffers
This enables the tracking of posted rx ring buffers. With this we can
identify if host/fw is wrong when we hit below issue:
"wlan: [0:E :QDF] rx hash: htt_rx_hash_list_lookup: no entry found for
<physical address>"

Change-Id: Ib973a2e2a69e881beddea23cdc1d2d994eeb1e12
CRs-Fixed: 864569
2016-06-14 13:48:31 -07:00
Poddar, Siddarth
cdebcd5d1c qcacmn: Add firmware download support for sdio bus (Part 5 - HIF SDIO)
Add BMI and firmware download support for sdio bus platform.
Refactor fw and bmi download routines to get rid of compile
time bus specific macro.
Refactor allocation and free routines for high latency bus.

CRs-Fixed: 969334
Change-Id: I2c217891d0ca4b503e7388b3ebe2f787e8325af5
2016-06-14 13:48:24 -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
28803728da qcacmn: Check null in qdf_nbuf_track_free
Freeing a null pointer shouldn't do anything.
Some code relies on this.  Specifically, in a
rare scenario, an allocation is made outside of
a spinlock and may freed without being used or
verified inside the spinlock.

Change-Id: Ib5f8ecabc62454a0ca9b6723cd80ff2f701196c3
CRs-Fixed: 1024277
2016-06-13 11:28:06 -07:00
Dhanashri Atre
5cfd37e211 qcacmn: Store the DMA address in the TSO meta data
Store the DMA address in the TSO meta data as opposed to
storing the higher and lower bits separately. The DMA address
can be convering to higher and lower 32 bit addresses if needed
by the hardware at a later point.

Change-Id: Iff706ca980ee86400952e8b3087a619f4a2728e1
CRs-Fixed: 1024169
2016-06-09 22:18:30 -07:00
Houston Hoffman
2bb5098d5e qcacmn: Do not truncate DMA addresses to 32 bits
A few apis were truncating DMA addresses to 32 bits

Change-Id: Ib827e3097c8319cb8932f21e2f2810a0219431e0
CRs-Fixed: 1024300
2016-06-09 22:18:24 -07:00
Houston Hoffman
2b0525b0f2 qcacmn: Implement a freelist for net buf tracking
The net buf tracking feature spend most of its time allocating
tracking cookies.  By not tracking these tracking cookies in
qdf we achieve a 90% time saving.  By keeping a freelist and
avoiding allocations altoogether, we save another 90%.  This
feature is 99% cheaper.  Throughput suffers less under when
the driver is forced to be cpu bound (eg. by mucking with the clockspeed).

Change-Id: If3268bdbbcf39aeb7278b1e51e17955eb2b47510
CRs-Fixed: 1024277
2016-06-09 22:18:13 -07:00
Anurag Chouhan
e5dc6df496 qcacmn: Add WIN Driver compilation fix
Fix compilation errors for WIN driver.

Change-Id: I3c13f3d75a929e418118863d0976016c81436504
CRs-Fixed: 1012511
2016-06-09 22:18:01 -07:00
Anurag Chouhan
b348ba478a qcacmn: Add WIN Driver Compilation fix
Initially, the QCA Wi-Fi driver was ported to support kernel
4.4. However, after the code changes due to converged code,
few issues were re-created when compiled on kernel 4.4.X.

This change resolves the newly introduced issues by the
converged code changes.

Change-Id: Iae76cdfee97675ff4bf2508ce5a42f08515bb168
CRs-Fixed: 1012511
2016-06-06 18:52:30 -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
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
e683eea688 qcacmn: Move locking for qdf_net_buf_debug_look_up to the colision list
At a cost of keeping 1023 more spinlocks in memory, we can avoid
spinlock contention between different hash keys while performing
the lookup.

Change-Id: Icca2bf0b49186176caf1ea40fb508efa7e7c89b4
CRs-Fixed: 1013620
2016-05-23 11:33:09 -07:00
Houston Hoffman
10749156e4 qcacmn: Reduce spinlock time in qdf_net_buf_debug_look_up
Improve hash function to better utilize the memory entropy.
Do memory allocation outside of the spinlock.

Change-Id: Ife7da44c81463bfa9bcf19850d98471f5c61d3f3
CRs-Fixed: 1013620
2016-05-23 11:29:53 -07:00
Anurag Chouhan
f0825aed74 qcacmn: Add Win Driver Compilation Fix
Add Win Driver Compilation Error Fixes

Change-Id: I362d05937ab5868c7957b573376317322495d5c4
CRs-Fixed: 1012511
2016-05-19 18:00:39 -07:00
Yuanyuan Liu
614628ba98 qcacmn: Remove CONFIG_CNSS dependency
Use OS standard APIs. Remove CONFIG_CNSS dependency.

Change-Id: I6689e8b5c4260f393a2b499c8b41359d042ce894
CRs-Fixed: 1000797
2016-05-11 09:28:36 -07:00
Yuanyuan Liu
bc8441f46f qcacmn: Add QDF_BUS_TYPE_NONE for error check
Add QDF_BUS_YTPE_NONE in qdf_bus_type, which is used to represent
error bus type.

Change-Id: I274a795d32b2a5581b8849f5827cb8ac3bbf169b
CRs-Fixed: 1000113
2016-05-09 11:04:03 -07:00
Manjunathappa Prakash
2c3575e635 qcacmn: Add qdf, nbuf changes for monitor mode
Add monitor mode changes, takes care to add radiotap header from
rx_status info.

Change-Id: Ie18b698836854df6f27e27534a61f8dd8a689bfd
CRs-Fixed: 963060
2016-05-06 13:09:27 -07:00
Manjunathappa Prakash
dff1f975d9 qcacmn: Takecare of extended nbufs memory leak tracking
Update nbuf memory leak tracking logic to handle extended nbufs.

Change-Id: I172f9de0b3dd99d634cfe70dfab964749b9d49a7
CRs-Fixed: 963060
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
e52902c4a5 qcacmn: Remove cds_api and wma_api includes
The inclues are not needed.

Change-Id: I874a511535fded52f346201b24f6d3174334b430
CRs-Fixed: 1003804
2016-05-04 21:10:40 -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
Abhishek Singh
0921144f1e qcacmn: Reduce the QDF_GET_MEMORY_TIME_THRESHOLD to 300ms
qcacld-2.0 to qcacmn propagation

Issues are seen where memory allocation takes 300-1000ms.

So to detect this reduce the QDF_GET_MEMORY_TIME_THRESHOLD value
to print the time taken by kmalloc, to 300ms from 3 sec.

Change-Id: I0f7e1587b2ddd2839d70a19b047aa46bb6a2cea1
CRs-Fixed: 970017
2016-05-04 21:10:04 -07:00
Govind Singh
d9615ed1e0 qcacmn: Add target bus type field in qdf context
Add target bus type field in qdf context, as bus type
needs to accessed at multiple layer.

Change-Id: I62b23d68743fedf205bb3859c0de50568ca09b7a
CRs-Fixed: 1009993
2016-05-03 00:08:58 -07:00
Govind Singh
0b58728a33 qcacmn: Add FL macro definition in QDF layer
FL macro definition is used in converged layer, move
FL macro definition from umac layer to common QDF layer.

Change-Id: Id3c4383c385eb3d6391c4c066b0034fb2f053cdc
CRs-Fixed: 1008835
2016-05-03 00:08:56 -07:00
Anurag Chouhan
8bfdee0154 qcacmn: Add WIN Driver compilation fix
Fix compilation errors for WIN driver

Change-Id: I2b7344c9632ea673754aa1f4d7003473b2527ada
CRs-Fixed: 981187
2016-04-28 13:02:20 -07:00
Nirav Shah
caf80788e6 qcacmn: Do not update control block for push/pull operation
Do not update physical address in control block while
nbuf push/pull operation for WIN.
Also uncomment dma_sync_single_for_cpu function in
__qdf_nbuf_sync_single_for_cpu.

Change-Id: Id80ed3e01162e44d90981885c3d387950323bce8
CRs-Fixed: 1006569
2016-04-27 17:11:16 -07:00
Hardik Kantilal Patel
732caef504 qcacmn:: Change QTIMER API as per 4.4 kernel
Use arch_counter_get_cntvct API for QTIMER API on
Kernel 4.4.

CRs-Fixed: 999964
Change-Id: Ia28c6759cfecfdcc7bd938089b3198eac7dcd961
2016-04-25 23:02:54 -07:00
Gupta, Kapil
8b2f77a059 qcacmn: Add support for beacon filtering
qcacld-2.0 to qcacld-3.0 propagation

In case of DFS channels and EBT is disabled, beacons are
forwarded to host in every 50msecs which increase power consumption.
Add the changes to set beacon filter once DUT connect to AP.

CRs-Fixed: 973958
Change-Id: I1a9379eacbd13f8dc7fae08923cd91f087d1b2b2
2016-04-20 15:48:53 -07:00
Rajeev Kumar
3537500cc0 qcacmn: Add new enums for QVIT mode
Add suport for QVIT mode in wlan driver.

Change-Id: I9014ac12e09495917f63f7b4b114363b24eeae1c
CRs-fixed: 987175
2016-04-20 15:48:28 -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
Naveen Rawat
9123c15bb0 qcacmn: Replace enum device_mode to tCDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: Ie41244becec39fe1f5f24a721f5b24e137e7fd26
CRs-Fixed: 985273
2016-04-17 15:19:07 -07:00
Chandrasekaran Manishekar
4758eb4153 qcacmn: Send channel switch request instead of doing SAP restart
Send channel switch request instead of performing SAP restart when
doing a MCC to SCC switch. This is controlled using the existing INI
item 'gWlanMccToSccSwitchMode'. The new value of '3' will perform
this channel change by sending (E)/CSA whereas the old value of '2'
can still be used to do a channel change by doing SAP restart.

Change-Id: I79e7317219503de0a9957940f3cf7a4e91c7a521
CRs-Fixed: 986202
2016-04-17 15:19:03 -07:00