Commit Graph

46 Commits

Author SHA1 Message Date
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
Ashish Kumar Dhanotiya
1ac4188eb5 qcacld-3.0: Remove legacy implementation of stats event handler
Driver has a stats infrastructure and all the stats related
commands are using this infrastructure and for this
target_if_mc_cp_stats_stats_event_handler is getting used.

Remove legacy implementation of stats event handler
wma_stats_event_handler and related APIs.
With this change remove unused structures also.

Change-Id: I9a892b5f7486a406654256fc2cc8177f2fafe790
CRs-Fixed: 2481937
2019-07-08 14:16:50 -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
Bala Venkatesh
98847cc1b4 qcacld-3.0: Avoid NULL pointer access of tdls_priv
tdls_priv is alloted per vdev and deleted after physical
vdev delete. Check the tdls_priv for NULL pointer before
accessing as there is possibility of NULL dereference
after vdev delete.

Change-Id: I47e30f6ed5dcf5c1ae6a07c3d56fa24db2ea4f6c
CRs-Fixed: 2469840
2019-06-13 01:07:52 -07:00
Bala Venkatesh
c218b38a16 qcacld-3.0: Avoid NULL pointer access in wlan_cfg80211_tdls_add_peer
In function wlan_cfg80211_tdls_add_peer, osif_tdls
is allocated only for STA and P2P CLI vdevs. So if tdls connection is in
progress on p2p_client vdev and at the same time if the driver gets the
change iface for p2p client to p2p device, p2p device vdev is created
with the same mac address replacing the p2p client vdev.
Now if supplicant issues add_station command after change_iface
on p2p interface, it tries to access osif_tdls pointer which is not
allocated for p2p device vdev. This can lead to NULL pointer access
of osif_tdls.

Add check for NULL pointer before accessing osif_tdls pointer
for adding station command.

Change-Id: I2cd63d4d758af360987e1563022918548d113d76
CRs-Fixed: 2464766
2019-06-06 13:02:11 -07:00
Wu Gao
c61878cf42 qcacld-3.0: Send mgmt frame with NULL channel
It won't send mgmt frame with NULL channel information currently,
which is different to other branches. Add this change because up layer
pass NULL channel information when tx mgmt frame in some platform.

Change-Id: I689d64789187fe0df03ed57ef0ff10c5157aeeb6
CRs-Fixed: 2459485
2019-06-03 21:03:29 -07:00
Bala Venkatesh
9bb9c05e83 qcacld-3.0: Pass psoc instead of vdev for teardown links
As part of start_ap or connect_start to teardown active tdls peers
hdd_notify_teardown_tdls_links is called with argument vdev. But
TDLS might not be enabled on that vdev. With recent changes,
osif_priv object is initialized as part of tdls_vdev_init.
For the new interface if TDLS is not initialized then osif_priv
object will not be found and TDLS peers are not removed.

Change-Id: Idcf690bba2766664700a4851d390ee620f2fe73a
CRs-Fixed: 2460108
2019-06-03 02:26:54 -07:00
Paul Zhang
3718567245 qcacld-3.0: Implement api for interop issues ap
Implement the interface to transfer the info between
host driver and firmware about the ap which has interop
issues with the DUT. It is detected by firmware and
forwarded to user sapce for persistent storage. And
user space configs these APs to firmware when the DUT
starts up next time.

CRs-Fixed: 2425202
Change-Id: I2e828d521f0e04862a01fa1c90626f51b7f65796
2019-05-24 16:00:44 -07:00
Arun Kumar Khandavalli
43fdd25d72 qcacld-3.0: Move allocation of tdls private to tdls component
Presently osif tdls memory is freed as part of the osif_priv
when the vdev is logically destroyed. There is case seen
wherein the  tdls is holding vdev reference and in the other
thread the  interface down is received and the osif_priv is
freed resulting in the tdls osif priv also, if the other thread
tries to dereference the tdls os priv it will result
null pointer exception.

Move the tdls osif priv memory creation/deletion to the tdls component.

Change-Id: I3782f6304bee5a6eaab4d9122a569ba56fd29947
CRs-Fixed: 2436379
2019-05-14 13:03:08 -07:00
Wu Gao
18e788a176 qcacld-3.0: Update rssi when get all tdls peers
It doesn't update rssi of tdls peers. So add logic to update it when
get all tdls peers.

