Commit Graph

463 Commits

Author SHA1 Message Date
Edayilliam Jayadev
2874cca041 qcacmn: Adjust RSSI values for Spectral HW gen III
RSSI values are reported in 1/2 dBm steps for spectral HW gen III.
Convert the RSSI values to 1dBm scale.

CRs-Fixed: 2231546
Change-Id: I30962a95ba7a5f759d933e373c2b8708a98712fc
2018-04-27 09:47:37 -07:00
Sathish Kumar
77f3c438f0 qcacmn: Fix memory leaks in direct buffer receive(DBR) module
Module param capabilities stored per module per pdev and overall
target dbr ring capabilities allocated and stored during service ready
are not freed during detach.

Fix above mentioned memory leaks through below changes
1. Free module param capabilities allocated per pdev during ring deinit
2. Free DBR ring capabilities allocated during service ready event
   as part of target psoc info free.
3. Free DBR entries allocated per event received from target

Change-Id: I93d5126063d3fa0094e15d57a75f03cf63b3c494
CRs-Fixed: 2228428
2018-04-27 05:26:39 -07:00
Edayilliam Jayadev
001d05b696 qcacmn: Use noise floor value from spectral report
Spectral module gets the noisefloor value from the meta data
info send by FW through direct dma framework. Copy the noise floor
value to SAMP message.

CRs-Fixed: 2219818
Change-Id: Icbd146875be668cdb99be20264e931040b670d5b
2018-04-25 23:49:05 -07:00
Edayilliam Jayadev
3d32949b42 qcacmn: Extract meta data from dbr event
Extract meta data from the dbr wmi event.

CRs-Fixed: 2219818
Change-Id: Ib19588775060e75017e9777206132a0efeec6223
2018-04-25 23:49:01 -07:00
Naveen Rawat
8f4c9087bf qcacmn: Fix CP_STATS rx_ops registration
Fix CP_STATS rx_ops registration in wlan_lmac_if.c, by including
dispatcher header and directly referencing public dispatcher tgt
APIs.

Change-Id: Id42aac8d2a7f1311d4319c77db05eadd75ee4aa0
CRs-Fixed: 2228934
2018-04-23 06:31:29 -07:00
Naveen Rawat
299269828a qcacmn: Add target_if/wmi implementation of get_tx_power
Add changes to support get tx power from within cp_stats component.

Change-Id: I89ac372bd31a8aa5a76938dc4ea4cfe05d6c7cf1
CRs-Fixed: 2210311
2018-04-19 22:06:53 -07:00
Naveen Rawat
1cd5f68488 qcacmn: Add target_if implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats
component.

Change-Id: If513f10bf103545536266823ece62cbf98dd3296
CRs-Fixed: 2210309
2018-04-17 13:17:51 -07:00
Santosh Anbu
9d32d1dfc5 qcacmn: Move retrieval of wmi_handle to target_if layer
Remove inconsistent API for scan start and stop, where pdev_wmi_handle
is derived from psoc_handle at the WMI layer instead of using
the wmi_handle passed from the above layer i.e target_if

Change-Id: If259260e6f8cf77bf68748a8130db4440b88588a
CRs-Fixed: 2203048
2018-04-15 23:15:26 -07:00
Naveen Rawat
70fd32e41b qcacmn: Add new files for cp_stats mobile connectivity component
Add file for mobile connectivity to use control path stats component.

Change-Id: I11ba1103745371ebf740ee2ec06dd04912afa7c9
CRs-Fixed: 2210307
2018-04-11 10:52:45 -07:00
Naveen Rawat
1c4d57ea15 qcacmn: Avoid un-initialized pointer access
Avoid un-initialized pointer access by initializing pointer to NULL
or valid value that is address of another variable.

Change-Id: I0666e7cebf9f39928b6b095fa4f7f017b5b2a837
CRs-Fixed: 2219381
2018-04-06 17:49:44 -07:00
Naga
f2d4e23818 qcacmn: Add support for cp_stats in target_if
Add support to register cp_stats for lmac Tx Ops and
provide inline APIs to get cp_stats lmac Rx and Tx Ops
structure

