aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-06-02 06:23:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-04 16:00:39 -0400
commit61389f3ed49968746327aef0454b2f27e88e0f8d (patch)
treee4ec07bf3210330eb292890b0a09c7b0d5460679 /drivers/net/wireless/ath/ath9k/common.c
parentb176286276f85e10e8ab3342730c5e39e1ce460b (diff)
ath9k_common: Move count_streams to common module
This can be used by ath9k_htc. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index 03590f048fb8..16e2849f644d 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -397,6 +397,19 @@ void ath9k_cmn_key_delete(struct ath_common *common,
397} 397}
398EXPORT_SYMBOL(ath9k_cmn_key_delete); 398EXPORT_SYMBOL(ath9k_cmn_key_delete);
399 399
400int ath9k_cmn_count_streams(unsigned int chainmask, int max)
401{
402 int streams = 0;
403
404 do {
405 if (++streams == max)
406 break;
407 } while ((chainmask = chainmask & (chainmask - 1)));
408
409 return streams;
410}
411EXPORT_SYMBOL(ath9k_cmn_count_streams);
412
400static int __init ath9k_cmn_init(void) 413static int __init ath9k_cmn_init(void)
401{ 414{
402 return 0; 415 return 0;