Change-Id: I81d4536b5cb2443b088ee4a5d425d548eac152d6
CRs-Fixed: 2435903
2019-04-29 04:17:25 -07:00
Rajeev Kumar
60a34715cf qcacld-3.0: Move os_if psoc locking inside when doing psoc trans wait
Since os_if_psoc_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_psoc_sync_lock(a spin lock bh) inside sync calback API for psoc
look up such that spin lock is not held before starting the wait on
event. os_if_psoc_sync lock is for psoc look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I0537604337a6b594be3e7dc34dc97b79d5987ad4
CRs-Fixed: 2433409
2019-04-12 05:19:54 -07:00
Rajeev Kumar
0118dc9cc9 qcacld-3.0: Move os_if vdev lock inside when doing vdev trans wait
Since os_if_vdev_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_vdev_sync_lock(a spin lock bh) inside sync calback API for vdev
look up such that spin lock is not held before starting the wait on
event. os_if_vdev_sync lock is for vdev look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I2cca560aeed9b79648168a09f596dbaa374ecbb5
CRs-Fixed: 2433829
2019-04-11 22:09:32 -07:00
Rajeev Kumar
70d2e56aae qcacld-3.0: Move os_if driver lock inside when doing driver trans wait
Since os_if_driver_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_driver_sync_lock(a spin lock bh) inside sync calback API for driver
look up such that spin lock is not held before starting the wait on
event. os_if_driver_sync lock is for driver look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I32c582bedbbee81d3a5b171666fc3009c3dc7e5a
CRs-Fixed: 2433825
2019-04-11 22:09:28 -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
Dustin Brown
2a1755db02 qcacld-3.0: Add osif_sync high level documentation
While the concepts of osif_sync started out as a simple set of APIs, it
ultimately evolved into its own full-fledge code module. While the
per-function documenation is present, high-level documentation for the
osif_sync code module as a whole was over looked. Add a high-level
description of the purpose of osif_sync in osif_sync.h

Change-Id: I42cd28673b500c85ecf95de4b507b677804892ba
CRs-Fixed: 2421801
2019-03-25 12:39:26 -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
Dustin Brown
265e82b4d0 qcacld-3.0: Register for qdf_op_protect/unprotect
As a step towards removing qdf_ssr_protect, register for the
replacement APIs, qdf_op_protect/unprotect.

Change-Id: Ica5802082b3be51f47bdf4ae0eb132b80c29b08a
CRs-Fixed: 2418432
2019-03-21 21:20:14 -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
Bala Venkatesh
4f9ba364ed qcacld-3.0: Trim operation classes to max supported in change station
Operation classes supported can be controlled by user, which can
be sent greater than the max supported operations. This results
in stack overflow in change station command.
Add check to validate operations supported param given by user
and if it exceeds max supported value, set it to max supported
value.

CRs-Fixed: 2002052
Change-Id: Idd3a35e38b091546a17d7ec6329f19429e5c289c
2019-03-05 14:23:35 -08: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
c1d81af5c6 qcacld-3.0: Migrate driver transitions to osif_driver_sync
With the recent addition of osif_driver_sync APIs, DSC use is abstracted
behind a common interface. Migrate HDD to the new interface by updating
driver transitions to use the new APIs.

Change-Id: I394f007dd5485cd8d22aee84af74f8854ed54bb6
CRs-Fixed: 2408211
2019-03-02 13:31:32 -08:00
Dustin Brown
60c206456f qcacld-3.0: Add osif_driver_sync APIs
To bring OSIF driver synchronization in line with recent VDEV and PSOC
enhancements, add osif_driver_sync APIs. These allow for atomically
acquiring the driver synchronization context, and protecting various
call flows via DSC primitives.

Change-Id: Iba8df54bb1a3894118adf3daf1d0de8a554284ae
CRs-Fixed: 2408210
2019-03-02 13:31:26 -08:00
Bala Venkatesh
2ee149738c qcacld-3.0: Remove vdev chk_frame structure
Chk frame member of the tdls_mgmt_req is declared locally inside of
the local function wlan_cfg80211_tdls_mgmt and address is copied
in the mgmt request, and posted to scheduler thread.
But, the validity of the chk frame variable is lost once returned
from the wlan_cfg80211_tdls_mgmt function. And the chk_frame
is used when processing the tdls_mgmt_req in scheduler thread.
And the stale data of chk_frame can be used.

Hence, make the chk_frame as a variable instead pointer inside
tdls_action_frame_request request.

Change-Id: Ib2a8a81e8f6db5550b1d0abee31d9f7ea5dacd9b
CRs-Fixed: 2402124
2019-03-02 05:12:42 -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
Jeff Johnson
2de587987d qcacld-3.0: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
switch to exclusively using the FEATURE_WLAN_TDLS feature flag since
that more accurately describes the code being protected.

