Commit Graph

923 Commitit

Tekijä SHA1 Viesti Päivämäärä
Srinivas Girigowda
ffc5af7bbf qcacmn: qdf: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: I89d17f8e7b58d10f56882310bd4e47a9519d0425
2020-08-23 23:09:27 -07:00
Pragaspathi Thilagaraj
bc2f1d2a72 qcacmn: Add support for connection manager rso mode command
Add changes to support new definition of
send_roam_scan_offload_mode_cmd() in connection manager.

Change-Id: Iea10907756ea785b0b0de72d01375f50ac3dbd6a
CRs-Fixed: 2758318
2020-08-23 17:37:51 -07:00
Nisha Menon
027d8742b8 qcacmn: Add new cpumask apis to framework
Add new qdf apis to copy cpumask and check if an
existing cpumask is empty.

Change-Id: Ie34a9f9c097a691ac16e7f8ceca0a855ab6b26e3
CRs-Fixed: 2738317
2020-08-21 02:28:48 -07:00
Harsh Kumar Bijlani
d47e448d58 qcacmn: Implementation of SKB Frag Debug Framework
SKB frag debug framework is required for debug purpose of frag based
approach in monitor mode

Change-Id: Ic7a5a2c3d7397c4d7dd2c5db32802b0f694e6101
CRs-Fixed: 2736136
2020-08-17 10:07:25 -07:00
Arun Kumar Khandavalli
d564955d05 qcacmn: Trim the hang data size as per requirement
Trim the hang data as per the customer data size requirement.

Change-Id: I5a5d848f820ddeaa721dba176e67dba97fed7a71
CRs-Fixed: 2751370
2020-08-17 08:06:29 -07:00
Rajeev Kumar
b23bb8b6f2 qcacmn: Increase spin lock bh timeout threshold in defconfig builds
In defconfig build(QDF_LOCK_STATS = 1 for slub debug enabled) increase
spin lock bh max time allowed to 2 seconds to accommodate for cache thrashing
and slow execution because of many debug features getting enabled.

Change-Id: I817d63a264079d25fed8a7ba1dbd9db5391abcdd
CRs-Fixed: 2754993
2020-08-15 18:55:22 -07:00
Srinivas Girigowda
5e4c6f6b29 qcacmn: qdf: Introduce QDF_MAC_ADDR_FMT and QDF_MAC_ADDR_REF
Introduce the feature to hide 2nd, 3rd and 4th octet of the
MAC address in the logs.

To enable this feature set CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS to y.
For example, if this feature is enabled, then
mac address ae:45:9c:f1:c0:98 shall be printed as ae:**:**:**:c0:98

If this feature is disabled, then QDF_MAC_ADDR_FMT translates to
"%pM".

Change-Id: I7b3823d33748120b0fa5eb372f7957de59760536
CRs-Fixed: 2751002
2020-08-14 23:06:23 -07:00
Alok Kumar
9949f46e04 qcacmn: Use DEFERRABLE_WORK instead of DELAYED_WORK for BUS BW
For static display case, BUS BW work periodically wakes up the
APPS because bus bw work is created as DELAYED_WORK.
This has the power impact in case of static display.

Use DEFERRABLE_WORK instead of DELAYED_WORK for bus bw work.
DEFERRABLE_WORK won't wake up the APPS periodically in static
display case.

Change-Id: Id812907cc6962ab7a9bb2ce8a7417ca0546363ab
CRs-Fixed: 2748373
2020-08-14 08:13:01 -07:00
Pragaspathi Thilagaraj
0df12365ac qcacmn: Add FILS crypto API for rIK generation
Replace the lim_default_hmac_sha256_kdf() & lim_create_fils_rik()
API  with crypto API since both these API are primarily for
cryptographic derivation of re-authentication integrity key(rIK)

Use the new crypto APIs qdf_default_hmac_sha256_kdf(),
wlan_crypto_create_fils_rik() for this.

Change-Id: I1c8f38ee0124b8b3eb527d4b01d39add134e181b
CRs-Fixed: 2752635
2020-08-13 10:33:09 -07:00
Jhalak Naik
a878b340c8 qcacmn: Export qdf symbol for functions used for CBT
Add export function symbol for functions and compile
qdf_func_tracker.c file, required for code instrumentation.
These functions print the dump of function call map and are
called during CBT test case execution, to find errors and
trace function calls.

