drivers/kw41zrf: don't re-get UIDs during reset#14363
drivers/kw41zrf: don't re-get UIDs during reset#14363benemorius wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
|
This problem affects all drivers, I'd rather have a more general solution. |
👍 I think it is an issue with the architecture of the drivers. IMO, the address should be generated once during |
|
#13746 will assign IDs to netdevs, this way we can always request the same ID from |
IMO this not the solution to the problem here. If the user changes the L2 address by hand and triggers a reset (e.g. both could be done via the But we shouldn't do something like void foo_init(foo_dev_t *dev)
{
/* ... */
foo_reset(dev);
/* ... */
}
void foo_reset(foo_dev_t *dev)
{
static bool is_first_reset = 1;
/* ... */
if (is_first_reset) {
is_first_reset = 0;
generate_new_addr();
}
apply_addr();
}but instead: void foo_init(foo_dev_t *dev)
{
/* ... */
generate_new_addr();
foo_reset(dev);
/* ... */
}
void foo_reset(foo_dev_t *dev)
{
/* ... */
apply_addr();
}(Or have the L2 addr generate in the Still, #13746 provides stable L2 addresses (regardless of number and order of network devices). So #13746 solves a problem, but not this. |
Now it does solve this as well :-) |
|
Should be fixed now. |
|
Tested on master this is no longer an issuse: |
Contribution description
This prevents
kw41zrffrom changing the long and short addresses duringifconfig 7 set state reset.Testing procedure
gnrc_networkingexample, runifconfigand observe addresses.ifconfig 7 set state resetifconfigagain and observe whether the long and short addresses have changed.