Change-Id: I2cdb4c6ddba22c5b1d29e87403e5e1c87ce5cbfe
CRs-Fixed: 2395728
2019-02-20 09:09:34 -08:00
Jeff Johnson
74c6bb25ba qcacld-3.0: Conditionally build TDLS component
Currently the TDLS component code is unconditionally built which will
bloat images where TDLS is not required. Fix this by only building the
TDLS component when the TDLS feature is enabled.

Change-Id: I7496b8f07ed495b00e62fc3cf50a96e1829d9341
CRs-Fixed: 2399966
2019-02-16 21:28:39 -08:00
Dustin Brown
93bdff328c qcacld-3.0: Remove qdf_util.h from osif_sync
Now that qdf_status_to_os_return() has moved to qdf_status.h in
Iaa2efa5f662be014a61a8490c3fab411ec0f2054, remove references to
qdf_util.h from osif_sync.

Change-Id: I42e70c8ac1a29ebba6d00994a12b96076684c403
CRs-Fixed: 2397508
2019-02-15 13:10:01 -08:00
Dustin Brown
2c5e0480c0 qcacld-3.0: Rename hdd_vdev_sync to osif_vdev_sync
Change I556e9d2833edd2bd26266496b6000347649c5fbe moved hdd_dsc to osif,
but retained the existing naming. Rename hdd_vdev_sync to a more
appropriate osif_vdev_sync, and address any remaining naming problems.

Change-Id: Ic0983a79b09254b1615a348fe540f1dc0121baff
CRs-Fixed: 2396514
2019-02-12 04:47:24 -08:00
Dustin Brown
363b479eb4 qcacld-3.0: Rename hdd_psoc_sync to osif_psoc_sync
Change I556e9d2833edd2bd26266496b6000347649c5fbe moved hdd_dsc to osif,
but retained the existing naming. Rename hdd_psoc_sync to a more
appropriate osif_psoc_sync.

Change-Id: Ic877c0d4efc7e74426c048c440a49f72ee1b5b0f
CRs-Fixed: 2396513
2019-02-11 23:58:19 -08:00
Dustin Brown
6412d1f9cc qcacld-3.0: Move hdd_dsc to osif/sync
Move the contents of hdd_dsc to the new files added in osif/sync as part
of Ica94d32028d10d344294d6cc12d91a06efe1ab6c.

Change-Id: I556e9d2833edd2bd26266496b6000347649c5fbe
CRs-Fixed: 2396512
2019-02-11 23:58:12 -08:00
Dustin Brown
a17cacefdd qcacld-3.0: Add file structure for osif_sync
To better align with current organizational recommendations and allow
API use by os_if/nan, begin moving hdd_*_sync APIs to os_if. In step
one, create the new osif_sync file structure.

Change-Id: Ica94d32028d10d344294d6cc12d91a06efe1ab6c
CRs-Fixed: 2396511
2019-02-11 23:58:05 -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
hangtian
44b1743568 qcacld-3.0: Use status value 0 stands for tdls_mgmt success
Use status value 0 stands for tdls_mgmt success.

Change-Id: I64834f7beaf2a58fd544d4ff5501aac6e7e5b5c7
CRs-Fixed: 2377881
2019-01-14 17:32:33 -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
Wu Gao
637d58a4c1 qcacld-3.0: Enable P2P component in CLD
P2P component related files moved from hostcmn to CLD, this change
adds initial functions, enables P2P in Kbuild.

Change-Id: I04102a5f3e59ded13ada15b1b417ae81c7a10e90
CRs-Fixed: 2361500
2018-12-11 17:25:51 -08:00
Linux Build Service Account
2954fcd110 Merge branch 'wlan-cmn.driver.lnx.2.0' of ../os/qca-wifi-host-cmn into HEAD 2018-12-04 16:14:25 +05:30
Linux Build Service Account
ec542fe9bd Move to os_if/tdls
Change-Id: I4f48da96ff9e3d726cffd4f1795657c9ada2429e
2018-12-04 16:14:01 +05:30
Linux Build Service Account
8b821af056 Merge branch 'wlan-cmn.driver.lnx.2.0' of ../os/qca-wifi-host-cmn into HEAD 2018-12-04 16:06:49 +05:30
Linux Build Service Account
09afffa36f Move to os_if/p2p
Change-Id: I08c7707a4a1acc4caa1842acd21e2104ddbd084a
2018-12-04 16:04:42 +05:30
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