Commit Graph

71 Commits

Author SHA1 Message Date
Srinivas Dasari
7586ee3a5e qcacld-3.0: Send NAN disable indication to userspace upon SSR
Currently, host driver sends NAN disable request to firmware and
firmware sends NAN disable indication as a response. Host driver
forwards this indication to framework. But when SSR happens,
driver needs to send this NAN disable indication to framework
as firmware lost the NAN context. This allows framework to
initiate NAN again. Send the NAN disable indication with success
status code to framework after recovery.

Change-Id: Ic2139e159f0c1d9c1fb5c39597ce18e0787e809b
CRs-Fixed: 2735047
2020-07-22 11:55:24 -07:00
Gururaj Pandurangi
7792f58388 qcacld-3.0: Enable NAN and NAN datapath by default
The NAN configs gEnableNanSupport and genable_nan_datapath
are being removed from ini config file. So, enable them by
default in .h file.

Change-Id: Ibc1e91e6d010994b5e1419b2241f846e0fde8969
CRs-Fixed: 2710133
2020-07-20 21:54:09 -07:00
Srinivas Dasari
440a823073 qcacld-3.0: Update policy mgr table if nan_conc control is supported
Currently, policy mgr table entries correspond to NAN/NDI are
updated only if nan_dbs is supported. Update/access the
policy mgr table even when nan_conc_control is supported by host.
This allows the host to take care of NAN cuncurrencies through
policy mgr on the non-DBS platforms.
Process NAN enable request in host if nan_conc_control is
supported, which updates the NAN entry to policy mgr table.

Change-Id: Id6e58a9bfde6ceb66a8a0b33136880f75e36090f
CRs-Fixed: 2729995
2020-07-12 07:31:19 -07:00
Srinivas Dasari
8e493f081d qcacld-3.0: Handle SAP+NAN concurrency when NAN_DBS isn't supported
When nan_sap and nan_disable are supported but nan_dbs is not
supported,
1. Allow SAP+NAN concurrency if force SCC is supported
2. Disable NAN if SAP comes up on a different band and force SCC is
   not supported
3. Reject NAN enable if SAP is already on a different band and force SCC is
   not supported

Change-Id: Ic53eedcda2e5b314f9be2a4bd913d5e63f6613a2
CRs-Fixed: 2729986
2020-07-11 22:39:29 -07:00
Srinivas Dasari
d296457502 qcacld-3.0: Rename nan_disable_support to nan_conc_controlled_by_host
nan_disable_support is the firmware capability to allow host to
disable NAN. So that host can disable NAN in any unsupported
concurrencies. This was actually introduced to handle
NAN concurrencies. Rename the capability flag and corresponding
APIs across host driver to resemble the functionality.

Change-Id: I24805194fdb855040bcc518acc96459ee7cb5128
CRs-Fixed: 2729984
2020-07-11 20:32:22 -07:00
Srinivas Dasari
c2b4e154f3 qcacld-3.0: Ini bitmap to enable/disable a particular NAN feature
NAN protocol runs in firmware and controlled by framework.
Framework configures multiple NAN discovery params while enabling
NAN. Framework configurations would be based on the framework
constraints or realtime scenarios like resource(memory/power/..)
consumption. But some of these params might need to be controlled
explicitly based on the usage.
NAN DW is one such parameter, which is configured as 4 seconds
when the device is in sync role and the screen is off. But
for some usecases, this param might have to be 512ms always
irrespective of screen off/on for some targets. Add an ini param
"nan_feature_config" to set a bit to indicate firmware whether to
honor framework configured DW value or the firmware default value.
Send the vdev param on NAN supported vdev by setting the "bit 0"
to indicate firmware to allow framework configured DW value.
If this bit is not set, firmware shall consider its default value.

Change-Id: I0476bca2bbe676beccfff207f5b4ea31e89031e2
CRs-Fixed: 2721970
2020-07-08 18:55:48 -07:00
Srinivas Dasari
2586d8f598 qcacld-3.0: cleanup NAN state upon NAN enable/disable timeout
Currently, driver sends NAN enable/disable request to firmware
and waits for the response. NAN state is cleaned up when NAN
disable indication is received. But if firmware doesn't respond to
NAN enable or disable request, a timeout happens and NAN state is
not cleaned up.
Cleanup the NAN state upon timeout for NAN enable/disable request.

