qcacld-3.0: Make NAN high priority than TDLS in legacy platforms
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
This commit is contained in:

committed by
Madan Koyyalamudi

parent
1ecf6ce8d9
commit
38d541df76
@@ -888,7 +888,15 @@ fail:
|
|||||||
psoc_nan_obj->nan_social_ch_2g_freq = 0;
|
psoc_nan_obj->nan_social_ch_2g_freq = 0;
|
||||||
psoc_nan_obj->nan_social_ch_5g_freq = 0;
|
psoc_nan_obj->nan_social_ch_5g_freq = 0;
|
||||||
nan_set_discovery_state(psoc, NAN_DISC_DISABLED);
|
nan_set_discovery_state(psoc, NAN_DISC_DISABLED);
|
||||||
policy_mgr_check_n_start_opportunistic_timer(psoc);
|
if (ucfg_is_nan_dbs_supported(psoc))
|
||||||
|
policy_mgr_check_n_start_opportunistic_timer(psoc);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If FW respond with NAN enable failure, then TDLS should be enable
|
||||||
|
* again if there is TDLS connection exist earlier.
|
||||||
|
* decrement the active TDLS session.
|
||||||
|
*/
|
||||||
|
ucfg_tdls_notify_connect_failure(psoc);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
nan_conc_callback = psoc_nan_obj->cb_obj.nan_concurrency_update;
|
nan_conc_callback = psoc_nan_obj->cb_obj.nan_concurrency_update;
|
||||||
@@ -1116,7 +1124,6 @@ bool nan_is_enable_allowed(struct wlan_objmgr_psoc *psoc, uint32_t nan_ch_freq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (NAN_DISC_DISABLED == nan_get_discovery_state(psoc) &&
|
return (NAN_DISC_DISABLED == nan_get_discovery_state(psoc) &&
|
||||||
ucfg_is_nan_conc_control_supported(psoc) &&
|
|
||||||
policy_mgr_allow_concurrency(psoc, PM_NAN_DISC_MODE,
|
policy_mgr_allow_concurrency(psoc, PM_NAN_DISC_MODE,
|
||||||
nan_ch_freq, HW_MODE_20_MHZ,
|
nan_ch_freq, HW_MODE_20_MHZ,
|
||||||
0));
|
0));
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "cfg_nan.h"
|
#include "cfg_nan.h"
|
||||||
#include "wlan_mlme_api.h"
|
#include "wlan_mlme_api.h"
|
||||||
#include "cfg_nan_api.h"
|
#include "cfg_nan_api.h"
|
||||||
|
#include "wlan_tdls_ucfg_api.h"
|
||||||
|
|
||||||
struct wlan_objmgr_psoc;
|
struct wlan_objmgr_psoc;
|
||||||
struct wlan_objmgr_vdev;
|
struct wlan_objmgr_vdev;
|
||||||
@@ -880,8 +881,16 @@ post_msg:
|
|||||||
if (req_type == NAN_ENABLE_REQ) {
|
if (req_type == NAN_ENABLE_REQ) {
|
||||||
nan_set_discovery_state(psoc,
|
nan_set_discovery_state(psoc,
|
||||||
NAN_DISC_DISABLED);
|
NAN_DISC_DISABLED);
|
||||||
policy_mgr_check_n_start_opportunistic_timer(
|
if (ucfg_is_nan_dbs_supported(psoc))
|
||||||
psoc);
|
policy_mgr_check_n_start_opportunistic_timer(psoc);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If FW respond with NAN enable failure, then
|
||||||
|
* TDLS should be enable again if there is TDLS
|
||||||
|
* connection exist earlier.
|
||||||
|
* decrement the active TDLS session.
|
||||||
|
*/
|
||||||
|
ucfg_tdls_notify_connect_failure(psoc);
|
||||||
} else if (req_type == NAN_DISABLE_REQ) {
|
} else if (req_type == NAN_DISABLE_REQ) {
|
||||||
nan_disable_cleanup(psoc);
|
nan_disable_cleanup(psoc);
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
#include "wlan_utility.h"
|
#include "wlan_utility.h"
|
||||||
#include "wlan_osif_request_manager.h"
|
#include "wlan_osif_request_manager.h"
|
||||||
#include "wlan_mlme_ucfg_api.h"
|
#include "wlan_mlme_ucfg_api.h"
|
||||||
|
#include "wlan_tdls_ucfg_api.h"
|
||||||
|
|
||||||
#define NAN_CMD_MAX_SIZE 2048
|
#define NAN_CMD_MAX_SIZE 2048
|
||||||
|
|
||||||
@@ -2746,15 +2747,15 @@ int os_if_process_nan_req(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If target does not support NAN DBS, send request with type GENERIC.
|
* If target does not support NAN DBS, stop the opportunistic timer.
|
||||||
* These will be treated as passthrough by the driver. This is to make
|
* Opportunistic timer gets triggered as soon as a DBS use case is
|
||||||
* sure that HW mode is not set to DBS by NAN Enable request. NAN state
|
* completed and hw_mode would be set to SMM when the timer(5 seconds)
|
||||||
* machine will remain unaffected in this case.
|
* expires.
|
||||||
|
* This is to make sure that HW mode is not set to DBS by NAN Enable
|
||||||
|
* request. NAN state machine will remain unaffected in this case.
|
||||||
*/
|
*/
|
||||||
if (!NAN_CONCURRENCY_SUPPORTED(psoc)) {
|
if (!NAN_CONCURRENCY_SUPPORTED(psoc))
|
||||||
policy_mgr_check_and_stop_opportunistic_timer(psoc, vdev_id);
|
policy_mgr_check_and_stop_opportunistic_timer(psoc, vdev_id);
|
||||||
return os_if_nan_generic_req(psoc, tb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send all requests other than Enable/Disable as type GENERIC.
|
* Send all requests other than Enable/Disable as type GENERIC.
|
||||||
|
Reference in New Issue
Block a user