commit 20955a02d7ddeef222c7811e31d16be148a45f9c Author: Jiri Slaby Date: Tue Jul 17 08:37:20 2007 +0200 make some functions static diff --git a/ath5k.h b/ath5k.h index 83b2f43..6956326 100644 --- a/ath5k.h +++ b/ath5k.h @@ -968,8 +968,6 @@ struct ath_hw { /* * Prototypes */ -/* General Functions */ -u16 ath_hal_computetxtime(struct ath_hw *hal, const struct ath5k_rate_table *rates, u32 frame_length, u16 rate_index, bool short_preamble); /* Attach/Detach Functions */ struct ath_hw *ath5k_hw_attach(u16 device, u8 macversion, void *sc, void __iomem *sh); const struct ath5k_rate_table *ath5k_hw_get_rate_table(struct ath_hw *hal, unsigned int mode); @@ -995,9 +993,6 @@ int ath5k_hw_get_isr(struct ath_hw *hal, enum ath5k_int *interrupt_mask); enum ath5k_int ath5k_hw_set_intr(struct ath_hw *hal, enum ath5k_int new_mask); void ath5k_hw_radar_alert(struct ath_hw *hal, bool enable); /* EEPROM access functions */ -u16 ath5k_eeprom_bin2freq(struct ath_hw *hal, u16 bin, unsigned int mode); -int ath5k_eeprom_read_ants(struct ath_hw *hal, u32 *offset, unsigned int mode); -int ath5k_eeprom_read_modes(struct ath_hw *hal, u32 *offset, unsigned int mode); int ath5k_hw_set_regdomain(struct ath_hw *hal, u16 regdomain); /* Protocol Control Unit Functions */ void ath5k_hw_set_opmode(struct ath_hw *hal); @@ -1061,10 +1056,6 @@ int ath5k_hw_phy_calibrate(struct ath_hw *hal, struct ieee80211_channel *channel bool ath5k_hw_phy_disable(struct ath_hw *hal); void ath5k_hw_set_def_antenna(struct ath_hw *hal, unsigned int ant); unsigned int ath5k_hw_get_def_antenna(struct ath_hw *hal); -unsigned int ath5k_hw_rfregs_op(u32 *rf, u32 offset, u32 reg, u32 bits, u32 first, u32 col, bool set); -u32 ath5k_hw_rfregs_gainf_corr(struct ath_hw *hal); -bool ath5k_hw_rfregs_gain_readback(struct ath_hw *hal); -s32 ath5k_hw_rfregs_gain_adjust(struct ath_hw *hal); bool ath5k_hw_rfgain(struct ath_hw *hal, unsigned int phy, u_int freq); enum ath5k_rfgain ath5k_hw_get_rf_gain(struct ath_hw *hal); /* Misc functions */ diff --git a/ath5k_hw.c b/ath5k_hw.c index 6f17542..ef8b960 100644 --- a/ath5k_hw.c +++ b/ath5k_hw.c @@ -14,12 +14,10 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id$ */ /* * HAL interface for Atheros Wireless LAN devices. - * (Please have a look at ar5xxx.h for further information) */ #include @@ -124,7 +122,7 @@ static const struct ath5k_ini_rfgain ath5k_rfg[] = AR5K_INI_RFGAIN; * Calculate transmition time of a frame * TODO: Left here for combatibility, change it in ath5k */ -u16 /*TODO: Is this really hardware dependent ?*/ +static u16 /*TODO: Is this really hardware dependent ?*/ ath_hal_computetxtime(struct ath_hw *hal, const struct ath5k_rate_table *rates, u32 frame_length, u16 rate_index, bool short_preamble) { @@ -1976,8 +1974,7 @@ static int ath5k_hw_eeprom_write(struct ath_hw *hal, u32 offset, u16 data) return -EIO; } -u16 -ath5k_eeprom_bin2freq(struct ath_hw *hal, u16 bin, unsigned int mode) +static u16 ath5k_eeprom_bin2freq(struct ath_hw *hal, u16 bin, unsigned int mode) { u16 val; @@ -2004,8 +2001,8 @@ ath5k_eeprom_bin2freq(struct ath_hw *hal, u16 bin, unsigned int mode) /* * Read antenna infos from eeprom */ -int -ath5k_eeprom_read_ants(struct ath_hw *hal, u32 *offset, unsigned int mode) +static int ath5k_eeprom_read_ants(struct ath_hw *hal, u32 *offset, + unsigned int mode) { struct ath5k_eeprom_info *ee = &hal->ah_capabilities.cap_eeprom; u32 o = *offset; @@ -2063,8 +2060,8 @@ ath5k_eeprom_read_ants(struct ath_hw *hal, u32 *offset, unsigned int mode) /* * Read supported modes from eeprom */ -int -ath5k_eeprom_read_modes(struct ath_hw *hal, u32 *offset, unsigned int mode) +static int ath5k_eeprom_read_modes(struct ath_hw *hal, u32 *offset, + unsigned int mode) { struct ath5k_eeprom_info *ee = &hal->ah_capabilities.cap_eeprom; u32 o = *offset; @@ -4920,7 +4917,7 @@ ath5k_hw_get_def_antenna(struct ath_hw *hal) return false; /*XXX: What do we return for 5210 ?*/ } -unsigned int ath5k_hw_rfregs_op(u32 *rf, u32 offset, u32 reg, u32 bits, +static unsigned int ath5k_hw_rfregs_op(u32 *rf, u32 offset, u32 reg, u32 bits, u32 first, u32 col, bool set) { u32 mask, entry, last, data, shift, position; @@ -4967,8 +4964,7 @@ unsigned int ath5k_hw_rfregs_op(u32 *rf, u32 offset, u32 reg, u32 bits, return data; } -u32 -ath5k_hw_rfregs_gainf_corr(struct ath_hw *hal) +static u32 ath5k_hw_rfregs_gainf_corr(struct ath_hw *hal) { u32 mix, step; u32 *rf; @@ -5003,14 +4999,13 @@ ath5k_hw_rfregs_gainf_corr(struct ath_hw *hal) return hal->ah_gain.g_f_corr; } -bool -ath5k_hw_rfregs_gain_readback(struct ath_hw *hal) +static bool ath5k_hw_rfregs_gain_readback(struct ath_hw *hal) { u32 step, mix, level[4]; u32 *rf; if (hal->ah_rf_banks == NULL) - return 0; + return false; rf = hal->ah_rf_banks; @@ -5045,7 +5040,7 @@ ath5k_hw_rfregs_gain_readback(struct ath_hw *hal) hal->ah_gain.g_current <= level[3])); } -s32 ath5k_hw_rfregs_gain_adjust(struct ath_hw *hal) +static s32 ath5k_hw_rfregs_gain_adjust(struct ath_hw *hal) { const struct ath5k_gain_opt *go; int ret = 0;