Commit Graph

20 Commits

Author SHA1 Message Date
bings
f39897e136 qcacld-3.0: Fix memory leak in os_if_ndp_end_ind_handler
In os_if_ndp_end_ind_handler, when it returns, make sure the
allocated memory ndp_instance_array is freed.

Change-Id: I39725bdeae01e3e3839f9bbac67721d4a1f38670
CRs-Fixed: 2552236
2019-10-29 22:02:04 -07:00
Manikandan Mohan
dbcd073e6d qcacld-3.0: Update NAN component to use frequency values
Due to channel number ambiguity with introduction of 6GHZ support
update NAN component APIs and data structures to use frequency
values instead of channel number.

Change-Id: I982fe8da0320c878f9473a62c86b80b220e2892e
CRs-fixed: 2551927
2019-10-24 21:41:47 -07:00
Rajeev Kumar Sirasanagandla
c64548c8a8 qcacld-3.0: Remove policy mgr entry after NDI delete
In the host driver, after receiving NDP END INDICATIONs for all NDP
connections then policy manager deletes NDI mode from
pm_conc_connection_list.

From user-space application, if NDP END REQUEST and NDI DELETE request
are issued back to back without waiting for NDP END indication, then
firmware could process NDI DELETE command firstly and avoid NDP END
indication due to peer delete as a part of NDI delete.

If vendor command NDI delete request is issued without receiving
NDP_END_INDICATIONs for all active NDP peers then pm_conc_connection_list
contains stale entry of PM_NDI_MODE associated with deleted NDI.

Stale NDI entry in pm_conc_connection_list is the cause for failure of
get_second_connection_pcl_table_index() for PM_NAN_DISC_MODE, therefore
further NAN enable requests are rejected.

To address this issue, cleanup PM_NDI_MODE from pm_conc_connection_list
as a part of NDI delete.

Change-Id: Ic1535420b60224cc426b24e22fe7486781fd2fa6
CRs-Fixed: 2519625
2019-09-13 21:44:07 -07:00
Bala Venkatesh
352834005d Revert "qcacmn: Free NDI peers/vdev at time of ndi_delete/driver unload"
This reverts commit I04631ffd611d6ded318ddfb65b2dfeba479c9bdc.
Currently, for all the peers cleanup is done in lim and wma layers
to remove this peers. The original change is deleting the ndi
peer in HDD, and can lead to memory overwrites.
Hence reverting the change.

Change-Id: Id0083c3d1612f0fdccb6fca2c9cc4c03f607a139
CRs-Fixed: 2507142
2019-08-19 06:19:19 -07:00
Manikandan Mohan
8776db5b50 qcacld-3.0: Fix nan disable issue on NAN+SAP concurrency
Fix the issue of NAN getting disabled in NAN+SAP concurrency
when SAP and NAN operate in different bands and host processes
LTE coex event for unsafe channel update.

