Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Aring and committed by
Marcel Holtmann
91f02b3d 09095fdc

-16
-16
net/mac802154/cfg.c
··· 209 209 { 210 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 212 wpan_dev->min_be = min_be; 217 213 wpan_dev->max_be = max_be; 218 214 return 0; ··· 219 223 __le16 short_addr) 220 224 { 221 225 ASSERT_RTNL(); 222 - 223 - if (wpan_dev->short_addr == short_addr) 224 - return 0; 225 226 226 227 wpan_dev->short_addr = short_addr; 227 228 return 0; ··· 231 238 { 232 239 ASSERT_RTNL(); 233 240 234 - if (wpan_dev->csma_retries == max_csma_backoffs) 235 - return 0; 236 - 237 241 wpan_dev->csma_retries = max_csma_backoffs; 238 242 return 0; 239 243 } ··· 242 252 { 243 253 ASSERT_RTNL(); 244 254 245 - if (wpan_dev->frame_retries == max_frame_retries) 246 - return 0; 247 - 248 255 wpan_dev->frame_retries = max_frame_retries; 249 256 return 0; 250 257 } ··· 251 264 bool mode) 252 265 { 253 266 ASSERT_RTNL(); 254 - 255 - if (wpan_dev->lbt == mode) 256 - return 0; 257 267 258 268 wpan_dev->lbt = mode; 259 269 return 0;