From a92e4696292199714d47d8e52c4bf0318324f77f Mon Sep 17 00:00:00 2001 From: Pontus Fuchs Date: Mon, 18 Apr 2016 22:00:44 -0700 Subject: wcn36xx: Add helper macros to cast sta to priv While poking at this I also change two related things. I rename one variable to make the names consistent. I also move one assignment of priv_sta to the declaration to save a few lines. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/net/wireless/ath/wcn36xx/wcn36xx.h') diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index c3ba07ed1db5..c368a34c8de7 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -275,4 +275,10 @@ struct ieee80211_vif *wcn36xx_priv_to_vif(struct wcn36xx_vif *vif_priv) return container_of((void *) vif_priv, struct ieee80211_vif, drv_priv); } +static inline +struct wcn36xx_sta *wcn36xx_sta_to_priv(struct ieee80211_sta *sta) +{ + return (struct wcn36xx_sta *)sta->drv_priv; +} + #endif /* _WCN36XX_H_ */ -- cgit v1.2.3