Change-Id: Iadfff2b4d010407f04b529ff81b1ce1f11064695
CRs-Fixed: 2723094
2020-07-02 18:23:16 -07:00
Srinivas Dasari
662a62841c qcacld-3.0: Don't create wifi-aware0 interface if NAN is not supported
Currently, NAN discovery interface(wifi-aware0) is created if both
host and firmware support NAN separate vdev feature. But NAN
feature capability(gEnableNanSupport) is the master of these
capabilities. Don't create wifi-aware0 if gEnableNanSupport is
disabled.
Also, don't allow NAN iface creation for the kernels less
than 4.14 as NAN interface is allowed by kernel only from 4.14.

Change-Id: Iaf10974c373b2a77d2c24a78540910f78a3dc768
CRs-Fixed: 2706997
2020-06-10 18:13:36 -07:00
Abhishek Ambure
9e3400ac77 qcacld-3.0: Add support to configure max ndi host supports
Introduce INI "ndi_max_support" to configure max number of ndi
interfaces host supports. Host configures max number of ndi
interfaces support in firmware using WMI_INIT_CMD.

Change-Id: I287b9f96b98103e67cf35d0c02488a28af731044
CRs-Fixed: 2701557
2020-06-10 07:25:54 -07:00
Ashish Kumar Dhanotiya
9f588185d9 qcacld-3.0: Add connect id for the connection manager
Add connect id in the policy manager for the newly designed
connection manager infrastructure.

Change-Id: Ib7bd08e5326ead04da88175636777bf5dd4e255b
CRs-FIxed: 2705700
2020-06-09 14:30:38 -07:00
Abhishek Ambure
a6afc073d0 qcacld-3.0: Add ini support to configure max ndp sessions in fw
Introduce INI "ndp_max_sessions" to configure max number of ndp
sessions host supports. Firmware advertises max number of ndp
sessions supported in wmi_service_ready_ext2 event. If the firmware
advertises non-zero value of max ndp sessions then host configures
max ndp sessions support in firmware using WMI_INIT_CMD.

Host uses a minimum of "ndp_max_sessions" value and firmware
advertised max ndp session value to configure max number of ndp
sessions in firmware.

Change-Id: I613815f384f9b0a61711324c85ecfa095d133360
CRs-Fixed: 2673120
2020-06-08 16:00:50 -07:00
Lincoln Tran
aa5716f95f qcacld-3.0: Update nan_discovery_flush_callback
Update return type of nan_discovery_flush_callback to return
QDF_STATUS to match scheduler_msg_process_fn_t.

Change-Id: I3a2c32beaff471ed3a2e8e3956292257e074cd50
CRs-fixed: 2698305
2020-06-01 23:13:23 -07:00
Srinivas Dasari
9484e68614 qcacld-3.0: Don't limit the max NDPs with a peer in host
Currently, host allows maximum MAX_NDP_INSTANCES_PER_PEER(2) NDPs
per peer. Framework may need more NDPs with the same peer when
multiple NDP applications are running. Firmware shall allow/reject
an NDP based on the max number of NDP connections allowed per peer.
It's platform specific and firmware shall take care of it.
Remove the check in host which limits this.

Change-Id: Ic43f6e2588a8ed8ffd7c8bb87d9b5656352e5cf7
CRs-Fixed: 2684987
2020-05-21 14:13:36 -07:00
Srinivas Dasari
f2f38a5e89 qcacld-3.0: Add a log to print nan separate vdev capa of host and fw
Currently, there is no log to identify whether the firmware doesn't
support NAN separate vdev or it's disabled through the ini param
nan_separate_iface_support. Add a log to print the firmware
and host capabilities when either of these is not supported.

Change-Id: I76ad6e192b7b7fc07c106f652df947767f7b4578
CRs-Fixed: 2684544
2020-05-13 08:37:28 -07:00
Srinivas Dasari
632c058365 qcacld-3.0: Send NDI del rsp in NAN_DATA_DISCONNECTED_STATE state
NDI delete response is sent to userspace only when NDI is in
NAN_DATA_NDI_DELETING_STATE state. But NDI could be in
NAN_DATA_DISCONNECTED_STATE state if cleanup happens through
NDP_END_ALL path. Driver doesn't send response to userspace in
this case.
Send the response to userspace in NAN_DATA_DISCONNECTED_STATE also
as the application might be waiting for NDI delete status.
Also, use set/get APIs and avoid accessing NDI state directly.

Change-Id: I81a6b19a77144c76dde145f126c45b2ca67ff093
CRs-Fixed: 2679581
2020-05-09 00:56:50 -07:00
Srinivas Dasari
9a0ed3383c qcacld-3.0: Delete all NDP peers when NDI is removed
When NDI is removed from framework, driver deletes all NDPs
as part of eWNI_SME_STOP_BSS_REQ. Driver posts WMA_DELETE_STA_RSP
to lim from wma just after sending PEER_DELETE request to
firmware for NDP and ignores the DEL_STA response from firmware.
If there are multiple peers, all peer delete requests are sent
back to back to firmware. NDI peer delete and NDI VDEV delete
request also follow these immediately. All these commands
can go back to back to firmware as driver doesn't wait for
any of these responses.
But firmware needs some time to send NDP end frame to
the NDP peer after receiving NDP peer delete. Firmware might hold
the NDP peer delete request till it successfully sends the frame
to the peer.
Driver must wait till the NDP peer delete response is received to
proceed further with NDI cleanup/NDI vdev delete.
So, send NDP_END_ALL to firmware to let the firmware
initiate cleanup for all NDP peers. Use ucfg_nan_disable_ndi to
do the same which takes care of waiting for response from firmware
indicating cleanup has started. Then wait for all NDP END
indications and unblock the wait upon receiving last NDP END
indication.

Change-Id: I250883b3e9759ad903c3ce17f8c2c0b74a81f496
CRs-Fixed: 2619757
2020-04-27 19:51:08 -07:00
Srinivas Dasari
8e652c0e58 qcacld-3.0: Remove NDP_END_ALL request from serialization queue
Currently NDP_END_ALL request is posted to serialization queue but
not removed even after getting response from firmware. The timer
expires after 4 seconds and the message is gets dequeued as part
of timer handler. Dequeue the request from queue after getting
NDP_HOST_UPDATE from firmware to avoid blocking the northbound
APIs for this 4 seconds.

Change-Id: Ie8045f2460f7ac27732d4070ed79e5a61aab0bd2
CRs-Fixed: 2662869
2020-04-24 23:44:18 -07:00
Abhishek Ambure
79c5436094 qcacld-3.0: Increase max ndp instances per peer to 2
To allow multiple instances of NDP on single peer, limit of max ndp
instances per peer set to 2.

Thus termination of first NDP instance will not affect second NDP
connection.

Change-Id: I421b185bd344688630dbe02e97f0b047d8823abe
CRs-Fixed: 2654713
2020-04-18 19:19:10 -07:00
Srinivas Dasari
11c907f867 qcacld-3.0: Consider host and firmware capa for NAN separate vdev
Firmware advertises the NAN separate vdev capability through
the service capability wmi_service_nan_vdev and host advertises
through the ini param nan_separate_iface_support. Both of the
capabilities must be checked to support the NAN separate vdev
support. Define an API to check both the capabilities and made
the individual capability APIs static. So that individual APIs
are not accessed outside this common API. Use this API to
know the support. This is to avoid any possible misses in
checking the support.
For example, NAN vdev id is fetched from the NAN enable
response message received from firmware only based on
firmware capability in nan_handle_enable_rsp. If firmware
supports the feature and ini is set to 0, then vdev id might
be invalid as it's fetched from the NAN enable response
without considering host capability. If either firmware or
host doesn't support NAN separate vdev feature, firmware
creates vdev and it may not fill the vdev id in NAN enable
response. Host shall use NAN_PSEUDO_VDEV_ID then.
So, consider NAN separate vdev feature as supported only if
both host and firmware support.
Also fetch the firmware capability to support NAN separate vdev
when wma_rx_service_ready_ext_event is received and update to NAN
psoc priv object.

Change-Id: I50e76fbe17befb28a5262fc26f5675b67f4d21f2
CRs-Fixed: 2650354
2020-04-17 17:24:13 -07:00
gaurank kathpalia
82511bc630 qcacld-3.0: Add support for STA+NAN+NDI+NDI
Add support for four port concurrency for
STA+NAN discovery + NDI + NDI.

