commit e868e1e53256928c50c67fa0331073a6f8f48eb1 Author: Jiri Slaby Date: Fri Jun 22 11:11:25 2007 +0200 several cleanups diff --git a/ath/if_ath.c b/ath/if_ath.c index 02518fe..ed978b0 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -2317,7 +2317,7 @@ ath_mode_init(struct net_device *dev) // ath5k_hw_set_rx_filter(ah, rfilt); /* configure operational mode */ - ath5k_hw_set_pcu_config(ah); + ath5k_hw_set_opmode(ah); /* * Handle any link-level address change. Note that we only diff --git a/openhal/ath5k.h b/openhal/ath5k.h index 731f5a8..6de3c16 100644 --- a/openhal/ath5k.h +++ b/openhal/ath5k.h @@ -1042,7 +1042,6 @@ typedef bool (ath5k_rfgain_t)(struct ath_hw *, struct ieee80211_channel *, /* 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); -unsigned int ath_hal_getwirelessmodes(struct ath_hw *hal, enum ieee80211_countrycode country) ; /* 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); @@ -1066,7 +1065,6 @@ bool ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase); /* Interrupt handling */ bool ath5k_hw_is_intr_pending(struct ath_hw *hal); bool ath5k_hw_get_isr(struct ath_hw *hal, u32 *interrupt_mask); -u32 ath5k_hw_get_intr(struct ath_hw *hal); 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 */ @@ -1076,7 +1074,6 @@ 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); -void ath5k_hw_set_pcu_config(struct ath_hw *hal); /* BSSID Functions */ void ath5k_hw_get_lladdr(struct ath_hw *hal, u8 *mac); bool ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac); diff --git a/openhal/ath5k_hw.c b/openhal/ath5k_hw.c index 99e5982..4bf7c42 100644 --- a/openhal/ath5k_hw.c +++ b/openhal/ath5k_hw.c @@ -180,23 +180,6 @@ ath_hal_computetxtime(struct ath_hw *hal, const struct ath5k_rate_table *rates, } /* - * Return the supported 802.11 operation modes - * TODO:Left here for combatibility, change it in at5k - */ -unsigned int/*TODO:Fix this */ -ath_hal_getwirelessmodes(struct ath_hw *hal, enum ieee80211_countrycode country) -{ - switch(hal->ah_version){ - case AR5K_AR5212: - return AR5K_MODE_11A|AR5K_MODE_11B|AR5K_MODE_11G; - case AR5K_AR5211: - return AR5K_MODE_11A|AR5K_MODE_11B|AR5K_MODE_11G; - default : - return(AR5K_MODE_11A); - } -} - -/* * Functions used internaly */ @@ -213,14 +196,12 @@ ath5k_hw_bitswap(u32 val, unsigned int bits) return retval; } -inline unsigned int -ath5k_hw_htoclock(unsigned int usec, bool turbo) +static inline unsigned int ath5k_hw_htoclock(unsigned int usec, bool turbo) { return turbo == true ? (usec * 80) : (usec * 40); } -inline unsigned int -ath5k_hw_clocktoh(unsigned int clock, bool turbo) +static inline unsigned int ath5k_hw_clocktoh(unsigned int clock, bool turbo) { return turbo == true ? (clock / 80) : (clock / 40); } @@ -228,7 +209,7 @@ ath5k_hw_clocktoh(unsigned int clock, bool turbo) /* * Copy a rate table to a new one */ -inline void +static inline void ath5k_hw_rtcopy(struct ath5k_rate_table *dst, const struct ath5k_rate_table *src) { memset(dst, 0, sizeof(struct ath5k_rate_table)); @@ -1817,17 +1798,6 @@ ath5k_hw_get_isr(struct ath_hw *hal, u32 *interrupt_mask) } /* - * Return the interrupt mask stored previously - * TODO: Remove ? - */ -u32 -ath5k_hw_get_intr(struct ath_hw *hal) -{ - AR5K_TRACE; - return hal->ah_imr; -} - -/* * Set interrupt mask */ enum ath5k_int @@ -2606,13 +2576,6 @@ ath5k_hw_set_opmode(struct ath_hw *hal) AR5K_REG_WRITE(AR5K_BCR, beacon_reg); } -void /*TODO: Get rid of this, clean up the driver code, only set_opmode is needed*/ -ath5k_hw_set_pcu_config(struct ath_hw *hal) -{ - AR5K_TRACE; - ath5k_hw_set_opmode(hal); -} - /* * BSSID Functions */