Merge pull request #9616 from bergzand/pr/at86rf2xx/always_set_channel
at86rf2xx: Always set channel on device
This commit is contained in:
commit
e897826cc7
@ -140,11 +140,11 @@ uint8_t at86rf2xx_get_chan(const at86rf2xx_t *dev)
|
|||||||
|
|
||||||
void at86rf2xx_set_chan(at86rf2xx_t *dev, uint8_t channel)
|
void at86rf2xx_set_chan(at86rf2xx_t *dev, uint8_t channel)
|
||||||
{
|
{
|
||||||
if ((channel > AT86RF2XX_MAX_CHANNEL) ||
|
if ((channel > AT86RF2XX_MAX_CHANNEL)
|
||||||
#if AT86RF2XX_MIN_CHANNEL /* is zero for sub-GHz */
|
#if AT86RF2XX_MIN_CHANNEL /* is zero for sub-GHz */
|
||||||
(channel < AT86RF2XX_MIN_CHANNEL) ||
|
|| (channel < AT86RF2XX_MIN_CHANNEL)
|
||||||
#endif
|
#endif
|
||||||
(dev->netdev.chan == channel)) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user