Change-Id: Idc79de7111398956b4995d3d7cbefa45a079b100
CRs-Fixed: 2748686
2020-08-11 09:48:00 -07:00
Jinwei Chen
d552bfa2cb qcacmn: add rx nbuf ipa smmu map/unmap trace
Currently in_use and unmapped flag from rx_desc can not know is
the rx nbuf has done IPA smmu map/unmap accurately.
add rx nbuf IPA smmu map/unmap flag in qdf_nbuf_cb, and use
this flag to check if IPA smmu map/unmap need to be done or not.

Change-Id: I19bbc6cc69ba752ef7c58d41fbe26299ca96d29e
CRs-Fixed: 2731313
2020-08-11 00:35:34 -07:00
Shivani Soni
15d8bb5c6b qcacmn: QDF API and SKB debug framework support for alloc_skb
Implementation of QDF API to allocate skb to avoid recycler pool
and extending skb debug framework support.
QDF API: qdf_nbuf_alloc_no_recycler

Change-Id: I32ccae7337000c899e8fba8127aa9fb3c8551783
CRs-Fixed: 2734717
2020-08-04 14:59:03 -07:00
Shwetha G K
66c83b2fbe qcacmn: Disable net_buf double-free panic when DISABLE_MEMDEBUG_PANIC set
Disable net_buf double-free panic when DISABLE_MEMDEBUG_PANIC set

CRs-Fixed: 2734030
Change-Id: I95b4e79e1e0607f39a950a3b96c70a066adee04d
2020-08-03 09:13:19 -07:00
Ankit Kumar
2b9e4ba1cb qcacmn: Add QDF wrapper for nbuf frag ops
Introduce qdf wrapper API for nbuf frag based ops.

Change-Id: I0f4c1cb1aa9fcdd9dc2fc2f5716860eb286a1932
CRs-Fixed: 2733972
2020-08-01 21:08:57 -07:00
bings
e344f80463 qcacmn: Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit
lock_cookie_freelist is global static, which means it is set as NULL when
loading driver module. It works well when there is only one driver module.
For the CE platform with CONFIG_WLAN_RESIDENT_DRIVER defined, driver is
split into two modules, one module keeps variables and functions in
kernel, the other module is used to trigger rmmod/insmod function. In this
case, lock_cookie_freelist is not NULL when insmod is triggered the second
time through the second module.

Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit.

Change-Id: Ia20fcc230c3a43eed9b646689348ad37b77811f2
CRs-Fixed: 2742118
2020-08-01 21:08:51 -07:00
Jayachandran Sreekumaran
3be1a0a167 qcacmn: Add qdf API for delayed workqueue
Add qdf API for delayed workqueue

Change-Id: Ic67f200ac6c9749b088bbd0769491d22583eed11
CRs-Fixed: 2738374
2020-07-31 07:43:44 -07:00
Shivani Soni
bf1bffa51d qcacmn: QDF macro for skb shared info size
Introducing QDF macro for getting size of skb shared info considering
alignment

Change-Id: Idb8e714c8de00b640dc7e400a757c71e80ae48e6
CRs-Fixed: 2737178
2020-07-23 07:00:44 -07:00
Prabhat Tamrakar
0ba944c541 qcacmn: Initialized QDF_NBUF_TRACK structure member
Uninitialize QDF_NBUF_TRACK structure members printing junk
data, it may lead to slab-out-of-bounds

Initialize QDF_NBUF_TRACK structure members with default value
in API qdf_net_buf_debug_add_node

CRs-Fixed: 2720988

Change-Id: I377a82a5e91b752516cd42089a66549d84d1c2dd
2020-07-17 01:51:16 -07:00
Aditya Kodukula
e99b7c2a82 qcacmn: Remove unused PMC status
There is no user for PMC related status codes in the CLD.
So remove them.

