diff options
author | Pontus Fuchs <pontus.fuchs@gmail.com> | 2016-04-19 08:00:41 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-04-25 20:37:04 +0300 |
commit | ce75877f6c3da01cd5efe41683dd32beee1b4b33 (patch) | |
tree | 8bbd0337722edaec0a32805998ae4aeb6937e56a /drivers/net/wireless/ath/wcn36xx/wcn36xx.h | |
parent | 91c3eeba45e13ab7edfb50610df8672d52809394 (diff) | |
download | linux-ce75877f6c3da01cd5efe41683dd32beee1b4b33.tar.xz |
wcn36xx: Add helper macros to cast vif to private vif and vice versa
Makes the code a little easier to read.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/wcn36xx.h')
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 7b41e833e18c..c3ba07ed1db5 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -263,4 +263,16 @@ struct ieee80211_sta *wcn36xx_priv_to_sta(struct wcn36xx_sta *sta_priv) return container_of((void *)sta_priv, struct ieee80211_sta, drv_priv); } +static inline +struct wcn36xx_vif *wcn36xx_vif_to_priv(struct ieee80211_vif *vif) +{ + return (struct wcn36xx_vif *) vif->drv_priv; +} + +static inline +struct ieee80211_vif *wcn36xx_priv_to_vif(struct wcn36xx_vif *vif_priv) +{ + return container_of((void *) vif_priv, struct ieee80211_vif, drv_priv); +} + #endif /* _WCN36XX_H_ */ |