Subject: Re: [Linux-zigbee-devel] [PATCH] mac802154: Keep track of the channel when changed

From: Werner Almesberger <[email-masked]>
Date: Fri, 5 Apr 2013 18:05:14 -0300

Alan Ott wrote:
> Prevent set_channel() from getting called every time a packet is sent. This
> looks like it was an oversight.

at86rf230.c and derivatives avoid this problem by setting
phy->current_* in the *_channel function.

But I'd agree that it's nicer to do this in one place, not in
every driver.

In case a driver had a weird failure mode in which it leaves the
original channel but only makes it halfway to the new channel, it
could still set phy->current_* and return an error. So there's no
loss of functionality with your change.

- Werner