summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc.h
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-02-21 07:49:15 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-02-23 16:25:27 -0500
commit0df8359a88f40ab3b0d38156a5f41ee856178aa3 (patch)
treeb78e5a87446960951f66dc3a164613cf52cc88b9 /drivers/net/wireless/ath/ath9k/htc.h
parent87df89579a4a3e6c767603acb762115159655745 (diff)
downloadblackbird-op-linux-0df8359a88f40ab3b0d38156a5f41ee856178aa3.tar.gz
blackbird-op-linux-0df8359a88f40ab3b0d38156a5f41ee856178aa3.zip
ath9k_htc: Maintain individual counters for interfaces
This is required for allowing only one IBSS interface to be configured. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 97f7ae096f69..0088c6e2f629 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -206,6 +206,32 @@ struct ath9k_htc_target_stats {
#define ATH9K_HTC_MAX_VIF 2
+#define INC_VIF(_priv, _type) do { \
+ switch (_type) { \
+ case NL80211_IFTYPE_STATION: \
+ _priv->num_sta_vif++; \
+ break; \
+ case NL80211_IFTYPE_ADHOC: \
+ _priv->num_ibss_vif++; \
+ break; \
+ default: \
+ break; \
+ } \
+ } while (0)
+
+#define DEC_VIF(_priv, _type) do { \
+ switch (_type) { \
+ case NL80211_IFTYPE_STATION: \
+ _priv->num_sta_vif--; \
+ break; \
+ case NL80211_IFTYPE_ADHOC: \
+ _priv->num_ibss_vif--; \
+ break; \
+ default: \
+ break; \
+ } \
+ } while (0)
+
struct ath9k_htc_vif {
u8 index;
u16 seq_no;
@@ -367,6 +393,8 @@ struct ath9k_htc_priv {
u8 mon_vif_idx;
u8 sta_slot;
u8 vif_sta_pos[ATH9K_HTC_MAX_VIF];
+ u8 num_ibss_vif;
+ u8 num_sta_vif;
u16 op_flags;
u16 curtxpow;
OpenPOWER on IntegriCloud