Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 895ad7eb authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by John W. Linville
Browse files

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: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d8a8440e
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -50,11 +50,6 @@ static int ar9003_get_training_power_2g(struct ath_hw *ah)
	return power;
	return power;
}
}


static int get_streams(int mask)
{
	return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
}

static int ar9003_get_training_power_5g(struct ath_hw *ah)
static int ar9003_get_training_power_5g(struct ath_hw *ah)
{
{
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath_common *common = ath9k_hw_common(ah);
+5 −0
Original line number Original line Diff line number Diff line
@@ -868,6 +868,11 @@ static inline struct ath_hw_ops *ath9k_hw_ops(struct ath_hw *ah)
	return &ah->ops;
	return &ah->ops;
}
}


static inline u8 get_streams(int mask)
{
	return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
}

/* Initialization, Detach, Reset */
/* Initialization, Detach, Reset */
const char *ath9k_hw_probe(u16 vendorid, u16 devid);
const char *ath9k_hw_probe(u16 vendorid, u16 devid);
void ath9k_hw_deinit(struct ath_hw *ah);
void ath9k_hw_deinit(struct ath_hw *ah);