aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/phy.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-06-10 22:22:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:41 -0400
commit46026e8f487c075f9ec4d671348e351eb5e46d3e (patch)
tree441d26a2ad9e6434114718fe14fe597732743682 /drivers/net/wireless/ath/ath5k/phy.c
parent8a46097a6c60dc9d2f09bf01734f3308142614b3 (diff)
ath5k: cleanup ath5k_hw struct
ah_gpios array isn't used, and ah_current_channel can be a pointer instead of an embedded struct. Removing these and some other write-only variables, and moving some things around for better packing and cache utilization saves 116 bytes. text data bss dec hex filename 121762 472 64 122298 1ddba ath5k_before.ko 121646 472 64 122182 1dd46 ath5k.ko Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/phy.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index a876ca8d69e..2075ba99396 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1085,8 +1085,7 @@ int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel)
AR5K_PHY_CCKTXCTL_WORLD);
}
- ah->ah_current_channel.center_freq = channel->center_freq;
- ah->ah_current_channel.hw_value = channel->hw_value;
+ ah->ah_current_channel = channel;
ah->ah_turbo = channel->hw_value == CHANNEL_T ? true : false;
return 0;
@@ -1731,7 +1730,7 @@ ath5k_hw_set_fast_div(struct ath5k_hw *ah, u8 ee_mode, bool enable)
void
ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
{
- struct ieee80211_channel *channel = &ah->ah_current_channel;
+ struct ieee80211_channel *channel = ah->ah_current_channel;
bool use_def_for_tx, update_def_on_tx, use_def_for_rts, fast_div;
bool use_def_for_sg;
u8 def_ant, tx_ant, ee_mode;
@@ -3011,7 +3010,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower)
{
/*Just a try M.F.*/
- struct ieee80211_channel *channel = &ah->ah_current_channel;
+ struct ieee80211_channel *channel = ah->ah_current_channel;
u8 ee_mode;
ATH5K_TRACE(ah->ah_sc);