Lines Matching +full:memcpy +full:- +full:channels

2  * Copyright (c) 2008-2011 Atheros Communications Inc.
35 /* Some 2 GHz radios are actually tunable on 2312-2732
36 * on 5 MHz steps, we support the channels which we know
56 /* Some 5 GHz radios are actually tunable on XXXX-YYYY
57 * on 5 MHz steps, we support the channels which we know
127 struct ath_hw *ah = common->ah; in ath9k_cmn_init_channels_rates()
128 void *channels; in ath9k_cmn_init_channels_rates() local
134 if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) { in ath9k_cmn_init_channels_rates()
135 channels = devm_kzalloc(ah->dev, in ath9k_cmn_init_channels_rates()
137 if (!channels) in ath9k_cmn_init_channels_rates()
138 return -ENOMEM; in ath9k_cmn_init_channels_rates()
140 memcpy(channels, ath9k_2ghz_chantable, in ath9k_cmn_init_channels_rates()
142 common->sbands[NL80211_BAND_2GHZ].channels = channels; in ath9k_cmn_init_channels_rates()
143 common->sbands[NL80211_BAND_2GHZ].band = NL80211_BAND_2GHZ; in ath9k_cmn_init_channels_rates()
144 common->sbands[NL80211_BAND_2GHZ].n_channels = in ath9k_cmn_init_channels_rates()
146 common->sbands[NL80211_BAND_2GHZ].bitrates = ath9k_legacy_rates; in ath9k_cmn_init_channels_rates()
147 common->sbands[NL80211_BAND_2GHZ].n_bitrates = in ath9k_cmn_init_channels_rates()
151 if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) { in ath9k_cmn_init_channels_rates()
152 channels = devm_kzalloc(ah->dev, in ath9k_cmn_init_channels_rates()
154 if (!channels) in ath9k_cmn_init_channels_rates()
155 return -ENOMEM; in ath9k_cmn_init_channels_rates()
157 memcpy(channels, ath9k_5ghz_chantable, in ath9k_cmn_init_channels_rates()
159 common->sbands[NL80211_BAND_5GHZ].channels = channels; in ath9k_cmn_init_channels_rates()
160 common->sbands[NL80211_BAND_5GHZ].band = NL80211_BAND_5GHZ; in ath9k_cmn_init_channels_rates()
161 common->sbands[NL80211_BAND_5GHZ].n_channels = in ath9k_cmn_init_channels_rates()
163 common->sbands[NL80211_BAND_5GHZ].bitrates = in ath9k_cmn_init_channels_rates()
165 common->sbands[NL80211_BAND_5GHZ].n_bitrates = in ath9k_cmn_init_channels_rates()
166 ARRAY_SIZE(ath9k_legacy_rates) - 4; in ath9k_cmn_init_channels_rates()
179 ht_info->ht_supported = true; in ath9k_cmn_setup_ht_cap()
180 ht_info->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 | in ath9k_cmn_setup_ht_cap()
185 if (ah->caps.hw_caps & ATH9K_HW_CAP_LDPC) in ath9k_cmn_setup_ht_cap()
186 ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING; in ath9k_cmn_setup_ht_cap()
188 if (ah->caps.hw_caps & ATH9K_HW_CAP_SGI_20) in ath9k_cmn_setup_ht_cap()
189 ht_info->cap |= IEEE80211_HT_CAP_SGI_20; in ath9k_cmn_setup_ht_cap()
191 ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; in ath9k_cmn_setup_ht_cap()
192 ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_8; in ath9k_cmn_setup_ht_cap()
205 ht_info->cap |= IEEE80211_HT_CAP_TX_STBC; in ath9k_cmn_setup_ht_cap()
206 ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT); in ath9k_cmn_setup_ht_cap()
210 memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); in ath9k_cmn_setup_ht_cap()
211 tx_streams = ath9k_cmn_count_streams(ah->txchainmask, max_streams); in ath9k_cmn_setup_ht_cap()
212 rx_streams = ath9k_cmn_count_streams(ah->rxchainmask, max_streams); in ath9k_cmn_setup_ht_cap()
218 ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_RX_DIFF; in ath9k_cmn_setup_ht_cap()
219 ht_info->mcs.tx_params |= ((tx_streams - 1) << in ath9k_cmn_setup_ht_cap()
224 ht_info->mcs.rx_mask[i] = 0xff; in ath9k_cmn_setup_ht_cap()
226 ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED; in ath9k_cmn_setup_ht_cap()
234 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_HT)) in ath9k_cmn_reload_chainmask()
237 if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) in ath9k_cmn_reload_chainmask()
239 &common->sbands[NL80211_BAND_2GHZ].ht_cap); in ath9k_cmn_reload_chainmask()
240 if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) in ath9k_cmn_reload_chainmask()
242 &common->sbands[NL80211_BAND_5GHZ].ht_cap); in ath9k_cmn_reload_chainmask()