Commit Graph

35 Commits

Author SHA1 Message Date
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
cbc6c3b8d1 qcacld-3.0: Process NAN enable/disable synchronously
In the current implementation, NAN enable and disable request are
processed asynchronously, because of which some race conditions
are seen.
	Example: If NDI is having multiple NDPs and without terminating
	NDPs if NAN disable and NDI delete are issued back to back then,
	NDP_END sequence is not initiated and causing deviation from
	NAN spec. Root-cause is firmware deleting NDP peer as a part of
	NDI delete before initiating NDP end sequence.

To fix this, process NAN enable and disable requests synchronously.

Change-Id: I467419370187b0dc8d879e1806347c9f21ebb23a
CRs-Fixed: 2528599
2019-10-24 16:03:42 -07:00
Manikandan Mohan
282c4b6f66 qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:

policy_mgr_allow_concurrency
policy_mgr_nan_sap_pre_enable_conc_check
policy_mgr_allow_concurrency_csa
policy_mgr_current_connections_update
policy_mgr_incr_connection_count_utfw
policy_mgr_update_connection_info_utfw
policy_mgr_get_channel_from_scan_result
policy_mgr_update_and_wait_for_connection_update
policy_mgr_get_sap_mandatory_channel
policy_mgr_checkn_update_hw_mode_single_mac_mode

Change-Id: I162c2b90a58539194907c5ecd6915eafecc635cc
CRs-fixed: 2545099
2019-10-22 18:09:25 -07:00
Sourav Mohapatra
4c9b82aaf6 qcacld-3.0: Fix compilation error in case NAN is disabled
Currently the function ucfg_nan_get_ndi_state is not defined for the
case WLAN_FEATURE_NAN is not defined. As this is a public function
defined in dispatcher/inc/ and can be used externally, there would be a
compilation failure on such cases.

Resolve the failure by declaring ucfg_nan_get_ndi_state as static in the
case WLAN_FEATURE_NAN is not enabled.

Change-Id: I30297e8a3781f9a529c40a1423a9d2613c286f4e
CRs-Fixed: 2548223
2019-10-19 06:48:58 -07:00
Manikandan Mohan
cf5048294b qcacld-3.0: Disallow TDLS when NAN is active
Since NAN has higher priority over TDLS, disallow TDLS link
when NAN is active.

Change-Id: I7de34dbb2f808c36358ac5266c26e2729b901941
CRs-fixed: 2537158
2019-10-14 05:47:03 -07:00
Sourav Mohapatra
3f02b6a70d qcacld-3.0: Add ini support for NDP inactivity timeout
Add an ini configuration that configures the inactivity timeout for NDP
peer. The value is sent to the firmware via the VDEV param
WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT.

Change-Id: Ifffe6bb40df94761d739463cf7e54a0be7e2a375
CRs-Fixed: 2531756
2019-09-20 23:36:09 -07:00
Manikandan Mohan
a440567c76 qcacld-3.0: Disable NDPs on SAP startup
NAN_NDP+SAP concurrency is not supported. Disable all NAN_NDP
sessions on SAP startup.

Change-Id: I73284ef4f820dd15df808b9c44da5f09c6b5db26
CRs-fixed: 2524112
2019-09-18 04:18:33 -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
Abhishek Singh
682cf6f843 qcacld-3.0: Fix WMI timeout for runtime PM
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.

Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
2019-08-20 22:53:50 -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
4e66c9a73a qcacld-3.0: Move NAN cfg params init to PSOC open
NAN config param initialization from CFG component is done
during PSOC object created notification. But as per component
design it must be done at psoc open to avoid CFG component
not initialized case. Thus update nan component to reorganize
NAN cfg params init.

Change-Id: I9636b527b796202e55a57c28d604795a705de026
CRs-fixed: 2489286
2019-07-29 20:10:58 -07:00
Rajeev Kumar Sirasanagandla
fa4e43888b qcacld-3.0: Add NULL check for nan private objects
In ndi_remove_and_update_primary_connection() of NAN component,
add missing NULL checks for psoc and vdev NAN private objects
to avoid possible NULL dereference.

Change-Id: Iff3e248259ab67628d081d30f16d1822a0ea6dcb
CRs-Fixed: 2423991
2019-06-14 07:40:54 -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
sheenam monga
4a3f34138c qcacld-3.0: Fix uninitialized subtype usage by policy manager
Currently, Updation of vdev related parameters
policy_mgr_vdev_entry_info is conditional. Conditional
updation can cause uninitialized usage of subtype of
policy_mgr_vdev_entry_info by policy manager to get concurrency
mode.

Fix is to initialize policy_mgr_vdev_entry_info with zero.

Change-Id: If1350bd66705defdea2e69d559de0a6578acde02
CRs-Fixed: 2423871
2019-05-01 16:21:03 -07:00
Manikandan Mohan
a1f29a9bfe qcacld-3.0: NAN component updates for SAP concurrency
Add NAN+SAP concurrency related changes to NAN component. This
handles NAN discovery and SAP SCC design constraint.

Change-Id: Ief0d6735d9f011eb3bac22d813b2d2ef41f3fe7c
CRs-fixed: 2431539
2019-04-11 01:13:13 -07:00
Nachiket Kukade
413c5fa36e qcacld-3.0: Add policy mgr changes to support NDI concurrencies
If Firmware supports NDI DBS mode, driver can support NDI
concurrency along with NAN and STA type connecitons. Use
Policy Manager API's to add support for these concurrencies.

Add policy mgr related changes to support NDI concurrencies.

Change-Id: If272be34606c0897d0b145c602b4bc2ba4462cb0
CRs-Fixed: 2384549
2019-03-12 13:58:17 -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
Rajeev Kumar Sirasanagandla
4477e7e4ae qcacld-3.0: Fix function type for sme_ser_cmd_callback
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the input argument type for sme_ser_cmd_callback().

Change-Id: I3f0b5df70163eca9282d2b1c2a48203448e4f0a6
CRs-Fixed: 2402977
2019-03-12 06:09:56 -07:00
Nachiket Kukade
15bd4f725e qcacld-3.0: Define WMA callback to update NDI conn info
Unlike other connection types, vdev start parameters for NDI
do not reflect the correct connection information for the
datapath. Once an NDP is established on NDI this info in WMA
needs to be updated accordingly. Define a WMA callback and
use it after NDP confirm and NDP End to update the connection
info for NDI.

Use WMA callback for updating NDI connection info.

Change-Id: Iefb515a751bd3fb5e10610d191bdadaf3a01f59a
CRs-Fixed: 2407153
2019-03-07 00:20:26 -08:00
Nachiket Kukade
6f46abc449 qcacld-3.0: Store NDP connection info in NAN's peer objects
To support NAN Datapath concurrencies driver needs to be aware
of the primary NDP connection for each NDI. If the primary
NDP has ended, driver needs to update NDI with the second NDP
if it exists. For this purpose driver needs to track the NDP
connections for every peer associated with NDI. Store and
update the primary NDP connection info in peer object for
NDP confirm, NDP End & NDP schedule update.

Store and update NDP connection info in NAN's peer objects.

Change-Id: I7d2c8c513beceebf155596bfa73841a834d9a97a
CRs-Fixed: 2406402
2019-03-06 22:43:26 -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
Ajit Pal Singh
a70e315601 qcacld-3.0: Add config option for CFG_TGT_NUM_MSDU_DESC
Add driver config option for CFG_TGT_NUM_MSDU_DESC

Change-Id: I9c738de779d03819e6920e9d3e260ec3d1fbd524
CRs-Fixed: 2390958
2019-03-02 13:31: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
Abhishek Singh
d1f21c7b0d qcacld-3.0: Refactor firmware, serialization and HDD CMD timeouts
Refactor firmware, serialization and command timeouts so that
HDD timeout are greater than serialization is greater than firmware
timeout.

The timeouts are defined considering below worst case delay in
firmware.
WMI_VDEV_START_REQUEST_CMDID	6 sec
WMI_VDEV_RESTART_REQUEST_CMDID	6 sec
WMI_VDEV_STOP_CMDID		2 sec
WMI_PEER_DELETE_CMDID		2 sec
WMI_PEER_ASSOC_CMDID		2 sec
WMI_PDEV_SET_HW_MODE_CMDID	2 sec
WMI_PDEV_SET_MAC_CONFIG_CMDID	2 sec

