Skip to content

Commit ca0390d

Browse files
[nrf fromtree] net: openthread: cleanup diag commands
After openthread/openthread#11055, platform is not required to check diagnostics mode while processing commands. Signed-off-by: Maciej Baczmanski <[email protected]> (cherry picked from commit 74bbbdc)
1 parent d71faef commit ca0390d

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

modules/openthread/platform/diag.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ void otPlatDiagRadioReceived(otInstance *aInstance,
125125
#if defined(CONFIG_IEEE802154_CARRIER_FUNCTIONS)
126126
otError 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",

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ manifest:
309309
revision: b735edbc739ad59156eb55bb8ce2583d74537719
310310
path: modules/lib/open-amp
311311
- name: openthread
312-
revision: 2aeb8b833ba760ec29d5f340dd1ce7bcb61c5d56
312+
revision: 3ae741f95e7dfb391dec35c48742862049eb62e8
313313
path: modules/lib/openthread
314314
- name: percepio
315315
path: modules/debug/percepio

0 commit comments

Comments
 (0)