aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-08-10 15:15:55 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-08-10 14:43:06 -0400
commit91f02b3dd8311b48c021e8667a84dfc2d6445a03 (patch)
treed2f63529bf868ac3cec2f7ffce5afd5b91e71381
parent09095fdc9e5d5438051fc4e92867f1aff764cd21 (diff)
mac802154: cfg: remove test and set checks
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 <stefan@osg.samsung.com> Suggested-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/mac802154/cfg.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index f7ba51e8b4ca..cecfcda09aac 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -209,10 +209,6 @@ ieee802154_set_backoff_exponent(struct wpan_phy *wpan_phy,
209{ 209{
210 ASSERT_RTNL(); 210 ASSERT_RTNL();
211 211
212 if (wpan_dev->min_be == min_be &&
213 wpan_dev->max_be == max_be)
214 return 0;
215
216 wpan_dev->min_be = min_be; 212 wpan_dev->min_be = min_be;
217 wpan_dev->max_be = max_be; 213 wpan_dev->max_be = max_be;
218 return 0; 214 return 0;
@@ -224,9 +220,6 @@ ieee802154_set_short_addr(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
224{ 220{
225 ASSERT_RTNL(); 221 ASSERT_RTNL();
226 222
227 if (wpan_dev->short_addr == short_addr)
228 return 0;
229
230 wpan_dev->short_addr = short_addr; 223 wpan_dev->short_addr = short_addr;
231 return 0; 224 return 0;
232} 225}
@@ -238,9 +231,6 @@ ieee802154_set_max_csma_backoffs(struct wpan_phy *wpan_phy,
238{ 231{
239 ASSERT_RTNL(); 232 ASSERT_RTNL();
240 233
241 if (wpan_dev->csma_retries == max_csma_backoffs)
242 return 0;
243
244 wpan_dev->csma_retries = max_csma_backoffs; 234 wpan_dev->csma_retries = max_csma_backoffs;
245 return 0; 235 return 0;
246} 236}
@@ -252,9 +242,6 @@ ieee802154_set_max_frame_retries(struct wpan_phy *wpan_phy,
252{ 242{
253 ASSERT_RTNL(); 243 ASSERT_RTNL();
254 244
255 if (wpan_dev->frame_retries == max_frame_retries)
256 return 0;
257
258 wpan_dev->frame_retries = max_frame_retries; 245 wpan_dev->frame_retries = max_frame_retries;
259 return 0; 246 return 0;
260} 247}
@@ -265,9 +252,6 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
265{ 252{
266 ASSERT_RTNL(); 253 ASSERT_RTNL();
267 254
268 if (wpan_dev->lbt == mode)
269 return 0;
270
271 wpan_dev->lbt = mode; 255 wpan_dev->lbt = mode;
272 return 0; 256 return 0;
273} 257}