summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.h
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-15 07:30:49 -0800
committerJohn W. Linville <linville@tuxdriver.com>2010-12-16 15:22:30 -0500
commit895ad7eb21ed228444169dbbff44f3dccfc7e006 (patch)
tree1f410c78bd463c9d5963d058493cecde7230f56d /drivers/net/wireless/ath/ath9k/hw.h
parentd8a8440e3f1f0cdd23074c6d2d8cbbde204a4374 (diff)
downloadblackbird-obmc-linux-895ad7eb21ed228444169dbbff44f3dccfc7e006.tar.gz
blackbird-obmc-linux-895ad7eb21ed228444169dbbff44f3dccfc7e006.zip
ath9k_hw: Move get_streams() to hw.h
This helper can be used in multiple places. Also make it inline returning u8. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 97f22c428603..fb64ab841dc1 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -868,6 +868,11 @@ static inline struct ath_hw_ops *ath9k_hw_ops(struct ath_hw *ah)
return &ah->ops;
}
+static inline u8 get_streams(int mask)
+{
+ return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
+}
+
/* Initialization, Detach, Reset */
const char *ath9k_hw_probe(u16 vendorid, u16 devid);
void ath9k_hw_deinit(struct ath_hw *ah);
OpenPOWER on IntegriCloud