Lines Matching +full:40 +full:- +full:bit

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2011-2020 NXP
66 /* LGI 40M */
70 /* SGI 40M */
101 /* LG 40M */
105 /* SG 40M */
134 /* LG 40M */
138 /* SG 40M */
195 /* 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */ in mwifiex_index_to_acs_data_rate()
202 rate = ac_mcs_rate_nss2[2 * (3 - bw) + gi][mcs_index]; in mwifiex_index_to_acs_data_rate()
204 rate = ac_mcs_rate_nss1[2 * (3 - bw) + gi][mcs_index]; in mwifiex_index_to_acs_data_rate()
206 /* 20M: bw=0, 40M: bw=1 */ in mwifiex_index_to_acs_data_rate()
219 rate = mcs_rate[2 * (1 - bw) + gi][index]; in mwifiex_index_to_acs_data_rate()
226 /* 11n non-HT rates */ in mwifiex_index_to_acs_data_rate()
242 (priv->adapter->user_dev_mcs_support == HT_STREAM_2X2) ? 16 : 8; in mwifiex_index_to_data_rate()
245 if (priv->adapter->is_hw_11ac_capable) in mwifiex_index_to_data_rate()
248 if (ht_info & BIT(0)) { in mwifiex_index_to_data_rate()
250 if (ht_info & BIT(2)) in mwifiex_index_to_data_rate()
255 if (ht_info & BIT(1)) { in mwifiex_index_to_data_rate()
256 if (ht_info & BIT(2)) in mwifiex_index_to_data_rate()
257 /* SGI, 40M */ in mwifiex_index_to_data_rate()
260 /* LGI, 40M */ in mwifiex_index_to_data_rate()
263 if (ht_info & BIT(2)) in mwifiex_index_to_data_rate()
287 if (!priv->media_connected) in mwifiex_get_active_data_rates()
291 priv->curr_bss_params.data_rates, in mwifiex_get_active_data_rates()
292 priv->curr_bss_params.num_of_rates); in mwifiex_get_active_data_rates()
296 * This function locates the Channel-Frequency-Power triplet based upon
311 sband = priv->wdev.wiphy->bands[NL80211_BAND_2GHZ]; in mwifiex_get_cfp()
313 sband = priv->wdev.wiphy->bands[NL80211_BAND_5GHZ]; in mwifiex_get_cfp()
316 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_get_cfp()
322 for (i = 0; i < sband->n_channels; i++) { in mwifiex_get_cfp()
323 ch = &sband->channels[i]; in mwifiex_get_cfp()
325 if (ch->flags & IEEE80211_CHAN_DISABLED) in mwifiex_get_cfp()
329 if (ch->center_freq == freq) in mwifiex_get_cfp()
333 if (ch->hw_value == channel || in mwifiex_get_cfp()
338 if (i == sband->n_channels) { in mwifiex_get_cfp()
339 mwifiex_dbg(priv->adapter, WARN, in mwifiex_get_cfp()
347 priv->cfp.channel = ch->hw_value; in mwifiex_get_cfp()
348 priv->cfp.freq = ch->center_freq; in mwifiex_get_cfp()
349 priv->cfp.max_tx_power = ch->max_power; in mwifiex_get_cfp()
350 cfp = &priv->cfp; in mwifiex_get_cfp()
365 for (i = 0; i < ARRAY_SIZE(priv->bitmap_rates); i++) in mwifiex_is_rate_auto()
366 if (priv->bitmap_rates[i]) in mwifiex_is_rate_auto()
381 struct wiphy *wiphy = priv->adapter->wiphy; in mwifiex_get_rates_from_cfg80211()
382 struct cfg80211_scan_request *request = priv->scan_request; in mwifiex_get_rates_from_cfg80211()
388 sband = wiphy->bands[NL80211_BAND_5GHZ]; in mwifiex_get_rates_from_cfg80211()
391 rate_mask = request->rates[NL80211_BAND_5GHZ]; in mwifiex_get_rates_from_cfg80211()
393 sband = wiphy->bands[NL80211_BAND_2GHZ]; in mwifiex_get_rates_from_cfg80211()
396 rate_mask = request->rates[NL80211_BAND_2GHZ]; in mwifiex_get_rates_from_cfg80211()
400 for (i = 0; i < sband->n_bitrates; i++) { in mwifiex_get_rates_from_cfg80211()
401 if ((BIT(i) & rate_mask) == 0) in mwifiex_get_rates_from_cfg80211()
403 rates[num_rates++] = (u8)(sband->bitrates[i].bitrate / 5); in mwifiex_get_rates_from_cfg80211()
410 * both Ad-Hoc and infra mode by printing the band and returning the
416 struct mwifiex_adapter *adapter = priv->adapter; in mwifiex_get_supported_rates()
418 if (priv->bss_mode == NL80211_IFTYPE_STATION || in mwifiex_get_supported_rates()
419 priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) { in mwifiex_get_supported_rates()
420 switch (adapter->config_bands) { in mwifiex_get_supported_rates()
424 adapter->config_bands); in mwifiex_get_supported_rates()
432 adapter->config_bands); in mwifiex_get_supported_rates()
444 adapter->config_bands); in mwifiex_get_supported_rates()
452 adapter->config_bands); in mwifiex_get_supported_rates()
463 adapter->config_bands); in mwifiex_get_supported_rates()
470 adapter->config_bands); in mwifiex_get_supported_rates()
476 /* Ad-hoc mode */ in mwifiex_get_supported_rates()
477 switch (adapter->adhoc_start_band) { in mwifiex_get_supported_rates()
513 if ((rate_info & BIT(0)) && (rate_info & BIT(1))) in mwifiex_adjust_data_rate()
516 else if (rate_info & BIT(0)) /* HT20 */ in mwifiex_adjust_data_rate()
520 rx_rate - 1 : rx_rate; in mwifiex_adjust_data_rate()
523 rate_index = MWIFIEX_MAX_AC_RX_RATES - 1; in mwifiex_adjust_data_rate()