Skip to content

Commit

Permalink
ath5k: update PCU opmode whenever a new interface is added
Browse files Browse the repository at this point in the history
Previously, we would store the operating mode at interface up time,
but only update the PCU registers when the next reset happened.
The result is that if beacon configuration (ops->bss_info_changed)
happens before ops->config, we will program the wrong things into
the timer registers.  Consequently, beacons won't work in AP mode
until after a reset (channel change, scan etc.).

This is fragile anyway so just program the opmode as soon as
mac80211 gives it to us.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Bob Copeland authored and John W. Linville committed Aug 4, 2009
1 parent 57c9fff commit ae6f53f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,8 @@ ath5k_mode_setup(struct ath5k_softc *sc)
struct ath5k_hw *ah = sc->ah;
u32 rfilt;

ah->ah_op_mode = sc->opmode;

/* configure rx filter */
rfilt = sc->filter_flags;
ath5k_hw_set_rx_filter(ah, rfilt);
Expand Down Expand Up @@ -2768,6 +2770,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
}

ath5k_hw_set_lladdr(sc->ah, conf->mac_addr);
ath5k_mode_setup(sc);

ret = 0;
end:
Expand Down

0 comments on commit ae6f53f

Please sign in to comment.