Lines Matching +full:rates +full:- +full:mcs
2 * Driver interaction with Linux nl80211/cfg80211 - Capabilities
3 * Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi>
5 * Copyright (c) 2009-2010, Atheros Communications
17 #include "common/qca-vendor.h"
18 #include "common/qca-vendor-attr.h"
117 info->capa->flags |= WPA_DRIVER_FLAGS_AP; in wiphy_info_supported_iftypes()
120 info->capa->flags |= WPA_DRIVER_FLAGS_MESH; in wiphy_info_supported_iftypes()
123 info->capa->flags |= WPA_DRIVER_FLAGS_IBSS; in wiphy_info_supported_iftypes()
126 info->capa->flags |= in wiphy_info_supported_iftypes()
130 info->p2p_go_supported = 1; in wiphy_info_supported_iftypes()
133 info->p2p_client_supported = 1; in wiphy_info_supported_iftypes()
169 info->capa->flags |= WPA_DRIVER_FLAGS_RADAR; in wiphy_info_iface_comb_process()
196 info->p2p_concurrent = 1; in wiphy_info_iface_comb_process()
197 if (info->num_multichan_concurrent < num_channels) in wiphy_info_iface_comb_process()
198 info->num_multichan_concurrent = num_channels; in wiphy_info_iface_comb_process()
233 info->auth_supported = 1; in wiphy_info_supp_cmds()
236 info->connect_supported = 1; in wiphy_info_supp_cmds()
239 info->capa->sched_scan_supported = 1; in wiphy_info_supp_cmds()
242 info->poll_command_supported = 1; in wiphy_info_supp_cmds()
245 info->channel_switch_supported = 1; in wiphy_info_supp_cmds()
248 info->set_qos_map_supported = 1; in wiphy_info_supp_cmds()
251 info->update_ft_ies_supported = 1; in wiphy_info_supp_cmds()
364 info->has_key_mgmt_iftype = 1; in get_iface_akm_suites_info()
370 info->drv->capa.key_mgmt_iftype[WPA_IF_IBSS] = key_mgmt; in get_iface_akm_suites_info()
373 info->drv->capa.key_mgmt_iftype[WPA_IF_STATION] = in get_iface_akm_suites_info()
377 info->drv->capa.key_mgmt_iftype[WPA_IF_AP_BSS] = in get_iface_akm_suites_info()
381 info->drv->capa.key_mgmt_iftype[WPA_IF_AP_VLAN] = in get_iface_akm_suites_info()
385 info->drv->capa.key_mgmt_iftype[WPA_IF_MESH] = key_mgmt; in get_iface_akm_suites_info()
388 info->drv->capa.key_mgmt_iftype[WPA_IF_P2P_CLIENT] = in get_iface_akm_suites_info()
392 info->drv->capa.key_mgmt_iftype[WPA_IF_P2P_GO] = in get_iface_akm_suites_info()
396 info->drv->capa.key_mgmt_iftype[WPA_IF_P2P_DEVICE] = in get_iface_akm_suites_info()
400 info->drv->capa.key_mgmt_iftype[WPA_IF_NAN] = key_mgmt; in get_iface_akm_suites_info()
430 info->has_key_mgmt = 1; in wiphy_info_akm_suites()
431 info->capa->key_mgmt = get_akm_suites_info(tb); in wiphy_info_akm_suites()
433 info->capa->key_mgmt); in wiphy_info_akm_suites()
451 wpa_printf(MSG_DEBUG, "nl80211: Supported cipher %02x-%02x-%02x:%d", in wiphy_info_cipher_suites()
456 info->capa->enc |= WPA_DRIVER_CAPA_ENC_CCMP_256; in wiphy_info_cipher_suites()
459 info->capa->enc |= WPA_DRIVER_CAPA_ENC_GCMP_256; in wiphy_info_cipher_suites()
462 info->capa->enc |= WPA_DRIVER_CAPA_ENC_CCMP; in wiphy_info_cipher_suites()
465 info->capa->enc |= WPA_DRIVER_CAPA_ENC_GCMP; in wiphy_info_cipher_suites()
468 info->capa->enc |= WPA_DRIVER_CAPA_ENC_TKIP; in wiphy_info_cipher_suites()
471 info->capa->enc |= WPA_DRIVER_CAPA_ENC_WEP104; in wiphy_info_cipher_suites()
474 info->capa->enc |= WPA_DRIVER_CAPA_ENC_WEP40; in wiphy_info_cipher_suites()
477 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP; in wiphy_info_cipher_suites()
480 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_128; in wiphy_info_cipher_suites()
483 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_256; in wiphy_info_cipher_suites()
486 info->capa->enc |= WPA_DRIVER_CAPA_ENC_BIP_CMAC_256; in wiphy_info_cipher_suites()
489 info->capa->enc |= WPA_DRIVER_CAPA_ENC_GTK_NOT_USED; in wiphy_info_cipher_suites()
500 capa->max_remain_on_chan = nla_get_u32(tb); in wiphy_info_max_roc()
511 capa->flags |= WPA_DRIVER_FLAGS_TDLS_SUPPORT; in wiphy_info_tdls()
515 capa->flags |= WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP; in wiphy_info_tdls()
536 struct wpa_driver_capa *capa = info->capa; in wiphy_info_ext_feature_flags()
547 capa->flags |= WPA_DRIVER_FLAGS_VHT_IBSS; in wiphy_info_ext_feature_flags()
550 capa->rrm_flags |= WPA_DRIVER_FLAGS_SUPPORT_RRM; in wiphy_info_ext_feature_flags()
553 capa->flags |= WPA_DRIVER_FLAGS_SUPPORT_FILS; in wiphy_info_ext_feature_flags()
557 capa->flags |= WPA_DRIVER_FLAGS_BEACON_RATE_LEGACY; in wiphy_info_ext_feature_flags()
561 capa->flags |= WPA_DRIVER_FLAGS_BEACON_RATE_HT; in wiphy_info_ext_feature_flags()
565 capa->flags |= WPA_DRIVER_FLAGS_BEACON_RATE_VHT; in wiphy_info_ext_feature_flags()
569 capa->flags2 |= WPA_DRIVER_FLAGS2_BEACON_RATE_HE; in wiphy_info_ext_feature_flags()
573 capa->rrm_flags |= WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL; in wiphy_info_ext_feature_flags()
581 capa->rrm_flags |= WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT; in wiphy_info_ext_feature_flags()
584 capa->flags |= WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA; in wiphy_info_ext_feature_flags()
587 capa->flags |= WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA_CONNECTED; in wiphy_info_ext_feature_flags()
590 capa->flags |= WPA_DRIVER_FLAGS_SCHED_SCAN_RELATIVE_RSSI; in wiphy_info_ext_feature_flags()
593 capa->flags |= WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD; in wiphy_info_ext_feature_flags()
597 capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK; in wiphy_info_ext_feature_flags()
600 capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X; in wiphy_info_ext_feature_flags()
604 capa->flags2 |= WPA_DRIVER_FLAGS2_SAE_OFFLOAD_STA; in wiphy_info_ext_feature_flags()
608 capa->flags |= WPA_DRIVER_FLAGS_MFP_OPTIONAL; in wiphy_info_ext_feature_flags()
612 capa->flags |= WPA_DRIVER_FLAGS_DFS_OFFLOAD; in wiphy_info_ext_feature_flags()
624 capa->flags |= WPA_DRIVER_FLAGS_OCE_STA; in wiphy_info_ext_feature_flags()
629 capa->flags |= WPA_DRIVER_FLAGS_FTM_RESPONDER; in wiphy_info_ext_feature_flags()
633 capa->flags |= WPA_DRIVER_FLAGS_CONTROL_PORT; in wiphy_info_ext_feature_flags()
636 capa->flags2 |= WPA_DRIVER_FLAGS2_CONTROL_PORT_RX; in wiphy_info_ext_feature_flags()
640 capa->flags2 |= WPA_DRIVER_FLAGS2_CONTROL_PORT_TX_STATUS; in wiphy_info_ext_feature_flags()
644 capa->flags |= WPA_DRIVER_FLAGS_VLAN_OFFLOAD; in wiphy_info_ext_feature_flags()
648 capa->flags |= WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS; in wiphy_info_ext_feature_flags()
652 capa->flags |= WPA_DRIVER_FLAGS_BEACON_PROTECTION; in wiphy_info_ext_feature_flags()
656 capa->flags |= WPA_DRIVER_FLAGS_EXTENDED_KEY_ID; in wiphy_info_ext_feature_flags()
660 info->drv->multicast_registrations = 1; in wiphy_info_ext_feature_flags()
664 info->drv->fils_discovery = 1; in wiphy_info_ext_feature_flags()
668 info->drv->unsol_bcast_probe_resp = 1; in wiphy_info_ext_feature_flags()
671 info->drv->puncturing = 1; in wiphy_info_ext_feature_flags()
675 capa->flags2 |= WPA_DRIVER_FLAGS2_BEACON_PROTECTION_CLIENT; in wiphy_info_ext_feature_flags()
679 capa->flags2 |= WPA_DRIVER_FLAGS2_OCV; in wiphy_info_ext_feature_flags()
683 capa->flags2 |= WPA_DRIVER_FLAGS2_RADAR_BACKGROUND; in wiphy_info_ext_feature_flags()
687 capa->flags2 |= WPA_DRIVER_FLAGS2_SEC_LTF_STA; in wiphy_info_ext_feature_flags()
688 capa->flags2 |= WPA_DRIVER_FLAGS2_SEC_LTF_AP; in wiphy_info_ext_feature_flags()
693 capa->flags2 |= WPA_DRIVER_FLAGS2_SEC_RTT_STA; in wiphy_info_ext_feature_flags()
694 capa->flags2 |= WPA_DRIVER_FLAGS2_SEC_RTT_AP; in wiphy_info_ext_feature_flags()
700 capa->flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA; in wiphy_info_ext_feature_flags()
701 capa->flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_AP; in wiphy_info_ext_feature_flags()
706 capa->flags2 |= WPA_DRIVER_FLAGS2_SCAN_MIN_PREQ; in wiphy_info_ext_feature_flags()
710 capa->flags2 |= WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK; in wiphy_info_ext_feature_flags()
714 capa->flags2 |= WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA; in wiphy_info_ext_feature_flags()
718 capa->flags2 |= WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP; in wiphy_info_ext_feature_flags()
722 capa->flags2 |= WPA_DRIVER_FLAGS2_SAE_OFFLOAD_AP; in wiphy_info_ext_feature_flags()
730 struct wpa_driver_capa *capa = info->capa; in wiphy_info_feature_flags()
738 info->data_tx_status = 1; in wiphy_info_feature_flags()
741 capa->flags |= WPA_DRIVER_FLAGS_INACTIVITY_TIMER; in wiphy_info_feature_flags()
744 capa->flags |= WPA_DRIVER_FLAGS_SAE; in wiphy_info_feature_flags()
747 capa->flags |= WPA_DRIVER_FLAGS_OBSS_SCAN; in wiphy_info_feature_flags()
750 capa->flags |= WPA_DRIVER_FLAGS_HT_2040_COEX; in wiphy_info_feature_flags()
754 capa->flags |= WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH; in wiphy_info_feature_flags()
758 info->p2p_go_ctwindow_supported = 1; in wiphy_info_feature_flags()
761 info->have_low_prio_scan = 1; in wiphy_info_feature_flags()
764 info->mac_addr_rand_scan_supported = 1; in wiphy_info_feature_flags()
767 info->mac_addr_rand_sched_scan_supported = 1; in wiphy_info_feature_flags()
770 info->wmm_ac_supported = 1; in wiphy_info_feature_flags()
773 capa->rrm_flags |= WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES; in wiphy_info_feature_flags()
776 capa->rrm_flags |= WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES; in wiphy_info_feature_flags()
779 capa->rrm_flags |= WPA_DRIVER_FLAGS_QUIET; in wiphy_info_feature_flags()
782 capa->rrm_flags |= WPA_DRIVER_FLAGS_TX_POWER_INSERTION; in wiphy_info_feature_flags()
785 capa->flags |= WPA_DRIVER_FLAGS_HT_IBSS; in wiphy_info_feature_flags()
788 capa->flags |= WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE; in wiphy_info_feature_flags()
803 capa->flags |= WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD; in wiphy_info_probe_resp_offload()
804 capa->probe_resp_offloads = probe_resp_offload_support(protocols); in wiphy_info_probe_resp_offload()
821 capa->wowlan_triggers.any = 1; in wiphy_info_wowlan_triggers()
823 capa->wowlan_triggers.disconnect = 1; in wiphy_info_wowlan_triggers()
825 capa->wowlan_triggers.magic_pkt = 1; in wiphy_info_wowlan_triggers()
827 capa->wowlan_triggers.gtk_rekey_failure = 1; in wiphy_info_wowlan_triggers()
829 capa->wowlan_triggers.eap_identity_req = 1; in wiphy_info_wowlan_triggers()
831 capa->wowlan_triggers.four_way_handshake = 1; in wiphy_info_wowlan_triggers()
833 capa->wowlan_triggers.rfkill_release = 1; in wiphy_info_wowlan_triggers()
843 if (!tb || drv->num_iface_capa == NL80211_IFTYPE_MAX) in wiphy_info_extended_capab()
858 capa = &drv->iface_capa[drv->num_iface_capa]; in wiphy_info_extended_capab()
859 capa->iftype = nla_get_u32(tb1[NL80211_ATTR_IFTYPE]); in wiphy_info_extended_capab()
861 "nl80211: Driver-advertised extended capabilities for interface type %s", in wiphy_info_extended_capab()
862 nl80211_iftype_str(capa->iftype)); in wiphy_info_extended_capab()
865 capa->ext_capa = os_memdup(nla_data(tb1[NL80211_ATTR_EXT_CAPA]), in wiphy_info_extended_capab()
867 if (!capa->ext_capa) in wiphy_info_extended_capab()
870 capa->ext_capa_len = len; in wiphy_info_extended_capab()
872 capa->ext_capa, capa->ext_capa_len); in wiphy_info_extended_capab()
875 capa->ext_capa_mask = in wiphy_info_extended_capab()
878 if (!capa->ext_capa_mask) in wiphy_info_extended_capab()
882 capa->ext_capa_mask, capa->ext_capa_len); in wiphy_info_extended_capab()
886 capa->eml_capa = in wiphy_info_extended_capab()
888 capa->mld_capa_and_ops = in wiphy_info_extended_capab()
894 capa->eml_capa, capa->mld_capa_and_ops); in wiphy_info_extended_capab()
896 drv->num_iface_capa++; in wiphy_info_extended_capab()
897 if (drv->num_iface_capa == NL80211_IFTYPE_MAX) in wiphy_info_extended_capab()
906 os_free(drv->iface_capa[i].ext_capa); in wiphy_info_extended_capab()
907 drv->iface_capa[i].ext_capa = NULL; in wiphy_info_extended_capab()
908 os_free(drv->iface_capa[i].ext_capa_mask); in wiphy_info_extended_capab()
909 drv->iface_capa[i].ext_capa_mask = NULL; in wiphy_info_extended_capab()
910 drv->iface_capa[i].ext_capa_len = 0; in wiphy_info_extended_capab()
912 drv->num_iface_capa = 0; in wiphy_info_extended_capab()
927 cap->mbssid_max_interfaces = in wiphy_info_mbssid()
931 cap->ema_max_periodicity = in wiphy_info_mbssid()
936 cap->mbssid_max_interfaces, cap->ema_max_periodicity); in wiphy_info_mbssid()
945 struct wpa_driver_capa *capa = info->capa; in wiphy_info_handler()
946 struct wpa_driver_nl80211_data *drv = info->drv; in wiphy_info_handler()
952 drv->wiphy_idx = nla_get_u32(tb[NL80211_ATTR_WIPHY]); in wiphy_info_handler()
955 os_strlcpy(drv->phyname, in wiphy_info_handler()
957 sizeof(drv->phyname)); in wiphy_info_handler()
959 capa->max_scan_ssids = in wiphy_info_handler()
963 capa->max_sched_scan_ssids = in wiphy_info_handler()
969 capa->max_sched_scan_plans = in wiphy_info_handler()
972 capa->max_sched_scan_plan_interval = in wiphy_info_handler()
975 capa->max_sched_scan_plan_iterations = in wiphy_info_handler()
980 capa->max_match_sets = in wiphy_info_handler()
984 capa->max_acl_mac_addrs = in wiphy_info_handler()
995 wpa_printf(MSG_DEBUG, "nl80211: Using driver-based " in wiphy_info_handler()
996 "off-channel TX"); in wiphy_info_handler()
997 capa->flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_TX; in wiphy_info_handler()
1001 wpa_printf(MSG_DEBUG, "nl80211: Using driver-based roaming"); in wiphy_info_handler()
1002 capa->flags |= WPA_DRIVER_FLAGS_BSS_SELECTION; in wiphy_info_handler()
1009 capa->flags |= WPA_DRIVER_FLAGS_AP_UAPSD; in wiphy_info_handler()
1019 capa->flags2 |= WPA_DRIVER_FLAGS2_SA_QUERY_OFFLOAD_AP; in wiphy_info_handler()
1021 info->device_ap_sme = 1; in wiphy_info_handler()
1030 drv->extended_capa == NULL) { in wiphy_info_handler()
1031 drv->extended_capa = in wiphy_info_handler()
1033 if (drv->extended_capa) { in wiphy_info_handler()
1034 os_memcpy(drv->extended_capa, in wiphy_info_handler()
1037 drv->extended_capa_len = in wiphy_info_handler()
1040 "nl80211: Driver-advertised extended capabilities (default)", in wiphy_info_handler()
1041 drv->extended_capa, drv->extended_capa_len); in wiphy_info_handler()
1043 drv->extended_capa_mask = in wiphy_info_handler()
1045 if (drv->extended_capa_mask) { in wiphy_info_handler()
1046 os_memcpy(drv->extended_capa_mask, in wiphy_info_handler()
1050 "nl80211: Driver-advertised extended capabilities mask (default)", in wiphy_info_handler()
1051 drv->extended_capa_mask, in wiphy_info_handler()
1052 drv->extended_capa_len); in wiphy_info_handler()
1054 os_free(drv->extended_capa); in wiphy_info_handler()
1055 drv->extended_capa = NULL; in wiphy_info_handler()
1056 drv->extended_capa_len = 0; in wiphy_info_handler()
1073 if (vinfo->vendor_id == OUI_QCA) { in wiphy_info_handler()
1074 switch (vinfo->subcmd) { in wiphy_info_handler()
1076 drv->vendor_cmd_test_avail = 1; in wiphy_info_handler()
1080 drv->roaming_vendor_cmd_avail = 1; in wiphy_info_handler()
1083 drv->dfs_vendor_cmd_avail = 1; in wiphy_info_handler()
1086 drv->get_features_vendor_cmd_avail = 1; in wiphy_info_handler()
1089 drv->get_pref_freq_list = 1; in wiphy_info_handler()
1092 drv->set_prob_oper_freq = 1; in wiphy_info_handler()
1095 drv->capa.flags |= in wiphy_info_handler()
1097 drv->qca_do_acs = 1; in wiphy_info_handler()
1100 drv->setband_vendor_cmd_avail = 1; in wiphy_info_handler()
1103 drv->scan_vendor_cmd_avail = 1; in wiphy_info_handler()
1106 drv->set_wifi_conf_vendor_cmd_avail = 1; in wiphy_info_handler()
1109 drv->fetch_bss_trans_status = 1; in wiphy_info_handler()
1112 drv->roam_vendor_cmd_avail = 1; in wiphy_info_handler()
1115 drv->add_sta_node_vendor_cmd_avail = 1; in wiphy_info_handler()
1118 drv->get_sta_info_vendor_cmd_avail = 1; in wiphy_info_handler()
1121 drv->secure_ranging_ctx_vendor_cmd_avail = 1; in wiphy_info_handler()
1126 } else if (vinfo->vendor_id == OUI_BRCM) { in wiphy_info_handler()
1127 switch (vinfo->subcmd) { in wiphy_info_handler()
1129 drv->capa.flags |= in wiphy_info_handler()
1133 drv->brcm_do_acs = 1; in wiphy_info_handler()
1140 vinfo->vendor_id, vinfo->subcmd); in wiphy_info_handler()
1156 vinfo->vendor_id, vinfo->subcmd); in wiphy_info_handler()
1164 capa->max_stations = in wiphy_info_handler()
1168 capa->max_csa_counters = in wiphy_info_handler()
1172 capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY; in wiphy_info_handler()
1175 capa->max_num_akms = in wiphy_info_handler()
1182 capa->flags2 |= WPA_DRIVER_FLAGS2_MLO; in wiphy_info_handler()
1196 info->capa = &drv->capa; in wpa_driver_nl80211_get_info()
1197 info->drv = drv; in wpa_driver_nl80211_get_info()
1202 msg = nl80211_cmd_msg(drv->first_bss, flags, NL80211_CMD_GET_WIPHY); in wpa_driver_nl80211_get_info()
1205 return -1; in wpa_driver_nl80211_get_info()
1209 return -1; in wpa_driver_nl80211_get_info()
1211 if (info->auth_supported) in wpa_driver_nl80211_get_info()
1212 drv->capa.flags |= WPA_DRIVER_FLAGS_SME; in wpa_driver_nl80211_get_info()
1213 else if (!info->connect_supported) { in wpa_driver_nl80211_get_info()
1216 info->error = 1; in wpa_driver_nl80211_get_info()
1219 if (info->p2p_go_supported && info->p2p_client_supported) in wpa_driver_nl80211_get_info()
1220 drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE; in wpa_driver_nl80211_get_info()
1221 if (info->p2p_concurrent) { in wpa_driver_nl80211_get_info()
1224 drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT; in wpa_driver_nl80211_get_info()
1225 drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P; in wpa_driver_nl80211_get_info()
1227 if (info->num_multichan_concurrent > 1) { in wpa_driver_nl80211_get_info()
1228 wpa_printf(MSG_DEBUG, "nl80211: Enable multi-channel " in wpa_driver_nl80211_get_info()
1230 drv->capa.num_multichan_concurrent = in wpa_driver_nl80211_get_info()
1231 info->num_multichan_concurrent; in wpa_driver_nl80211_get_info()
1233 if (drv->capa.flags & WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE) in wpa_driver_nl80211_get_info()
1237 if (!drv->capa.max_remain_on_chan) in wpa_driver_nl80211_get_info()
1238 drv->capa.max_remain_on_chan = 5000; in wpa_driver_nl80211_get_info()
1240 drv->capa.wmm_ac_supported = info->wmm_ac_supported; in wpa_driver_nl80211_get_info()
1242 drv->capa.mac_addr_rand_sched_scan_supported = in wpa_driver_nl80211_get_info()
1243 info->mac_addr_rand_sched_scan_supported; in wpa_driver_nl80211_get_info()
1244 drv->capa.mac_addr_rand_scan_supported = in wpa_driver_nl80211_get_info()
1245 info->mac_addr_rand_scan_supported; in wpa_driver_nl80211_get_info()
1247 if (info->channel_switch_supported) { in wpa_driver_nl80211_get_info()
1248 drv->capa.flags |= WPA_DRIVER_FLAGS_AP_CSA; in wpa_driver_nl80211_get_info()
1249 if (!drv->capa.max_csa_counters) in wpa_driver_nl80211_get_info()
1250 drv->capa.max_csa_counters = 1; in wpa_driver_nl80211_get_info()
1253 if (!drv->capa.max_sched_scan_plans) { in wpa_driver_nl80211_get_info()
1254 drv->capa.max_sched_scan_plans = 1; in wpa_driver_nl80211_get_info()
1255 drv->capa.max_sched_scan_plan_interval = UINT32_MAX; in wpa_driver_nl80211_get_info()
1256 drv->capa.max_sched_scan_plan_iterations = 0; in wpa_driver_nl80211_get_info()
1259 if (info->update_ft_ies_supported) in wpa_driver_nl80211_get_info()
1260 drv->capa.flags |= WPA_DRIVER_FLAGS_UPDATE_FT_IES; in wpa_driver_nl80211_get_info()
1262 if (!drv->capa.max_num_akms) in wpa_driver_nl80211_get_info()
1263 drv->capa.max_num_akms = NL80211_MAX_NR_AKM_SUITES; in wpa_driver_nl80211_get_info()
1306 if (!drv->dfs_vendor_cmd_avail) in qca_nl80211_check_dfs_capa()
1319 drv->capa.flags |= WPA_DRIVER_FLAGS_DFS_OFFLOAD; in qca_nl80211_check_dfs_capa()
1350 info->flags = os_malloc(len); in features_info_handler()
1351 if (info->flags != NULL) { in features_info_handler()
1352 os_memcpy(info->flags, nla_data(attr), len); in features_info_handler()
1353 info->flags_len = len; in features_info_handler()
1358 info->capa->conc_capab = nla_get_u32(attr); in features_info_handler()
1363 info->capa->max_conc_chan_2_4 = nla_get_u32(attr); in features_info_handler()
1368 info->capa->max_conc_chan_5_0 = nla_get_u32(attr); in features_info_handler()
1380 return (idx < info->flags_len) && in check_feature()
1381 (info->flags[idx] & BIT(feature % 8)); in check_feature()
1391 if (!drv->get_features_vendor_cmd_avail) in qca_nl80211_get_features()
1403 info.capa = &drv->capa; in qca_nl80211_get_features()
1409 drv->capa.flags |= WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD; in qca_nl80211_get_features()
1412 drv->capa.flags |= WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY; in qca_nl80211_get_features()
1416 drv->capa.flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS; in qca_nl80211_get_features()
1418 drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD; in qca_nl80211_get_features()
1420 drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_STA; in qca_nl80211_get_features()
1422 drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_AP; in qca_nl80211_get_features()
1424 drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_STA_CFON; in qca_nl80211_get_features()
1426 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_SEC_LTF_STA; in qca_nl80211_get_features()
1428 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_SEC_LTF_AP; in qca_nl80211_get_features()
1430 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_SEC_RTT_STA; in qca_nl80211_get_features()
1432 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_SEC_RTT_AP; in qca_nl80211_get_features()
1436 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA; in qca_nl80211_get_features()
1440 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_AP; in qca_nl80211_get_features()
1443 drv->qca_ap_allowed_freqs = 1; in qca_nl80211_get_features()
1445 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_HT_VHT_TWT_RESPONDER; in qca_nl80211_get_features()
1458 return -1; in wpa_driver_nl80211_capa()
1461 return -1; in wpa_driver_nl80211_capa()
1463 drv->has_capability = 1; in wpa_driver_nl80211_capa()
1464 drv->has_driver_key_mgmt = info.has_key_mgmt | info.has_key_mgmt_iftype; in wpa_driver_nl80211_capa()
1468 if (!drv->has_driver_key_mgmt) { in wpa_driver_nl80211_capa()
1469 drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA | in wpa_driver_nl80211_capa()
1477 if (drv->capa.enc & (WPA_DRIVER_CAPA_ENC_CCMP_256 | in wpa_driver_nl80211_capa()
1479 drv->capa.key_mgmt |= in wpa_driver_nl80211_capa()
1482 if (drv->capa.flags & WPA_DRIVER_FLAGS_SME) in wpa_driver_nl80211_capa()
1483 drv->capa.key_mgmt |= in wpa_driver_nl80211_capa()
1489 else if (drv->capa.flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD) in wpa_driver_nl80211_capa()
1490 drv->capa.key_mgmt |= in wpa_driver_nl80211_capa()
1500 drv->capa.key_mgmt_iftype[i] = drv->capa.key_mgmt; in wpa_driver_nl80211_capa()
1506 drv->capa.key_mgmt = 0; in wpa_driver_nl80211_capa()
1508 drv->capa.key_mgmt |= drv->capa.key_mgmt_iftype[i]; in wpa_driver_nl80211_capa()
1516 if (!drv->capa.key_mgmt_iftype[i]) in wpa_driver_nl80211_capa()
1517 drv->capa.key_mgmt_iftype[i] = in wpa_driver_nl80211_capa()
1518 drv->capa.key_mgmt; in wpa_driver_nl80211_capa()
1521 drv->capa.auth = WPA_DRIVER_AUTH_OPEN | in wpa_driver_nl80211_capa()
1525 drv->capa.flags |= WPA_DRIVER_FLAGS_VALID_ERROR_CODES; in wpa_driver_nl80211_capa()
1526 drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE; in wpa_driver_nl80211_capa()
1527 drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS; in wpa_driver_nl80211_capa()
1536 drv->capa.flags |= WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT; in wpa_driver_nl80211_capa()
1539 drv->capa.flags |= WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS; in wpa_driver_nl80211_capa()
1540 drv->capa.flags2 |= WPA_DRIVER_FLAGS2_AP_SME; in wpa_driver_nl80211_capa()
1546 drv->capa.flags |= WPA_DRIVER_FLAGS_AP_MLME; in wpa_driver_nl80211_capa()
1549 drv->device_ap_sme = info.device_ap_sme; in wpa_driver_nl80211_capa()
1550 drv->poll_command_supported = info.poll_command_supported; in wpa_driver_nl80211_capa()
1551 drv->data_tx_status = info.data_tx_status; in wpa_driver_nl80211_capa()
1552 drv->p2p_go_ctwindow_supported = info.p2p_go_ctwindow_supported; in wpa_driver_nl80211_capa()
1554 drv->capa.flags |= WPA_DRIVER_FLAGS_QOS_MAPPING; in wpa_driver_nl80211_capa()
1555 drv->have_low_prio_scan = info.have_low_prio_scan; in wpa_driver_nl80211_capa()
1561 drv->use_monitor = !info.device_ap_sme && in wpa_driver_nl80211_capa()
1569 if (!drv->use_monitor && !info.data_tx_status) in wpa_driver_nl80211_capa()
1570 drv->capa.flags &= ~WPA_DRIVER_FLAGS_EAPOL_TX_STATUS; in wpa_driver_nl80211_capa()
1573 if (!(info.capa->flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)) in wpa_driver_nl80211_capa()
1584 if (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX)) in wpa_driver_nl80211_capa()
1585 drv->capa.flags &= ~WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS; in wpa_driver_nl80211_capa()
1590 drv->capa.key_mgmt, drv->capa.enc, drv->capa.auth, in wpa_driver_nl80211_capa()
1591 (unsigned long long) drv->capa.flags, in wpa_driver_nl80211_capa()
1592 (unsigned long long) drv->capa.flags2, drv->capa.rrm_flags, in wpa_driver_nl80211_capa()
1593 drv->capa.probe_resp_offloads, drv->capa.max_stations, in wpa_driver_nl80211_capa()
1594 drv->capa.max_remain_on_chan, drv->capa.max_scan_ssids); in wpa_driver_nl80211_capa()
1613 mode->ht_capab = nla_get_u16(capa); in phy_info_ht_capa()
1616 mode->a_mpdu_params |= nla_get_u8(ampdu_factor) & 0x03; in phy_info_ht_capa()
1619 mode->a_mpdu_params |= nla_get_u8(ampdu_density) << 2; in phy_info_ht_capa()
1622 u8 *mcs; in phy_info_ht_capa() local
1623 mcs = nla_data(mcs_set); in phy_info_ht_capa()
1624 os_memcpy(mode->mcs_set, mcs, 16); in phy_info_ht_capa()
1634 mode->vht_capab = nla_get_u32(capa); in phy_info_vht_capa()
1637 u8 *mcs; in phy_info_vht_capa() local
1638 mcs = nla_data(mcs_set); in phy_info_vht_capa()
1639 os_memcpy(mode->vht_mcs_set, mcs, 8); in phy_info_vht_capa()
1651 mode->edmg.bw_config = nla_get_u8(bw_config); in phy_info_edmg_capa()
1652 mode->edmg.channels = nla_get_u8(channels); in phy_info_edmg_capa()
1654 if (!mode->edmg.channels || !mode->edmg.bw_config) in phy_info_edmg_capa()
1682 chan->freq = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_FREQ]); in phy_info_freq()
1683 chan->flag = 0; in phy_info_freq()
1684 chan->allowed_bw = ~0; in phy_info_freq()
1685 chan->dfs_cac_ms = 0; in phy_info_freq()
1686 if (ieee80211_freq_to_chan(chan->freq, &channel) != NUM_HOSTAPD_MODES) in phy_info_freq()
1687 chan->chan = channel; in phy_info_freq()
1691 chan->freq); in phy_info_freq()
1694 chan->flag |= HOSTAPD_CHAN_DISABLED; in phy_info_freq()
1696 chan->flag |= HOSTAPD_CHAN_NO_IR; in phy_info_freq()
1698 chan->flag |= HOSTAPD_CHAN_RADAR; in phy_info_freq()
1700 chan->flag |= HOSTAPD_CHAN_INDOOR_ONLY; in phy_info_freq()
1702 chan->flag |= HOSTAPD_CHAN_GO_CONCURRENT; in phy_info_freq()
1705 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_10; in phy_info_freq()
1707 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_20; in phy_info_freq()
1709 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_40P; in phy_info_freq()
1711 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_40M; in phy_info_freq()
1713 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_80; in phy_info_freq()
1715 chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_160; in phy_info_freq()
1723 chan->flag |= HOSTAPD_CHAN_DFS_USABLE; in phy_info_freq()
1726 chan->flag |= HOSTAPD_CHAN_DFS_AVAILABLE; in phy_info_freq()
1729 chan->flag |= HOSTAPD_CHAN_DFS_UNAVAILABLE; in phy_info_freq()
1735 chan->dfs_cac_ms = nla_get_u32( in phy_info_freq()
1739 chan->wmm_rules_valid = 0; in phy_info_freq()
1773 ac = nl_wmm->nla_type; in phy_info_freq()
1781 chan->wmm_rules[ac].min_cwmin = in phy_info_freq()
1784 chan->wmm_rules[ac].min_cwmax = in phy_info_freq()
1787 chan->wmm_rules[ac].min_aifs = in phy_info_freq()
1789 chan->wmm_rules[ac].max_txop = in phy_info_freq()
1796 chan->wmm_rules_valid = 1; in phy_info_freq()
1835 channel = os_realloc_array(mode->channels, in phy_info_freqs()
1836 mode->num_channels + new_channels, in phy_info_freqs()
1841 mode->channels = channel; in phy_info_freqs()
1842 mode->num_channels += new_channels; in phy_info_freqs()
1844 idx = phy_info->last_chan_idx; in phy_info_freqs()
1851 phy_info_freq(mode, &mode->channels[idx], tb_freq); in phy_info_freqs()
1854 phy_info->last_chan_idx = idx; in phy_info_freqs()
1880 mode->num_rates++; in phy_info_rates()
1883 mode->rates = os_calloc(mode->num_rates, sizeof(int)); in phy_info_rates()
1884 if (!mode->rates) in phy_info_rates()
1895 mode->rates[idx] = nla_get_u32( in phy_info_rates()
1910 struct he_capabilities *he_capab = &mode->he_capab[opmode]; in phy_info_iftype_copy()
1911 struct eht_capabilities *eht_capab = &mode->eht_capab[opmode]; in phy_info_iftype_copy()
1933 he_capab->he_supported = 1; in phy_info_iftype_copy()
1938 if (len > sizeof(he_capab->phy_cap)) in phy_info_iftype_copy()
1939 len = sizeof(he_capab->phy_cap); in phy_info_iftype_copy()
1940 os_memcpy(he_capab->phy_cap, in phy_info_iftype_copy()
1948 if (len > sizeof(he_capab->mac_cap)) in phy_info_iftype_copy()
1949 len = sizeof(he_capab->mac_cap); in phy_info_iftype_copy()
1950 os_memcpy(he_capab->mac_cap, in phy_info_iftype_copy()
1958 if (len > sizeof(he_capab->mcs)) in phy_info_iftype_copy()
1959 len = sizeof(he_capab->mcs); in phy_info_iftype_copy()
1960 os_memcpy(he_capab->mcs, in phy_info_iftype_copy()
1968 if (len > sizeof(he_capab->ppet)) in phy_info_iftype_copy()
1969 len = sizeof(he_capab->ppet); in phy_info_iftype_copy()
1970 os_memcpy(&he_capab->ppet, in phy_info_iftype_copy()
1979 he_capab->he_6ghz_capa = le_to_host16(capa); in phy_info_iftype_copy()
1986 eht_capab->eht_supported = true; in phy_info_iftype_copy()
1993 eht_capab->mac_cap = WPA_GET_LE16(pos); in phy_info_iftype_copy()
1998 if (len > sizeof(eht_capab->phy_cap)) in phy_info_iftype_copy()
1999 len = sizeof(eht_capab->phy_cap); in phy_info_iftype_copy()
2000 os_memcpy(eht_capab->phy_cap, in phy_info_iftype_copy()
2007 if (len > sizeof(eht_capab->mcs)) in phy_info_iftype_copy()
2008 len = sizeof(eht_capab->mcs); in phy_info_iftype_copy()
2009 os_memcpy(eht_capab->mcs, in phy_info_iftype_copy()
2016 if (len > sizeof(eht_capab->ppet)) in phy_info_iftype_copy()
2017 len = sizeof(eht_capab->ppet); in phy_info_iftype_copy()
2018 os_memcpy(&eht_capab->ppet, in phy_info_iftype_copy()
2055 if (phy_info->last_mode != nl_band->nla_type) { in phy_info_band()
2056 mode = os_realloc_array(phy_info->modes, in phy_info_band()
2057 *phy_info->num_modes + 1, in phy_info_band()
2060 phy_info->failed = 1; in phy_info_band()
2063 phy_info->modes = mode; in phy_info_band()
2065 mode = &phy_info->modes[*(phy_info->num_modes)]; in phy_info_band()
2067 mode->mode = NUM_HOSTAPD_MODES; in phy_info_band()
2068 mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN | in phy_info_band()
2073 * Unsupported VHT MCS stream is defined as value 3, so the VHT in phy_info_band()
2074 * MCS RX/TX map must be initialized with 0xffff to mark all 8 in phy_info_band()
2078 mode->vht_mcs_set[0] = 0xff; in phy_info_band()
2079 mode->vht_mcs_set[1] = 0xff; in phy_info_band()
2080 mode->vht_mcs_set[4] = 0xff; in phy_info_band()
2081 mode->vht_mcs_set[5] = 0xff; in phy_info_band()
2083 *(phy_info->num_modes) += 1; in phy_info_band()
2084 phy_info->last_mode = nl_band->nla_type; in phy_info_band()
2085 phy_info->last_chan_idx = 0; in phy_info_band()
2087 mode = &phy_info->modes[*(phy_info->num_modes) - 1]; in phy_info_band()
2107 phy_info->failed = 1; in phy_info_band()
2159 int i, mode11g_idx = -1; in wpa_driver_nl80211_postprocess_modes()
2174 if (modes[m].rates[i] > 200) { in wpa_driver_nl80211_postprocess_modes()
2196 os_free(modes[m].rates); in wpa_driver_nl80211_postprocess_modes()
2200 (*num_modes - (m + 1))); in wpa_driver_nl80211_postprocess_modes()
2201 (*num_modes)--; in wpa_driver_nl80211_postprocess_modes()
2229 mode->mode = HOSTAPD_MODE_IEEE80211B; in wpa_driver_nl80211_postprocess_modes()
2232 mode->num_channels = mode11g->num_channels; in wpa_driver_nl80211_postprocess_modes()
2233 mode->channels = os_memdup(mode11g->channels, in wpa_driver_nl80211_postprocess_modes()
2234 mode11g->num_channels * in wpa_driver_nl80211_postprocess_modes()
2236 if (mode->channels == NULL) { in wpa_driver_nl80211_postprocess_modes()
2237 (*num_modes)--; in wpa_driver_nl80211_postprocess_modes()
2241 mode->num_rates = 0; in wpa_driver_nl80211_postprocess_modes()
2242 mode->rates = os_malloc(4 * sizeof(int)); in wpa_driver_nl80211_postprocess_modes()
2243 if (mode->rates == NULL) { in wpa_driver_nl80211_postprocess_modes()
2244 os_free(mode->channels); in wpa_driver_nl80211_postprocess_modes()
2245 (*num_modes)--; in wpa_driver_nl80211_postprocess_modes()
2249 for (i = 0; i < mode11g->num_rates; i++) { in wpa_driver_nl80211_postprocess_modes()
2250 if (mode11g->rates[i] != 10 && mode11g->rates[i] != 20 && in wpa_driver_nl80211_postprocess_modes()
2251 mode11g->rates[i] != 55 && mode11g->rates[i] != 110) in wpa_driver_nl80211_postprocess_modes()
2253 mode->rates[mode->num_rates] = mode11g->rates[i]; in wpa_driver_nl80211_postprocess_modes()
2254 mode->num_rates++; in wpa_driver_nl80211_postprocess_modes()
2255 if (mode->num_rates == 4) in wpa_driver_nl80211_postprocess_modes()
2259 if (mode->num_rates == 0) { in wpa_driver_nl80211_postprocess_modes()
2260 os_free(mode->channels); in wpa_driver_nl80211_postprocess_modes()
2261 os_free(mode->rates); in wpa_driver_nl80211_postprocess_modes()
2262 (*num_modes)--; in wpa_driver_nl80211_postprocess_modes()
2263 return modes; /* No 802.11b rates */ in wpa_driver_nl80211_postprocess_modes()
2278 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_ht40_mode()
2279 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_ht40_mode()
2280 if (chan->freq - 10 >= start && chan->freq + 10 <= end) in nl80211_set_ht40_mode()
2281 chan->flag |= HOSTAPD_CHAN_HT40; in nl80211_set_ht40_mode()
2291 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_ht40_mode_sec()
2292 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_ht40_mode_sec()
2293 if (!(chan->flag & HOSTAPD_CHAN_HT40)) in nl80211_set_ht40_mode_sec()
2295 if (chan->freq - 30 >= start && chan->freq - 10 <= end) in nl80211_set_ht40_mode_sec()
2296 chan->flag |= HOSTAPD_CHAN_HT40MINUS; in nl80211_set_ht40_mode_sec()
2297 if (chan->freq + 10 >= start && chan->freq + 30 <= end) in nl80211_set_ht40_mode_sec()
2298 chan->flag |= HOSTAPD_CHAN_HT40PLUS; in nl80211_set_ht40_mode_sec()
2308 for (m = 0; m < *results->num_modes; m++) { in nl80211_reg_rule_max_eirp()
2310 struct hostapd_hw_modes *mode = &results->modes[m]; in nl80211_reg_rule_max_eirp()
2312 for (c = 0; c < mode->num_channels; c++) { in nl80211_reg_rule_max_eirp()
2313 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_reg_rule_max_eirp()
2314 if ((u32) chan->freq - 10 >= start && in nl80211_reg_rule_max_eirp()
2315 (u32) chan->freq + 10 <= end) in nl80211_reg_rule_max_eirp()
2316 chan->max_tx_power = max_eirp; in nl80211_reg_rule_max_eirp()
2327 for (m = 0; m < *results->num_modes; m++) { in nl80211_reg_rule_ht40()
2328 if (!(results->modes[m].ht_capab & in nl80211_reg_rule_ht40()
2331 nl80211_set_ht40_mode(&results->modes[m], start, end); in nl80211_reg_rule_ht40()
2354 for (m = 0; m < *results->num_modes; m++) { in nl80211_reg_rule_sec()
2355 if (!(results->modes[m].ht_capab & in nl80211_reg_rule_sec()
2358 nl80211_set_ht40_mode_sec(&results->modes[m], start, end); in nl80211_reg_rule_sec()
2368 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_vht_mode()
2369 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_vht_mode()
2371 if (chan->freq - 10 < start || chan->freq + 10 > end) in nl80211_set_vht_mode()
2375 chan->flag |= HOSTAPD_CHAN_VHT_80MHZ_SUBCHANNEL; in nl80211_set_vht_mode()
2378 chan->flag |= HOSTAPD_CHAN_VHT_160MHZ_SUBCHANNEL; in nl80211_set_vht_mode()
2401 for (m = 0; m < *results->num_modes; m++) { in nl80211_reg_rule_vht()
2402 if (!(results->modes[m].ht_capab & in nl80211_reg_rule_vht()
2406 if (!results->modes[m].vht_capab) in nl80211_reg_rule_vht()
2409 nl80211_set_vht_mode(&results->modes[m], start, end, max_bw); in nl80211_reg_rule_vht()
2419 for (c = 0; c < mode->num_channels; c++) { in nl80211_set_6ghz_mode()
2420 struct hostapd_channel_data *chan = &mode->channels[c]; in nl80211_set_6ghz_mode()
2422 if (chan->freq - 10 < start || chan->freq + 10 > end) in nl80211_set_6ghz_mode()
2426 chan->flag |= HOSTAPD_CHAN_VHT_80MHZ_SUBCHANNEL; in nl80211_set_6ghz_mode()
2429 chan->flag |= HOSTAPD_CHAN_VHT_160MHZ_SUBCHANNEL; in nl80211_set_6ghz_mode()
2432 chan->flag |= HOSTAPD_CHAN_EHT_320MHZ_SUBCHANNEL; in nl80211_set_6ghz_mode()
2455 for (m = 0; m < *results->num_modes; m++) { in nl80211_reg_rule_6ghz()
2456 if (results->modes[m].num_channels == 0 || in nl80211_reg_rule_6ghz()
2457 !is_6ghz_freq(results->modes[m].channels[0].freq)) in nl80211_reg_rule_6ghz()
2460 nl80211_set_6ghz_mode(&results->modes[m], start, end, max_bw); in nl80211_reg_rule_6ghz()
2483 return "DFS-UNSET"; in dfs_domain_name()
2485 return "DFS-FCC"; in dfs_domain_name()
2487 return "DFS-ETSI"; in dfs_domain_name()
2489 return "DFS-JP"; in dfs_domain_name()
2491 return "DFS-invalid"; in dfs_domain_name()
2525 nl80211_set_dfs_domain(dfs_domain, &results->dfs_domain); in nl80211_get_reg()
2526 wpa_printf(MSG_DEBUG, "nl80211: Regulatory information - country=%s (%s)", in nl80211_get_reg()
2530 wpa_printf(MSG_DEBUG, "nl80211: Regulatory information - country=%s", in nl80211_get_reg()
2551 wpa_printf(MSG_DEBUG, "nl80211: %u-%u @ %u MHz %u mBm%s%s%s%s%s%s%s%s", in nl80211_get_reg()
2601 return -ENOMEM; in nl80211_set_regulatory_flags()
2604 if (drv->capa.flags & WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY) { in nl80211_set_regulatory_flags()
2605 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, drv->wiphy_idx)) { in nl80211_set_regulatory_flags()
2607 return -1; in nl80211_set_regulatory_flags()
2648 for (j = 0; j < mode->num_channels; j++) { in nl80211_dump_chan_list()
2649 struct hostapd_channel_data *chan = &mode->channels[j]; in nl80211_dump_chan_list()
2651 if (is_6ghz_freq(chan->freq)) in nl80211_dump_chan_list()
2652 drv->uses_6ghz = true; in nl80211_dump_chan_list()
2653 if (chan->freq >= 900 && chan->freq < 1000) in nl80211_dump_chan_list()
2654 drv->uses_s1g = true; in nl80211_dump_chan_list()
2655 res = os_snprintf(pos, end - pos, " %d%s%s%s", in nl80211_dump_chan_list()
2656 chan->freq, in nl80211_dump_chan_list()
2657 (chan->flag & HOSTAPD_CHAN_DISABLED) ? in nl80211_dump_chan_list()
2659 (chan->flag & HOSTAPD_CHAN_NO_IR) ? in nl80211_dump_chan_list()
2661 (chan->flag & HOSTAPD_CHAN_RADAR) ? in nl80211_dump_chan_list()
2663 if (os_snprintf_error(end - pos, res)) in nl80211_dump_chan_list()
2670 modestr(mode->mode), str); in nl80211_dump_chan_list()
2681 struct wpa_driver_nl80211_data *drv = bss->drv; in nl80211_get_hw_feature_data()
2687 .last_mode = -1, in nl80211_get_hw_feature_data()
2714 os_free(result.modes[i].rates); in nl80211_get_hw_feature_data()