From b083b726aa47a51921b3427ae899d4a067e7bb30 Mon Sep 17 00:00:00 2001 From: Mohammed Ahmed Date: Mon, 23 Jan 2023 13:23:08 -0800 Subject: [PATCH] qcacld-3.0: Fix keepalive enum Currently gStaKeepAliveMethod and station_keepalive_method are not mapped properly due to an offset of one. Fix this by updating enum definition. Change-Id: I572ee472b0b45816bf26830060d2b0707c90f387 CRs-Fixed: 3385907 --- components/mlme/dispatcher/inc/cfg_mlme_sta.h | 8 ++++---- components/mlme/dispatcher/inc/wlan_mlme_public_struct.h | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sta.h b/components/mlme/dispatcher/inc/cfg_mlme_sta.h index 9a005f2ec5..6a3c7ed9e4 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sta.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sta.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -493,8 +493,8 @@ /* * * gStaKeepAliveMethod - Which keepalive method to use - * @Min: 0 - * @Max: 1 + * @Min: 1 + * @Max: 2 * @Default: 1 * * This ini determines which keepalive method to use for station interfaces @@ -512,8 +512,8 @@ #define CFG_STA_KEEPALIVE_METHOD CFG_INI_INT( \ "gStaKeepAliveMethod", \ MLME_STA_KEEPALIVE_NULL_DATA, \ - MLME_STA_KEEPALIVE_COUNT - 1, \ MLME_STA_KEEPALIVE_GRAT_ARP, \ + MLME_STA_KEEPALIVE_NULL_DATA, \ CFG_VALUE_OR_DEFAULT, \ "Which keepalive method to use") diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 4541f57eae..957a97591b 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1660,13 +1660,15 @@ struct wlan_mlme_nss_chains { /** * enum station_keepalive_method - available keepalive methods for stations + * @MLME_STA_KEEPALIVE_MIN: ensure KEEPALIVE_NULL or ARP are not values of 0 * @MLME_STA_KEEPALIVE_NULL_DATA: null data packet * @MLME_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet * @MLME_STA_KEEPALIVE_COUNT: number of method options available */ enum station_keepalive_method { - MLME_STA_KEEPALIVE_NULL_DATA, - MLME_STA_KEEPALIVE_GRAT_ARP, + MLME_STA_KEEPALIVE_MIN, + MLME_STA_KEEPALIVE_NULL_DATA = 1, + MLME_STA_KEEPALIVE_GRAT_ARP = 2, /* keep at the end */ MLME_STA_KEEPALIVE_COUNT };