lkml.org 
[lkml]   [2022]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] wcn36xx: Expose get_sta_index in wcn36xx.h
Date
Move this helper into wcn36xx.h for use in smd.c when constructing
HAL_GET_STATS messages.

Signed-off-by: Edmond Gagnon <egagnon@squareup.com>
Reviewed-by: Benjamin Li <benl@squareup.com>
---
drivers/net/wireless/ath/wcn36xx/main.c | 8 --------
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 8 ++++++++
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index b545d4b2b8c4..70531f62777e 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -184,14 +184,6 @@ static const struct wiphy_wowlan_support wowlan_support = {

#endif

-static inline u8 get_sta_index(struct ieee80211_vif *vif,
- struct wcn36xx_sta *sta_priv)
-{
- return NL80211_IFTYPE_STATION == vif->type ?
- sta_priv->bss_sta_index :
- sta_priv->sta_index;
-}
-
static const char * const wcn36xx_caps_names[] = {
"MCC", /* 0 */
"P2P", /* 1 */
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
index 9aa08b636d08..80a4e7aea419 100644
--- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
+++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
@@ -335,4 +335,12 @@ struct wcn36xx_sta *wcn36xx_sta_to_priv(struct ieee80211_sta *sta)
return (struct wcn36xx_sta *)sta->drv_priv;
}

+static inline u8 get_sta_index(struct ieee80211_vif *vif,
+ struct wcn36xx_sta *sta_priv)
+{
+ return vif->type == NL80211_IFTYPE_STATION ?
+ sta_priv->bss_sta_index :
+ sta_priv->sta_index;
+}
+
#endif /* _WCN36XX_H_ */
--
2.25.1
\
 
 \ /
  Last update: 2022-03-18 20:59    [W:2.365 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site