@@ -125,8 +125,8 @@ void otPlatDiagRadioReceived(otInstance *aInstance,
125125#if defined(CONFIG_IEEE802154_CARRIER_FUNCTIONS )
126126otError otPlatDiagRadioTransmitCarrier (otInstance * aInstance , bool aEnable )
127127{
128- if (! otPlatDiagModeGet () || ( sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
129- sTransmitMode != DIAG_TRANSMIT_MODE_CARRIER ) ) {
128+ if (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
129+ sTransmitMode != DIAG_TRANSMIT_MODE_CARRIER ) {
130130 return OT_ERROR_INVALID_STATE ;
131131 }
132132
@@ -175,10 +175,6 @@ static otError gpio_get_spec(uint32_t gpio_idx, const struct gpio_dt_spec **spec
175175
176176 * spec = & gpio_spec [gpio_idx ];
177177
178- if (!otPlatDiagModeGet ()) {
179- return OT_ERROR_INVALID_STATE ;
180- }
181-
182178 if (!gpio_is_ready_dt (* spec )) {
183179 return OT_ERROR_INVALID_ARGS ;
184180 }
@@ -326,8 +322,8 @@ static otError startModCarrier(otInstance *aInstance, uint8_t aArgsLength, char
326322 return OT_ERROR_INVALID_ARGS ;
327323 }
328324
329- if (! otPlatDiagModeGet () || ( sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
330- sTransmitMode != DIAG_TRANSMIT_MODE_MODCARRIER ) ) {
325+ if (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
326+ sTransmitMode != DIAG_TRANSMIT_MODE_MODCARRIER ) {
331327 return OT_ERROR_INVALID_STATE ;
332328 }
333329
@@ -396,10 +392,6 @@ static otError processTransmit(otInstance *aInstance, uint8_t aArgsLength, char
396392 long value ;
397393 uint32_t now ;
398394
399- if (!otPlatDiagModeGet ()) {
400- return OT_ERROR_INVALID_STATE ;
401- }
402-
403395 if (aArgsLength == 0 ) {
404396 diag_output ("transmit will send %" PRId32 " diagnostic messages with %" PRIu32
405397 " ms interval\r\n" ,
0 commit comments