qcacld-3.0: Disconnect after roam fails in NUD fail case

Extend ini value to disconnect from current AP
if roam failure happens after the NUD failure.

Change-Id: Id764c97b5c1748b1d513d85d4063868a1c77141b
CRs-Fixed: 2622087
This commit is contained in:
gaurank kathpalia
2020-02-17 17:18:10 +05:30
committed by nshrivas
parent 8f5b9fbe84
commit 29aa34ddea
10 changed files with 34 additions and 18 deletions

View File

@@ -1251,7 +1251,7 @@
* <ini> * <ini>
* gEnableNUDTracking - Will enable or disable NUD tracking within driver * gEnableNUDTracking - Will enable or disable NUD tracking within driver
* @Min: 0 * @Min: 0
* @Max: 2 * @Max: 3
* @Default: 2 * @Default: 2
* *
* This ini is used to specify the behaviour of the driver for NUD tracking. * This ini is used to specify the behaviour of the driver for NUD tracking.
@@ -1261,7 +1261,7 @@
* the connected BSSID. * the connected BSSID.
* 2: Driver will track the NUD failures and if honoured will roam away from * 2: Driver will track the NUD failures and if honoured will roam away from
* the connected BSSID to a new BSSID to retain the data connectivity. * the connected BSSID to a new BSSID to retain the data connectivity.
* * 3: Driver will try to roam to a new AP but if roam fails, disconnect.
* Related: None * Related: None
* *
* Supported Feature: STA * Supported Feature: STA
@@ -1270,15 +1270,11 @@
* *
* <ini> * <ini>
*/ */
#define CFG_DP_ROAM_AFTER_NUD_FAIL 2
#define CFG_DP_DISCONNECT_AFTER_NUD_FAIL 1
#define CFG_DP_DISABLE_NUD_TRACKING 0
#define CFG_DP_ENABLE_NUD_TRACKING \ #define CFG_DP_ENABLE_NUD_TRACKING \
CFG_INI_UINT("gEnableNUDTracking", \ CFG_INI_UINT("gEnableNUDTracking", \
CFG_DP_DISABLE_NUD_TRACKING, \ 0, \
CFG_DP_ROAM_AFTER_NUD_FAIL, \ 3, \
CFG_DP_ROAM_AFTER_NUD_FAIL, \ 2, \
CFG_VALUE_OR_DEFAULT, "Driver NUD tracking behaviour") CFG_VALUE_OR_DEFAULT, "Driver NUD tracking behaviour")
#define CFG_DP_ENABLE_NUD_TRACKING_ALL \ #define CFG_DP_ENABLE_NUD_TRACKING_ALL \

View File

@@ -204,9 +204,7 @@ struct hdd_config {
bool enable_dp_trace; bool enable_dp_trace;
uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH]; uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
#endif #endif
#ifdef WLAN_NUD_TRACKING
uint8_t enable_nud_tracking; uint8_t enable_nud_tracking;
#endif
uint32_t operating_chan_freq; uint32_t operating_chan_freq;
uint8_t num_vdevs; uint8_t num_vdevs;
uint8_t enable_concurrent_sta[CFG_CONCURRENT_IFACE_MAX_LEN]; uint8_t enable_concurrent_sta[CFG_CONCURRENT_IFACE_MAX_LEN];

View File

@@ -853,7 +853,7 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
*/ */
sme_config->csr_config.phyMode = sme_config->csr_config.phyMode =
hdd_cfg_xlate_to_csr_phy_mode(config->dot11Mode); hdd_cfg_xlate_to_csr_phy_mode(config->dot11Mode);
sme_update_nud_config(mac_handle, config->enable_nud_tracking);
if (config->dot11Mode == eHDD_DOT11_MODE_abg || if (config->dot11Mode == eHDD_DOT11_MODE_abg ||
config->dot11Mode == eHDD_DOT11_MODE_11b || config->dot11Mode == eHDD_DOT11_MODE_11b ||
config->dot11Mode == eHDD_DOT11_MODE_11g || config->dot11Mode == eHDD_DOT11_MODE_11g ||
@@ -884,7 +884,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
&enable_dfs_scan); &enable_dfs_scan);
sme_config->csr_config.fEnableDFSChnlScan = enable_dfs_scan; sme_config->csr_config.fEnableDFSChnlScan = enable_dfs_scan;
sme_config->csr_config.Csr11dinfo.Channels.numChannels = 0; sme_config->csr_config.Csr11dinfo.Channels.numChannels = 0;
hdd_set_power_save_offload_config(hdd_ctx); hdd_set_power_save_offload_config(hdd_ctx);
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE

View File

