Lines Matching refs:tb

106 					 struct nlattr *tb)  in wiphy_info_supported_iftypes()  argument
111 if (tb == NULL) in wiphy_info_supported_iftypes()
114 nla_for_each_nested(nl_mode, tb, i) { in wiphy_info_supported_iftypes()
206 struct nlattr *tb) in wiphy_info_iface_comb() argument
211 if (tb == NULL) in wiphy_info_iface_comb()
214 nla_for_each_nested(nl_combi, tb, rem_combi) { in wiphy_info_iface_comb()
222 struct nlattr *tb) in wiphy_info_supp_cmds() argument
227 if (tb == NULL) in wiphy_info_supp_cmds()
230 nla_for_each_nested(nl_cmd, tb, i) { in wiphy_info_supp_cmds()
258 static unsigned int get_akm_suites_info(struct nlattr *tb) in get_akm_suites_info() argument
264 if (!tb) in get_akm_suites_info()
267 num = nla_len(tb) / sizeof(u32); in get_akm_suites_info()
268 akms = nla_data(tb); in get_akm_suites_info()
349 struct nlattr *tb[NL80211_IFTYPE_AKM_ATTR_MAX + 1]; in get_iface_akm_suites_info() local
357 nla_parse(tb, NL80211_IFTYPE_AKM_ATTR_MAX, in get_iface_akm_suites_info()
360 if (!tb[NL80211_IFTYPE_AKM_ATTR_IFTYPES] || in get_iface_akm_suites_info()
361 !tb[NL80211_IFTYPE_AKM_ATTR_SUITES]) in get_iface_akm_suites_info()
365 key_mgmt = get_akm_suites_info(tb[NL80211_IFTYPE_AKM_ATTR_SUITES]); in get_iface_akm_suites_info()
367 nla_for_each_nested(nl_iftype, tb[NL80211_IFTYPE_AKM_ATTR_IFTYPES], i) { in get_iface_akm_suites_info()
411 struct nlattr *tb) in wiphy_info_iftype_akm_suites() argument
416 if (!tb) in wiphy_info_iftype_akm_suites()
419 nla_for_each_nested(nl_if, tb, rem_if) in wiphy_info_iftype_akm_suites()
425 struct nlattr *tb) in wiphy_info_akm_suites() argument
427 if (!tb) in wiphy_info_akm_suites()
431 info->capa->key_mgmt = get_akm_suites_info(tb); in wiphy_info_akm_suites()
438 struct nlattr *tb) in wiphy_info_cipher_suites() argument
443 if (tb == NULL) in wiphy_info_cipher_suites()
446 num = nla_len(tb) / sizeof(u32); in wiphy_info_cipher_suites()
447 ciphers = nla_data(tb); in wiphy_info_cipher_suites()
497 struct nlattr *tb) in wiphy_info_max_roc() argument
499 if (tb) in wiphy_info_max_roc()
500 capa->max_remain_on_chan = nla_get_u32(tb); in wiphy_info_max_roc()
534 struct nlattr *tb) in wiphy_info_ext_feature_flags() argument
540 if (tb == NULL) in wiphy_info_ext_feature_flags()
543 ext_features = nla_data(tb); in wiphy_info_ext_feature_flags()
544 len = nla_len(tb); in wiphy_info_ext_feature_flags()
727 struct nlattr *tb) in wiphy_info_feature_flags() argument
732 if (tb == NULL) in wiphy_info_feature_flags()
735 flags = nla_get_u32(tb); in wiphy_info_feature_flags()
793 struct nlattr *tb) in wiphy_info_probe_resp_offload() argument
797 if (tb == NULL) in wiphy_info_probe_resp_offload()
800 protocols = nla_get_u32(tb); in wiphy_info_probe_resp_offload()
809 struct nlattr *tb) in wiphy_info_wowlan_triggers() argument
813 if (tb == NULL) in wiphy_info_wowlan_triggers()
817 tb, NULL)) in wiphy_info_wowlan_triggers()
838 struct nlattr *tb) in wiphy_info_extended_capab() argument
843 if (!tb || drv->num_iface_capa == NL80211_IFTYPE_MAX) in wiphy_info_extended_capab()
846 nla_for_each_nested(attr, tb, rem) { in wiphy_info_extended_capab()
942 struct nlattr *tb[NL80211_ATTR_MAX + 1]; in wiphy_info_handler() local
948 nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), in wiphy_info_handler()
951 if (tb[NL80211_ATTR_WIPHY]) in wiphy_info_handler()
952 drv->wiphy_idx = nla_get_u32(tb[NL80211_ATTR_WIPHY]); in wiphy_info_handler()
954 if (tb[NL80211_ATTR_WIPHY_NAME]) in wiphy_info_handler()
956 nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]), in wiphy_info_handler()
958 if (tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]) in wiphy_info_handler()
960 nla_get_u8(tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]); in wiphy_info_handler()
962 if (tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS]) in wiphy_info_handler()
964 nla_get_u8(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS]); in wiphy_info_handler()
966 if (tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS] && in wiphy_info_handler()
967 tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL] && in wiphy_info_handler()
968 tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]) { in wiphy_info_handler()
970 nla_get_u32(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS]); in wiphy_info_handler()
973 nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL]); in wiphy_info_handler()
976 nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]); in wiphy_info_handler()
979 if (tb[NL80211_ATTR_MAX_MATCH_SETS]) in wiphy_info_handler()
981 nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]); in wiphy_info_handler()
983 if (tb[NL80211_ATTR_MAC_ACL_MAX]) in wiphy_info_handler()
985 nla_get_u32(tb[NL80211_ATTR_MAC_ACL_MAX]); in wiphy_info_handler()
987 wiphy_info_supported_iftypes(info, tb[NL80211_ATTR_SUPPORTED_IFTYPES]); in wiphy_info_handler()
988 wiphy_info_iface_comb(info, tb[NL80211_ATTR_INTERFACE_COMBINATIONS]); in wiphy_info_handler()
989 wiphy_info_supp_cmds(info, tb[NL80211_ATTR_SUPPORTED_COMMANDS]); in wiphy_info_handler()
990 wiphy_info_cipher_suites(info, tb[NL80211_ATTR_CIPHER_SUITES]); in wiphy_info_handler()
991 wiphy_info_akm_suites(info, tb[NL80211_ATTR_AKM_SUITES]); in wiphy_info_handler()
992 wiphy_info_iftype_akm_suites(info, tb[NL80211_ATTR_IFTYPE_AKM_SUITES]); in wiphy_info_handler()
994 if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK]) { in wiphy_info_handler()
1000 if (tb[NL80211_ATTR_ROAM_SUPPORT]) { in wiphy_info_handler()
1006 tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION]); in wiphy_info_handler()
1008 if (tb[NL80211_ATTR_SUPPORT_AP_UAPSD]) in wiphy_info_handler()
1011 wiphy_info_tdls(capa, tb[NL80211_ATTR_TDLS_SUPPORT], in wiphy_info_handler()
1012 tb[NL80211_ATTR_TDLS_EXTERNAL_SETUP]); in wiphy_info_handler()
1014 if (tb[NL80211_ATTR_DEVICE_AP_SME]) { in wiphy_info_handler()
1016 nla_get_u32(tb[NL80211_ATTR_DEVICE_AP_SME]); in wiphy_info_handler()
1024 wiphy_info_feature_flags(info, tb[NL80211_ATTR_FEATURE_FLAGS]); in wiphy_info_handler()
1025 wiphy_info_ext_feature_flags(info, tb[NL80211_ATTR_EXT_FEATURES]); in wiphy_info_handler()
1027 tb[NL80211_ATTR_PROBE_RESP_OFFLOAD]); in wiphy_info_handler()
1029 if (tb[NL80211_ATTR_EXT_CAPA] && tb[NL80211_ATTR_EXT_CAPA_MASK] && in wiphy_info_handler()
1032 os_malloc(nla_len(tb[NL80211_ATTR_EXT_CAPA])); in wiphy_info_handler()
1035 nla_data(tb[NL80211_ATTR_EXT_CAPA]), in wiphy_info_handler()
1036 nla_len(tb[NL80211_ATTR_EXT_CAPA])); in wiphy_info_handler()
1038 nla_len(tb[NL80211_ATTR_EXT_CAPA]); in wiphy_info_handler()
1044 os_malloc(nla_len(tb[NL80211_ATTR_EXT_CAPA_MASK])); in wiphy_info_handler()
1047 nla_data(tb[NL80211_ATTR_EXT_CAPA_MASK]), in wiphy_info_handler()
1048 nla_len(tb[NL80211_ATTR_EXT_CAPA_MASK])); in wiphy_info_handler()
1060 wiphy_info_extended_capab(drv, tb[NL80211_ATTR_IFTYPE_EXT_CAPA]); in wiphy_info_handler()
1062 if (tb[NL80211_ATTR_VENDOR_DATA]) { in wiphy_info_handler()
1066 nla_for_each_nested(nl, tb[NL80211_ATTR_VENDOR_DATA], rem) { in wiphy_info_handler()
1144 if (tb[NL80211_ATTR_VENDOR_EVENTS]) { in wiphy_info_handler()
1148 nla_for_each_nested(nl, tb[NL80211_ATTR_VENDOR_EVENTS], rem) { in wiphy_info_handler()
1161 tb[NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED]); in wiphy_info_handler()
1163 if (tb[NL80211_ATTR_MAX_AP_ASSOC_STA]) in wiphy_info_handler()
1165 nla_get_u32(tb[NL80211_ATTR_MAX_AP_ASSOC_STA]); in wiphy_info_handler()
1167 if (tb[NL80211_ATTR_MAX_CSA_COUNTERS]) in wiphy_info_handler()
1169 nla_get_u8(tb[NL80211_ATTR_MAX_CSA_COUNTERS]); in wiphy_info_handler()
1171 if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG]) in wiphy_info_handler()
1174 if (tb[NL80211_ATTR_MAX_NUM_AKM_SUITES]) in wiphy_info_handler()
1176 nla_get_u16(tb[NL80211_ATTR_MAX_NUM_AKM_SUITES]); in wiphy_info_handler()
1178 if (tb[NL80211_ATTR_MBSSID_CONFIG]) in wiphy_info_handler()
1179 wiphy_info_mbssid(capa, tb[NL80211_ATTR_MBSSID_CONFIG]); in wiphy_info_handler()
1181 if (tb[NL80211_ATTR_MLO_SUPPORT]) in wiphy_info_handler()
1273 struct nlattr *tb[NL80211_ATTR_MAX + 1]; in dfs_info_handler() local
1277 nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), in dfs_info_handler()
1280 if (tb[NL80211_ATTR_VENDOR_DATA]) { in dfs_info_handler()
1281 struct nlattr *nl_vend = tb[NL80211_ATTR_VENDOR_DATA]; in dfs_info_handler()
1332 struct nlattr *tb[NL80211_ATTR_MAX + 1]; in features_info_handler() local
1337 nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), in features_info_handler()
1340 nl_vend = tb[NL80211_ATTR_VENDOR_DATA]; in features_info_handler()
1802 struct hostapd_hw_modes *mode, struct nlattr *tb) in phy_info_freqs() argument
1824 if (tb == NULL) in phy_info_freqs()
1827 nla_for_each_nested(nl_freq, tb, rem_freq) { in phy_info_freqs()
1846 nla_for_each_nested(nl_freq, tb, rem_freq) { in phy_info_freqs()
1860 static int phy_info_rates(struct hostapd_hw_modes *mode, struct nlattr *tb) in phy_info_rates() argument
1871 if (tb == NULL) in phy_info_rates()
1874 nla_for_each_nested(nl_rate, tb, rem_rate) { in phy_info_rates()
1889 nla_for_each_nested(nl_rate, tb, rem_rate) { in phy_info_rates()
1906 struct nlattr **tb, struct nlattr **tb_flags) in phy_info_iftype_copy() argument
1935 if (tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY]) { in phy_info_iftype_copy()
1936 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY]); in phy_info_iftype_copy()
1941 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY]), in phy_info_iftype_copy()
1945 if (tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC]) { in phy_info_iftype_copy()
1946 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC]); in phy_info_iftype_copy()
1951 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC]), in phy_info_iftype_copy()
1955 if (tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET]) { in phy_info_iftype_copy()
1956 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET]); in phy_info_iftype_copy()
1961 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET]), in phy_info_iftype_copy()
1965 if (tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE]) { in phy_info_iftype_copy()
1966 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE]); in phy_info_iftype_copy()
1971 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE]), in phy_info_iftype_copy()
1975 if (tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]) { in phy_info_iftype_copy()
1978 capa = nla_get_u16(tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]); in phy_info_iftype_copy()
1982 if (!tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC] || in phy_info_iftype_copy()
1983 !tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]) in phy_info_iftype_copy()
1988 if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC] && in phy_info_iftype_copy()
1989 nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]) >= 2) { in phy_info_iftype_copy()
1992 pos = nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]); in phy_info_iftype_copy()
1996 if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]) { in phy_info_iftype_copy()
1997 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]); in phy_info_iftype_copy()
2001 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]), in phy_info_iftype_copy()
2005 if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]) { in phy_info_iftype_copy()
2006 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]); in phy_info_iftype_copy()
2010 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]), in phy_info_iftype_copy()
2014 if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]) { in phy_info_iftype_copy()
2015 len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]); in phy_info_iftype_copy()
2019 nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]), in phy_info_iftype_copy()
2028 struct nlattr *tb[NL80211_BAND_IFTYPE_ATTR_MAX + 1]; in phy_info_iftype() local
2032 nla_parse(tb, NL80211_BAND_IFTYPE_ATTR_MAX, in phy_info_iftype()
2035 if (!tb[NL80211_BAND_IFTYPE_ATTR_IFTYPES]) in phy_info_iftype()
2039 tb[NL80211_BAND_IFTYPE_ATTR_IFTYPES], NULL)) in phy_info_iftype()
2043 phy_info_iftype_copy(mode, i, tb, tb_flags); in phy_info_iftype()
2336 static void nl80211_reg_rule_sec(struct nlattr *tb[], in nl80211_reg_rule_sec() argument
2342 if (tb[NL80211_ATTR_FREQ_RANGE_START] == NULL || in nl80211_reg_rule_sec()
2343 tb[NL80211_ATTR_FREQ_RANGE_END] == NULL || in nl80211_reg_rule_sec()
2344 tb[NL80211_ATTR_FREQ_RANGE_MAX_BW] == NULL) in nl80211_reg_rule_sec()
2347 start = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_START]) / 1000; in nl80211_reg_rule_sec()
2348 end = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_END]) / 1000; in nl80211_reg_rule_sec()
2349 max_bw = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_MAX_BW]) / 1000; in nl80211_reg_rule_sec()
2383 static void nl80211_reg_rule_vht(struct nlattr *tb[], in nl80211_reg_rule_vht() argument
2389 if (tb[NL80211_ATTR_FREQ_RANGE_START] == NULL || in nl80211_reg_rule_vht()
2390 tb[NL80211_ATTR_FREQ_RANGE_END] == NULL || in nl80211_reg_rule_vht()
2391 tb[NL80211_ATTR_FREQ_RANGE_MAX_BW] == NULL) in nl80211_reg_rule_vht()
2394 start = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_START]) / 1000; in nl80211_reg_rule_vht()
2395 end = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_END]) / 1000; in nl80211_reg_rule_vht()
2396 max_bw = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_MAX_BW]) / 1000; in nl80211_reg_rule_vht()
2437 static void nl80211_reg_rule_6ghz(struct nlattr *tb[], in nl80211_reg_rule_6ghz() argument
2443 if (!tb[NL80211_ATTR_FREQ_RANGE_START] || in nl80211_reg_rule_6ghz()
2444 !tb[NL80211_ATTR_FREQ_RANGE_END] || in nl80211_reg_rule_6ghz()
2445 !tb[NL80211_ATTR_FREQ_RANGE_MAX_BW]) in nl80211_reg_rule_6ghz()
2448 start = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_START]) / 1000; in nl80211_reg_rule_6ghz()
2449 end = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_END]) / 1000; in nl80211_reg_rule_6ghz()
2450 max_bw = nla_get_u32(tb[NL80211_ATTR_FREQ_RANGE_MAX_BW]) / 1000; in nl80211_reg_rule_6ghz()