CRs-Fixed: 2192386
Change-Id: I33e7e22018a3aa3d3e76836ef9ddf1ead21209ea
2018-04-06 17:49:40 -07:00
Edayilliam Jayadev
01b4921127 qcacmn: Enable spectral registration to direct dma
Enable registration of spectral feature to direct dma

CRs-Fixed: 2219121
Change-Id: I483e87b9a6c7dcd297bc8b88d24c49e8d80ed547
2018-04-06 13:25:41 -07:00
Krishna Rao
24a08f2ad9 qcacmn: Adjust FFT bin size for Spectral report mode 2
On IPQ8074, for report mode 2 only the in-band bins are DMA'ed.
Scatter/gather is used. However, the HW generates all bins, not just
in-band, and reports the number of bins accordingly. The subsystem
arranging for the DMA cannot change this value. The host driver needs
to check if report format is 2, and if so halve the number of bins
reported to get the number actually DMA'ed.

CRs-Fixed: 2218423
Change-Id: Ic0be87422c67110cf3595a4bea71dc872d5b2504
2018-04-06 13:25:39 -07:00
Arif Hussain
958e7515b2 qcacmn: spectral: Replace instances of unadorned %p
Replace instances of unadorned %p in
target_if_spectral_process_phyerr_gen3.

Change-Id: I1f70e613885780b71aa69cd12b61e9d24415b333
Crs-Fixed: 2213177
2018-04-05 11:04:32 -07:00
Jeff Johnson
d7f3057bc4 qcacmn: Fix build error when Green AP disabled
When the Green AP feature is disabled in the Kbuild the following
build issue is observed:

target_if_green_ap.h:59:10: error: 'struct wlan_green_ap_egap_params'
declared inside parameter list [-Werror]
target_if_green_ap.h:59:10: error: its scope is only this definition
or declaration, which is probably not what you want [-Werror]

Fix this by including a forward reference for the struct.

Change-Id: Ia5d867c0ebde17dba0f20c1e97391197ae9dbb77
CRs-Fixed: 2216249
2018-04-04 16:40:04 -07:00
Naveen Rawat
2a5dc61663 qcacmn: Fix memory allocation in NDP firmware events
Fix memory allocation during NDP firmware events by allocating
memory before wmi_extract APIs are called.

Change-Id: I3af2f49895a79a45b3add246eeb9025b1df92faa
CRs-Fixed: 2183493
2018-04-04 07:37:36 -07:00
Edayilliam Jayadev
bf873df722 qcacmn: Fix API for getting first vedv of pdev
Since vdev_id is globally unique across multiple pdev,
assuming vdev_id 0 to find the first vdev of a pdev wouldn’t work.
Fix this issue by getting the first vdev from the head of vdev
linked list maintained per pdev.

CRs-Fixed: 2211742
Change-Id: I5a7b5436cff363d5470fb600cca54f587a7d683e
2018-04-03 01:42:58 -07:00
Edayilliam Jayadev
269c3deaac qcacmn: Fix for direct dma + ftm mode
This change fixes the null pointer dereference issues
observed when running spectral scan using direct dma
framework with ftm mode.

CRs-Fixed: 2214269
Change-Id: I06514b38b519da7eb972ff713feab97e7d5a9c29
2018-03-30 02:46:49 -07:00
Santosh Anbu
929e1e9760 qcacmn: Send WMI cmd only on completion of wmi_init
Call WMI cmd to set btcoex only on successful completion of WMI init.

Change-Id: Ifd911f7729fd47f6ff2ad1c3e8b16f53db5689e4
CRs-Fixed: 2208266
2018-03-23 09:56:03 -07:00
Abhijit Pradhan
ed8c9d3bc8 qcacmn: Have separate macros for DA/PO/FO to reduce the code size
Since, an AP may have any combinations of DA,PO, and FO chips on it,
having support for all chips always is redundant. Therefore, enable the
chip specific code as and when required.
DA:- Direct attach
PO:- Partial offload
FO:- Full offload
WLAN_DFS_DIRECT_ATTACH    :- enable/disable DA specific DFS code.
WLAN_DFS_PARTIAL_OFFLOAD  :- enable/disable PO specific DFS code.
WLAN_DFS_FULL_OFFLOAD     :- enable/disable FO specific DFS code.