Change-Id: Iba307a80b15caacbe0bc7890c89acbb57b716b72
CRs-Fixed: 2729642
2020-07-15 01:46:43 -07:00
Aditya Kodukula
b25366fa6f qcacmn: Check for NULL pointer before de-referencing it
Pointer 'hif_ctx' returned from call to function 'cds_get_context'
may be NULL. Check for NULL pointer before de-referencing it.

Change-Id: I6c909b2c62e1bf6945a4cc40315e8fdad4a0aa83
CRs-Fixed: 2726335
2020-07-10 01:43:25 -07:00
Ashish Kumar Dhanotiya
a54735abdd qcacmn: Change data type of the code for qdf trace to uint16_t
Currently for qdf trace api data type of code is uint8_t, some of
the modules are inserting message id of type uint16_t because of
which some information is getting lost and post processing cmm
script is not able to parse these messages correctly.

To address above issue, change the data type of code for
qdf trace function.

CRs-Fixed: 2719767
Change-Id: I4461dc9c2f45e691317d318870dfdbce93929e12
2020-07-09 21:39:40 -07:00
Abhishek Singh
9cf786a2ab qcacmn: Use crypto APIs in scan filter
Use crypto APIs in scan filter to match the security.

Change-Id: I8b4d6f6085e3bfcdd8af2b4d9243c27e070cda78
CRs-Fixed: 2718079
2020-07-03 04:28:29 -07:00
Disha Das
6320586a21 qcacmn: Enable qdf_get_keyed_hash() API
Enable qdf_get_keyed_hash() API in qdf_crypto.c

CRs-Fixed: 2721647
Change-Id: I2c051f79dce2e70c9fa7c25d171a69b60588d6b8
2020-07-03 04:28:23 -07:00
Wu Gao
7f96401451 qcacmn: Add QDF API for DRV support
Add QDF API to check platform capability if DRV is supported or not.
Then component enables wow support based on it.

Change-Id: I9045b1982acfc4ed4cdce724b48430cb20e03274
CRs-Fixed: 2722639
2020-07-02 18:23:36 -07:00
Baowei Liu
f884be9f79 qcacmn: Improve 'Not set force_set if event completed'
Original changes have problems and have been reverted.
This is improved fix, the difference is set event done flag
before complete

Original submit is I31f947169153ccbeb8435c539faab1059c055c04
Revert submit is If8318b28883ae8ddd4fee36013f28c45f30fa426

Change-Id: I72814381a3ee932c9ff43fdae7d2dda5619baa48
2020-07-01 18:06:19 -07:00
Mohammed Siddiq
61d47a3695 qcacmn: Use IS_ENABLED for the definition of kernel module
Add code to use IS_ENABLED for CONFIG_WCNSS_MEM_PRE_ALLOC
kernel modules and remove inclusion of reduntant header
file cnss.h.

Change-Id: If1d098c7c6f326d12700f06318909a7fc0e7895a
CRs-fixed: 2702368
2020-06-30 12:30:17 -07:00
phadiman
c90e1dc372 qcacmn: Fix incorrect verbose level debug print
If QDF_TRACE is called with wrong verbose level then
the actual print is supressed and a error log will be
printed indicating wrong verbose level

This change is introduced because of an issue wherein
the prints flooded with wrong verbose level and could
not identify the incorrect caller

Add change to concatenate the actual print along with
failure message to help identify such incorrect callers

CRs-Fixed: 2716564
Change-Id: I19c4e80958c1ab5d621eea3a6d32308ce4c51558
2020-06-30 12:30:13 -07:00
Vevek Venkatesan
d04ad531c8 qcacmn: fix format specifier in qdf_dpt_dump_stats_debugfs
Fix proper format specifier for qdf_debugfs_printf in
qdf_dpt_dump_stats_debugfs.

Change-Id: I3d357cb677c6419e13c3c2333b43d4cae2f2df41
CRs-Fixed: 2717408
2020-06-29 21:35:31 -07:00
Debasis Das
dd686ad391 qcacmn: Enable EWMA for appropriate kernel version
EWMA-related macros are available from version 4.3.0 onwards.

Change-Id: I94ffae3a72894e7494903445f752e926942f9af7
2020-06-29 07:44:00 -07:00
Aniruddha Paul
ea81d9ac47 qcacmn: Add qdf API wrapper for ktime_real_get
Add qdf wrapper API to the ktime_real(). This gives the
current wallclock in ktime format.

