diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index d457cb3bd772..18d76ede859d 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -175,18 +175,6 @@ static const struct ath_ops ath9k_common_ops = { | |||
175 | .write = ath9k_iowrite32, | 175 | .write = ath9k_iowrite32, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static int count_streams(unsigned int chainmask, int max) | ||
179 | { | ||
180 | int streams = 0; | ||
181 | |||
182 | do { | ||
183 | if (++streams == max) | ||
184 | break; | ||
185 | } while ((chainmask = chainmask & (chainmask - 1))); | ||
186 | |||
187 | return streams; | ||
188 | } | ||
189 | |||
190 | /**************************/ | 178 | /**************************/ |
191 | /* Initialization */ | 179 | /* Initialization */ |
192 | /**************************/ | 180 | /**************************/ |
@@ -208,6 +196,9 @@ static void setup_ht_cap(struct ath_softc *sc, | |||
208 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_LDPC) | 196 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_LDPC) |
209 | ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING; | 197 | ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING; |
210 | 198 | ||
199 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_SGI_20) | ||
200 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | ||
201 | |||
211 | ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; | 202 | ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; |
212 | ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_8; | 203 | ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_8; |
213 | 204 | ||
@@ -224,8 +215,8 @@ static void setup_ht_cap(struct ath_softc *sc, | |||
224 | 215 | ||
225 | /* set up supported mcs set */ | 216 | /* set up supported mcs set */ |
226 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); | 217 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); |
227 | tx_streams = count_streams(common->tx_chainmask, max_streams); | 218 | tx_streams = ath9k_cmn_count_streams(common->tx_chainmask, max_streams); |
228 | rx_streams = count_streams(common->rx_chainmask, max_streams); | 219 | rx_streams = ath9k_cmn_count_streams(common->rx_chainmask, max_streams); |
229 | 220 | ||
230 | ath_print(common, ATH_DBG_CONFIG, | 221 | ath_print(common, ATH_DBG_CONFIG, |
231 | "TX streams %d, RX streams: %d\n", | 222 | "TX streams %d, RX streams: %d\n", |