[rdkb][common][hal][Fix dmcli disable ap and enable radio failed issue]
This reverts commit fc51bc0412a98d8cef9e3cc9f60701c1691eadca.
Reason for revert: this commit make interface init fail in some cases.
Change-Id: Ic3c4f0e4a9b794f97a20427876f2fedd6be7a107
diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index df13fc9..d6e9969 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -12362,14 +12362,12 @@
return RETURN_ERR;
}
}
-
- // mt76 not support yet
- // if (current_param.greenFieldEnable != operationParam->greenFieldEnable) {
- // if (wifi_setRadio11nGreenfieldEnable(index, operationParam->greenFieldEnable) != RETURN_OK) {
- // fprintf(stderr, "%s: wifi_setRadio11nGreenfieldEnable return error.\n", __func__);
- // return RETURN_ERR;
- // }
- // }
+ if (current_param.greenFieldEnable != operationParam->greenFieldEnable) {
+ if (wifi_setRadio11nGreenfieldEnable(index, operationParam->greenFieldEnable) != RETURN_OK) {
+ fprintf(stderr, "%s: wifi_setRadio11nGreenfieldEnable return error.\n", __func__);
+ return RETURN_ERR;
+ }
+ }
// if enable is true, then restart the radio
wifi_setRadioEnable(index, FALSE);
@@ -12538,12 +12536,10 @@
else
operationParam->stbcEnable = FALSE;
- // mt76 not support yet
- operationParam->greenFieldEnable = 0;
- // if (wifi_getRadio11nGreenfieldEnable(index, &operationParam->greenFieldEnable) != RETURN_OK) {
- // fprintf(stderr, "%s: wifi_getRadio11nGreenfieldEnable return error.\n", __func__);
- // return RETURN_ERR;
- // }
+ if (wifi_getRadio11nGreenfieldEnable(index, &operationParam->greenFieldEnable) != RETURN_OK) {
+ fprintf(stderr, "%s: wifi_getRadio11nGreenfieldEnable return error.\n", __func__);
+ return RETURN_ERR;
+ }
// Below value is hardcoded
@@ -12983,8 +12979,7 @@
}
wifi_setApEnable(vap_info->vap_index, FALSE);
- if (vap_info->u.bss_info.enabled == TRUE)
- wifi_setApEnable(vap_info->vap_index, TRUE);
+ wifi_setApEnable(vap_info->vap_index, TRUE);
multiple_set = FALSE;
// If config use hostapd_cli to set, we calling these type of functions after enable the ap.