ath5k: No need to save/restore staid flags on reset

* Since we set antenna flags on phy init and ack bitrate
 mode on pcu init, there is no need to save/restore sta_id
 flags on ath5k_hw_reset. Also we don't need to re-set our
 mac address because it's not affected by resets.

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Nick Kossifidis 2010-11-23 21:42:22 +02:00 committed by John W. Linville
parent 8aec7af99b
commit c2b0ebef26

View File

@ -940,13 +940,11 @@ static void ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah,
int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
struct ieee80211_channel *channel, bool fast, bool skip_pcu)
{
struct ath_common *common = ath5k_hw_common(ah);
u32 s_seq[10], s_led[3], staid1_flags, tsf_up, tsf_lo;
u32 s_seq[10], s_led[3], tsf_up, tsf_lo;
u8 mode, freq, ee_mode;
int i, ret;
ee_mode = 0;
staid1_flags = 0;
tsf_up = 0;
tsf_lo = 0;
freq = 0;
@ -1115,15 +1113,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
s_led[1] = ath5k_hw_reg_read(ah, AR5K_GPIOCR);
s_led[2] = ath5k_hw_reg_read(ah, AR5K_GPIODO);
/* AR5K_STA_ID1 flags, only preserve antenna
* settings and ack/cts rate mode */
staid1_flags = ath5k_hw_reg_read(ah, AR5K_STA_ID1) &
(AR5K_STA_ID1_DEFAULT_ANTENNA |
AR5K_STA_ID1_DESC_ANTENNA |
AR5K_STA_ID1_RTS_DEF_ANTENNA |
AR5K_STA_ID1_ACKCTS_6MB |
AR5K_STA_ID1_BASE_RATE_11B |
AR5K_STA_ID1_SELFGEN_DEF_ANT);
/*
* Since we are going to write rf buffer
@ -1195,15 +1184,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
ath5k_hw_reg_write(ah, s_led[1], AR5K_GPIOCR);
ath5k_hw_reg_write(ah, s_led[2], AR5K_GPIODO);
/* Restore sta_id flags and preserve our mac address*/
ath5k_hw_reg_write(ah,
get_unaligned_le32(common->macaddr),
AR5K_STA_ID0);
ath5k_hw_reg_write(ah,
staid1_flags | get_unaligned_le16(common->macaddr + 4),
AR5K_STA_ID1);
/*
* Initialize PCU
*/