ieee820154: remove valid page and channel checks
authorAlexander Aring <alex.aring@gmail.com>
Wed, 12 Nov 2014 02:36:56 +0000 (03:36 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 12 Nov 2014 04:10:38 +0000 (05:10 +0100)
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>
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/fakelb.c

index ebcbeb3a06e833477b239d783108c5d79e6b9190..f9e3bce8d63b020b4d51af1eb919fffde9428430 100644 (file)
@@ -1047,23 +1047,11 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
        struct at86rf230_local *lp = hw->priv;
        int rc;
 
-       if (page > 31 ||
-           !(lp->hw->phy->channels_supported[page] & BIT(channel))) {
-               WARN_ON(1);
-               return -EINVAL;
-       }
-
        rc = lp->data->set_channel(lp, page, channel);
-       if (rc < 0)
-               return rc;
-
        /* Wait for PLL */
        usleep_range(lp->data->t_channel_switch,
                     lp->data->t_channel_switch + 10);
-       hw->phy->current_channel = channel;
-       hw->phy->current_page = page;
-
-       return 0;
+       return rc;
 }
 
 static int
index 6e62286cef7849c4523e1334015729ca7f8fa39a..96947d724189d88862d0af034c8d486ec4bbb428 100644 (file)
@@ -58,9 +58,6 @@ fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 {
        pr_debug("set channel to %d\n", channel);
 
-       hw->phy->current_page = page;
-       hw->phy->current_channel = channel;
-
        return 0;
 }