Skip to content

Commit

Permalink
mac802154: cfg: remove test and set checks
Browse files Browse the repository at this point in the history
This patch removes several checks if a value is really changed. This
makes only sense if we have another layer call e.g. calling the
driver_ops which is done by callbacks like "set_channel".

For MAC settings which need to be set by phy registers (if the phy
supports that handling) this is set by doing an interface up currently
and are not direct driver_ops calls, so we remove the checks from these
configuration callbacks.

Reviewed-by: Stefan Schmidt <[email protected]>
Suggested-by: Phoebe Buckheister <[email protected]>
Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
alexaring authored and holtmann committed Aug 10, 2015
1 parent 09095fd commit 91f02b3
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions net/mac802154/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ ieee802154_set_backoff_exponent(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();

if (wpan_dev->min_be == min_be &&
wpan_dev->max_be == max_be)
return 0;

wpan_dev->min_be = min_be;
wpan_dev->max_be = max_be;
return 0;
Expand All @@ -224,9 +220,6 @@ ieee802154_set_short_addr(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
{
ASSERT_RTNL();

if (wpan_dev->short_addr == short_addr)
return 0;

wpan_dev->short_addr = short_addr;
return 0;
}
Expand All @@ -238,9 +231,6 @@ ieee802154_set_max_csma_backoffs(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();

if (wpan_dev->csma_retries == max_csma_backoffs)
return 0;

wpan_dev->csma_retries = max_csma_backoffs;
return 0;
}
Expand All @@ -252,9 +242,6 @@ ieee802154_set_max_frame_retries(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();

if (wpan_dev->frame_retries == max_frame_retries)
return 0;

wpan_dev->frame_retries = max_frame_retries;
return 0;
}
Expand All @@ -265,9 +252,6 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
{
ASSERT_RTNL();

if (wpan_dev->lbt == mode)
return 0;

wpan_dev->lbt = mode;
return 0;
}
Expand Down

0 comments on commit 91f02b3

Please sign in to comment.