Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1f74825 authored by David Kilroy's avatar David Kilroy Committed by John W. Linville
Browse files

cfg80211: add wrapper function to get wiphy from priv pointer

parent 90e3012e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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
 *