Change-Id: I498ac1f8cd1d6423032d7b3b8c233656c5f0bf22
CRs-Fixed: 2199819
2018-03-23 03:18:32 -07:00
Manikandan Mohan
56a2bf8921 qcacmn: Fix export symbol for multi drivers compilation
Update target_if module files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: I83b2d79a96909a2661a89a1129e17c291e9a2e03
CRs-fixed: 2197751
2018-03-19 19:58:10 -07:00
phadiman
a2f544f294 qcacmn: Fix incorrect return type & variable access
Initialize the unintialized variables, fix return
types and fix typo errors (access map_status instead
of status)

CRs Fixed: 2200034

Change-Id: I02c5f989f1c41da07eabd165c3f45a44007b928d
2018-03-12 05:15:23 -07:00
Pratik Gandhi
7846150f2b qcacmn: Fix compilation issues for FW header abstraction
fwhdr_abstrct: Fix compilation issues for WIN firmware header abstraction.

Change-Id: Id76a6f29fd41ae559cf377029428224d59bd03fb
CRs-Fixed: 2140921
2018-03-09 07:28:50 -08:00
Himanshu Agarwal
cfcb8b4de0 qcacmn: Add NULL check for wmi_hdl before use
GET_WMI_HDL_FROM_PDEV() returns wmi_hdl to the caller of the
func. In some Green AP functions, wmi_hdl is passed directly
to WMI functions without any NULL check that could lead to
NULL pointer dereference.

Add NULL check for wmi_hdl before use in Green AP functions.

Change-Id: Id6222ce30d66b660008c1a4ad1b5020235d5b351
CRs-Fixed: 2196071
2018-03-08 18:47:11 -08:00
Arif Hussain
77ba8f42ca qcacmn: Fix possible null pointer de-references in DFS
Add null check to avoid null pointer de-references.

Change-Id: I3d6f6b182669ae4925ed85be2403bb0c18faeff5
CRs-Fixed: 2196070
2018-03-07 16:28:07 -08:00
Arif Hussain
c713727406 qcacmn: Fix possible null pointer de-references in FTM
Add null check to avoid null pointer de-references.

Change-Id: I99d01e5f543cffdace8aa07f709265f0eb5d7ed9
CRs-Fixed: 2196070
2018-03-07 16:28:04 -08:00
Shiva Krishna Pittala
a143f83a27 qcacmn: Add Netlink deinit functionality in Spectral
Define os_if_spectral_netlink_deinit to close the Spectral socket and
de-register the os_if callbacks

Change-Id: I3d054c2a2d630d4d959861d3620592010d04c09a
CRs-Fixed: 2186113
2018-03-06 03:53:47 -08:00
Sathish Kumar
6b55904827 qcacmn: Fix issues in direct buffer rx module
1. Populate number of capabilities after extracting service ready ext param
2. Deinit ring during pdev destroy only if ring is configured
3. Do not allocate module param if no capability is shared for
   the pdev by target

Change-Id: Ie92b7fc882ba8b7755fea150c724459264a0ea79
CRs-Fixed: 2192671
2018-03-04 16:50:54 -08:00
Sandeep Puligilla
4d3daf5cf0 qcacmn: Fix static analysis
Fix static analysis issues on spectral modules.

CRs-Fixed: 2196066
Change-Id: I7588a26108ff3c0b01f480007ffe3d3b91c29b8e
2018-03-02 23:45:16 -08:00
Nandha Kishore Easwaran
8bb56ebedc qcacmn: Initialize preferred_hw_mode to MAX
Initializing preferred_hw_mode to WMI_HOST_HW_MODE_MAX and removing
preferred_mode check. This is needed for Napier where preferred_hw_mode
of 0 is a valid configuation which represents single radio mode.

