Skip to content

Commit

Permalink
wpan-phy: init channel/page fields
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Eremin-Solenikov committed Nov 6, 2009
1 parent 1c889f4 commit 37eb0ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ieee802154/wpan-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37eb0ed

Please sign in to comment.