提交線圖

20 次程式碼提交

作者 SHA1 備註 日期
Aditya Kodukula
54ab05a36f qcacmn: Replace QDF_FULL_MAC_FMT with QDF_MAC_ADDR_FMT
Currently in driver, two macros are defined to specify the
mac address printing format. Since both macros achieve
the same result, replace all instances of QDF_FULL_MAC_FMT
with QDF_MAC_ADDR_FMT.

Change-Id: I195448267ef8e77a7fd5b232ffbf2cfb0ded1be4
CRs-Fixed: 3559488
2023-07-17 22:37:34 -07:00
Vishal Miskin
39042cfc1a qcacmn: Add support to parse a string into int32 array
Currently there is no api to parse a string to int32 array.

Write an api to parse a string to int32 array.

Change-Id: I2982a1bfeff94288a1bd76d8f4d87ea2eac934b2
CRs-Fixed: 3304318
2022-10-22 10:00:20 -07:00
Jeff Johnson
3bdf954afc qcacmn: qdf: Fix misspellings
Fix misspellings in qdf/...

Change-Id: If61ee47fba94b2bb60f33ab74feda56dbe5cb7bd
CRs-Fixed: 3277902
2022-10-12 23:22:37 -07:00
Jingxiang Ge
2ed71bd979 qcacmn: Fix compliation error when disable CONFIG_LEAK_DETECTION
Fix error when disable CONFIG_LEAK_DETECTION.

Change-Id: I16d85b596ef64ad45e9fb0bb594b0a3287554e8f
CRs-Fixed: 3080460
2021-11-24 22:58:30 -08:00
Wu Gao
1e52a027ce qcacmn: Fix compilation issue about decimal constant
There is compilation error about decimal constant on 32 arch. Fix is
to add suffix "UL" and to mark as unsigned.

Change-Id: I68b70fbfca4da244fdd9a82b1e28046c0a3b9a3d
CRs-Fixed: 2798875
2020-10-19 03:17:08 -07:00
Srinivas Girigowda
db57434d37 qcacmn: qdf: Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF
Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF.

Change-Id: Ief66fa40105e399fedee96cfaf142547cc6b3a2c
CRs-Fixed: 2763028
2020-08-28 02:00:58 -07:00
Madhvapathi Sriram
e55a45596f qcacmn: Add support to parse a string into uint32 array
Currently there is no api to parse a string to uint32 array.

Write an api to parse a string to uint32 array.

Change-Id: I54ab4ba1009f6efeb535df1ad43c56e1c3e56d2b
CRs-Fixed: 2758878
2020-08-25 05:41:29 -07:00
Ashish Kumar Dhanotiya
002aa7014b qcacmn: Add unit test for uint16 array parsing
Change Idbde9d70c64bc131813f5789c0453c9b3736228b has added
a logic to parse a string to uint16 array, there is no test
case written for this in unit test case infrastructure.

Add a unit test case to verify the logic written with the change
Idbde9d70c64bc131813f5789c0453c9b3736228b.

Change-Id: I38d6a0d6003807de7f5ec654926bd75da8b0996c
CRs-fixed: 2478274
2019-07-17 16:28:37 -07:00
jiad
45b81d1d88 qcacmn: Fix build errors with SLUB_DEBUG_ON
This patchset fixes following build errors with
CONFIG_SLUB_DEBUG_ON=y on sdxprairie.

qdf_types_test.c:111:2: error: this decimal constant is
unsigned only in ISO C90 [-Werror]

qdf_types_test.c:199:2: error: this decimal constant is
unsigned only in ISO C90 [-Werror]

Change-Id: I9379eb2754b95ef3a03ed2369d972fdf3ea46322
CRs-Fixed: 2433430
2019-04-27 04:22:29 -07:00
Dustin Brown
9c62f7d939 qcacmn: Add qdf_tracker
A common problem in any C code base is the proper management of various
resources, such as memory allocations, timers, works, locks, etc. To
that end, WLAN has added various one-off leak tracking features for
different resources over the years, to great benefit. However, this
approach is tedious, and prone to copy/paste and fix propagation issues,
making maintaining these various tracking features onerous.

Add a generic leak tracking data structure to WLAN for general use,
which implements these tracking logics. This will allow the various
resource tracking features to leverage this shared implementation for
ease of maintenance. Build on the hash table implementation added as
part of I7f5fc0c59ed220bde43044e7013b3c8573f1bf39.