@@ -290,7 +290,8 @@ hdd_handle_nud_fail_non_sta(struct hdd_adapter *adapter)
static bool static bool
hdd_is_roam_after_nud_enabled(struct hdd_config *config) hdd_is_roam_after_nud_enabled(struct hdd_config *config)
{ {
if (config->enable_nud_tracking == CFG_DP_ROAM_AFTER_NUD_FAIL) if (config->enable_nud_tracking == ROAM_AFTER_NUD_FAIL ||
config->enable_nud_tracking == DISCONNECT_AFTER_ROAM_FAIL)
return true; return true;
return false; return false;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -761,6 +761,7 @@ struct mac_context {
struct wlan_mlme_chain_cfg fw_chain_cfg; struct wlan_mlme_chain_cfg fw_chain_cfg;
struct wlan_mlme_cfg *mlme_cfg; struct wlan_mlme_cfg *mlme_cfg;
tAniSirLim lim; tAniSirLim lim;
uint8_t nud_fail_behaviour;
struct sch_context sch; struct sch_context sch;
tAniSirSys sys; tAniSirSys sys;

View File

@@ -4429,6 +4429,11 @@ struct sir_sme_ext_cng_chan_req {
uint8_t vdev_id; uint8_t vdev_id;
}; };
#define IGNORE_NUD_FAIL 0
#define DISCONNECT_AFTER_NUD_FAIL 1
#define ROAM_AFTER_NUD_FAIL 2
#define DISCONNECT_AFTER_ROAM_FAIL 3
/** /**
* struct sir_sme_ext_change_chan_ind. * struct sir_sme_ext_change_chan_ind.
* @session_id: session id * @session_id: session id

View File

@@ -901,6 +901,7 @@ struct csr_neighbor_report_offload_params {
struct csr_config_params { struct csr_config_params {
/* keep this uint32_t. This gets converted to ePhyChannelBondState */ /* keep this uint32_t. This gets converted to ePhyChannelBondState */
uint32_t channelBondingMode24GHz; uint32_t channelBondingMode24GHz;
uint8_t nud_fail_behaviour;
uint32_t channelBondingMode5GHz; uint32_t channelBondingMode5GHz;
eCsrPhyMode phyMode; eCsrPhyMode phyMode;
uint32_t HeartbeatThresh50; uint32_t HeartbeatThresh50;

View File

@@ -412,6 +412,13 @@ void sme_cleanup_session(mac_handle_t mac_handle, uint8_t vdev_id);
void sme_set_curr_device_mode(mac_handle_t mac_handle, void sme_set_curr_device_mode(mac_handle_t mac_handle,
enum QDF_OPMODE curr_device_mode); enum QDF_OPMODE curr_device_mode);
/**
* sme_update_nud_config() - update nud config
* @mac_handle: The handle returned by mac_open.
* @nud_fail_behavior: Vlaue of nud fail behaviour
*/
void sme_update_nud_config(mac_handle_t mac_handle, uint8_t nud_fail_behavior);
QDF_STATUS sme_update_roam_params(mac_handle_t mac_handle, QDF_STATUS sme_update_roam_params(mac_handle_t mac_handle,
uint8_t session_id, uint8_t session_id,
struct roam_ext_params *roam_params_src, struct roam_ext_params *roam_params_src,

View File

@@ -841,6 +841,13 @@ void sme_update_fine_time_measurement_capab(mac_handle_t mac_handle,
} }
} }
void sme_update_nud_config(mac_handle_t mac_handle, uint8_t nud_fail_behavior)
{
struct mac_context *mac = MAC_CONTEXT(mac_handle);
mac->nud_fail_behaviour = nud_fail_behavior;
}
/** /**
* sme_update_neighbor_report_config() - Update CSR config for 11k params * sme_update_neighbor_report_config() - Update CSR config for 11k params
* @mac_handle: Pointer to MAC context * @mac_handle: Pointer to MAC context

View File

@@ -21167,9 +21167,10 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
eCSR_ROAM_NAPI_OFF, eCSR_ROAM_RESULT_SUCCESS); eCSR_ROAM_NAPI_OFF, eCSR_ROAM_RESULT_SUCCESS);
goto end; goto end;
case SIR_ROAMING_INVOKE_FAIL: case SIR_ROAMING_INVOKE_FAIL:
sme_debug("Roaming triggered failed source %d", sme_debug("Roaming triggered failed source %d nud behaviour %d",
vdev_roam_params->source); vdev_roam_params->source, mac_ctx->nud_fail_behaviour);
if (vdev_roam_params->source == USERSPACE_INITIATED) { if (vdev_roam_params->source == USERSPACE_INITIATED ||
mac_ctx->nud_fail_behaviour == DISCONNECT_AFTER_NUD_FAIL) {
/* Userspace roam req fail, disconnect with AP */ /* Userspace roam req fail, disconnect with AP */
csr_roam_disconnect(mac_ctx, session_id, csr_roam_disconnect(mac_ctx, session_id,
eCSR_DISCONNECT_REASON_DEAUTH, eCSR_DISCONNECT_REASON_DEAUTH,