Lines Matching refs:wiphy

100 		if (wiphy_net(&rdev->wiphy) != netns)  in __cfg80211_wdev_from_attrs()
174 netdev->ieee80211_ptr->wiphy); in __cfg80211_rdev_from_attrs()
193 if (netns != wiphy_net(&rdev->wiphy)) in __cfg80211_rdev_from_attrs()
510 *rdev = wiphy_to_rdev((*wdev)->wiphy); in nl80211_prepare_wdev_dump()
516 struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); in nl80211_prepare_wdev_dump() local
519 if (!wiphy) { in nl80211_prepare_wdev_dump()
523 *rdev = wiphy_to_rdev(wiphy); in nl80211_prepare_wdev_dump()
912 static struct ieee80211_channel *nl80211_get_valid_chan(struct wiphy *wiphy, in nl80211_get_valid_chan() argument
919 chan = ieee80211_get_channel(wiphy, nla_get_u32(tb)); in nl80211_get_valid_chan()
948 static int nl80211_put_iface_combinations(struct wiphy *wiphy, in nl80211_put_iface_combinations() argument
960 for (i = 0; i < wiphy->n_iface_combinations; i++) { in nl80211_put_iface_combinations()
964 c = &wiphy->iface_combinations[i]; in nl80211_put_iface_combinations()
1020 const struct wiphy_wowlan_tcp_support *tcp = rdev->wiphy.wowlan->tcp; in nl80211_send_wowlan_tcp_caps()
1063 if (!rdev->wiphy.wowlan) in nl80211_send_wowlan()
1070 if (((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_ANY) && in nl80211_send_wowlan()
1072 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_DISCONNECT) && in nl80211_send_wowlan()
1074 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_MAGIC_PKT) && in nl80211_send_wowlan()
1076 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_SUPPORTS_GTK_REKEY) && in nl80211_send_wowlan()
1078 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) && in nl80211_send_wowlan()
1080 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_EAP_IDENTITY_REQ) && in nl80211_send_wowlan()
1082 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_4WAY_HANDSHAKE) && in nl80211_send_wowlan()
1084 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_RFKILL_RELEASE) && in nl80211_send_wowlan()
1088 if (rdev->wiphy.wowlan->n_patterns) { in nl80211_send_wowlan()
1090 .max_patterns = rdev->wiphy.wowlan->n_patterns, in nl80211_send_wowlan()
1091 .min_pattern_len = rdev->wiphy.wowlan->pattern_min_len, in nl80211_send_wowlan()
1092 .max_pattern_len = rdev->wiphy.wowlan->pattern_max_len, in nl80211_send_wowlan()
1093 .max_pkt_offset = rdev->wiphy.wowlan->max_pkt_offset, in nl80211_send_wowlan()
1101 if ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_NET_DETECT) && in nl80211_send_wowlan()
1103 rdev->wiphy.wowlan->max_nd_match_sets)) in nl80211_send_wowlan()
1120 if (!rdev->wiphy.coalesce) in nl80211_send_coalesce()
1123 rule.max_rules = rdev->wiphy.coalesce->n_rules; in nl80211_send_coalesce()
1124 rule.max_delay = rdev->wiphy.coalesce->max_delay; in nl80211_send_coalesce()
1125 rule.pat.max_patterns = rdev->wiphy.coalesce->n_patterns; in nl80211_send_coalesce()
1126 rule.pat.min_pattern_len = rdev->wiphy.coalesce->pattern_min_len; in nl80211_send_coalesce()
1127 rule.pat.max_pattern_len = rdev->wiphy.coalesce->pattern_max_len; in nl80211_send_coalesce()
1128 rule.pat.max_pkt_offset = rdev->wiphy.coalesce->max_pkt_offset; in nl80211_send_coalesce()
1272 rdev->wiphy.mgmt_stypes; in nl80211_send_wiphy()
1284 wiphy_name(&rdev->wiphy)) || in nl80211_send_wiphy()
1295 rdev->wiphy.retry_short) || in nl80211_send_wiphy()
1297 rdev->wiphy.retry_long) || in nl80211_send_wiphy()
1299 rdev->wiphy.frag_threshold) || in nl80211_send_wiphy()
1301 rdev->wiphy.rts_threshold) || in nl80211_send_wiphy()
1303 rdev->wiphy.coverage_class) || in nl80211_send_wiphy()
1305 rdev->wiphy.max_scan_ssids) || in nl80211_send_wiphy()
1307 rdev->wiphy.max_sched_scan_ssids) || in nl80211_send_wiphy()
1309 rdev->wiphy.max_scan_ie_len) || in nl80211_send_wiphy()
1311 rdev->wiphy.max_sched_scan_ie_len) || in nl80211_send_wiphy()
1313 rdev->wiphy.max_match_sets) || in nl80211_send_wiphy()
1315 rdev->wiphy.max_sched_scan_plans) || in nl80211_send_wiphy()
1317 rdev->wiphy.max_sched_scan_plan_interval) || in nl80211_send_wiphy()
1319 rdev->wiphy.max_sched_scan_plan_iterations)) in nl80211_send_wiphy()
1322 if ((rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN) && in nl80211_send_wiphy()
1325 if ((rdev->wiphy.flags & WIPHY_FLAG_MESH_AUTH) && in nl80211_send_wiphy()
1328 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) && in nl80211_send_wiphy()
1331 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) && in nl80211_send_wiphy()
1334 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) && in nl80211_send_wiphy()
1337 if ((rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP) && in nl80211_send_wiphy()
1345 sizeof(u32) * rdev->wiphy.n_cipher_suites, in nl80211_send_wiphy()
1346 rdev->wiphy.cipher_suites)) in nl80211_send_wiphy()
1350 rdev->wiphy.max_num_pmkids)) in nl80211_send_wiphy()
1353 if ((rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_send_wiphy()
1358 rdev->wiphy.available_antennas_tx) || in nl80211_send_wiphy()
1360 rdev->wiphy.available_antennas_rx)) in nl80211_send_wiphy()
1363 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD) && in nl80211_send_wiphy()
1365 rdev->wiphy.probe_resp_offload)) in nl80211_send_wiphy()
1368 if ((rdev->wiphy.available_antennas_tx || in nl80211_send_wiphy()
1369 rdev->wiphy.available_antennas_rx) && in nl80211_send_wiphy()
1390 rdev->wiphy.interface_modes)) in nl80211_send_wiphy()
1404 sband = rdev->wiphy.bands[band]; in nl80211_send_wiphy()
1505 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) in nl80211_send_wiphy()
1510 if (rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK) { in nl80211_send_wiphy()
1522 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) { in nl80211_send_wiphy()
1526 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) in nl80211_send_wiphy()
1530 if (rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) { in nl80211_send_wiphy()
1543 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH) in nl80211_send_wiphy()
1546 if (rdev->wiphy.features & in nl80211_send_wiphy()
1571 (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) && in nl80211_send_wiphy()
1574 rdev->wiphy.max_remain_on_channel_duration)) in nl80211_send_wiphy()
1577 if ((rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX) && in nl80211_send_wiphy()
1598 rdev->wiphy.software_iftypes)) in nl80211_send_wiphy()
1601 if (nl80211_put_iface_combinations(&rdev->wiphy, msg, in nl80211_send_wiphy()
1609 if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) && in nl80211_send_wiphy()
1611 rdev->wiphy.ap_sme_capa)) in nl80211_send_wiphy()
1614 features = rdev->wiphy.features; in nl80211_send_wiphy()
1625 if (rdev->wiphy.ht_capa_mod_mask && in nl80211_send_wiphy()
1627 sizeof(*rdev->wiphy.ht_capa_mod_mask), in nl80211_send_wiphy()
1628 rdev->wiphy.ht_capa_mod_mask)) in nl80211_send_wiphy()
1631 if (rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME && in nl80211_send_wiphy()
1632 rdev->wiphy.max_acl_mac_addrs && in nl80211_send_wiphy()
1634 rdev->wiphy.max_acl_mac_addrs)) in nl80211_send_wiphy()
1650 if (rdev->wiphy.extended_capabilities && in nl80211_send_wiphy()
1652 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
1653 rdev->wiphy.extended_capabilities) || in nl80211_send_wiphy()
1655 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
1656 rdev->wiphy.extended_capabilities_mask))) in nl80211_send_wiphy()
1659 if (rdev->wiphy.vht_capa_mod_mask && in nl80211_send_wiphy()
1661 sizeof(*rdev->wiphy.vht_capa_mod_mask), in nl80211_send_wiphy()
1662 rdev->wiphy.vht_capa_mod_mask)) in nl80211_send_wiphy()
1671 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) && in nl80211_send_wiphy()
1676 if (rdev->wiphy.max_ap_assoc_sta && in nl80211_send_wiphy()
1678 rdev->wiphy.max_ap_assoc_sta)) in nl80211_send_wiphy()
1684 if (rdev->wiphy.n_vendor_commands) { in nl80211_send_wiphy()
1692 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_send_wiphy()
1693 info = &rdev->wiphy.vendor_commands[i].info; in nl80211_send_wiphy()
1700 if (rdev->wiphy.n_vendor_events) { in nl80211_send_wiphy()
1709 for (i = 0; i < rdev->wiphy.n_vendor_events; i++) { in nl80211_send_wiphy()
1710 info = &rdev->wiphy.vendor_events[i]; in nl80211_send_wiphy()
1719 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH && in nl80211_send_wiphy()
1721 rdev->wiphy.max_num_csa_counters)) in nl80211_send_wiphy()
1724 if (rdev->wiphy.regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_wiphy()
1729 sizeof(rdev->wiphy.ext_features), in nl80211_send_wiphy()
1730 rdev->wiphy.ext_features)) in nl80211_send_wiphy()
1772 netdev->ieee80211_ptr->wiphy); in nl80211_dump_wiphy_parse()
1804 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_wiphy()
1942 chandef->chan = ieee80211_get_channel(&rdev->wiphy, control_freq); in nl80211_parse_chandef()
1984 if (!cfg80211_chandef_usable(&rdev->wiphy, chandef, in nl80211_parse_chandef()
1990 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ)) in nl80211_parse_chandef()
2019 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in __nl80211_set_channel()
2026 !(rdev->wiphy.features & in __nl80211_set_channel()
2118 rdev = wiphy_to_rdev(netdev->ieee80211_ptr->wiphy); in nl80211_set_wiphy()
2197 if (!(rdev->wiphy.features & NL80211_FEATURE_VIF_TXPOWER)) in nl80211_set_wiphy()
2223 if ((!rdev->wiphy.available_antennas_tx && in nl80211_set_wiphy()
2224 !rdev->wiphy.available_antennas_rx) || in nl80211_set_wiphy()
2233 if ((~tx_ant && (tx_ant & ~rdev->wiphy.available_antennas_tx)) || in nl80211_set_wiphy()
2234 (~rx_ant && (rx_ant & ~rdev->wiphy.available_antennas_rx))) in nl80211_set_wiphy()
2237 tx_ant = tx_ant & rdev->wiphy.available_antennas_tx; in nl80211_set_wiphy()
2238 rx_ant = rx_ant & rdev->wiphy.available_antennas_rx; in nl80211_set_wiphy()
2299 if (!(rdev->wiphy.features & NL80211_FEATURE_ACKTO_ESTIMATION)) in nl80211_set_wiphy()
2313 old_retry_short = rdev->wiphy.retry_short; in nl80211_set_wiphy()
2314 old_retry_long = rdev->wiphy.retry_long; in nl80211_set_wiphy()
2315 old_frag_threshold = rdev->wiphy.frag_threshold; in nl80211_set_wiphy()
2316 old_rts_threshold = rdev->wiphy.rts_threshold; in nl80211_set_wiphy()
2317 old_coverage_class = rdev->wiphy.coverage_class; in nl80211_set_wiphy()
2320 rdev->wiphy.retry_short = retry_short; in nl80211_set_wiphy()
2322 rdev->wiphy.retry_long = retry_long; in nl80211_set_wiphy()
2324 rdev->wiphy.frag_threshold = frag_threshold; in nl80211_set_wiphy()
2326 rdev->wiphy.rts_threshold = rts_threshold; in nl80211_set_wiphy()
2328 rdev->wiphy.coverage_class = coverage_class; in nl80211_set_wiphy()
2332 rdev->wiphy.retry_short = old_retry_short; in nl80211_set_wiphy()
2333 rdev->wiphy.retry_long = old_retry_long; in nl80211_set_wiphy()
2334 rdev->wiphy.frag_threshold = old_frag_threshold; in nl80211_set_wiphy()
2335 rdev->wiphy.rts_threshold = old_rts_threshold; in nl80211_set_wiphy()
2336 rdev->wiphy.coverage_class = old_coverage_class; in nl80211_set_wiphy()
2346 ((u64)wiphy_to_rdev(wdev->wiphy)->wiphy_idx << 32); in wdev_id()
2453 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_interface()
2546 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_AP) in nl80211_valid_4addr()
2550 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_STATION) in nl80211_valid_4addr()
2623 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) in nl80211_set_interface()
2662 !(rdev->wiphy.interface_modes & (1 << type))) in nl80211_new_interface()
2666 rdev->wiphy.features & NL80211_FEATURE_MAC_ON_CREATE) && in nl80211_new_interface()
2686 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) in nl80211_new_interface()
2754 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in nl80211_new_interface()
2791 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in nl80211_del_interface()
2901 if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_get_key()
3094 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_del_key()
3136 static struct cfg80211_acl_data *parse_acl_data(struct wiphy *wiphy, in parse_acl_data() argument
3144 if (!wiphy->max_acl_mac_addrs) in parse_acl_data()
3162 if (n_entries > wiphy->max_acl_mac_addrs) in parse_acl_data()
3195 acl = parse_acl_data(&rdev->wiphy, info); in nl80211_set_mac_acl()
3294 if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) && in nl80211_valid_auth_type()
3390 if (!(rdev->wiphy.features & NL80211_FEATURE_INACTIVITY_TIMER)) in nl80211_start_ap()
3404 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) in nl80211_start_ap()
3418 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) in nl80211_start_ap()
3431 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &params.chandef, in nl80211_start_ap()
3442 if (!(rdev->wiphy.features & in nl80211_start_ap()
3447 if (!(rdev->wiphy.features & in nl80211_start_ap()
3459 params.acl = parse_acl_data(&rdev->wiphy, info); in nl80211_start_ap()
3749 switch (rdev->wiphy.signal_type) { in nl80211_send_station()
3967 int cfg80211_check_station_change(struct wiphy *wiphy, in cfg80211_check_station_change() argument
4065 if (!(wiphy->features & NL80211_FEATURE_FULL_AP_CLIENT_STATE) && in cfg80211_check_station_change()
4122 if (!v->ieee80211_ptr || v->ieee80211_ptr->wiphy != &rdev->wiphy) { in get_vlan()
4459 if (!(rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) || in nl80211_new_station()
4471 if (!(rdev->wiphy.features & in nl80211_new_station()
4509 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS)) in nl80211_new_station()
4512 if (!(rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP)) in nl80211_new_station()
4924 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) in nl80211_set_bss()
4938 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) in nl80211_set_bss()
5329 !(rdev->wiphy.features & NL80211_FEATURE_USERSPACE_MPM)) in nl80211_parse_mesh_setup()
5444 struct wiphy *wiphy = NULL; in nl80211_get_reg_do() local
5466 wiphy = &rdev->wiphy; in nl80211_get_reg_do()
5467 self_managed = wiphy->regulatory_flags & in nl80211_get_reg_do()
5469 regdom = get_wiphy_regdom(wiphy); in nl80211_get_reg_do()
5478 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_get_reg_do()
5482 if (!wiphy && reg_last_request_cell_base() && in nl80211_get_reg_do()
5510 u32 seq, int flags, struct wiphy *wiphy, in nl80211_send_regdom() argument
5524 if (!wiphy && reg_last_request_cell_base() && in nl80211_send_regdom()
5529 if (wiphy && in nl80211_send_regdom()
5530 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_regdom()
5533 if (wiphy && wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_regdom()
5565 regdom = get_wiphy_regdom(&rdev->wiphy); in nl80211_get_reg_dump()
5573 NLM_F_MULTI, &rdev->wiphy, regdom); in nl80211_get_reg_dump()
5784 struct wiphy *wiphy; in nl80211_trigger_scan() local
5791 wiphy = &rdev->wiphy; in nl80211_trigger_scan()
5809 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_trigger_scan()
5816 if (n_ssids > wiphy->max_scan_ssids) { in nl80211_trigger_scan()
5826 if (ie_len > wiphy->max_scan_ie_len) { in nl80211_trigger_scan()
5856 chan = ieee80211_get_channel(wiphy, nla_get_u32(attr)); in nl80211_trigger_scan()
5876 if (!wiphy->bands[band]) in nl80211_trigger_scan()
5878 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_trigger_scan()
5881 chan = &wiphy->bands[band]->channels[j]; in nl80211_trigger_scan()
5920 if (wiphy->bands[i]) in nl80211_trigger_scan()
5922 (1 << wiphy->bands[i]->n_bitrates) - 1; in nl80211_trigger_scan()
5935 if (!wiphy->bands[band]) in nl80211_trigger_scan()
5938 err = ieee80211_get_ratemask(wiphy->bands[band], in nl80211_trigger_scan()
5951 !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { in nl80211_trigger_scan()
5957 if (!(wiphy->features & in nl80211_trigger_scan()
5980 request->wiphy = &rdev->wiphy; in nl80211_trigger_scan()
6001 nl80211_parse_sched_scan_plans(struct wiphy *wiphy, int n_plans, in nl80211_parse_sched_scan_plans() argument
6030 wiphy->max_sched_scan_plan_interval) in nl80211_parse_sched_scan_plans()
6032 wiphy->max_sched_scan_plan_interval; in nl80211_parse_sched_scan_plans()
6056 wiphy->max_sched_scan_plan_interval) in nl80211_parse_sched_scan_plans()
6064 wiphy->max_sched_scan_plan_iterations)) in nl80211_parse_sched_scan_plans()
6088 nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_parse_sched_scan() argument
6108 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_parse_sched_scan()
6116 if (n_ssids > wiphy->max_sched_scan_ssids) in nl80211_parse_sched_scan()
6154 if (n_match_sets > wiphy->max_match_sets) in nl80211_parse_sched_scan()
6162 if (ie_len > wiphy->max_sched_scan_ie_len) in nl80211_parse_sched_scan()
6189 if (!n_plans || n_plans > wiphy->max_sched_scan_plans) in nl80211_parse_sched_scan()
6243 chan = ieee80211_get_channel(wiphy, nla_get_u32(attr)); in nl80211_parse_sched_scan()
6261 if (!wiphy->bands[band]) in nl80211_parse_sched_scan()
6263 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_parse_sched_scan()
6266 chan = &wiphy->bands[band]->channels[j]; in nl80211_parse_sched_scan()
6365 !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) { in nl80211_parse_sched_scan()
6376 if (!(wiphy->features & flg)) { in nl80211_parse_sched_scan()
6397 err = nl80211_parse_sched_scan_plans(wiphy, n_plans, request, attrs); in nl80211_parse_sched_scan()
6419 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) || in nl80211_start_sched_scan()
6426 sched_scan_req = nl80211_parse_sched_scan(&rdev->wiphy, wdev, in nl80211_start_sched_scan()
6438 sched_scan_req->wiphy = &rdev->wiphy; in nl80211_start_sched_scan()
6460 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) || in nl80211_stop_sched_scan()
6478 dfs_region = reg_get_dfs_region(wdev->wiphy); in nl80211_start_radar_detection()
6492 err = cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, in nl80211_start_radar_detection()
6500 if (!cfg80211_chandef_dfs_usable(wdev->wiphy, &chandef)) in nl80211_start_radar_detection()
6506 cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef); in nl80211_start_radar_detection()
6510 err = rdev->ops->start_radar_detection(&rdev->wiphy, dev, &chandef, in nl80211_start_radar_detection()
6537 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) in nl80211_channel_switch()
6605 if (rdev->wiphy.max_num_csa_counters && in nl80211_channel_switch()
6607 rdev->wiphy.max_num_csa_counters)) in nl80211_channel_switch()
6630 if (rdev->wiphy.max_num_csa_counters && in nl80211_channel_switch()
6632 rdev->wiphy.max_num_csa_counters)) in nl80211_channel_switch()
6656 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &params.chandef, in nl80211_channel_switch()
6660 err = cfg80211_chandef_dfs_required(wdev->wiphy, in nl80211_channel_switch()
6758 switch (rdev->wiphy.signal_type) { in nl80211_send_bss()
7021 for (i = 0; i < rdev->wiphy.n_cipher_suites; i++) { in nl80211_authenticate()
7022 if (key.p.cipher == rdev->wiphy.cipher_suites[i]) { in nl80211_authenticate()
7039 chan = nl80211_get_valid_chan(&rdev->wiphy, in nl80211_authenticate()
7102 if (!(rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_crypto_settings()
7128 &rdev->wiphy, in nl80211_crypto_settings()
7136 if (!cfg80211_supported_cipher_suite(&rdev->wiphy, in nl80211_crypto_settings()
7194 chan = nl80211_get_valid_chan(&rdev->wiphy, in nl80211_associate()
7252 if (!(rdev->wiphy.features & in nl80211_associate()
7254 !(rdev->wiphy.features & NL80211_FEATURE_QUIET)) in nl80211_associate()
7369 struct wiphy *wiphy = &rdev->wiphy; in nl80211_parse_mcast_rate() local
7376 sband = wiphy->bands[band]; in nl80211_parse_mcast_rate()
7397 struct wiphy *wiphy; in nl80211_join_ibss() local
7425 wiphy = &rdev->wiphy; in nl80211_join_ibss()
7445 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef, in nl80211_join_ibss()
7456 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
7462 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
7464 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_join_ibss()
7481 wiphy->bands[ibss.chandef.chan->band]; in nl80211_join_ibss()
7574 err = rdev->ops->set_mcast_rate(&rdev->wiphy, dev, mcast_rate); in nl80211_set_mcast_rate()
7636 struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy, in __cfg80211_alloc_event_skb() argument
7643 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_event_skb()
7654 vendor_event_idx >= wiphy->n_vendor_events)) in __cfg80211_alloc_event_skb()
7656 info = &wiphy->vendor_events[vendor_event_idx]; in __cfg80211_alloc_event_skb()
7684 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), skb, 0, in __cfg80211_send_event_skb()
7705 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_testmode_do()
7822 struct wiphy *wiphy; in nl80211_connect() local
7855 wiphy = &rdev->wiphy; in nl80211_connect()
7859 (wiphy->flags & WIPHY_FLAG_SUPPORTS_FW_ROAM)) { in nl80211_connect()
7888 wiphy, info->attrs[NL80211_ATTR_WIPHY_FREQ]); in nl80211_connect()
7893 wiphy, info->attrs[NL80211_ATTR_WIPHY_FREQ_HINT]); in nl80211_connect()
7942 if (!(rdev->wiphy.features & in nl80211_connect()
7944 !(rdev->wiphy.features & NL80211_FEATURE_QUIET)) { in nl80211_connect()
8008 if (!net_eq(wiphy_net(&rdev->wiphy), net)) in nl80211_wiphy_netns()
8018 int (*rdev_ops)(struct wiphy *wiphy, struct net_device *dev, in nl80211_setdel_pmksa()
8053 return rdev_ops(&rdev->wiphy, dev, &pmksa); in nl80211_setdel_pmksa()
8081 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_mgmt()
8115 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_oper()
8148 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL)) in nl80211_remain_on_channel()
8156 duration > rdev->wiphy.max_remain_on_channel_duration) in nl80211_remain_on_channel()
8351 sband = rdev->wiphy.bands[i]; in nl80211_set_tx_bitrate_mask()
8383 sband = rdev->wiphy.bands[band]; in nl80211_set_tx_bitrate_mask()
8425 if (!(rdev->wiphy.bands[band]->ht_cap.ht_supported || in nl80211_set_tx_bitrate_mask()
8426 rdev->wiphy.bands[band]->vht_cap.vht_supported)) in nl80211_set_tx_bitrate_mask()
8518 if (!(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
8527 params.wait > rdev->wiphy.max_remain_on_channel_duration) in nl80211_tx_mgmt()
8534 if (params.offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
8901 sband = rdev->wiphy.bands[setup.chandef.chan->band]; in nl80211_join_mesh()
8924 struct cfg80211_wowlan *wowlan = rdev->wiphy.wowlan_config; in nl80211_send_wowlan_patterns()
9068 if (!rdev->wiphy.wowlan) in nl80211_get_wowlan()
9071 if (rdev->wiphy.wowlan_config && rdev->wiphy.wowlan_config->tcp) { in nl80211_get_wowlan()
9073 size += rdev->wiphy.wowlan_config->tcp->tokens_size + in nl80211_get_wowlan()
9074 rdev->wiphy.wowlan_config->tcp->payload_len + in nl80211_get_wowlan()
9075 rdev->wiphy.wowlan_config->tcp->wake_len + in nl80211_get_wowlan()
9076 rdev->wiphy.wowlan_config->tcp->wake_len / 8; in nl80211_get_wowlan()
9088 if (rdev->wiphy.wowlan_config) { in nl80211_get_wowlan()
9095 if ((rdev->wiphy.wowlan_config->any && in nl80211_get_wowlan()
9097 (rdev->wiphy.wowlan_config->disconnect && in nl80211_get_wowlan()
9099 (rdev->wiphy.wowlan_config->magic_pkt && in nl80211_get_wowlan()
9101 (rdev->wiphy.wowlan_config->gtk_rekey_failure && in nl80211_get_wowlan()
9103 (rdev->wiphy.wowlan_config->eap_identity_req && in nl80211_get_wowlan()
9105 (rdev->wiphy.wowlan_config->four_way_handshake && in nl80211_get_wowlan()
9107 (rdev->wiphy.wowlan_config->rfkill_release && in nl80211_get_wowlan()
9115 rdev->wiphy.wowlan_config->tcp)) in nl80211_get_wowlan()
9120 rdev->wiphy.wowlan_config->nd_config)) in nl80211_get_wowlan()
9146 if (!rdev->wiphy.wowlan->tcp) in nl80211_parse_wowlan_tcp()
9166 if (data_size > rdev->wiphy.wowlan->tcp->data_payload_max) in nl80211_parse_wowlan_tcp()
9170 rdev->wiphy.wowlan->tcp->data_interval_max || in nl80211_parse_wowlan_tcp()
9175 if (wake_size > rdev->wiphy.wowlan->tcp->wake_payload_max) in nl80211_parse_wowlan_tcp()
9190 if (!rdev->wiphy.wowlan->tcp->tok) in nl80211_parse_wowlan_tcp()
9192 if (tok->len > rdev->wiphy.wowlan->tcp->tok->max_len) in nl80211_parse_wowlan_tcp()
9194 if (tok->len < rdev->wiphy.wowlan->tcp->tok->min_len) in nl80211_parse_wowlan_tcp()
9196 if (tokens_size > rdev->wiphy.wowlan->tcp->tok->bufsize) in nl80211_parse_wowlan_tcp()
9204 if (!rdev->wiphy.wowlan->tcp->seq) in nl80211_parse_wowlan_tcp()
9230 err = __sock_create(wiphy_net(&rdev->wiphy), PF_INET, SOCK_STREAM, in nl80211_parse_wowlan_tcp()
9302 trig->nd_config = nl80211_parse_sched_scan(&rdev->wiphy, NULL, tb); in nl80211_parse_wowlan_nd()
9318 const struct wiphy_wowlan_support *wowlan = rdev->wiphy.wowlan; in nl80211_set_wowlan()
9320 bool prev_enabled = rdev->wiphy.wowlan_config; in nl80211_set_wowlan()
9328 rdev->wiphy.wowlan_config = NULL; in nl80211_set_wowlan()
9493 rdev->wiphy.wowlan_config = ntrig; in nl80211_set_wowlan()
9497 prev_enabled != !!rdev->wiphy.wowlan_config) in nl80211_set_wowlan()
9498 rdev_set_wakeup(rdev, rdev->wiphy.wowlan_config); in nl80211_set_wowlan()
9575 if (!rdev->wiphy.coalesce) in nl80211_get_coalesce()
9623 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_parse_coalesce_rule()
9710 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_set_coalesce()
9717 if (!rdev->wiphy.coalesce || !rdev->ops->set_coalesce) in nl80211_set_coalesce()
9722 rdev->ops->set_coalesce(&rdev->wiphy, NULL); in nl80211_set_coalesce()
9750 err = rdev->ops->set_coalesce(&rdev->wiphy, &new_coalesce); in nl80211_set_coalesce()
9898 if (!(rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS)) in nl80211_register_beacons()
10084 if (!rdev->wiphy.vendor_commands) in nl80211_vendor_cmd()
10092 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_vendor_cmd()
10102 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_vendor_cmd()
10107 vcmd = &rdev->wiphy.vendor_commands[i]; in nl80211_vendor_cmd()
10140 err = rdev->wiphy.vendor_commands[i].doit(&rdev->wiphy, wdev, in nl80211_vendor_cmd()
10165 struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); in nl80211_prepare_vendor_dump() local
10168 if (!wiphy) { in nl80211_prepare_vendor_dump()
10172 *rdev = wiphy_to_rdev(wiphy); in nl80211_prepare_vendor_dump()
10215 for (i = 0; i < (*rdev)->wiphy.n_vendor_commands; i++) { in nl80211_prepare_vendor_dump()
10218 vcmd = &(*rdev)->wiphy.vendor_commands[i]; in nl80211_prepare_vendor_dump()
10276 vcmd = &rdev->wiphy.vendor_commands[vcmd_idx]; in nl80211_vendor_cmd_dump()
10315 err = vcmd->dumpit(&rdev->wiphy, wdev, skb, data, data_len, in nl80211_vendor_cmd_dump()
10336 struct sk_buff *__cfg80211_alloc_reply_skb(struct wiphy *wiphy, in __cfg80211_alloc_reply_skb() argument
10341 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_reply_skb()
10435 if (!(rdev->wiphy.features & NL80211_FEATURE_SUPPORTS_WMM_ADMISSION)) in nl80211_add_tx_ts()
10522 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_channel_switch()
10552 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in nl80211_tdls_channel_switch()
10557 if (cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, wdev->iftype)) in nl80211_tdls_channel_switch()
10580 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_cancel_channel_switch()
10647 rdev = wiphy_to_rdev(wdev->wiphy); in nl80211_pre_doit()
11443 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_notify_wiphy()
11556 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_start()
11585 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_result()
11604 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_sched_scan_results()
11622 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_sched_scan()
11655 struct wiphy *wiphy = wiphy_idx_to_wiphy(request->wiphy_idx); in nl80211_reg_change_event_fill() local
11657 if (wiphy && in nl80211_reg_change_event_fill()
11661 if (wiphy && in nl80211_reg_change_event_fill()
11662 wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_reg_change_event_fill()
11749 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_event()
11794 struct wiphy *wiphy = wdev->wiphy; in cfg80211_rx_unprot_mlme_mgmt() local
11795 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_rx_unprot_mlme_mgmt()
11837 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_timeout()
11893 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_connect_result()
11932 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_roamed()
11970 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_disconnected()
12004 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_ibss_bssid()
12017 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_notify_new_peer_candidate()
12045 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_notify_new_peer_candidate()
12084 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_michael_mic_failure()
12093 void nl80211_send_beacon_hint_event(struct wiphy *wiphy, in nl80211_send_beacon_hint_event() argument
12115 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_beacon_hint_event()
12183 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_remain_on_chan_event()
12196 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ready_on_channel() local
12197 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ready_on_channel()
12210 struct wiphy *wiphy = wdev->wiphy; in cfg80211_remain_on_channel_expired() local
12211 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_remain_on_channel_expired()
12222 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_new_sta() local
12223 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_new_sta()
12238 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_new_sta()
12246 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_del_sta_sinfo() local
12247 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_del_sta_sinfo()
12266 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_del_sta_sinfo()
12275 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_conn_failed() local
12276 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_conn_failed()
12297 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_conn_failed()
12311 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in __nl80211_unexpected_frame()
12335 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in __nl80211_unexpected_frame()
12419 return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in nl80211_send_mgmt()
12430 struct wiphy *wiphy = wdev->wiphy; in cfg80211_mgmt_tx_status() local
12431 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_mgmt_tx_status()
12459 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_mgmt_tx_status()
12473 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_prepare_cqm()
12517 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_send_cqm()
12653 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_gtk_rekey_notify()
12666 struct wiphy *wiphy = wdev->wiphy; in cfg80211_gtk_rekey_notify() local
12667 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_gtk_rekey_notify()
12711 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_pmksa_candidate_notify()
12724 struct wiphy *wiphy = wdev->wiphy; in cfg80211_pmksa_candidate_notify() local
12725 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_pmksa_candidate_notify()
12764 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_ch_switch_notify()
12777 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_notify() local
12778 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_notify()
12796 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_started_notify() local
12797 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_started_notify()
12845 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_radar_notify()
12858 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_probe_status()
12884 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_probe_status()
12894 void cfg80211_report_obss_beacon(struct wiphy *wiphy, in cfg80211_report_obss_beacon() argument
12898 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_report_obss_beacon()
12903 trace_cfg80211_report_obss_beacon(wiphy, frame, len, freq, sig_dbm); in cfg80211_report_obss_beacon()
12927 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, reg->nlportid); in cfg80211_report_obss_beacon()
13004 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_report_wowlan_wakeup()
13009 trace_cfg80211_report_wowlan_wakeup(wdev->wiphy, wdev, wakeup); in cfg80211_report_wowlan_wakeup()
13103 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_report_wowlan_wakeup()
13118 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_tdls_oper_request()
13122 trace_cfg80211_tdls_oper_request(wdev->wiphy, dev, peer, oper, in cfg80211_tdls_oper_request()
13145 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_tdls_oper_request()
13212 rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) in nl80211_netlink_notify()
13234 struct wiphy *wiphy = netdev->ieee80211_ptr->wiphy; in cfg80211_ft_event() local
13235 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ft_event()
13239 trace_cfg80211_ft_event(wiphy, netdev, ft_event); in cfg80211_ft_event()
13267 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_ft_event()
13282 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_crit_proto_stopped()
13303 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in cfg80211_crit_proto_stopped()
13316 struct wiphy *wiphy = wdev->wiphy; in nl80211_send_ap_stopped() local
13317 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_send_ap_stopped()
13336 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), msg, 0, in nl80211_send_ap_stopped()