Skip to content

Commit

Permalink
cfg80211: add wrapper function to get wiphy from priv pointer
Browse files Browse the repository at this point in the history
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
David Kilroy authored and John W. Linville committed Jul 10, 2009
1 parent 90e3012 commit f1f7482
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
return &wiphy->priv;
}

/**
* priv_to_wiphy - return the wiphy containing the priv
*
* @priv: a pointer previously returned by wiphy_priv
*/
static inline struct wiphy *priv_to_wiphy(void *priv)
{
BUG_ON(!priv);
return container_of(priv, struct wiphy, priv);
}

/**
* set_wiphy_dev - set device pointer for wiphy
*
Expand Down

0 comments on commit f1f7482

Please sign in to comment.