mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Add ini for station keepalive method
Add an ini item for configuring the keepalive method used by station interfaces. Change-Id: Id44773f5ae7f7ad1ad9441592512ab3e2ce3a076 CRs-Fixed: 2016799
This commit is contained in:
parent
7a7e13cfa1
commit
b6b0f18937
3 changed files with 57 additions and 4 deletions
|
|
@ -2537,6 +2537,43 @@ typedef enum {
|
|||
#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX (65535)
|
||||
#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT (90)
|
||||
|
||||
/**
|
||||
* enum station_keepalive_method - available keepalive methods for stations
|
||||
* @HDD_STA_KEEPALIVE_NULL_DATA: null data packet
|
||||
* @HDD_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet
|
||||
* @HDD_STA_KEEPALIVE_COUNT: number of method options available
|
||||
*/
|
||||
enum station_keepalive_method {
|
||||
HDD_STA_KEEPALIVE_NULL_DATA,
|
||||
HDD_STA_KEEPALIVE_GRAT_ARP,
|
||||
/* keep at the end */
|
||||
HDD_STA_KEEPALIVE_COUNT
|
||||
};
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gStaKeepAliveMethod - Which keepalive method to use
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini determines which keepalive method to use for station interfaces
|
||||
* 1) Use null data packets
|
||||
* 2) Use gratuitous ARP packets
|
||||
*
|
||||
* Related: gStaKeepAlivePeriod, gApKeepAlivePeriod, gGoKeepAlivePeriod
|
||||
*
|
||||
* Supported Feature: STA, Keepalive
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_STA_KEEPALIVE_METHOD_NAME "gStaKeepAliveMethod"
|
||||
#define CFG_STA_KEEPALIVE_METHOD_MIN (HDD_STA_KEEPALIVE_NULL_DATA)
|
||||
#define CFG_STA_KEEPALIVE_METHOD_MAX (HDD_STA_KEEPALIVE_COUNT - 1)
|
||||
#define CFG_STA_KEEPALIVE_METHOD_DEFAULT (HDD_STA_KEEPALIVE_GRAT_ARP)
|
||||
|
||||
/* WMM configuration */
|
||||
/*
|
||||
* <ini>
|
||||
|
|
@ -8852,6 +8889,7 @@ enum hdd_wext_control {
|
|||
#define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Type declarations
|
||||
*/
|
||||
|
|
@ -8901,6 +8939,7 @@ struct hdd_config {
|
|||
uint8_t enableLTECoex;
|
||||
uint32_t apKeepAlivePeriod;
|
||||
uint32_t goKeepAlivePeriod;
|
||||
enum station_keepalive_method sta_keepalive_method;
|
||||
uint32_t apLinkMonitorPeriod;
|
||||
uint32_t goLinkMonitorPeriod;
|
||||
uint32_t nBeaconInterval;
|
||||
|
|
|
|||
|
|
@ -1591,6 +1591,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
|||
CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MIN,
|
||||
CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_STA_KEEPALIVE_METHOD_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, sta_keepalive_method,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_STA_KEEPALIVE_METHOD_DEFAULT,
|
||||
CFG_STA_KEEPALIVE_METHOD_MIN,
|
||||
CFG_STA_KEEPALIVE_METHOD_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, AddTSWhenACMIsOff,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
|
|
|
|||
|
|
@ -687,11 +687,18 @@ static int hdd_set_grat_arp_keepalive(hdd_adapter_t *adapter)
|
|||
*/
|
||||
static void __hdd_ipv4_notifier_work_queue(struct work_struct *work)
|
||||
{
|
||||
hdd_adapter_t *pAdapter =
|
||||
container_of(work, hdd_adapter_t, ipv4NotifierWorkQueue);
|
||||
hdd_adapter_t *adapter;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
hdd_enable_arp_offload(pAdapter, pmo_ipv4_change_notify);
|
||||
hdd_set_grat_arp_keepalive(pAdapter);
|
||||
|
||||
adapter = container_of(work, hdd_adapter_t, ipv4NotifierWorkQueue);
|
||||
hdd_enable_arp_offload(adapter, pmo_ipv4_change_notify);
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
if (hdd_ctx->config->sta_keepalive_method == HDD_STA_KEEPALIVE_GRAT_ARP)
|
||||
hdd_set_grat_arp_keepalive(adapter);
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue