eMLSR + NAN concurrency is not supported currently, so handle it
as mentioned below
1. eMLSR+NAN: If NAN is coming up when eMLSR is active, disable
one ML link so that eMLSR gets disabled.
2. NAN+eMLSR: If eMLSR is coming up when NAN is already enabled,
disable one link so that eMLSR doesn't get enabled.
Also, cleanup the APIs to carry a generic flag to indicate that
a concurrent connection is coming up instead of mode specific flag
as there is no dependency on modes to handle concurrency.
Change-Id: I625f8b18f9d7e991922d22af53f3e8743a3727bd
CRs-Fixed: 3443900
TDLS is not supported on ML STA but it gets enabled
currently when connected with ML AP and TDLS discovery request
is sent to peer devices.
So don't allow TDLS on MLO vdev.
Change-Id: I5bb9e03a0be3f3249aa7af664666a53a67ee812d
CRs-Fixed: 3416206
Currently, driver finds PASN peer from BSSID in mgmt auth frame
and with help of this peer, it extracts the vdev_id. It uses this
vdev_id to retrieve the adapter in hdd.
But for NAN iface, there is no PASN peer and driver drops the
auth mgmt frame as no valid vdev_id available.
The NAN Cluster ID is a MAC address that takes a value from
50-6F-9A-01-00-00 to 50-6F-9A-01-FF-FF and is carried in the A3
field of some of the NAN frames.
So, to fix this, compare the first four bytes BSSID with
"50-6F-9A-01" and extract the vdev from vdev_list for NAN opmode.
Change-Id: Ie4f15549e3bd8378e362538da4d7ec49e84ad138
CRs-Fixed: 3382962
When component dependent functions calling from higher
modules or any other components, it uses ucfg APIs pattern.
Calling ucfg dependent APIs is acceptable for higher modules
like HDD, OSIF but for another components like DP to avoid
using ucfg APIs here, implementing component APIs for existing
ucfg APIs to other components like NAN, vdev_mgr in DP
component module.
Change-Id: Ia5431c7de7fc944aacf5c8a328072a8ec31e8f3f
CRs-Fixed: 3351496
Currently host sends many pdev/vdev set param
commands separately to firmware from hdd.
Combine multiple pdev/vdev set params and
send to WMI to reduce number of transactions.
Also replace target wmi pdev/vdev params with host wmi
pdev/vdev params to fix existing broken layering
violation.
Change-Id: Ib76f5bd5f582a2c67486f6773ff6fd486b3d84cf
CRs-Fixed: 3333732
The kernel-doc script identified a multitude of documentation issues
in components/nan, so fix them.
Change-Id: Ibec4c381da3088f704264d04f756d82d20613c46
CRs-Fixed: 3359549
As part of Spatial Reuse, host has to send SR Suspend and resume
events based on concurrency which is not sent in case of NAN
concurrency.
Fix is to send SR Suspend in case NAN comes up and any STA that
supports SR is already present because SR is not supported in
case of NAN concurrency. Similarly during NAN disable check
if any other vdev apart from NAN is sharing mac with STA that
supports SR and SR support on same mac is disabled then don't
send SR resume event as there is already a concurrent vdev that
will take care of SR Suspend event otherwise send SR Resume event.
Change-Id: I56a9b455dd0166bc3997f8306992e46da759e992
CRs-Fixed: 3339713
Firmware handles all NAN concurrencies in the platforms which
don't advertise the WMI service cabability
WMI_SERVICE_NAN_DISABLE_SUPPORT. Host takes care of the NAN
concurrency if the capability is advertised by firmware.
But there can be some legacy targets where firmware wants to
offload NAN+TDLS concurrency alone to the host and it takes care
of rest of the concurrencies. This is to make NAN of higher
priority and disable TDLS when NAN is active. Currently, TDLS is
of more priority than NAN and it can't change the order as it
can't disable TDLS to change the priority.
Currently, driver doesn't parse the NAN messages(even NAN enable
request) in such platforms. Parse the NAN messages and disable
TDLS upon NAN enable request. Rely on NAN state machine to
allow/disallow new TDLS requests. This needs NAN enable status.
Change-Id: Ie9c7c1cc2f1ed6328a31b93077c2928940fc3450
CRs-Fixed: 3263730
Currently, host driver sends NAN enable and disable request to
firmware and wait for its response to change the NAN state in
driver. But, when firmware is down (during SSR), driver is in
recovery state and so, timeout occurs while waiting for response.
To fix this, driver does not need to wait for NAN enable/disable
response from firmware in recovery state. It can directly take the
action and change the NAN state machine. Hence, add flag to check
the driver recovery state. If recovery is in progress, then driver
does not wait for firmware NAN enable/ disable responses.
Change-Id: I0325240cc082d8ef91d48793d3da2eea552d59cd
CRs-Fixed: 3307543
Currently in driver, NAN Data Interface can be created with
only name "aware_data" which creates dependency on interface name.
To remove the dependency, the interface is created now by name
provided by Wifi-HAL.
For this, interface is created in STA mode with name provided by
WiFi-HAl. While processing vendor cmd QCA_NL80211_VENDOR_SUBCMD_NDP,
given ifname is searched in adapter list and mode is changed to NDI.
CRs-Fixed: 3196179
Change-Id: I62dd512f8a7de4c69a53babf3112942d348bf3b6
Enabling ndi_max_support=2 is consuming 4 vdevs + 11 peers
in firmware when STA and NAN(+2 NDIs) are active. Max peers
allowed in firmware are 11 only and this ini configuration is
consuming all of them.
There is no provision/memory for new peer allocation even for
simple use cases like roaming(roaming needs a temporary peer).
Revert this change and set the ini ndi_max_support=2 in target
specific ini files if required to avoid the peer exhaust issue.
This reverts change: Id45147541dba057c2f3420adee43c7a56e3ee72b.
Change-Id: If655b63071b07e96b4e343b8e1bb65acd33be625
CRs-Fixed: 3120555
Check MLO STA + NAN + NDP concurrency support. Allow this
combination only If service cap and mlo sta presents.
Change-Id: I6fd0cae227eb8c4096444160b2450ad65dc51c30
CRs-Fixed: 3120645
Currently, the ini param "ndi_max_support" is set to 1 in the
ini definition though DUT can support maximum 2 NDIs.
Customers need to set the ini param to 2 in ini file
in order to support two NDIs. This ini param value needs
to be maintained across chipsets and android versions,
which is difficult.
Change the default value to 2 to avoid these. If any customer
needs the value to be 1, the same can be set in customer/target
specific ini files.
Change-Id: Id45147541dba057c2f3420adee43c7a56e3ee72b
CRs-Fixed: 3097045
Currently, NDP peer multicast address is derived from peer MAC address
and cached in the host. While removing the NDP peer, peer MAC address
is used to search the cached multicast address list. Because of this,
peer multicast address list is not getting freed.
To resolve this, derive peer multicast address from the peer MAC address
while clearing the cached multicast address list.
Since MAX NDP sessions are 8, allocate memory for peer multicast address
list during the NAN vdev private object allocation. This avoids the
special handling for peer multicast list in multiple error scenarios.
Change-Id: Ifbf890a4b9c8be54d84a5b57ed8f6c237ecd51ca
CRs-Fixed: 3085069
Currently, driver is depending on NS frame to be received to configure
peer multicast address for an NDP session. If there is a delay in NS
frame reception, peer multicast address list will be configured to the
FW without actual peer multicast address. Because of this, FW will drop
the NS frame from NDP peer.
To address this, derive peer multicast address from peer MAC address
and include it in multicast address list that is configured to the FW.
Change-Id: I92a575352d592b4001dc4f061e31eb7f592f8445
CRs-Fixed: 3066990
Update the concurrency policy for STA mode.
For an upcoming STA connection:
1. Disallow the 2nd STA connection if multiple STA connections are
not allowed.
2. Allow the secondary MLO link when primary link is connected.
3. Disallow ML STA when ML STA/SAP is present.
4. Disallow the 3rd STA.
5. Allow for the other cases.
Change-Id: I70c41177b7a3a9aa9cbac0aaced08c6eafca2b6d
CRs-Fixed: 3012577
Framework disables p2p before enabling NAN as P2P+NAN concurrency
is not supported. NAN operations happens through wifihal and p2p
operations happen through wpa_supplicant which are two different
userspace components. Wifihal call to enable NAN may come to host
driver before disabling p2p through wpa_supplicant. There are high
chances for p2p scan to be in running state while NAN enable is
received. Firmware NAN state machine goes to inconsistent state
and disables NAN as p2p scan is running in such cases.
So, stop the ongoing p2p scan before enabling NAN as P2P+NAN
concurrency is not supported currently.
Also, forward the pdev to NAN component inorder to iterate through
all P2P vdevs.
Change-Id: Ibe30a5ebe90514aee4f6721cdc5476570524cad8
CRs-Fixed: 3054576
TWT is supported in STA/SAP vdevs and it's allowed only in
DBS/Standalone case and not in SCC/MCC. Disable SAP TWT if
1. Concurrency occurs in SAP + NAN/NDI vdev
2. SCC/MCC occurs after CSA
Change-Id: Id1400bd5555d2f48590d7d3ad7c70162d1dd92fb
CRs-Fixed: 2942959
Currently, osif_request_alloc is done and waiting for response
after posting the message NDP_END_REQ. But this may lead to
invalid memory access if message gets processed in scheduler
thread and response also comes before the request is allocated.
Allocate the request before sending message to avoid this.
Change-Id: I88b0a8be229e779526f0f3cf184b191e00872ee8
CRs-Fixed: 2782045
Currently there is no support to enable NAN on indoor channels,
as per the new requirement add an ini support to enable NAN on
indoor channels.
Change-Id: Ia3acbc133cab4865d8ad69992e893be91439f50f
CRs-Fixed: 2943668
Currently single request context is used for NAN discovery and NDP.
If NAN disable request is sent to the FW and FW sends NDP end
indication and didn't send NAN disable indication. In this case,
wait event for NAN disable indication will be completed as part of
NDP end indication. This is because same request context is used for
both NAN discovery and NDP.
To resolve this, use separate request for NAN discovery and NDP.
Change-Id: Ic42e32c5cfd818188ca96d6cba3cbec1ed85a3ec
CRs-Fixed: 2921287
Store the NAN NDI beamform service bit in the NAN capability struct and
add API to access that value.
Change-Id: I429fc870b5287bd40855b9277d14b19574974a46
CRs-fixed: 2876730
Currently, there is no INI parameter to control NAN feature in 6GHz
frequency band. Because of this, there is no provision to disable the
NAN in 6GHz when there is no requirement.
To address this, add INI parameter to configure NAN feature in 6GHz.
Change-Id: I6b4faa8e8aa1a3df72539fed1d7ff3cc8287debd
CRs-Fixed: 2817920
Add new ini "monitor_mode_concurrency" to support this feature
and introduce policy manager api's for concurrency checks.
Change-Id: I35ee1fece0a6f9ae8fe340b0598c4a3e20b17e82
CRs-Fixed: 2814523
NDP connection will be active for keep alive period even after receiving
NDP end request. The default value for this keep alive period if 20ms.
update the default value as 14ms to reduce the wait time for connection
termination.
Change-Id: I3d09ce764846d7e535a7369d32a730907b621735
CRs-Fixed: 2802723
Set nan_feature_config default as 0 from 1 in INI to have DW interval for
NMNS mode when device goes to suspend mode.
Change-Id: Ib0044ca36cba570f51edcc0006f8e54c55d673d3
CRs-Fixed: 2776238
After sending disable request to FW, it needs some time to
communicate the frame to all NDP connected peers. Increase
the wait time from 1 second to 4 seconds.
Change-Id: Iae36fe007704600a9f29ac7b943ef22fba91b651
CRs-fixed: 2787069
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.
Change-Id: If0b9425f82f9ed793c7639c0ed09eb1f868b6d5c
CRs-Fixed: 2781932
NDPs can exist on an NDI only when the NAN discovery is active.
Currently, firmware sends NDP_END indication for all NDPs when NAN
is disabled. Host driver removes the NDI entry from the policy mgr
based on these NDP_END indications. But firmware might miss to send
the NDP_END indication in some cases though the NDPs are deleted
in firmware. This leads to stale NDI entries in the policy mgr and
it prevents STA connections as NDI+STA without NAN discovery is not
a valid concurrency.
Host driver can remove all NDPs before sending NAN disable request
to firmware to avoid this. This is a blocking call in driver and
wait for the NDP_HOST_UPDATE event from firmware. Cleanup the policy
mgr entries in timeout case as well to avoid further failures due
to unsupported concurrency.
Change-Id: I8df905b7ae4cfe5dfb5affe5b6a3fd478851a453
CRs-Fixed: 2774329
Check if NAN SRD operation is enabled in the ini
"etsi13_srd_chan_in_master_mode" and send the same to firmware
for all SRD channels.
Change-Id: I2aa8fd34c67b2061963b62a34d29c73740af3a76
CRs-Fixed: 2748455
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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