From 2ba2d3eda307c4205d0d47926141fbd92ae2c8cc Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Fri, 6 Mar 2020 22:26:17 +0800 Subject: [PATCH] qcacmn: Mixed error code and tx power When channel invalid, error code is treated as tx power value by the caller. Change-Id: Ie37c7f04734be46b6237acffe02eed3f31923012 CRs-Fixed: 2636772 --- umac/regulatory/core/src/reg_services_common.c | 4 ++-- umac/regulatory/dispatcher/inc/reg_services_public_struct.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 208df2c881d3..293f04f23e48 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -3366,14 +3366,14 @@ uint8_t reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev, if (chan_enum == INVALID_CHANNEL) { reg_err("channel is invalid"); - return QDF_STATUS_E_FAILURE; + return REG_INVALID_TXPOWER; } pdev_priv_obj = reg_get_pdev_obj(pdev); if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) { reg_err("reg pdev priv obj is NULL"); - return QDF_STATUS_E_FAILURE; + return REG_INVALID_TXPOWER; } reg_channels = pdev_priv_obj->cur_chan_list; diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index d7487c75a941..b373f67e1fff 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -34,6 +34,7 @@ #define REG_MAX_SUPP_OPER_CLASSES 32 #define REG_MAX_CHAN_CHANGE_CBKS 30 +#define REG_INVALID_TXPOWER 255 #define MAX_STA_VDEV_CNT 4 #define INVALID_VDEV_ID 0xFF #define INVALID_CHANNEL_NUM 0x0