diff options
author | Vivek Natarajan <vivek.natraj@gmail.com> | 2009-01-28 10:23:27 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:35 -0500 |
commit | 4e30ffa29c1388006e5d36d5ea8c5b46b38b36d5 (patch) | |
tree | c05847938ff2183f071abeda43b43e9a34494e54 /drivers/net/wireless/ath9k/main.c | |
parent | d22b0022e75b37e5c5a995754fcf9f61b39022d2 (diff) |
ath9k: Enable MIB and TIM interrupts for station mode.
Enable operating mode specific interrupts in ath9k_add_interface instead
of ath9k_start.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index d8e826659c15..91f7a7b69a30 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1957,25 +1957,6 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1957 | if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_HT) | 1957 | if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_HT) |
1958 | sc->sc_imask |= ATH9K_INT_CST; | 1958 | sc->sc_imask |= ATH9K_INT_CST; |
1959 | 1959 | ||
1960 | /* | ||
1961 | * Enable MIB interrupts when there are hardware phy counters. | ||
1962 | * Note we only do this (at the moment) for station mode. | ||
1963 | */ | ||
1964 | if (ath9k_hw_phycounters(sc->sc_ah) && | ||
1965 | ((sc->sc_ah->ah_opmode == NL80211_IFTYPE_STATION) || | ||
1966 | (sc->sc_ah->ah_opmode == NL80211_IFTYPE_ADHOC))) | ||
1967 | sc->sc_imask |= ATH9K_INT_MIB; | ||
1968 | /* | ||
1969 | * Some hardware processes the TIM IE and fires an | ||
1970 | * interrupt when the TIM bit is set. For hardware | ||
1971 | * that does, if not overridden by configuration, | ||
1972 | * enable the TIM interrupt when operating as station. | ||
1973 | */ | ||
1974 | if ((sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_ENHANCEDPM) && | ||
1975 | (sc->sc_ah->ah_opmode == NL80211_IFTYPE_STATION) && | ||
1976 | !sc->sc_config.swBeaconProcess) | ||
1977 | sc->sc_imask |= ATH9K_INT_TIM; | ||
1978 | |||
1979 | ath_cache_conf_rate(sc, &hw->conf); | 1960 | ath_cache_conf_rate(sc, &hw->conf); |
1980 | 1961 | ||
1981 | sc->sc_flags &= ~SC_OP_INVALID; | 1962 | sc->sc_flags &= ~SC_OP_INVALID; |
@@ -2124,6 +2105,27 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
2124 | /* Set the device opmode */ | 2105 | /* Set the device opmode */ |
2125 | sc->sc_ah->ah_opmode = ic_opmode; | 2106 | sc->sc_ah->ah_opmode = ic_opmode; |
2126 | 2107 | ||
2108 | /* | ||
2109 | * Enable MIB interrupts when there are hardware phy counters. | ||
2110 | * Note we only do this (at the moment) for station mode. | ||
2111 | */ | ||
2112 | if (ath9k_hw_phycounters(sc->sc_ah) && | ||
2113 | ((conf->type == NL80211_IFTYPE_STATION) || | ||
2114 | (conf->type == NL80211_IFTYPE_ADHOC))) | ||
2115 | sc->sc_imask |= ATH9K_INT_MIB; | ||
2116 | /* | ||
2117 | * Some hardware processes the TIM IE and fires an | ||
2118 | * interrupt when the TIM bit is set. For hardware | ||
2119 | * that does, if not overridden by configuration, | ||
2120 | * enable the TIM interrupt when operating as station. | ||
2121 | */ | ||
2122 | if ((sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_ENHANCEDPM) && | ||
2123 | (conf->type == NL80211_IFTYPE_STATION) && | ||
2124 | !sc->sc_config.swBeaconProcess) | ||
2125 | sc->sc_imask |= ATH9K_INT_TIM; | ||
2126 | |||
2127 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_imask); | ||
2128 | |||
2127 | if (conf->type == NL80211_IFTYPE_AP) { | 2129 | if (conf->type == NL80211_IFTYPE_AP) { |
2128 | /* TODO: is this a suitable place to start ANI for AP mode? */ | 2130 | /* TODO: is this a suitable place to start ANI for AP mode? */ |
2129 | /* Start ANI */ | 2131 | /* Start ANI */ |