Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 820bd66f authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

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: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent ab0bd561
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -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
+0 −3
Original line number Diff line number Diff line
@@ -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;
}