Change-Id: I8998745427427021f219667e03f767c66527d579
CRs-Fixed: 2192227
2018-03-02 16:34:35 -08:00
Varun Reddy Yeturu
1848acda2b qcacmn: Fix NULL pointer dereference issues in scan and power debug
get_pdev_wmi_handle() can return a NULL pointer in some cases.
Perform a NULL check before using the returned pointer.

target_psoc_get_service_ext_param() can return NULL pointer in
some cases. Perform a NULL check before using the pointer.

The power debug command can  take a maximum of WMI_MAX_POWER_DBG_ARGS
arguments. Check for the limit before indexing the array to avoid
illegal access of memory or overflow the array.

Change-Id: I264475e9f86c7a7e78b17b7a1fa025718a7c5af6
CRs-Fixed: 2196063
2018-03-02 16:30:44 -08:00
Dustin Brown
fb6527630f qcacmn: Deprecate WLAN_MACADDR_LEN
At some point WLAN_MACADDR_LEN was added to the driver, despite
QDF_MAC_ADDR_SIZE already serving the same purpose. There are cases
where these two macros are implicitly assumed to be the same value.
This is a classic single-source-of-truth violation, and only serves to
confuse developers. Deprecate WLAN_MACADDR_LEN and use
QDF_MAC_ADDR_SIZE instead.

Change-Id: I4e941d5e17d161a5810e693c89b95ae08f83c6b0
CRs-Fixed: 2179728
2018-02-28 14:57:53 -08:00
Arif Hussain
c8fe4680ae qcacmn: Fix sending dfs offload enable command sequence
Currently dfs offload command is sent during event registration
when psoc object is created. Dfs offload command is sent by accessing
pdev object, as pdev object during this time may not be created
or maybe in logically deleted state and sending command may fail.
This failure may cause wifi_dfs_psoc_enable and thereby effecting
other module objects.

To fix this, avoid using pdev objects during psoc enable, and send
pdev object specific command when pdev is created.

Change-Id: Ia10d493267259d0fbd918453e532b4f244029163
CRs-Fixed: 2179845
2018-02-23 06:05:56 -08:00
akosigi
6e19edc1e4 qcacmn: Update function name and remove redundant code
Rename scan_tx_ops_register for consistency
Remove redundant lines of code in tx_ops registration

Change-Id: I3ade89f7eeb1f506f75b5c859dd4bc4242414628
CRs-Fixed: 2127952
2018-02-21 18:20:52 -08:00
Pratik Gandhi
8713aa61ff qcacmn: Additional export symbols for split of kernel modules
Add additional Export symbols to support modularization in
WIN.

Change-Id: I4e5e7a7f38b7dae4c5e5f0865a4799caaa3870ea
CRs-Fixed: 2179854
2018-02-12 15:45:00 -08:00
Shiva Krishna Pittala
cd67294973 qcacmn: Fix configuration of Spectral module for Gen2
Spectral module configuration is failing on Gen2, fix it.

CRs-Fixed: 2187148
Change-Id: I424512d181e70d300a71210cf3e0593b2ddbf24f
2018-02-12 06:45:43 -08:00
Manoj Ekbote
d1d26229a8 qcacmn: Extract MAC address list in ready event
FW provides a list of MAC addresses in ready event,
one per radio. Change event handler to extract the
list. Legacy HW will use the single MAC address
function.

Change-Id: If0a9db3b7dab81bbeed387d2b7417100021e912d
2018-02-10 00:52:16 -08:00
Edayilliam Jayadev
f01a81b79f qcacmn: spectral changes for gen3 HW
Process spectral summary and search fft report for
gen3 spectral HW. Add the frame work to register to
Direct dma module.

CRs-Fixed: 2184019
Change-Id: I4e2869d9c2887767d58685533265cc93c908b697
2018-02-09 09:21:04 -08:00
Sandeep Puligilla
cd793f38a3 qcacmn: Configure spectral module for Gen2
-Initialize the default Configuration as
gen2 for spectral module on MCL.
-Add support to general netlink socket.

