mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Modify NUD tracking ini for disconnect/roam
Modify the nud tracking ini so that the driver does a disconnection/roaming after NUD failure is detected. According to the ini specified, the driver would either disconnect or do roaming. Change-Id: I6af1c819322a702605d92ada735298a124127533 CRs-Fixed: 2497153
This commit is contained in:
parent
7db7a5d167
commit
cdc3b574d1
3 changed files with 40 additions and 8 deletions
|
|
@ -1130,14 +1130,21 @@
|
|||
#define CFG_DP_CONFIG_DP_TRACE_ALL
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_NUD_TRACKING
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableNUDTracking - Will enable or disable NUD tracking within driver
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
* @Max: 2
|
||||
* @Default: 2
|
||||
*
|
||||
* This ini is used to enable or disable NUD tracking within driver
|
||||
* This ini is used to specify the behaviour of the driver for NUD tracking.
|
||||
* If the ini value is:-
|
||||
* 0: Driver will not track the NUD failures, and ignore the same.
|
||||
* 1: Driver will track the NUD failures and if honoured will disconnect from
|
||||
* the connected BSSID.
|
||||
* 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.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
|
|
@ -1147,10 +1154,16 @@
|
|||
*
|
||||
* <ini>
|
||||
*/
|
||||
#ifdef WLAN_NUD_TRACKING
|
||||
#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 \
|
||||
CFG_INI_BOOL("gEnableNUDTracking", \
|
||||
true, "Ctrl to enable nud tracking")
|
||||
CFG_INI_UINT("gEnableNUDTracking", \
|
||||
CFG_DP_DISABLE_NUD_TRACKING, \
|
||||
CFG_DP_ROAM_AFTER_NUD_FAIL, \
|
||||
CFG_DP_ROAM_AFTER_NUD_FAIL, \
|
||||
CFG_VALUE_OR_DEFAULT, "Driver NUD tracking behaviour")
|
||||
|
||||
#define CFG_DP_ENABLE_NUD_TRACKING_ALL \
|
||||
CFG(CFG_DP_ENABLE_NUD_TRACKING)
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ struct hdd_config {
|
|||
uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
|
||||
#endif
|
||||
#ifdef WLAN_NUD_TRACKING
|
||||
bool enable_nud_tracking;
|
||||
uint8_t enable_nud_tracking;
|
||||
#endif
|
||||
uint8_t operating_channel;
|
||||
uint8_t num_vdevs;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "osif_sync.h"
|
||||
#include "wlan_hdd_main.h"
|
||||
#include "wlan_blm_ucfg_api.h"
|
||||
#include "hdd_dp_cfg.h"
|
||||
|
||||
void hdd_nud_set_gateway_addr(struct hdd_adapter *adapter,
|
||||
struct qdf_mac_addr gw_mac_addr)
|
||||
|
|
@ -277,6 +278,23 @@ hdd_handle_nud_fail_non_sta(struct hdd_adapter *adapter)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef WLAN_NUD_TRACKING
|
||||
static bool
|
||||
hdd_is_roam_after_nud_enabled(struct hdd_config *config)
|
||||
{
|
||||
if (config->enable_nud_tracking == CFG_DP_ROAM_AFTER_NUD_FAIL)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
static bool
|
||||
hdd_is_roam_after_nud_enabled(struct hdd_config *config)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* __hdd_nud_failure_work() - work for nud event
|
||||
* @adapter: Pointer to hdd_adapter
|
||||
|
|
@ -312,7 +330,8 @@ static void __hdd_nud_failure_work(struct hdd_adapter *adapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
if (adapter->device_mode == QDF_STA_MODE &&
|
||||
hdd_is_roam_after_nud_enabled(hdd_ctx->config)) {
|
||||
hdd_handle_nud_fail_sta(hdd_ctx, adapter);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue