wpan-phy: init channel/page fields
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 18 Sep 2009 12:35:06 +0000 (16:35 +0400)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 6 Nov 2009 11:13:22 +0000 (14:13 +0300)
Set page to zero (for compatibility w/ devices supporting only first page).
Also init channel by default to -1 to disallow transfers for non-initialised
devices.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
net/ieee802154/wpan-class.c

index 0cec138429162fc50e3bdb476d9da85b6c6e74ee..a10ae5be6adb56badd698996478b44809314ccfd 100644 (file)
@@ -143,6 +143,9 @@ struct wpan_phy *wpan_phy_alloc(size_t priv_size)
 
        phy->dev.class = &wpan_phy_class;
 
+       phy->current_channel = -1; /* not initialised */
+       phy->current_page = 0; /* for compatibility */
+
        return phy;
 }
 EXPORT_SYMBOL(wpan_phy_alloc);