aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-11 21:36:56 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-11 23:10:38 -0500
commit820bd66fb28ce0c47cb024895d8bace58f5be56d (patch)
tree1028d239711c49cd590c8cdca990eb0a901c2c78 /drivers/net/ieee802154
parentab0bd561724bf3c09aa80e76ca0a187c6880bc5c (diff)
ieee820154: remove valid page and channel checks
This patch removes validation of page and channel while setting from driver layer. This is already handled by nl802154 and mac802154. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c14
-rw-r--r--drivers/net/ieee802154/fakelb.c3
2 files changed, 1 insertions, 16 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
1069static int 1057static int
diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c
index 6e62286cef78..96947d724189 100644
--- a/drivers/net/ieee802154/fakelb.c
+++ b/drivers/net/ieee802154/fakelb.c
@@ -58,9 +58,6 @@ fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
58{ 58{
59 pr_debug("set channel to %d\n", channel); 59 pr_debug("set channel to %d\n", channel);
60 60
61 hw->phy->current_page = page;
62 hw->phy->current_channel = channel;
63
64 return 0; 61 return 0;
65} 62}
66 63