Hi All,
I've just been looking at what happens if one diverts even
slightly from the setup approach on the getting started
page.
On classic is that if one attempt
iz assoc wpan0 0x777 1 10
(e.g. not a valid channel) there is no checking code in mac802154
to prevent this invalid option. In cc2420 at least, this triggers
a Bug on.
I'm not sure where best to check this (and return error). Currently
have added to
static int ieee802154_mlme_assoc_req(struct net_device *dev,
struct ieee802154_addr *addr, u8 channel, u8 page, u8 cap)
+ if (!(priv->hw->phy->channels_supported[page] &
+ (1 << channel)))
+ return -EINVAL;
which does the job, but I don't know my way around the code well enough
to say if this is the best place. (if it is I'm happy to submit a proper patch)
The other fun one I know of is the random error returned if one tries
to associate with a device before bringing it up. Not sure what the correct
sanity check to prevent this. (by random error, I mean a random value that
is then reported by iz to userspace).
Jonathan
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Linux-zigbee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel