1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

kw2xrf: Remove netdev access from set_pan

This write access is only required when a modification to the PAN ID
happened directly via this function and not via a netdev::set operation.
The only direct call was done in the reset function of the driver
This commit is contained in:
Koen Zandberg 2018-11-13 21:14:30 +01:00
parent bd4592a06b
commit 5566f48f02
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -255,14 +255,11 @@ void kw2xrf_set_sequence(kw2xrf_t *dev, kw2xrf_physeq_t seq)
void kw2xrf_set_pan(kw2xrf_t *dev, uint16_t pan)
{
dev->netdev.pan = pan;
uint8_t val_ar[2];
val_ar[1] = (pan >> 8);
val_ar[0] = (uint8_t)pan;
kw2xrf_write_iregs(dev, MKW2XDMI_MACPANID0_LSB, val_ar, 2);
LOG_DEBUG("[kw2xrf] set pan to: 0x%x\n", pan);
dev->netdev.pan = pan;
}
void kw2xrf_set_addr_short(kw2xrf_t *dev, uint16_t addr)