Change-Id: I4f2d63a5283bd75712aa3bd9a3b3f278a28b0951
CRs-fixed: 2486595
2019-07-16 17:15:00 -07:00
Jeff Johnson
93cc00cb90 qcacld-3.0: Use renamed OSIF logging macros
Change Id3273498f623d04beec879aa9d77c1d33986357a ("qcacmn: Rename OSIF
logging macros") is renaming the OSIF logging macros, so update the
legacy OSIF to use the new names.

Change-Id: I73d4214c9fecc435f9ac8c9f79560aa36333d311
CRs-Fixed: 2469498
2019-06-17 13:00:42 -07:00
hqu
dd904c8e39 qcacld-3.0: Fix possible NULL pointer dereference in os_if_nan_legacy_req()
In function os_if_nan_legacy_req(), if qdf_mem_malloc() call return NULL,
this will result in nan_req NULL pointer dereference.

Fix is to add NULL pointer check for nan_req before using.

Change-Id: I8ce9e9f9fa556606cf5e8d389905c39ff7198f2c
CRs-Fixed: 2423772
2019-04-04 08:51:13 -07:00
Nachiket Kukade
8de3c7bcb2 qcacld-3.0: Move interface name related modules to NAN OS IF
NAN Datapath vendor commands include a vendor attribute that
contains interface name string. Only NAN Datapath interface
needs the modules that return vdev object from interface name
and vice versa. Presently these modules are part of in cmn
utils under UMAC. They're accessing OS IF private structures
which is a layering violation. So move these modules to the
NAN OS IF files where they're appropriate.

Move interface name related modules to NAN OS IF files.

Change-Id: I643bf597895e172fa501ada18ebc13ffa2e144e3
CRs-Fixed: 2284200
2019-03-24 14:54:43 -07:00
Jeff Johnson
9e5e30d3a6 qcacld-3.0: os_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within os_if replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Ia316c656c5156960d254383a8de4bfc58522f877
CRs-Fixed: 2418386
2019-03-20 00:57:43 -07:00
Nachiket Kukade
9ea5f13a28 qcacld-3.0: Add support for disabling an NDI concurrency
NAN Datapath implementation allows more than one concurrent
NDI's to be active at the same time. But this isn't supported
if there is a higher priority incoming connection such as
STA. Add modules that check for unsupported NDI concurrency
and initiates termination of all NDP's on it.

Add modules that check and disable unsupported NDI concurrency.

Change-Id: I6ad9afbfc41beda1d1c8f31bf58a8ea70027f5ca
CRs-Fixed: 2407215
2019-03-12 13:58:08 -07:00
Nachiket Kukade
d5b7ebcc37 qcacld-3.0: Define NAN peer objects for storing NDP Peer info
Host presently stores NAN Peer specific info, such as number
of active NDP sessions, in an array inside vdev private object.
The array uses Peer index from HDD connection info. Instead,
use object manager to define peer private objects to store
this information.

Define NAN peer objects for storing NDP Peer info

Change-Id: I43d9339d06acc0eff61cafb337ccb084c372c7e1
CRs-Fixed: 2405507
2019-03-02 17:45:36 -08:00
Dustin Brown
c0591c0308 qcacld-3.0: Rename osif_*_sync_create_with_trans()
Rename the osif_*_sync_create_with_trans() to a slightly more
appropriate osid_*_sync_create_and_trans(), to help convey the fact that
the transition does not end when the function returns.

Change-Id: I5606fb613d786d65de773dae49fe8ad431b5342f
CRs-Fixed: 2406713
2019-02-28 01:27:50 -08:00
Dustin Brown
1b899ef904 qcacld-3.0: Integrate DSC (nan)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into OSIF, protect NAN datapath and
NAN discovery.

Change-Id: Icf24c8f7717cd1ca92616c781f06dacdd69c01f0
CRs-Fixed: 2398340
2019-02-20 11:31:56 -08:00
Nachiket Kukade
2fb1fdb1ac qcacld-3.0: Combine all NAN related flags with WLAN_FEATURE_NAN
Flag WLAN_FEATURE_NAN_DATAPATH was added to protect NAN Datapath
related code, while WLAN_FEATURE_NAN_CONVERGENCE was added to
protect the converged code inside NAN Component. Since the
original NAN Discovery related code has now been moved inside
NAN component and NAN Datapath cannot exist without NAN Discovery,
keeping these flags separate doesn't make sense. Combine these
two flags with WLAN_FEATURE_NAN flag which is the original NAN
feature flag.

As a cleanup of NAN code, combine all NAN related flags with
WLAN_FEATURE_NAN flag.

Change-Id: If98ecaace17f8724e9c28325ef61e721f42e1d8f
CRs-Fixed: 2377375
2019-02-04 10:44:30 -08:00
Nachiket Kukade
089b98361e qcacld-3.0: Handle concurrencies with NAN Discovery
Use policy manager to set and update the NAN Discovery
related connection info. Disable NAN Discovery
explicitly for unsupported concurrencies.

Handle concurrencies with NAN Discovery interface.

Change-Id: I8c9450b034983ef0402fdc878d8b525bedac9f0b
CRs-Fixed: 2358180
2018-12-22 02:54:03 -08:00
Nachiket Kukade
6003bd2adf qcacld-3.0: Route the legacy NAN commands through NAN component
NAN component has been moved to CLD. It includes implementation
of the new NAN command QCA_NL80211_VENDOR_SUBCMD_NAN_EXT.
Change the legacy NAN implementation of vendor cmd
QCA_NL80211_VENDOR_SUBCMD_NAN so that the requests go
through the NAN component. Clean up the legacy path.
Functionality remains unchanged for legacy command.

Route the legacy NAN commands through the NAN component.

Change-Id: I542e5afe832619f8c088220cc4456aa7fe4416fd
CRs-Fixed: 2356772
2018-12-18 14:29:19 -08:00
Nachiket Kukade
4f89e9e161 qcacld-3.0: Add support for handling the NAN events
As part of supporting NAN DBS, new WMI TLVs are defined so
that Host can maintain the status of NAN Discovery in sync
with the Firmware. Add modules that process these events and
updates the NAN states.

Add support for handling the NAN events.

Change-Id: Icfcd9c33cc410d9a65140f63cac69ddd69742306
CRs-Fixed: 2355383
2018-12-18 14:29:15 -08:00
Nachiket Kukade
d5a7683c8a qcacld-3.0: Add support for the NAN Enable/Disable commands
Add changes in the NAN component and Target IF to support the
NAN Enable and Disable commands. Add changes to support all
the other generic NAN commands as well. Add a state machine
to keep track of the status of the NAN Discovery in the Target.

Add support for the NAN Enable/Disable commands

Change-Id: I20c303cad8b7a30deba50345032b33b1deba4802
CRs-Fixed: 2338054
2018-12-18 14:29:10 -08:00
Nachiket Kukade
a6a70a98f1 qcacld-3.0: Add support for the new NAN EXT vendor command
As part of the NAN Discovery DBS support, a new vendor command
- QCA_NL80211_VENDOR_SUBCMD_NAN_EXT - has been defined that can
carry the binary blob encapsulated within an attribute and can
carry additional attributes to enhance the NAN command interface.
Add related data structures in NAN component and add modules in
OSIF to parse and sanitize this new command data and forward
the NAN message to the NAN component.

Add support for the new NAN EXT vendor command.

Change-Id: I0e6bb833b01a8cbd65e4d42700b5b70599f3ef99
CRs-Fixed: 2339029
2018-12-18 14:29:02 -08:00
Linux Build Service Account
bc04268a27 qcacld-3.0: Merge NAN related OS IF files into CLD
NAN component is not needed in the CMN repo. To reduce the
unnecessary lines of code, merge the NAN related OS IF files
from CMN into CLD. Subsequently remove these files from the
CMN repo.

Merge NAN related OS IF files from CMN into CLD.

Change-Id: Iba5c367549f135800c6f36a7066829393d62e92b
2018-11-15 19:11:56 +05:30