Change-Id: I3247ace583108139dfb699ca077db3bdf5cfeace
CRs-Fixed: 2422958
2019-04-02 15:16:18 -07:00
Dustin Brown
6577bea1d6 qcacmn: Add qdf_ptr_hash
While the Linux kernel provides a generic hash table data structure, it
makes the assumption that it will always be referred to statically, so
as to avoid having to store the size of the hash table's internal array.
This limitation means reusing this data type generically is difficult or
impossible.

Add a very simple hash table implementation to WLAN for general use,
which stores its own size information, and assumes all input keys will
be pointers. Build on top of the recently added single-linked list
implementation added in I2959f34649a0d8e0b312d9d67c81de17753b9b6c to
reduce memory overhead.

Change-Id: I7f5fc0c59ed220bde43044e7013b3c8573f1bf39
CRs-Fixed: 2421829
2019-03-26 02:51:12 -07:00
Dustin Brown
b52a362e62 qcacmn: Add qdf_slist
For memory savings it is sometimes desirable to use a single-linked list
instead of a double-linked list. However, the Linux kernel does not
provide a default implementation of a single-linked list.

Add a very simple single-linked list implementation to WLAN for general
use.

Change-Id: I2959f34649a0d8e0b312d9d67c81de17753b9b6c
CRs-Fixed: 2418493
2019-03-26 02:51:09 -07:00
Dustin Brown
d48a842b4b qcacmn: Add qdf_delayed_work
Add a new deferred work type, qdf_delayed_work, which executes a
callback after a delay. This type is meant to supersede
qdf_delayed_work_t, with a more consistent API and without typedefs.

Change-Id: I76bc59dcd4222643d70c6a763e5bc4ee9f0a487c
CRs-Fixed: 2419155
2019-03-21 16:15:22 -07:00
Dustin Brown
5e919958d2 qcacmn: Add qdf_periodic_work
Add a new deferred work type, qdf_periodic_work, which executes a
callback periodically until stopped.

Change-Id: Iedf5486474fccadb35e146e6d289c27a7c1002d3
CRs-Fixed: 2410005
2019-03-21 13:02:30 -07:00
Ashish Kumar Dhanotiya
3be335ca19 qcacmn: Avoid compilation issue with kernel 4.19
There is a compilation issue if a variable is passed to
kernel api DECLARE_HASHTABLE.
TO resolve this issue, instead of passing a variable
pass a constant to DECLARE_HASHTABLE.

Change-Id: Ie9782af541bb34cc50f79060b0007dc73881e5f4
CRs-Fixed: 2386893
2019-02-02 15:27:57 -08:00
Dustin Brown
243d00af0b qcacmn: Adjust min zero compression to 1
The IPv6 address format allows compression of _one_ or more zero hextets
using "::". However, the current implementation accepts _zero_ or more
zero hextets as valid. Adjust the minimum required hextets for a zero
compression to 1 from 0.

Change-Id: Ibdf406b04bbdc44d4a28fafa6179c104285c915c
CRs-Fixed: 2362739
2018-12-14 14:26:22 -08:00
Dustin Brown
7c32e412b8 qcacmn: Add qdf_talloc APIs
Add APIs for t(ree) alloc(ated) memory management.

These APIs allocate memory like malloc, but track those allocations via
a parent-child relationship, or tree. If the parent is freed while it
still has children, a panic will be triggered. This effectively gives
you the ability to limit the lifetime of an allocation by ensuring the
child allocation lifetime will be strictly less than the parent
allocation lifetime.

Change-Id: I6308c96061e125b2e5a9c424ec2d2298c1c503ab
CRs-Fixed: 2359469
2018-12-13 16:46:04 -08:00
Dustin Brown
ce57c688b9 qcacmn: Add qdf hashtable APIs
Add a thin wrapper in QDF around the kernel hashtable implementation.
Additionally, add basic unit tests for these APIs.

Change-Id: I07999e5fc8116e67b3850b866ced20af64342055
CRs-Fixed: 2359335
2018-12-13 16:46:01 -08:00
Dustin Brown
1b76d59f78 qcacmn: Add int parse unit tests to QDF
Add unit tests for the following parsing function in QDF:
 * qdf_int32_parse()
 * qdf_int64_parse()
 * qdf_uint32_parse()
 * qdf_uint64_parse()

Change-Id: I43d162d008910396df051dd18e7a1ab7fede657a
CRs-Fixed: 2362740
2018-12-11 17:26:09 -08:00
Dustin Brown
fbe43ca5c4 qcacmn: Add unit test cases for qdf parse APIs
Add unit test cases for bool, mac, ipv4, and ipv6 parsing APIs.

Change-Id: I7536a973141a6311662390e42da749f48239bef8
CRs-Fixed: 2359298
2018-12-11 15:40:36 -08:00