Change-Id: I270e980ed1cf2aee55a1fa4e88ff8ddc845a203b
CRs-Fixed: 2384389
2019-01-24 16:17:50 -08:00
Madhvapathi Sriram
3e6627a9f9 qcacld-3.0: Optimize schedule msg post error logging
Change-Id: Ieaddca5f141c99c42ed4a7c954dea2788e353640
CRs-Fixed: 2373015
2019-01-22 02:37:31 -08:00
Nachiket Kukade
0a1aea6d44 qcacld-3.0: Forward NDP Indication event for NDP initiator
Driver only forwards NDP Indication event to upper layers
after it receives the event WMI_NDP_INDICATION_EVENTID as
an NDP Responder. But while as an NDP Initiator, if the
NDP Peer sends App info through NDP Response instead of
NDP Confirm, driver receives the same event. But it does
not forward it to upper layers. As a result App info is
dropped and upper layers miss out on it.

Forward NDP Indication event to upper layers through vendor
event subtype QCA_WLAN_VENDOR_ATTR_NDP_REQUEST_IND regardless
of the NDP role of the device.

Change-Id: I63349b92426b6090e024957e70fd7f9ef97cf314
CRs-Fixed: 2375741
2019-01-09 01:28:18 -08:00
Nachiket Kukade
c1bba2f146 qcacld-3.0: Set 5GHz channel for NDI start and remove the INI
NDI Create from upper layers also does a start bss with the
channel specified with INI "gnan_datapath_ndi_channel". It
defaults to channel 6 if no value is specified. For targets
with 2x2 DBS MAC Configuration this cannot happen without
a DBS mode change. Since this channel is not indicative of
the actual NDI channel, send a 5GHz NAN Social channel for
the BSS start to avoid the DBS mode change.

Send 5GHz NAN Social channel for NDI bss start and remove
the corresponding INI.

Change-Id: I40428f5eb4071f7c1d3934c6279316aad8082c03
CRs-Fixed: 2364619
2018-12-26 01:21:13 -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
cf94160805 qcacld-3.0: Add policy mgr changes to manage NAN Discovery
Add NAN Discovery specific modes, modules that manage NAN
Discovery interface. Add cases and exceptions that manage
concurrent operations alongside NAN Discovery.

Add policy manager changes to manage NAN Discovery.

Change-Id: Ib9a10be265c14adf8d1d5f2f2e2b65aa399d6636
CRs-Fixed: 2358183
2018-12-21 12:34:38 -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
85aa3788b6 qcacld-3.0: Store the NAN target caps inside its private obj
Host will receive the NAN related service capabilities from
the SERVICE_AVAILABLE event. In the HDD callback that gets
called afterwards, set the NAN related capabilities into
the NAN's private PSOC object.

Store the NAN target capabilities inside its private object.

Change-Id: If398b6f253613fc424b7821cfc62b0984ad34b6c
CRs-Fixed: 2356709
2018-12-18 14:29:06 -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
Nachiket Kukade
63bb63d833 qcacld-3.0: Complete the NAN component movement into CLD
NAN related OS IF, Target IF and component files have been
merged into CLD. Add Makefile changes, include correct
files, replace lmac tx/rx ops with the new ops and call
updated API's such as init/deinit.

Complete the remaining changes for moving NAN component
into CLD.

Change-Id: Idcf8816337aa49b399596ce3cdfc9cdab811d386
CRs-Fixed: 2338060
2018-12-03 15:17:59 -08:00
Linux Build Service Account
4e044cf9f5 qcacld-3.0: Merge NAN component files from CMN into CLD
NAN component is not needed in the CMN repo. To reduce the
unnecessary lines of code, merge the NAN component files
from CMN into CLD with updated copyrights. Subsequently
remove these files from the CMN repo.

Merge NAN component files from CMN into CLD.

Change-Id: I63c2fb90ea517496946ea45a66bdf290af9d5a7c
2018-11-15 19:12:32 +05:30