Change-Id: If869985007225606075fb936593d5798ea0746e9
2020-06-29 02:38:43 -07:00
gaurank kathpalia
506f49a0ff qcacmn: Move scoring logic to connection manager
Move bss scoring logic to connection manager.

Change-Id: If8484ec2fa8b3e2d153ae4a6caed76f3354b8965
CRs-Fixed: 2707106
2020-06-26 11:08:56 -07:00
nakul kachhwaha
c5cdd1eaaf qcacmn: iot_sim add support for drop operation
Adding support for iot_sim drop operation.
Drop operation will be handled in Rx direction.

Change-Id: If2e1c9663a69fcd16715cdd1d28639a388ea1c0c
CRs-Fixed: 2686309
2020-06-24 03:34:57 -07:00
Arun Kumar Khandavalli
a8c41c0988 qcacmn: add generic hweight16,32 implementation
In driver there are multiple implementations to read the number of
1's set, have a generic qdf implementation to get the same.

Change-Id: Idf769c221b33e867720943fb8c42158edd9600de
CRs-Fixed: 2716525
2020-06-24 03:34:41 -07:00
Zhaoyang Liu
d83a21ba68 qcacmn: use kzalloc for memory instead of kmalloc
Try to request memory using kzalloc instead of kmalloc.

Change-Id: Ib35097f76257733b3663c112b8255b587ff19bd6
CRs-Fixed: 2706674
2020-06-20 12:04:29 -07:00
Yeshwanth Sriram Guntuka
82ce33c6c9 qcacmn: Update tx_rx_status enum to include new status
Update qdf_dp_tx_rx_status enum to include download
success status.

Change-Id: Ifcac2c21eee101d75e352bb7092023bfe9b72025
CRs-Fixed: 2682023
2020-06-18 05:47:32 -07:00
Aditya Kodukula
aad7669d56 qcacmn: Revert "qcacmn: Not set "force_set" if event completed"
This reverts commit I31f947169153ccbeb8435c539faab1059c055c04 since
it has introduced, use after free issue during dp_rx_thread shutdown.

Change-Id: If8318b28883ae8ddd4fee36013f28c45f30fa426
CRs-Fixed: 2707451
2020-06-17 19:38:05 -07:00
Tiger Yu
0f08390fa4 qcacmn: Add memory barrier to avoid inconsistent reg write for valid flag
Add memory barrier to avoid inconsistent reg write for valid flag.

Change-Id: Ieb4ed80872961889f29de083a6b1dcdbe6a303d2
CRs-Fixed: 2699549
2020-06-16 21:44:18 -07:00
Nisha Menon
0bbaedb23c qcacmn: Log memory stats in host driver
Add logs in driver to log current memory footprint
in init functions. Add wlan_mem_stats to sysfs node
in both perf and defconfig builds.
The stats are included under MCL feature
DCONFIG_WLAN_SYSFS_MEM_STATS.

Change-Id: I79c6d418a5762cddf52ab3bc0b0c93993fa7fd84
CRs-Fixed: 2635192
2020-06-11 02:04:46 -07:00
Ashish Kumar Dhanotiya
7bcac49e55 qcacmn: Add driver command to dump function call mapping
Add driver command support to dump all the function call mapping
which is cached in global buffer.

Change-Id: I6df9273c641e2cf3ecefe64c8f3c15d8ec2f9b20
CRs-Fixed: 2677981
2020-06-09 21:53:33 -07:00
bings
131d1bf176 qcacmn: remove return value of qdf_debugfs_create_u*
According to Kernel comment, no one checks the return value of routines:
debugfs_create_u8
debugfs_create_u16
debugfs_create_u32
debugfs_create_u64
debugfs_create_atomic_t
so remove return value of related qdf api.

Change-Id: I7d260bccfce463dddae963c54a776813df116eac
CRs-Fixed: 2666506
2020-06-08 13:50:24 -07:00
bings
67ae88ddbb qcacmn: rtc_time64_to_tm support for 4.0+ kernel
rtc_time64_to_tm in defined from kernel 4.0+. Use rtc_time64_to_tm
instead of rtc_time_to_tm from kernel 4.0+.