Change-Id: Iab06f66d18c4791f0ff5483781634df2a7268ddb
CRs-Fixed: 2183870
2018-02-09 09:21:02 -08:00
Shiva Krishna Pittala
101778698b qcacmn: Move Spectral Netlink APIs to os_if layer
Spectral Netlink related APIs are currently present in
target_if layer, move them to os_if layer.

Change-Id: I86a5495f6ec8aa85a2e9639902503a522b023f8e
CRs-Fixed: 2151548
2018-02-09 09:21:00 -08:00
Shiva Krishna Pittala
71155a3e48 qcacmn: Use module level logging in Spectral
Current Spectral module uses qdf_print. To improve the control over
logging, use module level logging

CRs-Fixed: 2165341
Change-Id: I205991347453c4dcc424ba1958e309b7c5fb71a0
2018-02-09 09:20:56 -08:00
Arunk Khandavalli
e460c52c3f qcacmn: update the pcl info from the converged structures
Update the pcl information from the converged strutures.

CRs-Fixed: 2179012
Change-Id: Id9269e85728409645266e1edc17d03237144a9cc
2018-02-08 07:55:50 -08:00
Pratik Gandhi
dc82a77896 qcacmn: Support to WIN for split of kernel modules
Add EXPORT_SYMBOLS to support modularization in WIN.

Change-Id: I587fe6f2c5cce4b54756358de5c488b146f61850
CRs-Fixed: 2179854
2018-02-08 06:58:35 -08:00
Arunk Khandavalli
1b5e807809 qcacmn: expose get/set target_if_api's
Expose the target_if ap's for the set/get different values in the
target_psoc_info.

Change-Id: I7e84482faa46606b39bb64b82fe541b96f0eccce
CRs-Fixed: 2184015
2018-02-07 02:15:33 -08:00
Himanshu Agarwal
c4cec662cf qcacmn: Remove dependency on WMA layer for green AP component
Remove dependency on WMA layer for green AP component by registering
green AP events through target_if layer.

Change-Id: I8fe9079c6ba6b23cd5f1d98a7d1b333fde31f19b
CRs-Fixed: 2178143
2018-02-06 17:33:03 -08:00
Himanshu Agarwal
497e83eeea qcacmn: Add support to get objmgr pdev from scn handle
Add support to get objmgr pdev from scn handle in wmi event
handler functions.

Change-Id: I9003692958bf5ae47b6054f1ef8a0d6d3e33193b
CRs-Fixed: 2178124
2018-02-06 07:45:02 -08:00
Arunk Khandavalli
9f8a064726 qcacmn: Invoke the legacy cb for ready event
Invoke legacy callback for ready event.

CRs-Fixed: 2179013
Change-Id: I104cc12d6fa0f65320d20ab71d6fff3a0d1d9a95
2018-02-03 15:11:20 -08:00
Srinivas Pitla
5530895779 qcacmn: Add API to get num radios
Introduce API to get number of radios

Change-Id: Idb0b6fdf9fe7e524b20016ff5cf6497ca6f13318
CRs-Fixed: 2177109
2018-02-03 15:11:18 -08:00
Sathyanarayanan Esakkiappan
38c6f988d5 qcacmn: Pass psoc/pdev object as ctrl objects to DP
pass psoc/pdev object as ctrl pointers to instead of legacy objects.
It introduces new APIs to get feature pointers of psoc/pdev.

DP attach API param modified to pass ctrl psoc (psoc object)

Change-Id: I3d83f28c3e72e5ee984a4220b9d5cf3c4522b501
CRs-Fixed: 2177109
2018-02-03 15:11:15 -08:00
Srinivas Pitla
0b9d3b241a qcacmn: Define API to get component handles
Introduce APIs set and get component handles

Change-Id: I8bfcd802f10b8ecf9908a02d492f1ad757d8f7ec
CRs-Fixed: 2177109
2018-02-03 15:11:13 -08:00