Lines Matching refs:mode

1618 static void phy_info_ht_capa(struct hostapd_hw_modes *mode, struct nlattr *capa,  in phy_info_ht_capa()  argument
1624 mode->ht_capab = nla_get_u16(capa); in phy_info_ht_capa()
1627 mode->a_mpdu_params |= nla_get_u8(ampdu_factor) & 0x03; in phy_info_ht_capa()
1630 mode->a_mpdu_params |= nla_get_u8(ampdu_density) << 2; in phy_info_ht_capa()
1635 os_memcpy(mode->mcs_set, mcs, 16); in phy_info_ht_capa()
1640 static void phy_info_vht_capa(struct hostapd_hw_modes *mode, in phy_info_vht_capa() argument
1645 mode->vht_capab = nla_get_u32(capa); in phy_info_vht_capa()
1650 os_memcpy(mode->vht_mcs_set, mcs, 8); in phy_info_vht_capa()
1655 static int phy_info_edmg_capa(struct hostapd_hw_modes *mode, in phy_info_edmg_capa() argument
1662 mode->edmg.bw_config = nla_get_u8(bw_config); in phy_info_edmg_capa()
1663 mode->edmg.channels = nla_get_u8(channels); in phy_info_edmg_capa()
1665 if (!mode->edmg.channels || !mode->edmg.bw_config) in phy_info_edmg_capa()
1686 static void phy_info_freq(struct hostapd_hw_modes *mode, in phy_info_freq() argument
1813 struct hostapd_hw_modes *mode, struct nlattr *tb) in phy_info_freqs() argument
1846 channel = os_realloc_array(mode->channels, in phy_info_freqs()
1847 mode->num_channels + new_channels, in phy_info_freqs()
1852 mode->channels = channel; in phy_info_freqs()
1853 mode->num_channels += new_channels; in phy_info_freqs()
1862 phy_info_freq(mode, &mode->channels[idx], tb_freq); in phy_info_freqs()
1871 static int phy_info_rates(struct hostapd_hw_modes *mode, struct nlattr *tb) in phy_info_rates() argument
1891 mode->num_rates++; in phy_info_rates()
1894 mode->rates = os_calloc(mode->num_rates, sizeof(int)); in phy_info_rates()
1895 if (!mode->rates) in phy_info_rates()
1906 mode->rates[idx] = nla_get_u32( in phy_info_rates()
1915 static void phy_info_iftype_copy(struct hostapd_hw_modes *mode, in phy_info_iftype_copy() argument
1921 struct he_capabilities *he_capab = &mode->he_capab[opmode]; in phy_info_iftype_copy()
1922 struct eht_capabilities *eht_capab = &mode->eht_capab[opmode]; in phy_info_iftype_copy()
2036 static int phy_info_iftype(struct hostapd_hw_modes *mode, in phy_info_iftype() argument
2054 phy_info_iftype_copy(mode, i, tb, tb_flags); in phy_info_iftype()
2063 struct hostapd_hw_modes *mode; in phy_info_band() local
2067 mode = os_realloc_array(phy_info->modes, in phy_info_band()
2069 sizeof(*mode)); in phy_info_band()
2070 if (!mode) { in phy_info_band()
2074 phy_info->modes = mode; in phy_info_band()
2076 mode = &phy_info->modes[*(phy_info->num_modes)]; in phy_info_band()
2077 os_memset(mode, 0, sizeof(*mode)); in phy_info_band()
2078 mode->mode = NUM_HOSTAPD_MODES; in phy_info_band()
2079 mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN | in phy_info_band()
2089 mode->vht_mcs_set[0] = 0xff; in phy_info_band()
2090 mode->vht_mcs_set[1] = 0xff; in phy_info_band()
2091 mode->vht_mcs_set[4] = 0xff; in phy_info_band()
2092 mode->vht_mcs_set[5] = 0xff; in phy_info_band()
2098 mode = &phy_info->modes[*(phy_info->num_modes) - 1]; in phy_info_band()
2103 phy_info_ht_capa(mode, tb_band[NL80211_BAND_ATTR_HT_CAPA], in phy_info_band()
2107 phy_info_vht_capa(mode, tb_band[NL80211_BAND_ATTR_VHT_CAPA], in phy_info_band()
2109 ret = phy_info_edmg_capa(mode, in phy_info_band()
2113 ret = phy_info_freqs(phy_info, mode, in phy_info_band()
2116 ret = phy_info_rates(mode, tb_band[NL80211_BAND_ATTR_RATES]); in phy_info_band()
2129 ret = phy_info_iftype(mode, nl_iftype); in phy_info_band()
2169 struct hostapd_hw_modes *mode11g = NULL, *nmodes, *mode; in wpa_driver_nl80211_postprocess_modes() local
2183 modes[m].mode = HOSTAPD_MODE_IEEE80211B; in wpa_driver_nl80211_postprocess_modes()
2186 modes[m].mode = HOSTAPD_MODE_IEEE80211G; in wpa_driver_nl80211_postprocess_modes()
2191 modes[m].mode = HOSTAPD_MODE_IEEE80211AD; in wpa_driver_nl80211_postprocess_modes()
2193 modes[m].mode = HOSTAPD_MODE_IEEE80211A; in wpa_driver_nl80211_postprocess_modes()
2196 modes[m].mode = HOSTAPD_MODE_IEEE80211A; in wpa_driver_nl80211_postprocess_modes()
2203 if (modes[m].mode == NUM_HOSTAPD_MODES) { in wpa_driver_nl80211_postprocess_modes()
2222 if (modes[m].mode == HOSTAPD_MODE_IEEE80211B) in wpa_driver_nl80211_postprocess_modes()
2224 if (modes[m].mode == HOSTAPD_MODE_IEEE80211G) in wpa_driver_nl80211_postprocess_modes()
2235 mode = &nmodes[*num_modes]; in wpa_driver_nl80211_postprocess_modes()
2236 os_memset(mode, 0, sizeof(*mode)); in wpa_driver_nl80211_postprocess_modes()
2240 mode->mode = HOSTAPD_MODE_IEEE80211B; in wpa_driver_nl80211_postprocess_modes()
2243 mode->num_channels = mode11g->num_channels; in wpa_driver_nl80211_postprocess_modes()
2244 mode->channels = os_memdup(mode11g->channels, in wpa_driver_nl80211_postprocess_modes()
2247 if (mode->channels == NULL) { in wpa_driver_nl80211_postprocess_modes()
2252 mode->num_rates = 0; in wpa_driver_nl80211_postprocess_modes()
2253 mode->rates = os_malloc(4 * sizeof(int)); in wpa_driver_nl80211_postprocess_modes()
2254 if (mode->rates == NULL) { in wpa_driver_nl80211_postprocess_modes()
2255 os_free(mode->channels); in wpa_driver_nl80211_postprocess_modes()
2264 mode->rates[mode->num_rates] = mode11g->rates[i]; in wpa_driver_nl80211_postprocess_modes()
2265 mode->num_rates++; in wpa_driver_nl80211_postprocess_modes()
2266 if (mode->num_rates == 4) in wpa_driver_nl80211_postprocess_modes()
2270 if (mode->num_rates == 0) { in wpa_driver_nl80211_postprocess_modes()
2271 os_free(mode->channels); in wpa_driver_nl80211_postprocess_modes()
2272 os_free(mode->rates); in wpa_driver_nl80211_postprocess_modes()
2284 static void nl80211_set_ht40_mode(struct hostapd_hw_modes *mode, int start, in nl80211_set_ht40_mode() argument
2289 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_ht40_mode()
2290 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_ht40_mode()
2297 static void nl80211_set_ht40_mode_sec(struct hostapd_hw_modes *mode, int start, in nl80211_set_ht40_mode_sec() argument
2302 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_ht40_mode_sec()
2303 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_ht40_mode_sec()
2321 struct hostapd_hw_modes *mode = &results->modes[m]; in nl80211_reg_rule_max_eirp() local
2323 for (c = 0; c < mode->num_channels; c++) { in nl80211_reg_rule_max_eirp()
2324 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_reg_rule_max_eirp()
2374 static void nl80211_set_vht_mode(struct hostapd_hw_modes *mode, int start, in nl80211_set_vht_mode() argument
2379 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_vht_mode()
2380 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_vht_mode()
2425 static void nl80211_set_6ghz_mode(struct hostapd_hw_modes *mode, int start, in nl80211_set_6ghz_mode() argument
2430 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_6ghz_mode()
2431 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_6ghz_mode()
2626 static const char * modestr(enum hostapd_hw_mode mode) in modestr() argument
2628 switch (mode) { in modestr()
2653 struct hostapd_hw_modes *mode = &modes[i]; in nl80211_dump_chan_list() local
2659 for (j = 0; j < mode->num_channels; j++) { in nl80211_dump_chan_list()
2660 struct hostapd_channel_data *chan = &mode->channels[j]; in nl80211_dump_chan_list()
2681 modestr(mode->mode), str); in nl80211_dump_chan_list()