Change-Id: I7d6d3f482a61bef7f3d0a31eee3fdfe5e5e9d879
CRs-Fixed: 2633982
2020-04-01 10:46:22 -07:00
Srinivas Dasari
491ae1e5f7 qcacld-3.0: Unblock wait for NDP_END indcation if req is a failure
When host driver sends NDP_END request to firmware, driver starts
a wait-for-complete and waits for the NDP_END confirm event.
It unblocks the wait upon getting successful NDP_END event from
firmware. But firmware sends response with a failure status if
the NDP is already gone and it doesn't send NDP_END event.
NDP_END requester waits till the timeout(2 seconds) happens for the
NDP_END confirm event from firmware in this case. Unblock the
wait-for-complete in this case also to avoid the unnecessary wait.

Change-Id: I779248455b07cd934ceaf2c23e79f3943aff5e41
CRs-Fixed: 2651663
2020-03-29 17:38:13 -07:00
Srinivas Dasari
5ab63299b9 qcacld-3.0: cleanup NAN/NDP logging
Few NAN/NDP logs are redundant in the current logging infra.
Optimize the same and add few necessary logs.

Change-Id: Ie261db317af48955a16269539948ff1596c4bbcb
CRs-Fixed: 2644418
2020-03-19 20:41:40 -07:00
Abhishek Ambure
48b790c62d qcacld-3.0: Add INI support to disable STA roaming
Use INI "sta_disable_roam" to disable roaming on STA interface if
connection on other interfaces ex. p2p, ndp comes up. Each bit of
the INI "sta_disable_roam" represents an interface.
ex. LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
    LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)

As INI "sta_disable_roam" is generic for all the interfaces, cleanup
for INI "p2p_disable_roam" done.

Change-Id: Icd05a97c640ca07978d9960a33de036ed6fe38df
CRs-Fixed: 2637555
2020-03-13 19:22:14 -07:00
gaurank kathpalia
f3d64f7ffa qcacld-3.0: Add support for NAN msg in kmsg
Add support for the following NAN messages in kmsg:-
1. NAN enable status
2. NAN, NDP match events
3. NDP channel info.
etc.

Change-Id: Icbf8f4ed05a7bd181a076d526dd2e01d70be6b05
CRs-Fixed: 2618835
2020-02-20 01:08:01 -08:00
Srinivas Dasari
62bb6191b1 qcacld-3.0: Wait for NDP_END indication from firmware
When application issues NDP end to terminate an NDP connection,
host driver sends a request to the firmware and firmware
terminates the NDP by sending NDP end frame to the peer.
Currently, driver returns immediately after posting request to
the firmware. Application might issue NDI delete immediately
after returning from NDP_END request.
But firmware might take some time to complete the NDP termination
and send NDP_END indication to driver.
When driver tries to delete the NDI before receiving NDP_END
indication from firmware, it causes inconsistency in firmware as
the NDI on which the NDP is parked is freed.
So, wait till the NDP_END indication comes from
firmware(or timeout happens) before returning from ndp_end request
context.

Change-Id: Ied7ed36451ef007e38f67d48c54290b9dd674f54
CRs-Fixed: 2616018
2020-02-10 13:32:36 -08:00
Ashish Kumar Dhanotiya
b3ae646bf2 qcacld-3.0: Add support for the NAN config items
Currently there is no inis for NAN component:
1. To configure the keep alive period for the
NDI interface.
2. To enable/disable discovery of NAN cluster with
Master Preference (MP) as 0 when a new device is
enabling NAN.

Add ini support to configure above mentioned values.

Change-Id: I47b67eb89fb8849960a9f492d2909e45b96308f3
CRs-Fixed: 2617839
2020-02-10 11:58:46 -08:00
Abhinav Kumar
36b42d3545 qcacld-3.0: Make nan_separate_iface_support enable by default
Make nan_separate_iface_support feature enable by default

Change-Id: I0651a47ce68421b0108ab65295a0341cbb22393e
CRs-Fixed: 2613584
2020-02-03 06:04:40 -08:00
Abhinav Kumar
dafd2a637b qcacld-3.0: Add an ini for separate iface support for NAN
Add a new INI parameter "nan_separate_iface_support" to
indicate firmware that the host driver supports separate
interface for NAN Discovery.

Change-Id: I6fb313b02c5f3a05638e85494051fb003b2dd867
CRs-Fixed: 2612006
2020-01-31 00:57:02 -08:00
Arun Kumar Khandavalli
5aff060d8d qcacld-3.0: selectively reduce the nan logs
Selectively reduce the nan logs loglevel form info to debug.

