Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: openthread: cleanup diag commands #83777

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions modules/openthread/platform/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void otPlatDiagRadioReceived(otInstance *aInstance,
#if defined(CONFIG_IEEE802154_CARRIER_FUNCTIONS)
otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable)
{
if (!otPlatDiagModeGet() || (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
sTransmitMode != DIAG_TRANSMIT_MODE_CARRIER)) {
if (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
sTransmitMode != DIAG_TRANSMIT_MODE_CARRIER) {
return OT_ERROR_INVALID_STATE;
}

Expand Down Expand Up @@ -175,10 +175,6 @@ static otError gpio_get_spec(uint32_t gpio_idx, const struct gpio_dt_spec **spec

*spec = &gpio_spec[gpio_idx];

if (!otPlatDiagModeGet()) {
return OT_ERROR_INVALID_STATE;
}

if (!gpio_is_ready_dt(*spec)) {
return OT_ERROR_INVALID_ARGS;
}
Expand Down Expand Up @@ -326,8 +322,8 @@ static otError startModCarrier(otInstance *aInstance, uint8_t aArgsLength, char
return OT_ERROR_INVALID_ARGS;
}

if (!otPlatDiagModeGet() || (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
sTransmitMode != DIAG_TRANSMIT_MODE_MODCARRIER)) {
if (sTransmitMode != DIAG_TRANSMIT_MODE_IDLE &&
sTransmitMode != DIAG_TRANSMIT_MODE_MODCARRIER) {
return OT_ERROR_INVALID_STATE;
}

Expand Down Expand Up @@ -396,10 +392,6 @@ static otError processTransmit(otInstance *aInstance, uint8_t aArgsLength, char
long value;
uint32_t now;

if (!otPlatDiagModeGet()) {
return OT_ERROR_INVALID_STATE;
}

if (aArgsLength == 0) {
diag_output("transmit will send %" PRId32 " diagnostic messages with %" PRIu32
" ms interval\r\n",
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ manifest:
revision: 52bb1783521c62c019451cee9b05b8eda9d7425f
path: modules/lib/open-amp
- name: openthread
revision: 2aeb8b833ba760ec29d5f340dd1ce7bcb61c5d56
revision: 3ae741f95e7dfb391dec35c48742862049eb62e8
path: modules/lib/openthread
- name: percepio
path: modules/debug/percepio
Expand Down
Loading