Change-Id: I6335150300cd4cd7a91d771dd86bf11592d1ff11
CRs-Fixed: 2666521
2020-06-08 13:50:21 -07:00
Vevek Venkatesan
eed5d30c55 qcacmn: Use IS_ENABLED for the definition of kernel module
Add support in code to use IS_ENABLED, if CONFIG_ARM_SMMU
config as kernel module.

Change-Id: I64c1e0c7918d520ed36a7a9e22fdf39f66e1c150
CRs-Fixed: 2701645
2020-06-05 10:22:51 -07:00
Jeevan Kukkalli
8bcf1b75d2 qcacmn: Register for panic notification
If wlan logging is enabled then register a notifier block
to kernel's panic notifier chain. Notifier block contains a
callback function to print buffered wlan logs in the event
of kernel panic.

Change-Id: Id8cae651afe45e411e1ddf122c2bc9b5f6688327
CRs-Fixed: 2692163
2020-06-05 02:04:10 -07:00
bings
2be79bf9fd qcacmn: sizeof_field support for 4.16+ kernel
sizeof_field is defined from kernel 4.16. So use sizeof_field
instead of FIELD_SIZEOF from kernel 4.16.

Change-Id: I291531ea86499a7c0ba52fbb6607b19dff533111
CRs-Fixed: 2666512
2020-06-03 09:27:52 -07:00
Chaoli Zhou
47e9c6a997 qcacmn: Fix htt_status & A_STATUS map dp status wrong issue
The packet tx complete status from wlan fw define in htt_tx_status
doesn't match with packet trace feature used in qdf_dp_tx_rx_status,
Meanwhile A_STATUS also doesn't convert to correct qdf_dp_tx_rx_status,
so add two according APIs to fix it

Change-Id: Ic250175dd270632f40af14ad9499ddcafbb3033b
2020-06-01 05:23:26 -07:00
bings
1740435d49 qcacmn: Use ktime_get_real_ts64 for kernel 3.17.0+
ktime_get_real_ts64 is defined from kernel 3.17.0.
Use ktime_get_real_ts64 instead of ktime_get_ts from
kernel 3.17.0.

Change-Id: Ica72545fe5224966fbb350813bf3c2d849946dbc
CRs-Fixed: 2666404
2020-06-01 00:04:08 -07:00
Baowei Liu
ca3412698e qcacmn: Not set "force_set" if event completed
"qdf_complete_wait_events" set force_set flag for all event in
"qdf_wait_event_list". This cause qdf_wait_for_event_completion
return QDF_STATUS_E_FAULT, even if event have completed

Add new flag "done" to record event completed. Use this flag to
detect event have completed or not.

Change-Id: I31f947169153ccbeb8435c539faab1059c055c04
2020-05-28 17:28:50 -07:00
Alok Kumar
163a364d27 qcacmn: Set TCP PSH flag only for the last segment of TSO packet
Currently, if TCP PSH flag is set in TSO packet then
PSH flag is set for each TSO segment in the driver.
This causes GRO flush for each segment received in the receiver side.

Set this PSH flag only in last TSO segment so that GRO flush
happens for the last segment in the receiver end.

Change-Id: I6d6b34fab71ab2984ea68d8197f2979d25b36c6b
CRs-Fixed: 2692251
2020-05-28 07:57:09 -07:00
Santosh Anbu
453e7a3240 qcacmn: Add qdf bitmap AND and EMPTY APIs
Add qdf API to check if a given bitmap is empty and API to compute
bitwise AND operation of two given bitmaps.
1. qdf_bitmap_and
2. qdf_bitmap_empty

Change-Id: Ibc26e0f515c3804f1b627e8eaa8bf6f796c40324
CRs-Fixed: 2635330
2020-05-17 23:12:47 -07:00
Jinwei Chen
c1ab9eee8e qcacmn: add exception frame flag in qdf_nbuf_cb
add exception frame flag in qdf_nbuf_cb structure.

Change-Id: I97f61973cc1c0d00fe66cc0e8aac0c7b4b16bb56
CRs-Fixed: 2680255
2020-05-14 13:04:23 -07:00