Change-Id: Ie71e34582d22de14a49b3d07fc286d4c4caccdbd
CRs-Fixed: 2607290
2020-01-22 19:22:30 -08:00
Srinivas Dasari
c9e048e52f qcacld-3.0: Add NAN vdev_id entry to policy mgr
Firmware sends vdev id allocated for NAN discovery in NAN enable
response. Validate the same and add corresponding entry to
policy manager.

Change-Id: I5e7426c6739620e05480fb90cecdb8ff156fd4cd
CRs-Fixed: 2592021
2020-01-01 20:03:44 -08:00
Srinivas Dasari
ee454da9db qcacld-3.0: Disable NAN in stop_adapter
Framework might not disable NAN discovery explicitly in some
cases like driver unload. So disable NAN from stop_adapter to
terminate NDPs and NAN discovery properly.
Cleanup the API os_if_process_nan_disable_req() by using the
new API ucfg_disable_nan_discovery().

Change-Id: Ic2c834db44c42a44db902c93f67a887de1b6c2fb
CRs-Fixed: 2594318
2020-01-01 18:24:15 -08:00
Srinivas Dasari
4c50119c27 qcacld-3.0: Get the firmware capability NAN_VDEV_SUPPORT
Firmware advertises service capability bit NAN_VDEV_SUPPORT for
separate NAN vdev creation. This capability can be used to create
separate interface for NAN discovery and process corresponding
commands from userspace.

Change-Id: I45573c94ee2d966afc1e207c9eefc146ff43320f
CRs-Fixed: 2592019
2020-01-01 15:42:33 -08:00
Srinivas Dasari
4a32ec5220 qcacld-3.0: Allow/Disallow NDP creation in different concurrencies
Currently in case of STA+NDI+NDI concurrency, the below scenario
can occur,
1) If NDI(NDP) + NDI(NDP) exists and sta tries to connect,
   then all NDPs on 1st NDI is tear down.
2) If STA+NDI(NDPs) exist and then another NDI tries to establish
   the NDP, then it is allowed in the current driver.

Fix is to reject the 2nd NDI(NDP) if STA+NDI(NDPs) concurrency
already exist.

Change-Id: Iadf6c9e10b9cdd59ca7beaace578a52b5e5dbb0f
CRs-Fixed: 2568552
2019-12-11 17:44:33 -08:00
Manikandan Mohan
a8a0a0d00e qcacld-3.0: Decouple NDI policy mgr update from active peer count
In multiple NDP peer case NDP indication might come for these
peers before first NDI confirm is sent for first peer. This
results in not updating policy manager session for NDI and
not creating datapath TX pool. Fix this issue by using one
time init flag for NDI instead of relying on peer count.

Change-Id: I812ff9be46580f3fb2da03ae7e1c1a36d205c38f
CRs-fixed: 2573935
2019-12-09 13:55:55 -08:00
Sourav Mohapatra
fab026a99a qcacld-3.0: Send RTT capability for STA mode
Based on the ini gfine_time_meas_cap, send enable/disable value to the
firmware for STA INITIATOR/RESPONDER mode using VDEV set param.

Change-Id: Idd4142e13061cd1af992bda88d0a0b81edc42fef
CRs-Fixed: 2574050
2019-12-03 13:10:29 -08:00
Srinivas Dasari
b24bdd3f73 qcacld-3.0: Consider NAN enabling also as connection in progress
There is a race condition while handling the below scenario,
1. NAN enable request is received from framework.
2. Policy mgr opportunistic timer expired and set hw mode
   initiated to Single MAC mode in scheduler thread at
   the same time

As the opportunistic timer handler doesn't have any info if
NAN enable initiated in DBS mode, it's configuring the hw
mode to Single Mac Mode just before NAN enable request is sent
to firmware. So the NAN enable request is sent to firmware in
Single Mac Mode which is not allowed by firmware.

NAN enable/disable is also similar to connection in progress
status in case of STA. So provide NAN enable/disable status
through hdd_is_connection_in_progress() to the opportunistic
timer handler. Opportunistic timer handler restarts the timer as
connection(NAN enable/disable) is in progress.

Also set hw_mode_change_in_progress before checking the
connection progress status. This is to avoid a possible race in
the below scenario,
1. NAN-enable sets the state but scheduler thread had read the
   state just before that
2. NAN-enable read the hw_mode_change_in_progress just
   before it gets set by scheduler thread.

Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364
CRs-Fixed: 2566841
2019-12-01 17:39:45 -08: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
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