1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 01:53:51 +01:00

Merge pull request #21904 from Stopkaa/drivers/mrf24j40

drivers/mrf24j40: replace && with || in TX power validation
This commit is contained in:
benpicco 2025-11-21 13:23:42 +00:00 committed by GitHub
commit 47ecbc14a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,7 +254,7 @@ static int _config_phy(ieee802154_dev_t *hal, const ieee802154_phy_conf_t *conf)
mrf24j40_t *dev = hal->priv;
int8_t pow = conf->pow;
uint8_t channel = conf->channel;
if (pow < MRF24J40_MIN_TXPOWER && pow > MRF24J40_MAX_TXPOWER) {
if (pow < MRF24J40_MIN_TXPOWER || pow > MRF24J40_MAX_TXPOWER) {
return -EINVAL;
}
mrf24j40_set_txpower(dev, pow);