Lines Matching refs:wiphy
99 if (wiphy_net(&rdev->wiphy) != netns) in __cfg80211_wdev_from_attrs()
173 netdev->ieee80211_ptr->wiphy); in __cfg80211_rdev_from_attrs()
192 if (netns != wiphy_net(&rdev->wiphy)) in __cfg80211_rdev_from_attrs()
503 *rdev = wiphy_to_rdev((*wdev)->wiphy); in nl80211_prepare_wdev_dump()
509 struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); in nl80211_prepare_wdev_dump() local
512 if (!wiphy) { in nl80211_prepare_wdev_dump()
516 *rdev = wiphy_to_rdev(wiphy); in nl80211_prepare_wdev_dump()
905 static struct ieee80211_channel *nl80211_get_valid_chan(struct wiphy *wiphy, in nl80211_get_valid_chan() argument
912 chan = ieee80211_get_channel(wiphy, nla_get_u32(tb)); in nl80211_get_valid_chan()
941 static int nl80211_put_iface_combinations(struct wiphy *wiphy, in nl80211_put_iface_combinations() argument
953 for (i = 0; i < wiphy->n_iface_combinations; i++) { in nl80211_put_iface_combinations()
957 c = &wiphy->iface_combinations[i]; in nl80211_put_iface_combinations()
1013 const struct wiphy_wowlan_tcp_support *tcp = rdev->wiphy.wowlan->tcp; in nl80211_send_wowlan_tcp_caps()
1056 if (!rdev->wiphy.wowlan) in nl80211_send_wowlan()
1063 if (((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_ANY) && in nl80211_send_wowlan()
1065 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_DISCONNECT) && in nl80211_send_wowlan()
1067 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_MAGIC_PKT) && in nl80211_send_wowlan()
1069 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_SUPPORTS_GTK_REKEY) && in nl80211_send_wowlan()
1071 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) && in nl80211_send_wowlan()
1073 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_EAP_IDENTITY_REQ) && in nl80211_send_wowlan()
1075 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_4WAY_HANDSHAKE) && in nl80211_send_wowlan()
1077 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_RFKILL_RELEASE) && in nl80211_send_wowlan()
1081 if (rdev->wiphy.wowlan->n_patterns) { in nl80211_send_wowlan()
1083 .max_patterns = rdev->wiphy.wowlan->n_patterns, in nl80211_send_wowlan()
1084 .min_pattern_len = rdev->wiphy.wowlan->pattern_min_len, in nl80211_send_wowlan()
1085 .max_pattern_len = rdev->wiphy.wowlan->pattern_max_len, in nl80211_send_wowlan()
1086 .max_pkt_offset = rdev->wiphy.wowlan->max_pkt_offset, in nl80211_send_wowlan()
1094 if ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_NET_DETECT) && in nl80211_send_wowlan()
1096 rdev->wiphy.wowlan->max_nd_match_sets)) in nl80211_send_wowlan()
1113 if (!rdev->wiphy.coalesce) in nl80211_send_coalesce()
1116 rule.max_rules = rdev->wiphy.coalesce->n_rules; in nl80211_send_coalesce()
1117 rule.max_delay = rdev->wiphy.coalesce->max_delay; in nl80211_send_coalesce()
1118 rule.pat.max_patterns = rdev->wiphy.coalesce->n_patterns; in nl80211_send_coalesce()
1119 rule.pat.min_pattern_len = rdev->wiphy.coalesce->pattern_min_len; in nl80211_send_coalesce()
1120 rule.pat.max_pattern_len = rdev->wiphy.coalesce->pattern_max_len; in nl80211_send_coalesce()
1121 rule.pat.max_pkt_offset = rdev->wiphy.coalesce->max_pkt_offset; in nl80211_send_coalesce()
1265 rdev->wiphy.mgmt_stypes; in nl80211_send_wiphy()
1277 wiphy_name(&rdev->wiphy)) || in nl80211_send_wiphy()
1288 rdev->wiphy.retry_short) || in nl80211_send_wiphy()
1290 rdev->wiphy.retry_long) || in nl80211_send_wiphy()
1292 rdev->wiphy.frag_threshold) || in nl80211_send_wiphy()
1294 rdev->wiphy.rts_threshold) || in nl80211_send_wiphy()
1296 rdev->wiphy.coverage_class) || in nl80211_send_wiphy()
1298 rdev->wiphy.max_scan_ssids) || in nl80211_send_wiphy()
1300 rdev->wiphy.max_sched_scan_ssids) || in nl80211_send_wiphy()
1302 rdev->wiphy.max_scan_ie_len) || in nl80211_send_wiphy()
1304 rdev->wiphy.max_sched_scan_ie_len) || in nl80211_send_wiphy()
1306 rdev->wiphy.max_match_sets)) in nl80211_send_wiphy()
1309 if ((rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN) && in nl80211_send_wiphy()
1312 if ((rdev->wiphy.flags & WIPHY_FLAG_MESH_AUTH) && in nl80211_send_wiphy()
1315 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) && in nl80211_send_wiphy()
1318 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) && in nl80211_send_wiphy()
1321 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) && in nl80211_send_wiphy()
1324 if ((rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP) && in nl80211_send_wiphy()
1332 sizeof(u32) * rdev->wiphy.n_cipher_suites, in nl80211_send_wiphy()
1333 rdev->wiphy.cipher_suites)) in nl80211_send_wiphy()
1337 rdev->wiphy.max_num_pmkids)) in nl80211_send_wiphy()
1340 if ((rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_send_wiphy()
1345 rdev->wiphy.available_antennas_tx) || in nl80211_send_wiphy()
1347 rdev->wiphy.available_antennas_rx)) in nl80211_send_wiphy()
1350 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD) && in nl80211_send_wiphy()
1352 rdev->wiphy.probe_resp_offload)) in nl80211_send_wiphy()
1355 if ((rdev->wiphy.available_antennas_tx || in nl80211_send_wiphy()
1356 rdev->wiphy.available_antennas_rx) && in nl80211_send_wiphy()
1377 rdev->wiphy.interface_modes)) in nl80211_send_wiphy()
1391 sband = rdev->wiphy.bands[band]; in nl80211_send_wiphy()
1492 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) in nl80211_send_wiphy()
1497 if (rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK) { in nl80211_send_wiphy()
1509 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) { in nl80211_send_wiphy()
1513 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) in nl80211_send_wiphy()
1517 if (rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) { in nl80211_send_wiphy()
1530 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH) in nl80211_send_wiphy()
1533 if (rdev->wiphy.features & in nl80211_send_wiphy()
1558 (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) && in nl80211_send_wiphy()
1561 rdev->wiphy.max_remain_on_channel_duration)) in nl80211_send_wiphy()
1564 if ((rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX) && in nl80211_send_wiphy()
1585 rdev->wiphy.software_iftypes)) in nl80211_send_wiphy()
1588 if (nl80211_put_iface_combinations(&rdev->wiphy, msg, in nl80211_send_wiphy()
1596 if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) && in nl80211_send_wiphy()
1598 rdev->wiphy.ap_sme_capa)) in nl80211_send_wiphy()
1601 features = rdev->wiphy.features; in nl80211_send_wiphy()
1612 if (rdev->wiphy.ht_capa_mod_mask && in nl80211_send_wiphy()
1614 sizeof(*rdev->wiphy.ht_capa_mod_mask), in nl80211_send_wiphy()
1615 rdev->wiphy.ht_capa_mod_mask)) in nl80211_send_wiphy()
1618 if (rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME && in nl80211_send_wiphy()
1619 rdev->wiphy.max_acl_mac_addrs && in nl80211_send_wiphy()
1621 rdev->wiphy.max_acl_mac_addrs)) in nl80211_send_wiphy()
1637 if (rdev->wiphy.extended_capabilities && in nl80211_send_wiphy()
1639 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
1640 rdev->wiphy.extended_capabilities) || in nl80211_send_wiphy()
1642 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
1643 rdev->wiphy.extended_capabilities_mask))) in nl80211_send_wiphy()
1646 if (rdev->wiphy.vht_capa_mod_mask && in nl80211_send_wiphy()
1648 sizeof(*rdev->wiphy.vht_capa_mod_mask), in nl80211_send_wiphy()
1649 rdev->wiphy.vht_capa_mod_mask)) in nl80211_send_wiphy()
1658 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) && in nl80211_send_wiphy()
1663 if (rdev->wiphy.max_ap_assoc_sta && in nl80211_send_wiphy()
1665 rdev->wiphy.max_ap_assoc_sta)) in nl80211_send_wiphy()
1671 if (rdev->wiphy.n_vendor_commands) { in nl80211_send_wiphy()
1679 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_send_wiphy()
1680 info = &rdev->wiphy.vendor_commands[i].info; in nl80211_send_wiphy()
1687 if (rdev->wiphy.n_vendor_events) { in nl80211_send_wiphy()
1696 for (i = 0; i < rdev->wiphy.n_vendor_events; i++) { in nl80211_send_wiphy()
1697 info = &rdev->wiphy.vendor_events[i]; in nl80211_send_wiphy()
1706 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH && in nl80211_send_wiphy()
1708 rdev->wiphy.max_num_csa_counters)) in nl80211_send_wiphy()
1711 if (rdev->wiphy.regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_wiphy()
1716 sizeof(rdev->wiphy.ext_features), in nl80211_send_wiphy()
1717 rdev->wiphy.ext_features)) in nl80211_send_wiphy()
1759 netdev->ieee80211_ptr->wiphy); in nl80211_dump_wiphy_parse()
1791 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_wiphy()
1929 chandef->chan = ieee80211_get_channel(&rdev->wiphy, control_freq); in nl80211_parse_chandef()
1971 if (!cfg80211_chandef_usable(&rdev->wiphy, chandef, in nl80211_parse_chandef()
1977 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ)) in nl80211_parse_chandef()
2006 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef, iftype)) { in __nl80211_set_channel()
2012 !(rdev->wiphy.features & in __nl80211_set_channel()
2104 rdev = wiphy_to_rdev(netdev->ieee80211_ptr->wiphy); in nl80211_set_wiphy()
2183 if (!(rdev->wiphy.features & NL80211_FEATURE_VIF_TXPOWER)) in nl80211_set_wiphy()
2209 if ((!rdev->wiphy.available_antennas_tx && in nl80211_set_wiphy()
2210 !rdev->wiphy.available_antennas_rx) || in nl80211_set_wiphy()
2219 if ((~tx_ant && (tx_ant & ~rdev->wiphy.available_antennas_tx)) || in nl80211_set_wiphy()
2220 (~rx_ant && (rx_ant & ~rdev->wiphy.available_antennas_rx))) in nl80211_set_wiphy()
2223 tx_ant = tx_ant & rdev->wiphy.available_antennas_tx; in nl80211_set_wiphy()
2224 rx_ant = rx_ant & rdev->wiphy.available_antennas_rx; in nl80211_set_wiphy()
2285 if (!(rdev->wiphy.features & NL80211_FEATURE_ACKTO_ESTIMATION)) in nl80211_set_wiphy()
2299 old_retry_short = rdev->wiphy.retry_short; in nl80211_set_wiphy()
2300 old_retry_long = rdev->wiphy.retry_long; in nl80211_set_wiphy()
2301 old_frag_threshold = rdev->wiphy.frag_threshold; in nl80211_set_wiphy()
2302 old_rts_threshold = rdev->wiphy.rts_threshold; in nl80211_set_wiphy()
2303 old_coverage_class = rdev->wiphy.coverage_class; in nl80211_set_wiphy()
2306 rdev->wiphy.retry_short = retry_short; in nl80211_set_wiphy()
2308 rdev->wiphy.retry_long = retry_long; in nl80211_set_wiphy()
2310 rdev->wiphy.frag_threshold = frag_threshold; in nl80211_set_wiphy()
2312 rdev->wiphy.rts_threshold = rts_threshold; in nl80211_set_wiphy()
2314 rdev->wiphy.coverage_class = coverage_class; in nl80211_set_wiphy()
2318 rdev->wiphy.retry_short = old_retry_short; in nl80211_set_wiphy()
2319 rdev->wiphy.retry_long = old_retry_long; in nl80211_set_wiphy()
2320 rdev->wiphy.frag_threshold = old_frag_threshold; in nl80211_set_wiphy()
2321 rdev->wiphy.rts_threshold = old_rts_threshold; in nl80211_set_wiphy()
2322 rdev->wiphy.coverage_class = old_coverage_class; in nl80211_set_wiphy()
2331 ((u64)wiphy_to_rdev(wdev->wiphy)->wiphy_idx << 32); in wdev_id()
2428 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_interface()
2521 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_AP) in nl80211_valid_4addr()
2525 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_STATION) in nl80211_valid_4addr()
2598 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) in nl80211_set_interface()
2637 !(rdev->wiphy.interface_modes & (1 << type))) in nl80211_new_interface()
2641 rdev->wiphy.features & NL80211_FEATURE_MAC_ON_CREATE) && in nl80211_new_interface()
2661 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) in nl80211_new_interface()
2729 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in nl80211_new_interface()
2766 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in nl80211_del_interface()
2876 if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_get_key()
3069 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_del_key()
3111 static struct cfg80211_acl_data *parse_acl_data(struct wiphy *wiphy, in parse_acl_data() argument
3119 if (!wiphy->max_acl_mac_addrs) in parse_acl_data()
3137 if (n_entries > wiphy->max_acl_mac_addrs) in parse_acl_data()
3170 acl = parse_acl_data(&rdev->wiphy, info); in nl80211_set_mac_acl()
3269 if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) && in nl80211_valid_auth_type()
3365 if (!(rdev->wiphy.features & NL80211_FEATURE_INACTIVITY_TIMER)) in nl80211_start_ap()
3379 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) in nl80211_start_ap()
3393 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) in nl80211_start_ap()
3406 if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef, in nl80211_start_ap()
3417 if (!(rdev->wiphy.features & in nl80211_start_ap()
3422 if (!(rdev->wiphy.features & in nl80211_start_ap()
3434 params.acl = parse_acl_data(&rdev->wiphy, info); in nl80211_start_ap()
3724 switch (rdev->wiphy.signal_type) { in nl80211_send_station()
3942 int cfg80211_check_station_change(struct wiphy *wiphy, in cfg80211_check_station_change() argument
4034 if (!(wiphy->features & NL80211_FEATURE_FULL_AP_CLIENT_STATE) && in cfg80211_check_station_change()
4090 if (!v->ieee80211_ptr || v->ieee80211_ptr->wiphy != &rdev->wiphy) { in get_vlan()
4421 if (!(rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) || in nl80211_new_station()
4433 if (!(rdev->wiphy.features & in nl80211_new_station()
4471 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS)) in nl80211_new_station()
4474 if (!(rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP)) in nl80211_new_station()
4886 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) in nl80211_set_bss()
4900 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) in nl80211_set_bss()
5341 !(rdev->wiphy.features & NL80211_FEATURE_USERSPACE_MPM)) in nl80211_parse_mesh_setup()
5456 struct wiphy *wiphy = NULL; in nl80211_get_reg_do() local
5478 wiphy = &rdev->wiphy; in nl80211_get_reg_do()
5479 self_managed = wiphy->regulatory_flags & in nl80211_get_reg_do()
5481 regdom = get_wiphy_regdom(wiphy); in nl80211_get_reg_do()
5490 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_get_reg_do()
5494 if (!wiphy && reg_last_request_cell_base() && in nl80211_get_reg_do()
5522 u32 seq, int flags, struct wiphy *wiphy, in nl80211_send_regdom() argument
5536 if (!wiphy && reg_last_request_cell_base() && in nl80211_send_regdom()
5541 if (wiphy && in nl80211_send_regdom()
5542 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_regdom()
5545 if (wiphy && wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_regdom()
5577 regdom = get_wiphy_regdom(&rdev->wiphy); in nl80211_get_reg_dump()
5585 NLM_F_MULTI, &rdev->wiphy, regdom); in nl80211_get_reg_dump()
5744 struct wiphy *wiphy; in nl80211_trigger_scan() local
5751 wiphy = &rdev->wiphy; in nl80211_trigger_scan()
5769 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_trigger_scan()
5776 if (n_ssids > wiphy->max_scan_ssids) { in nl80211_trigger_scan()
5786 if (ie_len > wiphy->max_scan_ie_len) { in nl80211_trigger_scan()
5816 chan = ieee80211_get_channel(wiphy, nla_get_u32(attr)); in nl80211_trigger_scan()
5836 if (!wiphy->bands[band]) in nl80211_trigger_scan()
5838 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_trigger_scan()
5841 chan = &wiphy->bands[band]->channels[j]; in nl80211_trigger_scan()
5880 if (wiphy->bands[i]) in nl80211_trigger_scan()
5882 (1 << wiphy->bands[i]->n_bitrates) - 1; in nl80211_trigger_scan()
5895 if (!wiphy->bands[band]) in nl80211_trigger_scan()
5898 err = ieee80211_get_ratemask(wiphy->bands[band], in nl80211_trigger_scan()
5911 !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { in nl80211_trigger_scan()
5917 if (!(wiphy->features & in nl80211_trigger_scan()
5940 request->wiphy = &rdev->wiphy; in nl80211_trigger_scan()
5961 nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_parse_sched_scan() argument
5989 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_parse_sched_scan()
5997 if (n_ssids > wiphy->max_sched_scan_ssids) in nl80211_parse_sched_scan()
6035 if (n_match_sets > wiphy->max_match_sets) in nl80211_parse_sched_scan()
6043 if (ie_len > wiphy->max_sched_scan_ie_len) in nl80211_parse_sched_scan()
6084 chan = ieee80211_get_channel(wiphy, nla_get_u32(attr)); in nl80211_parse_sched_scan()
6102 if (!wiphy->bands[band]) in nl80211_parse_sched_scan()
6104 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_parse_sched_scan()
6107 chan = &wiphy->bands[band]->channels[j]; in nl80211_parse_sched_scan()
6206 !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { in nl80211_parse_sched_scan()
6217 if (!(wiphy->features & flg)) { in nl80211_parse_sched_scan()
6257 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) || in nl80211_start_sched_scan()
6264 sched_scan_req = nl80211_parse_sched_scan(&rdev->wiphy, wdev, in nl80211_start_sched_scan()
6276 sched_scan_req->wiphy = &rdev->wiphy; in nl80211_start_sched_scan()
6298 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) || in nl80211_stop_sched_scan()
6316 dfs_region = reg_get_dfs_region(wdev->wiphy); in nl80211_start_radar_detection()
6330 err = cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, in nl80211_start_radar_detection()
6338 if (!cfg80211_chandef_dfs_usable(wdev->wiphy, &chandef)) in nl80211_start_radar_detection()
6344 cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef); in nl80211_start_radar_detection()
6348 err = rdev->ops->start_radar_detection(&rdev->wiphy, dev, &chandef, in nl80211_start_radar_detection()
6375 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) in nl80211_channel_switch()
6443 if (rdev->wiphy.max_num_csa_counters && in nl80211_channel_switch()
6445 rdev->wiphy.max_num_csa_counters)) in nl80211_channel_switch()
6468 if (rdev->wiphy.max_num_csa_counters && in nl80211_channel_switch()
6470 rdev->wiphy.max_num_csa_counters)) in nl80211_channel_switch()
6494 if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef, in nl80211_channel_switch()
6498 err = cfg80211_chandef_dfs_required(wdev->wiphy, in nl80211_channel_switch()
6591 switch (rdev->wiphy.signal_type) { in nl80211_send_bss()
6854 for (i = 0; i < rdev->wiphy.n_cipher_suites; i++) { in nl80211_authenticate()
6855 if (key.p.cipher == rdev->wiphy.cipher_suites[i]) { in nl80211_authenticate()
6872 chan = nl80211_get_valid_chan(&rdev->wiphy, in nl80211_authenticate()
6935 if (!(rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_crypto_settings()
6961 &rdev->wiphy, in nl80211_crypto_settings()
6969 if (!cfg80211_supported_cipher_suite(&rdev->wiphy, in nl80211_crypto_settings()
7027 chan = nl80211_get_valid_chan(&rdev->wiphy, in nl80211_associate()
7085 if (!(rdev->wiphy.features & in nl80211_associate()
7087 !(rdev->wiphy.features & NL80211_FEATURE_QUIET)) in nl80211_associate()
7202 struct wiphy *wiphy = &rdev->wiphy; in nl80211_parse_mcast_rate() local
7209 sband = wiphy->bands[band]; in nl80211_parse_mcast_rate()
7230 struct wiphy *wiphy; in nl80211_join_ibss() local
7258 wiphy = &rdev->wiphy; in nl80211_join_ibss()
7278 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef, in nl80211_join_ibss()
7289 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
7295 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
7297 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_join_ibss()
7314 wiphy->bands[ibss.chandef.chan->band]; in nl80211_join_ibss()
7406 err = rdev->ops->set_mcast_rate(&rdev->wiphy, dev, mcast_rate); in nl80211_set_mcast_rate()
7468 struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy, in __cfg80211_alloc_event_skb() argument
7475 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_event_skb()
7486 vendor_event_idx >= wiphy->n_vendor_events)) in __cfg80211_alloc_event_skb()
7488 info = &wiphy->vendor_events[vendor_event_idx]; in __cfg80211_alloc_event_skb()
7516 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), skb, 0, in __cfg80211_send_event_skb()
7537 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_testmode_do()
7654 struct wiphy *wiphy; in nl80211_connect() local
7687 wiphy = &rdev->wiphy; in nl80211_connect()
7691 (wiphy->flags & WIPHY_FLAG_SUPPORTS_FW_ROAM)) { in nl80211_connect()
7720 wiphy, info->attrs[NL80211_ATTR_WIPHY_FREQ]); in nl80211_connect()
7725 wiphy, info->attrs[NL80211_ATTR_WIPHY_FREQ_HINT]); in nl80211_connect()
7774 if (!(rdev->wiphy.features & in nl80211_connect()
7776 !(rdev->wiphy.features & NL80211_FEATURE_QUIET)) in nl80211_connect()
7838 if (!net_eq(wiphy_net(&rdev->wiphy), net)) in nl80211_wiphy_netns()
7848 int (*rdev_ops)(struct wiphy *wiphy, struct net_device *dev, in nl80211_setdel_pmksa()
7883 return rdev_ops(&rdev->wiphy, dev, &pmksa); in nl80211_setdel_pmksa()
7911 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_mgmt()
7945 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_oper()
7978 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL)) in nl80211_remain_on_channel()
7986 duration > rdev->wiphy.max_remain_on_channel_duration) in nl80211_remain_on_channel()
8181 sband = rdev->wiphy.bands[i]; in nl80211_set_tx_bitrate_mask()
8213 sband = rdev->wiphy.bands[band]; in nl80211_set_tx_bitrate_mask()
8255 if (!(rdev->wiphy.bands[band]->ht_cap.ht_supported || in nl80211_set_tx_bitrate_mask()
8256 rdev->wiphy.bands[band]->vht_cap.vht_supported)) in nl80211_set_tx_bitrate_mask()
8348 if (!(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
8357 params.wait > rdev->wiphy.max_remain_on_channel_duration) in nl80211_tx_mgmt()
8364 if (params.offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
8731 sband = rdev->wiphy.bands[setup.chandef.chan->band]; in nl80211_join_mesh()
8754 struct cfg80211_wowlan *wowlan = rdev->wiphy.wowlan_config; in nl80211_send_wowlan_patterns()
8879 if (!rdev->wiphy.wowlan) in nl80211_get_wowlan()
8882 if (rdev->wiphy.wowlan_config && rdev->wiphy.wowlan_config->tcp) { in nl80211_get_wowlan()
8884 size += rdev->wiphy.wowlan_config->tcp->tokens_size + in nl80211_get_wowlan()
8885 rdev->wiphy.wowlan_config->tcp->payload_len + in nl80211_get_wowlan()
8886 rdev->wiphy.wowlan_config->tcp->wake_len + in nl80211_get_wowlan()
8887 rdev->wiphy.wowlan_config->tcp->wake_len / 8; in nl80211_get_wowlan()
8899 if (rdev->wiphy.wowlan_config) { in nl80211_get_wowlan()
8906 if ((rdev->wiphy.wowlan_config->any && in nl80211_get_wowlan()
8908 (rdev->wiphy.wowlan_config->disconnect && in nl80211_get_wowlan()
8910 (rdev->wiphy.wowlan_config->magic_pkt && in nl80211_get_wowlan()
8912 (rdev->wiphy.wowlan_config->gtk_rekey_failure && in nl80211_get_wowlan()
8914 (rdev->wiphy.wowlan_config->eap_identity_req && in nl80211_get_wowlan()
8916 (rdev->wiphy.wowlan_config->four_way_handshake && in nl80211_get_wowlan()
8918 (rdev->wiphy.wowlan_config->rfkill_release && in nl80211_get_wowlan()
8926 rdev->wiphy.wowlan_config->tcp)) in nl80211_get_wowlan()
8931 rdev->wiphy.wowlan_config->nd_config)) in nl80211_get_wowlan()
8957 if (!rdev->wiphy.wowlan->tcp) in nl80211_parse_wowlan_tcp()
8977 if (data_size > rdev->wiphy.wowlan->tcp->data_payload_max) in nl80211_parse_wowlan_tcp()
8981 rdev->wiphy.wowlan->tcp->data_interval_max || in nl80211_parse_wowlan_tcp()
8986 if (wake_size > rdev->wiphy.wowlan->tcp->wake_payload_max) in nl80211_parse_wowlan_tcp()
9001 if (!rdev->wiphy.wowlan->tcp->tok) in nl80211_parse_wowlan_tcp()
9003 if (tok->len > rdev->wiphy.wowlan->tcp->tok->max_len) in nl80211_parse_wowlan_tcp()
9005 if (tok->len < rdev->wiphy.wowlan->tcp->tok->min_len) in nl80211_parse_wowlan_tcp()
9007 if (tokens_size > rdev->wiphy.wowlan->tcp->tok->bufsize) in nl80211_parse_wowlan_tcp()
9015 if (!rdev->wiphy.wowlan->tcp->seq) in nl80211_parse_wowlan_tcp()
9041 err = __sock_create(wiphy_net(&rdev->wiphy), PF_INET, SOCK_STREAM, in nl80211_parse_wowlan_tcp()
9113 trig->nd_config = nl80211_parse_sched_scan(&rdev->wiphy, NULL, tb); in nl80211_parse_wowlan_nd()
9129 const struct wiphy_wowlan_support *wowlan = rdev->wiphy.wowlan; in nl80211_set_wowlan()
9131 bool prev_enabled = rdev->wiphy.wowlan_config; in nl80211_set_wowlan()
9139 rdev->wiphy.wowlan_config = NULL; in nl80211_set_wowlan()
9304 rdev->wiphy.wowlan_config = ntrig; in nl80211_set_wowlan()
9308 prev_enabled != !!rdev->wiphy.wowlan_config) in nl80211_set_wowlan()
9309 rdev_set_wakeup(rdev, rdev->wiphy.wowlan_config); in nl80211_set_wowlan()
9385 if (!rdev->wiphy.coalesce) in nl80211_get_coalesce()
9433 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_parse_coalesce_rule()
9520 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_set_coalesce()
9527 if (!rdev->wiphy.coalesce || !rdev->ops->set_coalesce) in nl80211_set_coalesce()
9532 rdev->ops->set_coalesce(&rdev->wiphy, NULL); in nl80211_set_coalesce()
9560 err = rdev->ops->set_coalesce(&rdev->wiphy, &new_coalesce); in nl80211_set_coalesce()
9708 if (!(rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS)) in nl80211_register_beacons()
9894 if (!rdev->wiphy.vendor_commands) in nl80211_vendor_cmd()
9902 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_vendor_cmd()
9912 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_vendor_cmd()
9917 vcmd = &rdev->wiphy.vendor_commands[i]; in nl80211_vendor_cmd()
9947 err = rdev->wiphy.vendor_commands[i].doit(&rdev->wiphy, wdev, in nl80211_vendor_cmd()
9956 struct sk_buff *__cfg80211_alloc_reply_skb(struct wiphy *wiphy, in __cfg80211_alloc_reply_skb() argument
9961 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_reply_skb()
10055 if (!(rdev->wiphy.features & NL80211_FEATURE_SUPPORTS_WMM_ADMISSION)) in nl80211_add_tx_ts()
10142 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_channel_switch()
10172 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef, wdev->iftype)) in nl80211_tdls_channel_switch()
10176 if (cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, wdev->iftype)) in nl80211_tdls_channel_switch()
10199 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_cancel_channel_switch()
10266 rdev = wiphy_to_rdev(wdev->wiphy); in nl80211_pre_doit()
11059 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_notify_wiphy()
11172 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_start()
11201 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_result()
11220 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_sched_scan_results()
11238 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_sched_scan()
11271 struct wiphy *wiphy = wiphy_idx_to_wiphy(request->wiphy_idx); in nl80211_reg_change_event_fill() local
11273 if (wiphy && in nl80211_reg_change_event_fill()
11277 if (wiphy && in nl80211_reg_change_event_fill()
11278 wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_reg_change_event_fill()
11365 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_event()
11410 struct wiphy *wiphy = wdev->wiphy; in cfg80211_rx_unprot_mlme_mgmt() local
11411 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_rx_unprot_mlme_mgmt()
11453 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_timeout()
11509 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_connect_result()
11548 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_roamed()
11586 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_disconnected()
11620 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_ibss_bssid()
11633 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_notify_new_peer_candidate()
11661 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_notify_new_peer_candidate()
11700 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_michael_mic_failure()
11709 void nl80211_send_beacon_hint_event(struct wiphy *wiphy, in nl80211_send_beacon_hint_event() argument
11731 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_beacon_hint_event()
11799 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_remain_on_chan_event()
11812 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ready_on_channel() local
11813 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ready_on_channel()
11826 struct wiphy *wiphy = wdev->wiphy; in cfg80211_remain_on_channel_expired() local
11827 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_remain_on_channel_expired()
11838 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_new_sta() local
11839 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_new_sta()
11854 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_new_sta()
11862 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_del_sta_sinfo() local
11863 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_del_sta_sinfo()
11882 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_del_sta_sinfo()
11891 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_conn_failed() local
11892 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_conn_failed()
11913 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_conn_failed()
11927 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in __nl80211_unexpected_frame()
11951 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in __nl80211_unexpected_frame()
12035 return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in nl80211_send_mgmt()
12046 struct wiphy *wiphy = wdev->wiphy; in cfg80211_mgmt_tx_status() local
12047 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_mgmt_tx_status()
12075 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_mgmt_tx_status()
12089 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_prepare_cqm()
12133 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_send_cqm()
12269 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_gtk_rekey_notify()
12282 struct wiphy *wiphy = wdev->wiphy; in cfg80211_gtk_rekey_notify() local
12283 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_gtk_rekey_notify()
12327 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_pmksa_candidate_notify()
12340 struct wiphy *wiphy = wdev->wiphy; in cfg80211_pmksa_candidate_notify() local
12341 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_pmksa_candidate_notify()
12380 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_ch_switch_notify()
12393 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_notify() local
12394 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_notify()
12412 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_started_notify() local
12413 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_started_notify()
12461 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_radar_notify()
12474 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_probe_status()
12500 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_probe_status()
12510 void cfg80211_report_obss_beacon(struct wiphy *wiphy, in cfg80211_report_obss_beacon() argument
12514 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_report_obss_beacon()
12519 trace_cfg80211_report_obss_beacon(wiphy, frame, len, freq, sig_dbm); in cfg80211_report_obss_beacon()
12543 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, reg->nlportid); in cfg80211_report_obss_beacon()
12620 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_report_wowlan_wakeup()
12625 trace_cfg80211_report_wowlan_wakeup(wdev->wiphy, wdev, wakeup); in cfg80211_report_wowlan_wakeup()
12719 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_report_wowlan_wakeup()
12734 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_tdls_oper_request()
12738 trace_cfg80211_tdls_oper_request(wdev->wiphy, dev, peer, oper, in cfg80211_tdls_oper_request()
12761 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_tdls_oper_request()
12828 rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) in nl80211_netlink_notify()
12850 struct wiphy *wiphy = netdev->ieee80211_ptr->wiphy; in cfg80211_ft_event() local
12851 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ft_event()
12855 trace_cfg80211_ft_event(wiphy, netdev, ft_event); in cfg80211_ft_event()
12883 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_ft_event()
12898 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_crit_proto_stopped()
12919 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in cfg80211_crit_proto_stopped()
12932 struct wiphy *wiphy = wdev->wiphy; in nl80211_send_ap_stopped() local
12933 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_send_ap_stopped()
12952 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), msg, 0, in nl80211_send_ap_stopped()