diff options
Diffstat (limited to 'drivers/net/ieee802154/at86rf230.c')
-rw-r--r-- | drivers/net/ieee802154/at86rf230.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index ebcbeb3a06e8..f9e3bce8d63b 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -1047,23 +1047,11 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel) | |||
1047 | struct at86rf230_local *lp = hw->priv; | 1047 | struct at86rf230_local *lp = hw->priv; |
1048 | int rc; | 1048 | int rc; |
1049 | 1049 | ||
1050 | if (page > 31 || | ||
1051 | !(lp->hw->phy->channels_supported[page] & BIT(channel))) { | ||
1052 | WARN_ON(1); | ||
1053 | return -EINVAL; | ||
1054 | } | ||
1055 | |||
1056 | rc = lp->data->set_channel(lp, page, channel); | 1050 | rc = lp->data->set_channel(lp, page, channel); |
1057 | if (rc < 0) | ||
1058 | return rc; | ||
1059 | |||
1060 | /* Wait for PLL */ | 1051 | /* Wait for PLL */ |
1061 | usleep_range(lp->data->t_channel_switch, | 1052 | usleep_range(lp->data->t_channel_switch, |
1062 | lp->data->t_channel_switch + 10); | 1053 | lp->data->t_channel_switch + 10); |
1063 | hw->phy->current_channel = channel; | 1054 | return rc; |
1064 | hw->phy->current_page = page; | ||
1065 | |||
1066 | return 0; | ||
1067 | } | 1055 | } |
1068 | 1056 | ||
1069 | static int | 1057 | static int |