OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008-2009 Atheros Communications Inc. | 2 * Copyright (c) 2008-2009 Atheros Communications Inc. |
3 * | 3 * |
4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
7 * | 7 * |
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ath_print(common, ATH_DBG_FATAL, | 247 ath_print(common, ATH_DBG_FATAL, |
248 "Unable to restart recv logic\n"); | 248 "Unable to restart recv logic\n"); |
249 r = -EIO; | 249 r = -EIO; |
250 goto ps_restore; | 250 goto ps_restore; |
251 } | 251 } |
252 | 252 |
253 ath_cache_conf_rate(sc, &hw->conf); | 253 ath_cache_conf_rate(sc, &hw->conf); |
254 ath_update_txpow(sc); | 254 ath_update_txpow(sc); |
255 ath9k_hw_set_interrupts(ah, ah->imask); | 255 ath9k_hw_set_interrupts(ah, ah->imask); |
256 | 256 |
257 » if (!(sc->sc_flags & (SC_OP_OFFCHANNEL | SC_OP_SCANNING))) { | 257 » if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { |
| 258 » » ath_beacon_config(sc, NULL); |
| 259 » » ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); |
258 ath_start_ani(common); | 260 ath_start_ani(common); |
259 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | |
260 } | 261 } |
261 | 262 |
262 if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) | |
263 ath_beacon_config(sc, NULL); | |
264 | |
265 ps_restore: | 263 ps_restore: |
266 ath9k_ps_restore(sc); | 264 ath9k_ps_restore(sc); |
267 return r; | 265 return r; |
268 } | 266 } |
269 | 267 |
270 static void ath_paprd_activate(struct ath_softc *sc) | 268 static void ath_paprd_activate(struct ath_softc *sc) |
271 { | 269 { |
272 struct ath_hw *ah = sc->sc_ah; | 270 struct ath_hw *ah = sc->sc_ah; |
273 struct ath9k_hw_cal_data *caldata = ah->caldata; | 271 struct ath9k_hw_cal_data *caldata = ah->caldata; |
274 int chain; | 272 int chain; |
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2030 * After mac80211 fixes we will not have configured hardware | 2028 * After mac80211 fixes we will not have configured hardware |
2031 * to the home channel nor would we have configured the RX | 2029 * to the home channel nor would we have configured the RX |
2032 * filter yet. | 2030 * filter yet. |
2033 */ | 2031 */ |
2034 mutex_unlock(&sc->mutex); | 2032 mutex_unlock(&sc->mutex); |
2035 return; | 2033 return; |
2036 } | 2034 } |
2037 | 2035 |
2038 aphy->state = ATH_WIPHY_SCAN; | 2036 aphy->state = ATH_WIPHY_SCAN; |
2039 ath9k_wiphy_pause_all_forced(sc, aphy); | 2037 ath9k_wiphy_pause_all_forced(sc, aphy); |
2040 sc->sc_flags |= SC_OP_SCANNING; | |
2041 mutex_unlock(&sc->mutex); | 2038 mutex_unlock(&sc->mutex); |
2042 } | 2039 } |
2043 | 2040 |
2044 /* | 2041 /* |
2045 * XXX: this requires a revisit after the driver | 2042 * XXX: this requires a revisit after the driver |
2046 * scan_complete gets moved to another place/removed in mac80211. | 2043 * scan_complete gets moved to another place/removed in mac80211. |
2047 */ | 2044 */ |
2048 static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) | 2045 static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) |
2049 { | 2046 { |
2050 struct ath_wiphy *aphy = hw->priv; | 2047 struct ath_wiphy *aphy = hw->priv; |
2051 struct ath_softc *sc = aphy->sc; | 2048 struct ath_softc *sc = aphy->sc; |
2052 | 2049 |
2053 mutex_lock(&sc->mutex); | 2050 mutex_lock(&sc->mutex); |
2054 aphy->state = ATH_WIPHY_ACTIVE; | 2051 aphy->state = ATH_WIPHY_ACTIVE; |
2055 sc->sc_flags &= ~SC_OP_SCANNING; | |
2056 mutex_unlock(&sc->mutex); | 2052 mutex_unlock(&sc->mutex); |
2057 } | 2053 } |
2058 | 2054 |
2059 static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | 2055 static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) |
2060 { | 2056 { |
2061 struct ath_wiphy *aphy = hw->priv; | 2057 struct ath_wiphy *aphy = hw->priv; |
2062 struct ath_softc *sc = aphy->sc; | 2058 struct ath_softc *sc = aphy->sc; |
2063 struct ath_hw *ah = sc->sc_ah; | 2059 struct ath_hw *ah = sc->sc_ah; |
2064 | 2060 |
2065 mutex_lock(&sc->mutex); | 2061 mutex_lock(&sc->mutex); |
(...skipping 18 matching lines...) Expand all Loading... |
2084 .get_tsf = ath9k_get_tsf, | 2080 .get_tsf = ath9k_get_tsf, |
2085 .set_tsf = ath9k_set_tsf, | 2081 .set_tsf = ath9k_set_tsf, |
2086 .reset_tsf = ath9k_reset_tsf, | 2082 .reset_tsf = ath9k_reset_tsf, |
2087 .ampdu_action = ath9k_ampdu_action, | 2083 .ampdu_action = ath9k_ampdu_action, |
2088 .get_survey = ath9k_get_survey, | 2084 .get_survey = ath9k_get_survey, |
2089 .sw_scan_start = ath9k_sw_scan_start, | 2085 .sw_scan_start = ath9k_sw_scan_start, |
2090 .sw_scan_complete = ath9k_sw_scan_complete, | 2086 .sw_scan_complete = ath9k_sw_scan_complete, |
2091 .rfkill_poll = ath9k_rfkill_poll_state, | 2087 .rfkill_poll = ath9k_rfkill_poll_state, |
2092 .set_coverage_class = ath9k_set_coverage_class, | 2088 .set_coverage_class = ath9k_set_coverage_class, |
2093 }; | 2089 }; |
OLD | NEW |