Skip to content

Commit

Permalink
ath9k_hw: Fix opmode initialization
Browse files Browse the repository at this point in the history
Commit "ath9k_hw: Relocate Opmode initialization"
moved the opmode initialization before the STA_ID1 register
was programmed with defaults. This changed the original
behaviour because the re-programming code doesn't take into
account the existing value in the register. Both ath9k and ath9k_htc
were not affected by this change because the opmode is
re-initialized after every reset, when RX is started.

Revert to the original behavior, except keep it outside the
REGWRITE block. This would help remove extraneous opmode calls
in the driver core.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Jan 28, 2011
1 parent 45cbad6 commit 00e0003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
ath9k_hw_spur_mitigate_freq(ah, chan);
ah->eep_ops->set_board_values(ah, chan);

ath9k_hw_set_operating_mode(ah, ah->opmode);

ENABLE_REGWRITE_BUFFER(ah);

REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr));
Expand All @@ -1365,6 +1363,8 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,

REGWRITE_BUFFER_FLUSH(ah);

ath9k_hw_set_operating_mode(ah, ah->opmode);

r = ath9k_hw_rf_set_freq(ah, chan);
if (r)
return r;
Expand Down

0 comments on commit 00e0003

Please sign in to comment.