Преглед изворни кода

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
Jianmin Zhu пре 5 година
родитељ
комит
2ba2d3eda3

+ 2 - 2
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;

+ 1 - 0
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