Lines Matching full:wiphy
90 lockdep_assert_held(&rdev->wiphy.mtx); in __cfg80211_wdev_from_attrs()
92 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in __cfg80211_wdev_from_attrs()
112 if (wiphy_net(&rdev->wiphy) != netns) in __cfg80211_wdev_from_attrs()
118 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in __cfg80211_wdev_from_attrs()
164 list_for_each_entry(wdev, &tmp->wiphy.wdev_list, list) { in __cfg80211_rdev_from_attrs()
187 netdev->ieee80211_ptr->wiphy); in __cfg80211_rdev_from_attrs()
206 if (netns != wiphy_net(&rdev->wiphy)) in __cfg80211_rdev_from_attrs()
1119 *rdev = wiphy_to_rdev((*wdev)->wiphy); in nl80211_prepare_wdev_dump()
1120 mutex_lock(&(*rdev)->wiphy.mtx); in nl80211_prepare_wdev_dump()
1127 struct wiphy *wiphy; in nl80211_prepare_wdev_dump() local
1131 wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); in nl80211_prepare_wdev_dump()
1132 if (!wiphy) { in nl80211_prepare_wdev_dump()
1136 *rdev = wiphy_to_rdev(wiphy); in nl80211_prepare_wdev_dump()
1139 list_for_each_entry(tmp, &(*rdev)->wiphy.wdev_list, list) { in nl80211_prepare_wdev_dump()
1150 mutex_lock(&(*rdev)->wiphy.mtx); in nl80211_prepare_wdev_dump()
1201 static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy, in nl80211_msg_put_channel() argument
1325 freq_reg_info(wiphy, MHZ_TO_KHZ(chan->center_freq)); in nl80211_msg_put_channel()
1664 lockdep_assert_wiphy(wdev->wiphy); in nl80211_key_allowed()
1682 if (wiphy_ext_feature_isset(wdev->wiphy, in nl80211_key_allowed()
1698 static struct ieee80211_channel *nl80211_get_valid_chan(struct wiphy *wiphy, in nl80211_get_valid_chan() argument
1703 chan = ieee80211_get_channel_khz(wiphy, freq); in nl80211_get_valid_chan()
1790 static int nl80211_put_iface_combinations(struct wiphy *wiphy, in nl80211_put_iface_combinations() argument
1804 c = wiphy->radio[0].iface_combinations; in nl80211_put_iface_combinations()
1805 n = wiphy->radio[0].n_iface_combinations; in nl80211_put_iface_combinations()
1807 c = wiphy->iface_combinations; in nl80211_put_iface_combinations()
1808 n = wiphy->n_iface_combinations; in nl80211_put_iface_combinations()
1825 const struct wiphy_wowlan_tcp_support *tcp = rdev->wiphy.wowlan->tcp; in nl80211_send_wowlan_tcp_caps()
1869 if (!rdev->wiphy.wowlan) in nl80211_send_wowlan()
1877 if (((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_ANY) && in nl80211_send_wowlan()
1879 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_DISCONNECT) && in nl80211_send_wowlan()
1881 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_MAGIC_PKT) && in nl80211_send_wowlan()
1883 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_SUPPORTS_GTK_REKEY) && in nl80211_send_wowlan()
1885 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) && in nl80211_send_wowlan()
1887 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_EAP_IDENTITY_REQ) && in nl80211_send_wowlan()
1889 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_4WAY_HANDSHAKE) && in nl80211_send_wowlan()
1891 ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_RFKILL_RELEASE) && in nl80211_send_wowlan()
1895 if (rdev->wiphy.wowlan->n_patterns) { in nl80211_send_wowlan()
1897 .max_patterns = rdev->wiphy.wowlan->n_patterns, in nl80211_send_wowlan()
1898 .min_pattern_len = rdev->wiphy.wowlan->pattern_min_len, in nl80211_send_wowlan()
1899 .max_pattern_len = rdev->wiphy.wowlan->pattern_max_len, in nl80211_send_wowlan()
1900 .max_pkt_offset = rdev->wiphy.wowlan->max_pkt_offset, in nl80211_send_wowlan()
1908 if ((rdev->wiphy.wowlan->flags & WIPHY_WOWLAN_NET_DETECT) && in nl80211_send_wowlan()
1910 rdev->wiphy.wowlan->max_nd_match_sets)) in nl80211_send_wowlan()
1927 if (!rdev->wiphy.coalesce) in nl80211_send_coalesce()
1930 rule.max_rules = rdev->wiphy.coalesce->n_rules; in nl80211_send_coalesce()
1931 rule.max_delay = rdev->wiphy.coalesce->max_delay; in nl80211_send_coalesce()
1932 rule.pat.max_patterns = rdev->wiphy.coalesce->n_patterns; in nl80211_send_coalesce()
1933 rule.pat.min_pattern_len = rdev->wiphy.coalesce->pattern_min_len; in nl80211_send_coalesce()
1934 rule.pat.max_pattern_len = rdev->wiphy.coalesce->pattern_max_len; in nl80211_send_coalesce()
1935 rule.pat.max_pkt_offset = rdev->wiphy.coalesce->max_pkt_offset; in nl80211_send_coalesce()
2214 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) in nl80211_add_commands_unsplit()
2219 if (rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK) { in nl80211_add_commands_unsplit()
2230 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) { in nl80211_add_commands_unsplit()
2234 if (rdev->wiphy.max_sched_scan_reqs) in nl80211_add_commands_unsplit()
2238 if (rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) { in nl80211_add_commands_unsplit()
2318 const struct cfg80211_pmsr_capabilities *cap = rdev->wiphy.pmsr_capa; in nl80211_send_pmsr_capa()
2365 if (!rdev->wiphy.num_iftype_akm_suites || in nl80211_put_iftype_akm_suites()
2366 !rdev->wiphy.iftype_akm_suites) in nl80211_put_iftype_akm_suites()
2373 for (i = 0; i < rdev->wiphy.num_iftype_akm_suites; i++) { in nl80211_put_iftype_akm_suites()
2378 iftype_akms = &rdev->wiphy.iftype_akm_suites[i]; in nl80211_put_iftype_akm_suites()
2403 if (!rdev->wiphy.tid_config_support.vif && in nl80211_put_tid_config_support()
2404 !rdev->wiphy.tid_config_support.peer) in nl80211_put_tid_config_support()
2411 if (rdev->wiphy.tid_config_support.vif && in nl80211_put_tid_config_support()
2413 rdev->wiphy.tid_config_support.vif, in nl80211_put_tid_config_support()
2417 if (rdev->wiphy.tid_config_support.peer && in nl80211_put_tid_config_support()
2419 rdev->wiphy.tid_config_support.peer, in nl80211_put_tid_config_support()
2425 rdev->wiphy.tid_config_support.max_retry)) in nl80211_put_tid_config_support()
2428 rdev->wiphy.tid_config_support.max_retry)) in nl80211_put_tid_config_support()
2447 if (!rdev->wiphy.sar_capa) in nl80211_put_sar_specs()
2450 num_freq_ranges = rdev->wiphy.sar_capa->num_freq_ranges; in nl80211_put_sar_specs()
2456 if (nla_put_u32(msg, NL80211_SAR_ATTR_TYPE, rdev->wiphy.sar_capa->type)) in nl80211_put_sar_specs()
2470 rdev->wiphy.sar_capa->freq_ranges[i].start_freq)) in nl80211_put_sar_specs()
2474 rdev->wiphy.sar_capa->freq_ranges[i].end_freq)) in nl80211_put_sar_specs()
2489 static int nl80211_put_mbssid_support(struct wiphy *wiphy, struct sk_buff *msg) in nl80211_put_mbssid_support() argument
2493 if (!wiphy->mbssid_max_interfaces) in nl80211_put_mbssid_support()
2501 wiphy->mbssid_max_interfaces)) in nl80211_put_mbssid_support()
2504 if (wiphy->ema_max_profile_periodicity && in nl80211_put_mbssid_support()
2507 wiphy->ema_max_profile_periodicity)) in nl80211_put_mbssid_support()
2518 static int nl80211_put_radio(struct wiphy *wiphy, struct sk_buff *msg, int idx) in nl80211_put_radio() argument
2520 const struct wiphy_radio *r = &wiphy->radio[idx]; in nl80211_put_radio()
2521 const struct wiphy_radio_cfg *rcfg = &wiphy->radio_cfg[idx]; in nl80211_put_radio()
2573 static int nl80211_put_radios(struct wiphy *wiphy, struct sk_buff *msg) in nl80211_put_radios() argument
2578 if (!wiphy->n_radio) in nl80211_put_radios()
2585 for (i = 0; i < wiphy->n_radio; i++) in nl80211_put_radios()
2586 if (nl80211_put_radio(wiphy, msg, i)) in nl80211_put_radios()
2591 if (nl80211_put_iface_combinations(wiphy, msg, in nl80211_put_radios()
2603 static int nl80211_put_nan_capa(struct wiphy *wiphy, struct sk_buff *msg) in nl80211_put_nan_capa() argument
2611 if (wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_CONFIGURABLE_SYNC && in nl80211_put_nan_capa()
2615 if ((wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_USERSPACE_DE) && in nl80211_put_nan_capa()
2620 wiphy->nan_capa.op_mode) || in nl80211_put_nan_capa()
2622 wiphy->nan_capa.n_antennas) || in nl80211_put_nan_capa()
2624 wiphy->nan_capa.max_channel_switch_time) || in nl80211_put_nan_capa()
2626 wiphy->nan_capa.dev_capabilities)) in nl80211_put_nan_capa()
2658 rdev->wiphy.mgmt_stypes; in nl80211_send_wiphy()
2670 wiphy_name(&rdev->wiphy)) || in nl80211_send_wiphy()
2681 rdev->wiphy.retry_short) || in nl80211_send_wiphy()
2683 rdev->wiphy.retry_long) || in nl80211_send_wiphy()
2685 rdev->wiphy.frag_threshold) || in nl80211_send_wiphy()
2687 rdev->wiphy.rts_threshold) || in nl80211_send_wiphy()
2689 rdev->wiphy.coverage_class) || in nl80211_send_wiphy()
2691 rdev->wiphy.max_scan_ssids) || in nl80211_send_wiphy()
2693 rdev->wiphy.max_sched_scan_ssids) || in nl80211_send_wiphy()
2695 rdev->wiphy.max_scan_ie_len) || in nl80211_send_wiphy()
2697 rdev->wiphy.max_sched_scan_ie_len) || in nl80211_send_wiphy()
2699 rdev->wiphy.max_match_sets)) in nl80211_send_wiphy()
2702 if ((rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN) && in nl80211_send_wiphy()
2705 if ((rdev->wiphy.flags & WIPHY_FLAG_MESH_AUTH) && in nl80211_send_wiphy()
2708 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) && in nl80211_send_wiphy()
2711 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) && in nl80211_send_wiphy()
2714 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) && in nl80211_send_wiphy()
2717 if ((rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP) && in nl80211_send_wiphy()
2726 sizeof(u32) * rdev->wiphy.n_cipher_suites, in nl80211_send_wiphy()
2727 rdev->wiphy.cipher_suites)) in nl80211_send_wiphy()
2731 rdev->wiphy.max_num_pmkids)) in nl80211_send_wiphy()
2734 if ((rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_send_wiphy()
2739 rdev->wiphy.available_antennas_tx) || in nl80211_send_wiphy()
2741 rdev->wiphy.available_antennas_rx)) in nl80211_send_wiphy()
2744 if ((rdev->wiphy.flags & WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD) && in nl80211_send_wiphy()
2746 rdev->wiphy.probe_resp_offload)) in nl80211_send_wiphy()
2749 if ((rdev->wiphy.available_antennas_tx || in nl80211_send_wiphy()
2750 rdev->wiphy.available_antennas_rx) && in nl80211_send_wiphy()
2773 rdev->wiphy.interface_modes)) in nl80211_send_wiphy()
2796 sband = rdev->wiphy.bands[band]; in nl80211_send_wiphy()
2832 msg, &rdev->wiphy, chan, in nl80211_send_wiphy()
2881 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH) in nl80211_send_wiphy()
2884 if (rdev->wiphy.features & in nl80211_send_wiphy()
2890 if (rdev->wiphy.sar_capa) in nl80211_send_wiphy()
2903 (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) && in nl80211_send_wiphy()
2906 rdev->wiphy.max_remain_on_channel_duration)) in nl80211_send_wiphy()
2909 if ((rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX) && in nl80211_send_wiphy()
2930 rdev->wiphy.software_iftypes)) in nl80211_send_wiphy()
2933 if (nl80211_put_iface_combinations(&rdev->wiphy, msg, in nl80211_send_wiphy()
2935 rdev->wiphy.n_radio ? 0 : -1, in nl80211_send_wiphy()
2944 if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) && in nl80211_send_wiphy()
2946 rdev->wiphy.ap_sme_capa)) in nl80211_send_wiphy()
2949 features = rdev->wiphy.features; in nl80211_send_wiphy()
2960 if (rdev->wiphy.ht_capa_mod_mask && in nl80211_send_wiphy()
2962 sizeof(*rdev->wiphy.ht_capa_mod_mask), in nl80211_send_wiphy()
2963 rdev->wiphy.ht_capa_mod_mask)) in nl80211_send_wiphy()
2966 if (rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME && in nl80211_send_wiphy()
2967 rdev->wiphy.max_acl_mac_addrs && in nl80211_send_wiphy()
2969 rdev->wiphy.max_acl_mac_addrs)) in nl80211_send_wiphy()
2992 rdev->wiphy.max_sched_scan_plans) || in nl80211_send_wiphy()
2994 rdev->wiphy.max_sched_scan_plan_interval) || in nl80211_send_wiphy()
2996 rdev->wiphy.max_sched_scan_plan_iterations)) in nl80211_send_wiphy()
2999 if (rdev->wiphy.extended_capabilities && in nl80211_send_wiphy()
3001 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
3002 rdev->wiphy.extended_capabilities) || in nl80211_send_wiphy()
3004 rdev->wiphy.extended_capabilities_len, in nl80211_send_wiphy()
3005 rdev->wiphy.extended_capabilities_mask))) in nl80211_send_wiphy()
3008 if (rdev->wiphy.vht_capa_mod_mask && in nl80211_send_wiphy()
3010 sizeof(*rdev->wiphy.vht_capa_mod_mask), in nl80211_send_wiphy()
3011 rdev->wiphy.vht_capa_mod_mask)) in nl80211_send_wiphy()
3015 rdev->wiphy.perm_addr)) in nl80211_send_wiphy()
3018 if (!is_zero_ether_addr(rdev->wiphy.addr_mask) && in nl80211_send_wiphy()
3020 rdev->wiphy.addr_mask)) in nl80211_send_wiphy()
3023 if (rdev->wiphy.n_addresses > 1) { in nl80211_send_wiphy()
3030 for (i = 0; i < rdev->wiphy.n_addresses; i++) in nl80211_send_wiphy()
3032 rdev->wiphy.addresses[i].addr)) in nl80211_send_wiphy()
3044 if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) && in nl80211_send_wiphy()
3049 if (rdev->wiphy.max_ap_assoc_sta && in nl80211_send_wiphy()
3051 rdev->wiphy.max_ap_assoc_sta)) in nl80211_send_wiphy()
3057 if (rdev->wiphy.n_vendor_commands) { in nl80211_send_wiphy()
3066 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_send_wiphy()
3067 info = &rdev->wiphy.vendor_commands[i].info; in nl80211_send_wiphy()
3074 if (rdev->wiphy.n_vendor_events) { in nl80211_send_wiphy()
3083 for (i = 0; i < rdev->wiphy.n_vendor_events; i++) { in nl80211_send_wiphy()
3084 info = &rdev->wiphy.vendor_events[i]; in nl80211_send_wiphy()
3093 if (rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH && in nl80211_send_wiphy()
3095 rdev->wiphy.max_num_csa_counters)) in nl80211_send_wiphy()
3098 if (rdev->wiphy.regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_wiphy()
3102 if (rdev->wiphy.max_sched_scan_reqs && in nl80211_send_wiphy()
3104 rdev->wiphy.max_sched_scan_reqs)) in nl80211_send_wiphy()
3108 sizeof(rdev->wiphy.ext_features), in nl80211_send_wiphy()
3109 rdev->wiphy.ext_features)) in nl80211_send_wiphy()
3112 if (rdev->wiphy.bss_param_support) { in nl80211_send_wiphy()
3114 u32 parsup = rdev->wiphy.bss_param_support; in nl80211_send_wiphy()
3146 if (rdev->wiphy.bss_select_support) { in nl80211_send_wiphy()
3148 u32 bss_select_support = rdev->wiphy.bss_select_support; in nl80211_send_wiphy()
3169 if (rdev->wiphy.num_iftype_ext_capab && in nl80211_send_wiphy()
3170 rdev->wiphy.iftype_ext_capab) { in nl80211_send_wiphy()
3179 i < rdev->wiphy.num_iftype_ext_capab; i++) { in nl80211_send_wiphy()
3182 capab = &rdev->wiphy.iftype_ext_capab[i]; in nl80211_send_wiphy()
3197 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO && in nl80211_send_wiphy()
3211 if (i < rdev->wiphy.num_iftype_ext_capab) { in nl80211_send_wiphy()
3218 rdev->wiphy.nan_supported_bands)) in nl80211_send_wiphy()
3221 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_send_wiphy()
3233 rdev->wiphy.txq_limit)) in nl80211_send_wiphy()
3236 rdev->wiphy.txq_memory_limit)) in nl80211_send_wiphy()
3239 rdev->wiphy.txq_quantum)) in nl80211_send_wiphy()
3252 if (rdev->wiphy.akm_suites && in nl80211_send_wiphy()
3254 sizeof(u32) * rdev->wiphy.n_akm_suites, in nl80211_send_wiphy()
3255 rdev->wiphy.akm_suites)) in nl80211_send_wiphy()
3269 if (nl80211_put_mbssid_support(&rdev->wiphy, msg)) in nl80211_send_wiphy()
3273 rdev->wiphy.max_num_akm_suites)) in nl80211_send_wiphy()
3276 if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO) in nl80211_send_wiphy()
3279 if (rdev->wiphy.hw_timestamp_max_peers && in nl80211_send_wiphy()
3281 rdev->wiphy.hw_timestamp_max_peers)) in nl80211_send_wiphy()
3287 if (nl80211_put_radios(&rdev->wiphy, msg)) in nl80211_send_wiphy()
3293 if (nl80211_put_nan_capa(&rdev->wiphy, msg)) in nl80211_send_wiphy()
3346 netdev->ieee80211_ptr->wiphy); in nl80211_dump_wiphy_parse()
3381 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_wiphy()
3388 wiphy_lock(&rdev->wiphy); in nl80211_dump_wiphy()
3389 /* attempt to fit multiple wiphy data chunks into the skb */ in nl80211_dump_wiphy()
3398 * If sending the wiphy data didn't fit (ENOBUFS in nl80211_dump_wiphy()
3401 * wiphy dataset is already in the skb) and in nl80211_dump_wiphy()
3415 wiphy_unlock(&rdev->wiphy); in nl80211_dump_wiphy()
3423 wiphy_unlock(&rdev->wiphy); in nl80211_dump_wiphy()
3534 chandef->chan = ieee80211_get_channel_khz(&rdev->wiphy, control_freq); in _nl80211_parse_chandef()
3616 !wiphy_ext_feature_isset(&rdev->wiphy, in _nl80211_parse_chandef()
3629 if (!_cfg80211_chandef_usable(&rdev->wiphy, chandef, in _nl80211_parse_chandef()
3638 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ)) { in _nl80211_parse_chandef()
3686 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in __nl80211_set_channel()
3693 !(rdev->wiphy.features & in __nl80211_set_channel()
3774 old_rts = rdev->wiphy.radio_cfg[radio_idx].rts_threshold; in nl80211_set_wiphy_radio()
3776 rdev->wiphy.radio_cfg[radio_idx].rts_threshold = rts_threshold; in nl80211_set_wiphy_radio()
3780 rdev->wiphy.radio_cfg[radio_idx].rts_threshold = old_rts; in nl80211_set_wiphy_radio()
3801 * Try to find the wiphy and netdev. Normally this in nl80211_set_wiphy()
3804 * setting the channel was done per wiphy, but now in nl80211_set_wiphy()
3815 rdev = wiphy_to_rdev(netdev->ieee80211_ptr->wiphy); in nl80211_set_wiphy()
3833 guard(wiphy)(&rdev->wiphy); in nl80211_set_wiphy()
3849 /* Radio idx is not expected for non-multi radio wiphy */ in nl80211_set_wiphy()
3850 if (rdev->wiphy.n_radio <= 0) in nl80211_set_wiphy()
3855 if (radio_idx >= rdev->wiphy.n_radio) in nl80211_set_wiphy()
3932 if (!(rdev->wiphy.features & NL80211_FEATURE_VIF_TXPOWER)) in nl80211_set_wiphy()
3960 if ((!rdev->wiphy.available_antennas_tx && in nl80211_set_wiphy()
3961 !rdev->wiphy.available_antennas_rx) || in nl80211_set_wiphy()
3970 if ((~tx_ant && (tx_ant & ~rdev->wiphy.available_antennas_tx)) || in nl80211_set_wiphy()
3971 (~rx_ant && (rx_ant & ~rdev->wiphy.available_antennas_rx))) in nl80211_set_wiphy()
3974 tx_ant = tx_ant & rdev->wiphy.available_antennas_tx; in nl80211_set_wiphy()
3975 rx_ant = rx_ant & rdev->wiphy.available_antennas_rx; in nl80211_set_wiphy()
4032 if (!(rdev->wiphy.features & NL80211_FEATURE_ACKTO_ESTIMATION)) in nl80211_set_wiphy()
4039 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_wiphy()
4049 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_wiphy()
4059 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_wiphy()
4078 if (rdev->wiphy.n_radio) { in nl80211_set_wiphy()
4079 old_radio_rts_threshold = kcalloc(rdev->wiphy.n_radio, in nl80211_set_wiphy()
4086 old_retry_short = rdev->wiphy.retry_short; in nl80211_set_wiphy()
4087 old_retry_long = rdev->wiphy.retry_long; in nl80211_set_wiphy()
4088 old_frag_threshold = rdev->wiphy.frag_threshold; in nl80211_set_wiphy()
4089 old_rts_threshold = rdev->wiphy.rts_threshold; in nl80211_set_wiphy()
4091 for (i = 0 ; i < rdev->wiphy.n_radio; i++) in nl80211_set_wiphy()
4093 rdev->wiphy.radio_cfg[i].rts_threshold; in nl80211_set_wiphy()
4095 old_coverage_class = rdev->wiphy.coverage_class; in nl80211_set_wiphy()
4096 old_txq_limit = rdev->wiphy.txq_limit; in nl80211_set_wiphy()
4097 old_txq_memory_limit = rdev->wiphy.txq_memory_limit; in nl80211_set_wiphy()
4098 old_txq_quantum = rdev->wiphy.txq_quantum; in nl80211_set_wiphy()
4101 rdev->wiphy.retry_short = retry_short; in nl80211_set_wiphy()
4103 rdev->wiphy.retry_long = retry_long; in nl80211_set_wiphy()
4105 rdev->wiphy.frag_threshold = frag_threshold; in nl80211_set_wiphy()
4108 rdev->wiphy.rts_threshold = rts_threshold; in nl80211_set_wiphy()
4109 for (i = 0 ; i < rdev->wiphy.n_radio; i++) in nl80211_set_wiphy()
4110 rdev->wiphy.radio_cfg[i].rts_threshold = in nl80211_set_wiphy()
4111 rdev->wiphy.rts_threshold; in nl80211_set_wiphy()
4114 rdev->wiphy.coverage_class = coverage_class; in nl80211_set_wiphy()
4116 rdev->wiphy.txq_limit = txq_limit; in nl80211_set_wiphy()
4118 rdev->wiphy.txq_memory_limit = txq_memory_limit; in nl80211_set_wiphy()
4120 rdev->wiphy.txq_quantum = txq_quantum; in nl80211_set_wiphy()
4124 rdev->wiphy.retry_short = old_retry_short; in nl80211_set_wiphy()
4125 rdev->wiphy.retry_long = old_retry_long; in nl80211_set_wiphy()
4126 rdev->wiphy.frag_threshold = old_frag_threshold; in nl80211_set_wiphy()
4127 rdev->wiphy.rts_threshold = old_rts_threshold; in nl80211_set_wiphy()
4129 for (i = 0 ; i < rdev->wiphy.n_radio; i++) in nl80211_set_wiphy()
4130 rdev->wiphy.radio_cfg[i].rts_threshold = in nl80211_set_wiphy()
4133 rdev->wiphy.coverage_class = old_coverage_class; in nl80211_set_wiphy()
4134 rdev->wiphy.txq_limit = old_txq_limit; in nl80211_set_wiphy()
4135 rdev->wiphy.txq_memory_limit = old_txq_memory_limit; in nl80211_set_wiphy()
4136 rdev->wiphy.txq_quantum = old_txq_quantum; in nl80211_set_wiphy()
4192 lockdep_assert_wiphy(&rdev->wiphy); in nl80211_send_iface()
4359 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk))) in nl80211_dump_interface()
4371 guard(wiphy)(&rdev->wiphy); in nl80211_dump_interface()
4373 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in nl80211_dump_interface()
4483 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) in nl80211_parse_mon_options()
4493 if (!wiphy_ext_feature_isset(&rdev->wiphy, cap_flag)) in nl80211_parse_mon_options()
4514 if (!wiphy_ext_feature_isset(&rdev->wiphy, cap_flag)) in nl80211_parse_mon_options()
4537 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_AP) in nl80211_valid_4addr()
4541 if (rdev->wiphy.flags & WIPHY_FLAG_4ADDR_STATION) in nl80211_valid_4addr()
4563 allowed = BIT(rdev->wiphy.n_radio) - 1; in nl80211_parse_vif_radio_mask()
4671 rdev->wiphy.features & NL80211_FEATURE_MAC_ON_CREATE) && in _nl80211_new_interface()
4686 if (!cfg80211_iftype_allowed(&rdev->wiphy, type, params.use_4addr, 0)) in _nl80211_new_interface()
4757 guard(wiphy)(&rdev->wiphy); in nl80211_new_interface()
4779 mutex_unlock(&rdev->wiphy.mtx); in nl80211_del_interface()
4793 mutex_lock(&rdev->wiphy.mtx); in nl80211_del_interface()
4905 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_get_key()
4911 wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_get_key()
4940 if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_get_key()
5070 wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_key()
5200 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in nl80211_del_key()
5245 static struct cfg80211_acl_data *parse_acl_data(struct wiphy *wiphy, in parse_acl_data() argument
5253 if (!wiphy->max_acl_mac_addrs) in parse_acl_data()
5271 if (n_entries > wiphy->max_acl_mac_addrs) in parse_acl_data()
5302 acl = parse_acl_data(&rdev->wiphy, info); in nl80211_set_mac_acl()
5704 sband = rdev->wiphy.bands[i]; in nl80211_parse_tx_bitrate_mask()
5759 sband = rdev->wiphy.bands[band]; in nl80211_parse_tx_bitrate_mask()
5831 if (!(rdev->wiphy.bands[band]->ht_cap.ht_supported || in nl80211_parse_tx_bitrate_mask()
5832 rdev->wiphy.bands[band]->vht_cap.vht_supported || in nl80211_parse_tx_bitrate_mask()
5930 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_beacon_tx_rate()
5934 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_beacon_tx_rate()
5938 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_beacon_tx_rate()
5942 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_beacon_tx_rate()
5947 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_beacon_tx_rate()
5954 static int nl80211_parse_mbssid_config(struct wiphy *wiphy, in nl80211_parse_mbssid_config() argument
5964 if (!wiphy->mbssid_max_interfaces) in nl80211_parse_mbssid_config()
5974 if (!wiphy->ema_max_profile_periodicity) in nl80211_parse_mbssid_config()
5977 if (num_elems > wiphy->ema_max_profile_periodicity) in nl80211_parse_mbssid_config()
5982 if (config->index >= wiphy->mbssid_max_interfaces || in nl80211_parse_mbssid_config()
5999 dev_get_by_index(wiphy_net(wiphy), tx_ifindex); in nl80211_parse_mbssid_config()
6002 tx_netdev->ieee80211_ptr->wiphy != wiphy || in nl80211_parse_mbssid_config()
6038 nl80211_parse_mbssid_elems(struct wiphy *wiphy, struct nlattr *attrs) in nl80211_parse_mbssid_elems() argument
6045 if (!wiphy->mbssid_max_interfaces) in nl80211_parse_mbssid_elems()
6068 nl80211_parse_rnr_elems(struct wiphy *wiphy, struct nlattr *attrs, in nl80211_parse_rnr_elems() argument
6187 wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_parse_beacon()
6216 nl80211_parse_mbssid_elems(&rdev->wiphy, in nl80211_parse_beacon()
6226 nl80211_parse_rnr_elems(&rdev->wiphy, in nl80211_parse_beacon()
6294 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_parse_fils_discovery()
6331 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_parse_unsol_bcast_probe_resp()
6435 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in nl80211_get_ap_channel()
6459 if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) && in nl80211_valid_auth_type()
6462 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_valid_auth_type()
6470 if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) && in nl80211_valid_auth_type()
6471 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_valid_auth_type()
6481 &rdev->wiphy, in nl80211_valid_auth_type()
6487 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_valid_auth_type()
6505 struct wiphy *wiphy = wdev->wiphy; in nl80211_send_ap_started() local
6506 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_send_ap_started()
6531 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), msg, 0, in nl80211_send_ap_started()
6561 if (!rdev->wiphy.bands[NL80211_BAND_S1GHZ]) in nl80211_parse_s1g_short_beacon()
6692 if (!(rdev->wiphy.features & NL80211_FEATURE_INACTIVITY_TIMER)) { in nl80211_start_ap()
6708 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) { in nl80211_start_ap()
6724 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) { in nl80211_start_ap()
6750 if (!cfg80211_reg_check_beaconing(&rdev->wiphy, ¶ms->chandef, in nl80211_start_ap()
6771 if (params->pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) { in nl80211_start_ap()
6777 params->acl = parse_acl_data(&rdev->wiphy, info); in nl80211_start_ap()
6813 err = nl80211_parse_mbssid_config(&rdev->wiphy, dev, link_id, in nl80211_start_ap()
6929 if (!cfg80211_reg_check_beaconing(&rdev->wiphy, in nl80211_set_beacon()
7260 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_fill_link_station()
7264 switch (rdev->wiphy.signal_type) { in nl80211_fill_link_station()
7333 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_fill_link_station()
7459 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_send_station()
7463 switch (rdev->wiphy.signal_type) { in nl80211_send_station()
7543 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_send_station()
7869 __acquire(&rdev->wiphy.mtx); in nl80211_dump_station()
7925 wiphy_unlock(&rdev->wiphy); in nl80211_dump_station()
7982 int cfg80211_check_station_change(struct wiphy *wiphy, in cfg80211_check_station_change() argument
8095 if (!(wiphy->features & NL80211_FEATURE_FULL_AP_CLIENT_STATE) && in cfg80211_check_station_change()
8145 * Get vlan interface making sure it is running and on the right wiphy.
8161 if (!v->ieee80211_ptr || v->ieee80211_ptr->wiphy != &rdev->wiphy) { in get_vlan()
8298 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_parse_sta_txpower_setting()
8445 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_station()
8627 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_new_station()
8677 if (!(rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) || in nl80211_new_station()
8689 if (!(rdev->wiphy.features & in nl80211_new_station()
8694 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_new_station()
8745 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS)) in nl80211_new_station()
8748 if (!(rdev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP)) in nl80211_new_station()
8805 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_del_station()
8926 __acquire(&rdev->wiphy.mtx); in nl80211_dump_mpath()
8959 wiphy_unlock(&rdev->wiphy); in nl80211_dump_mpath()
9126 __acquire(&rdev->wiphy.mtx); in nl80211_dump_mpp()
9159 wiphy_unlock(&rdev->wiphy); in nl80211_dump_mpp()
9168 u32 bss_param_support = rdev->wiphy.bss_param_support; in nl80211_set_bss()
9253 !(rdev->wiphy.bss_param_support & WIPHY_BSS_PARAM_P2P_OPPPS)) in nl80211_set_bss()
9264 changed &= rdev->wiphy.bss_param_support; in nl80211_set_bss()
9680 !(rdev->wiphy.features & NL80211_FEATURE_USERSPACE_MPM)) in nl80211_parse_mesh_setup()
9797 struct wiphy *wiphy = NULL; in nl80211_get_reg_do() local
9822 wiphy = &rdev->wiphy; in nl80211_get_reg_do()
9823 self_managed = wiphy->regulatory_flags & in nl80211_get_reg_do()
9828 regdom = get_wiphy_regdom(wiphy); in nl80211_get_reg_do()
9837 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_get_reg_do()
9843 if (!wiphy && reg_last_request_cell_base() && in nl80211_get_reg_do()
9870 u32 seq, int flags, struct wiphy *wiphy, in nl80211_send_regdom() argument
9884 if (!wiphy && reg_last_request_cell_base() && in nl80211_send_regdom()
9889 if (wiphy && in nl80211_send_regdom()
9890 nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_regdom()
9893 if (wiphy && wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_send_regdom()
9925 regdom = get_wiphy_regdom(&rdev->wiphy); in nl80211_get_reg_dump()
9933 NLM_F_MULTI, &rdev->wiphy, regdom); in nl80211_get_reg_dump()
10108 static bool is_band_valid(struct wiphy *wiphy, enum nl80211_band b) in is_band_valid() argument
10110 return b < NUM_NL80211_BANDS && wiphy->bands[b]; in is_band_valid()
10113 static int parse_bss_select(struct nlattr *nla, struct wiphy *wiphy, in parse_bss_select() argument
10151 if (!is_band_valid(wiphy, bss_select->param.band_pref)) in parse_bss_select()
10162 if (!is_band_valid(wiphy, bss_select->param.adjust.band)) in parse_bss_select()
10170 if (!(wiphy->bss_select_support & BIT(bss_select->behaviour))) in parse_bss_select()
10220 lockdep_assert_wiphy(wdev->wiphy); in cfg80211_off_channel_oper_allowed()
10228 radio_idx = cfg80211_get_radio_idx_by_chan(wdev->wiphy, chan); in cfg80211_off_channel_oper_allowed()
10256 link_radio_idx = cfg80211_get_radio_idx_by_chan(wdev->wiphy, in cfg80211_off_channel_oper_allowed()
10267 return regulatory_pre_cac_allowed(wdev->wiphy); in cfg80211_off_channel_oper_allowed()
10270 static bool nl80211_check_scan_feat(struct wiphy *wiphy, u32 flags, u32 flag, in nl80211_check_scan_feat() argument
10275 if (wiphy_ext_feature_isset(wiphy, feat)) in nl80211_check_scan_feat()
10281 nl80211_check_scan_flags(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_check_scan_flags() argument
10291 !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) || in nl80211_check_scan_flags()
10292 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10295 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10298 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10301 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10304 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10307 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10310 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10313 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10316 !nl80211_check_scan_feat(wiphy, *flags, in nl80211_check_scan_flags()
10324 if (!(wiphy->features & randomness_flag) || in nl80211_check_scan_flags()
10337 nl80211_check_scan_flags_sched(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_check_scan_flags_sched() argument
10341 return nl80211_check_scan_flags(wiphy, wdev, attrs, in nl80211_check_scan_flags_sched()
10349 nl80211_check_scan_flags_reg(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_check_scan_flags_reg() argument
10353 return nl80211_check_scan_flags(wiphy, wdev, attrs, in nl80211_check_scan_flags_reg()
10368 struct wiphy *wiphy; in nl80211_trigger_scan() local
10373 wiphy = &rdev->wiphy; in nl80211_trigger_scan()
10385 if (!wiphy_ext_feature_isset(wiphy, in nl80211_trigger_scan()
10398 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_trigger_scan()
10405 if (n_ssids > wiphy->max_scan_ssids) in nl80211_trigger_scan()
10413 if (ie_len > wiphy->max_scan_ie_len) in nl80211_trigger_scan()
10441 chan = ieee80211_get_channel_khz(wiphy, freq); in nl80211_trigger_scan()
10463 if (!wiphy->bands[band]) in nl80211_trigger_scan()
10465 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_trigger_scan()
10468 chan = &wiphy->bands[band]->channels[j]; in nl80211_trigger_scan()
10524 if (wiphy->bands[i]) in nl80211_trigger_scan()
10526 (1 << wiphy->bands[i]->n_bitrates) - 1; in nl80211_trigger_scan()
10539 if (!wiphy->bands[band]) in nl80211_trigger_scan()
10542 err = ieee80211_get_ratemask(wiphy->bands[band], in nl80211_trigger_scan()
10558 err = nl80211_check_scan_flags_reg(wiphy, wdev, info->attrs, request); in nl80211_trigger_scan()
10588 request->req.wiphy = &rdev->wiphy; in nl80211_trigger_scan()
10628 nl80211_parse_sched_scan_plans(struct wiphy *wiphy, int n_plans, in nl80211_parse_sched_scan_plans() argument
10654 wiphy->max_sched_scan_plan_interval) in nl80211_parse_sched_scan_plans()
10656 wiphy->max_sched_scan_plan_interval; in nl80211_parse_sched_scan_plans()
10681 wiphy->max_sched_scan_plan_interval) in nl80211_parse_sched_scan_plans()
10689 wiphy->max_sched_scan_plan_iterations)) in nl80211_parse_sched_scan_plans()
10713 nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, in nl80211_parse_sched_scan() argument
10730 n_channels = ieee80211_get_num_supported_channels(wiphy); in nl80211_parse_sched_scan()
10738 if (n_ssids > wiphy->max_sched_scan_ssids) in nl80211_parse_sched_scan()
10793 if (ie_len > wiphy->max_sched_scan_ie_len) in nl80211_parse_sched_scan()
10820 if (!n_plans || n_plans > wiphy->max_sched_scan_plans) in nl80211_parse_sched_scan()
10824 wiphy, NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI) && in nl80211_parse_sched_scan()
10884 chan = ieee80211_get_channel(wiphy, nla_get_u32(attr)); in nl80211_parse_sched_scan()
10903 if (!wiphy->bands[band]) in nl80211_parse_sched_scan()
10905 for (j = 0; j < wiphy->bands[band]->n_channels; j++) { in nl80211_parse_sched_scan()
10908 chan = &wiphy->bands[band]->channels[j]; in nl80211_parse_sched_scan()
11011 err = nl80211_check_scan_flags_sched(wiphy, wdev, attrs, request); in nl80211_parse_sched_scan()
11033 if (!is_band_valid(wiphy, request->rssi_adjust.band)) { in nl80211_parse_sched_scan()
11039 err = nl80211_parse_sched_scan_plans(wiphy, n_plans, request, attrs); in nl80211_parse_sched_scan()
11062 if (!rdev->wiphy.max_sched_scan_reqs || !rdev->ops->sched_scan_start) in nl80211_start_sched_scan()
11070 sched_scan_req = nl80211_parse_sched_scan(&rdev->wiphy, wdev, in nl80211_start_sched_scan()
11072 rdev->wiphy.max_match_sets); in nl80211_start_sched_scan()
11081 if (want_multi && rdev->wiphy.max_sched_scan_reqs > 1) in nl80211_start_sched_scan()
11089 sched_scan_req->wiphy = &rdev->wiphy; in nl80211_start_sched_scan()
11112 if (!rdev->wiphy.max_sched_scan_reqs || !rdev->ops->sched_scan_stop) in nl80211_stop_sched_scan()
11138 struct wiphy *wiphy = wdev->wiphy; in nl80211_start_radar_detection() local
11157 guard(wiphy)(wiphy); in nl80211_start_radar_detection() local
11159 dfs_region = reg_get_dfs_region(wiphy); in nl80211_start_radar_detection()
11167 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype); in nl80211_start_radar_detection()
11174 if (!cfg80211_chandef_dfs_usable(wiphy, &chandef)) in nl80211_start_radar_detection()
11197 if (wiphy_ext_feature_isset(wiphy, NL80211_EXT_FEATURE_DFS_OFFLOAD)) in nl80211_start_radar_detection()
11203 cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef); in nl80211_start_radar_detection()
11239 struct wiphy *wiphy = wdev->wiphy; in nl80211_notify_radar_detection() local
11244 dfs_region = reg_get_dfs_region(wiphy); in nl80211_notify_radar_detection()
11257 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype); in nl80211_notify_radar_detection()
11275 cfg80211_set_dfs_state(wiphy, &chandef, NL80211_DFS_UNAVAILABLE); in nl80211_notify_radar_detection()
11303 if (rdev->wiphy.max_num_csa_counters && in nl80211_parse_counter_offsets()
11304 (*n_offsets > rdev->wiphy.max_num_csa_counters)) in nl80211_parse_counter_offsets()
11337 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) in nl80211_channel_switch()
11441 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms.chandef, in nl80211_channel_switch()
11447 err = cfg80211_chandef_dfs_required(wdev->wiphy, in nl80211_channel_switch()
11499 lockdep_assert_wiphy(wdev->wiphy); in nl80211_send_bss()
11584 switch (rdev->wiphy.signal_type) { in nl80211_send_bss()
11666 __acquire(&rdev->wiphy.mtx); in nl80211_dump_scan()
11702 wiphy_unlock(&rdev->wiphy); in nl80211_dump_scan()
11806 __acquire(&rdev->wiphy.mtx); in nl80211_dump_survey()
11848 wiphy_unlock(&rdev->wiphy); in nl80211_dump_survey()
11902 for (i = 0; i < rdev->wiphy.n_cipher_suites; i++) { in nl80211_authenticate()
11903 if (key.p.cipher == rdev->wiphy.cipher_suites[i]) { in nl80211_authenticate()
11925 chan = nl80211_get_valid_chan(&rdev->wiphy, freq); in nl80211_authenticate()
11980 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO)) in nl80211_authenticate()
11989 req.bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len, in nl80211_authenticate()
11997 cfg80211_put_bss(&rdev->wiphy, req.bss); in nl80211_authenticate()
12011 !wiphy_ext_feature_isset(&rdev->wiphy, in validate_pae_over_nl80211()
12033 if (!(rdev->wiphy.flags & WIPHY_FLAG_CONTROL_PORT_PROTOCOL) && in nl80211_crypto_settings()
12071 &rdev->wiphy, in nl80211_crypto_settings()
12079 if (!cfg80211_supported_cipher_suite(&rdev->wiphy, in nl80211_crypto_settings()
12099 if (settings->n_akm_suites > rdev->wiphy.max_num_akm_suites) in nl80211_crypto_settings()
12108 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_crypto_settings()
12110 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_crypto_settings()
12117 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_crypto_settings()
12119 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_crypto_settings()
12154 chan = nl80211_get_valid_chan(&rdev->wiphy, freq); in nl80211_assoc_bss()
12163 bss = __cfg80211_get_bss(&rdev->wiphy, chan, bssid, in nl80211_assoc_bss()
12344 if (!((rdev->wiphy.features & in nl80211_associate()
12346 (rdev->wiphy.features & NL80211_FEATURE_QUIET)) && in nl80211_associate()
12347 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_associate()
12379 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_associate()
12393 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO)) in nl80211_associate()
12491 cfg80211_put_bss(&rdev->wiphy, req.links[link_id].bss); in nl80211_associate()
12492 cfg80211_put_bss(&rdev->wiphy, req.bss); in nl80211_associate()
12592 struct wiphy *wiphy = &rdev->wiphy; in nl80211_parse_mcast_rate() local
12599 sband = wiphy->bands[band]; in nl80211_parse_mcast_rate()
12620 struct wiphy *wiphy; in nl80211_join_ibss() local
12647 wiphy = &rdev->wiphy; in nl80211_join_ibss()
12667 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef, in nl80211_join_ibss()
12678 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
12684 if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) in nl80211_join_ibss()
12686 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_join_ibss()
12705 wiphy->bands[ibss.chandef.chan->band]; in nl80211_join_ibss()
12871 struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy, in __cfg80211_alloc_event_skb() argument
12879 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_event_skb()
12890 vendor_event_idx >= wiphy->n_vendor_events)) in __cfg80211_alloc_event_skb()
12892 info = &wiphy->vendor_events[vendor_event_idx]; in __cfg80211_alloc_event_skb()
12919 genlmsg_unicast(wiphy_net(&rdev->wiphy), skb, in __cfg80211_send_event_skb()
12925 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in __cfg80211_send_event_skb()
12938 lockdep_assert_held(&rdev->wiphy.mtx); in nl80211_testmode_do()
12951 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_testmode_do()
13075 struct wiphy *wiphy; in nl80211_connect() local
13098 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_connect()
13112 wiphy = &rdev->wiphy; in nl80211_connect()
13116 (wiphy->flags & WIPHY_FLAG_SUPPORTS_FW_ROAM)) { in nl80211_connect()
13137 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_connect()
13156 connect.channel = nl80211_get_valid_chan(wiphy, freq); in nl80211_connect()
13162 connect.channel_hint = nl80211_get_valid_chan(wiphy, freq); in nl80211_connect()
13225 if (!((rdev->wiphy.features & in nl80211_connect()
13227 (rdev->wiphy.features & NL80211_FEATURE_QUIET)) && in nl80211_connect()
13228 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_connect()
13237 if (connect.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) { in nl80211_connect()
13250 wiphy, &connect.bss_select); in nl80211_connect()
13257 if (wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_connect()
13336 fils_sk_offload = wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_update_connect_params()
13439 if (!net_eq(wiphy_net(&rdev->wiphy), net)) in nl80211_wiphy_netns()
13455 ap_pmksa_caching_support = wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_pmksa()
13512 sae_offload_support = wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_del_pmksa()
13514 owe_offload_support = wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_del_pmksa()
13516 ap_pmksa_caching_support = wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_del_pmksa()
13579 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_mgmt()
13614 if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || in nl80211_tdls_oper()
13648 !(rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL)) in nl80211_remain_on_channel()
13656 duration > rdev->wiphy.max_remain_on_channel_duration) in nl80211_remain_on_channel()
13776 if (!wiphy_ext_feature_isset(wdev->wiphy, in nl80211_register_mgmt()
13778 !(wdev->wiphy->nan_capa.flags & in nl80211_register_mgmt()
13791 !wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_register_mgmt()
13839 if (!wiphy_ext_feature_isset(wdev->wiphy, in nl80211_tx_mgmt()
13841 !(wdev->wiphy->nan_capa.flags & in nl80211_tx_mgmt()
13850 if (!(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
13859 params.wait > rdev->wiphy.max_remain_on_channel_duration) in nl80211_tx_mgmt()
13865 if (params.offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) in nl80211_tx_mgmt()
13965 if (!wiphy_ext_feature_isset(wdev->wiphy, in nl80211_tx_mgmt_cancel_wait()
14170 old = wiphy_dereference(wdev->wiphy, wdev->cqm_config); in nl80211_set_cqm_rssi()
14177 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_cqm_rssi()
14370 sband = rdev->wiphy.bands[setup.chandef.chan->band]; in nl80211_join_mesh()
14426 struct cfg80211_wowlan *wowlan = rdev->wiphy.wowlan_config; in nl80211_send_wowlan_patterns()
14597 if (!rdev->wiphy.wowlan) in nl80211_get_wowlan()
14600 if (rdev->wiphy.wowlan_config && rdev->wiphy.wowlan_config->tcp) { in nl80211_get_wowlan()
14602 size += rdev->wiphy.wowlan_config->tcp->tokens_size + in nl80211_get_wowlan()
14603 rdev->wiphy.wowlan_config->tcp->payload_len + in nl80211_get_wowlan()
14604 rdev->wiphy.wowlan_config->tcp->wake_len + in nl80211_get_wowlan()
14605 rdev->wiphy.wowlan_config->tcp->wake_len / 8; in nl80211_get_wowlan()
14617 if (rdev->wiphy.wowlan_config) { in nl80211_get_wowlan()
14625 if ((rdev->wiphy.wowlan_config->any && in nl80211_get_wowlan()
14627 (rdev->wiphy.wowlan_config->disconnect && in nl80211_get_wowlan()
14629 (rdev->wiphy.wowlan_config->magic_pkt && in nl80211_get_wowlan()
14631 (rdev->wiphy.wowlan_config->gtk_rekey_failure && in nl80211_get_wowlan()
14633 (rdev->wiphy.wowlan_config->eap_identity_req && in nl80211_get_wowlan()
14635 (rdev->wiphy.wowlan_config->four_way_handshake && in nl80211_get_wowlan()
14637 (rdev->wiphy.wowlan_config->rfkill_release && in nl80211_get_wowlan()
14645 rdev->wiphy.wowlan_config->tcp)) in nl80211_get_wowlan()
14650 rdev->wiphy.wowlan_config->nd_config)) in nl80211_get_wowlan()
14676 if (!rdev->wiphy.wowlan->tcp) in nl80211_parse_wowlan_tcp()
14695 if (data_size > rdev->wiphy.wowlan->tcp->data_payload_max) in nl80211_parse_wowlan_tcp()
14699 rdev->wiphy.wowlan->tcp->data_interval_max || in nl80211_parse_wowlan_tcp()
14704 if (wake_size > rdev->wiphy.wowlan->tcp->wake_payload_max) in nl80211_parse_wowlan_tcp()
14719 if (!rdev->wiphy.wowlan->tcp->tok) in nl80211_parse_wowlan_tcp()
14721 if (tok->len > rdev->wiphy.wowlan->tcp->tok->max_len) in nl80211_parse_wowlan_tcp()
14723 if (tok->len < rdev->wiphy.wowlan->tcp->tok->min_len) in nl80211_parse_wowlan_tcp()
14725 if (tokens_size > rdev->wiphy.wowlan->tcp->tok->bufsize) in nl80211_parse_wowlan_tcp()
14733 if (!rdev->wiphy.wowlan->tcp->seq) in nl80211_parse_wowlan_tcp()
14756 err = __sock_create(wiphy_net(&rdev->wiphy), PF_INET, SOCK_STREAM, in nl80211_parse_wowlan_tcp()
14829 trig->nd_config = nl80211_parse_sched_scan(&rdev->wiphy, NULL, tb, in nl80211_parse_wowlan_nd()
14846 const struct wiphy_wowlan_support *wowlan = rdev->wiphy.wowlan; in nl80211_set_wowlan()
14848 bool prev_enabled = rdev->wiphy.wowlan_config; in nl80211_set_wowlan()
14856 rdev->wiphy.wowlan_config = NULL; in nl80211_set_wowlan()
15024 rdev->wiphy.wowlan_config = ntrig; in nl80211_set_wowlan()
15028 prev_enabled != !!rdev->wiphy.wowlan_config) in nl80211_set_wowlan()
15029 rdev_set_wakeup(rdev, rdev->wiphy.wowlan_config); in nl80211_set_wowlan()
15106 if (!rdev->wiphy.coalesce) in nl80211_get_coalesce()
15151 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_parse_coalesce_rule()
15238 const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; in nl80211_set_coalesce()
15243 if (!rdev->wiphy.coalesce || !rdev->ops->set_coalesce) in nl80211_set_coalesce()
15313 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK && in nl80211_set_rekey_data()
15317 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK && in nl80211_set_rekey_data()
15319 !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_EXT_KCK_32 && in nl80211_set_rekey_data()
15417 if (!(rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS)) in nl80211_register_beacons()
15460 if (rfkill_blocked(rdev->wiphy.rfkill)) in nl80211_start_p2p_device()
15489 static struct ieee80211_channel *nl80211_get_nan_channel(struct wiphy *wiphy, in nl80211_get_nan_channel() argument
15499 chan = ieee80211_get_channel(wiphy, freq); in nl80211_get_nan_channel()
15506 if (cfg80211_reg_can_beacon(wiphy, &def, NL80211_IFTYPE_NAN)) in nl80211_get_nan_channel()
15512 static int nl80211_parse_nan_band_config(struct wiphy *wiphy, in nl80211_parse_nan_band_config() argument
15517 if (BIT(band) & ~(u32)wiphy->nan_supported_bands) in nl80211_parse_nan_band_config()
15526 cfg->chan = nl80211_get_nan_channel(wiphy, freq); in nl80211_parse_nan_band_config()
15558 static int nl80211_parse_nan_conf(struct wiphy *wiphy, in nl80211_parse_nan_conf() argument
15578 if (bands & ~(u32)wiphy->nan_supported_bands) in nl80211_parse_nan_conf()
15594 nl80211_get_nan_channel(wiphy, 2437); in nl80211_parse_nan_conf()
15650 err = nl80211_parse_nan_band_config(wiphy, tb, cfg, in nl80211_parse_nan_conf()
15678 nl80211_get_nan_channel(wiphy, 5745); in nl80211_parse_nan_conf()
15681 nl80211_get_nan_channel(wiphy, 5220); in nl80211_parse_nan_conf()
15712 if (rfkill_blocked(rdev->wiphy.rfkill)) in nl80211_start_nan()
15719 err = nl80211_parse_nan_conf(&rdev->wiphy, info, &conf, NULL); in nl80211_start_nan()
16085 err = nl80211_parse_nan_conf(&rdev->wiphy, info, &conf, &changed); in nl80211_nan_change_config()
16098 struct wiphy *wiphy = wdev->wiphy; in cfg80211_nan_match() local
16099 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_nan_match()
16162 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in cfg80211_nan_match()
16165 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, in cfg80211_nan_match()
16180 struct wiphy *wiphy = wdev->wiphy; in cfg80211_nan_func_terminated() local
16181 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_nan_func_terminated()
16222 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in cfg80211_nan_func_terminated()
16225 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, in cfg80211_nan_func_terminated()
16369 if (!rdev->wiphy.vendor_commands) in nl80211_vendor_cmd()
16377 } else if (wdev->wiphy != &rdev->wiphy) { in nl80211_vendor_cmd()
16387 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in nl80211_vendor_cmd()
16392 vcmd = &rdev->wiphy.vendor_commands[i]; in nl80211_vendor_cmd()
16428 err = vcmd->doit(&rdev->wiphy, wdev, data, len); in nl80211_vendor_cmd()
16451 struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); in nl80211_prepare_vendor_dump() local
16454 if (!wiphy) in nl80211_prepare_vendor_dump()
16456 *rdev = wiphy_to_rdev(wiphy); in nl80211_prepare_vendor_dump()
16460 list_for_each_entry(tmp, &wiphy->wdev_list, list) { in nl80211_prepare_vendor_dump()
16502 for (i = 0; i < (*rdev)->wiphy.n_vendor_commands; i++) { in nl80211_prepare_vendor_dump()
16505 vcmd = &(*rdev)->wiphy.vendor_commands[i]; in nl80211_prepare_vendor_dump()
16529 &(*rdev)->wiphy.vendor_commands[vcmd_idx], in nl80211_prepare_vendor_dump()
16571 vcmd = &rdev->wiphy.vendor_commands[vcmd_idx]; in nl80211_vendor_cmd_dump()
16615 err = vcmd->dumpit(&rdev->wiphy, wdev, skb, data, data_len, in nl80211_vendor_cmd_dump()
16636 struct sk_buff *__cfg80211_alloc_reply_skb(struct wiphy *wiphy, in __cfg80211_alloc_reply_skb() argument
16641 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in __cfg80211_alloc_reply_skb()
16673 unsigned int cfg80211_vendor_cmd_get_sender(struct wiphy *wiphy) in cfg80211_vendor_cmd_get_sender() argument
16675 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_vendor_cmd_get_sender()
16741 if (!(rdev->wiphy.features & NL80211_FEATURE_SUPPORTS_WMM_ADMISSION)) in nl80211_add_tx_ts()
16810 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_channel_switch()
16840 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in nl80211_tdls_channel_switch()
16845 if (cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, wdev->iftype)) in nl80211_tdls_channel_switch()
16863 !(rdev->wiphy.features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)) in nl80211_tdls_cancel_channel_switch()
16917 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_set_pmk()
16955 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_del_pmk()
17023 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_tx_control_port()
17252 if (tid_conf->retry_short > rdev->wiphy.max_data_retry_count) in parse_tid_conf()
17261 if (tid_conf->retry_long > rdev->wiphy.max_data_retry_count) in parse_tid_conf()
17302 mask = rdev->wiphy.tid_config_support.peer; in parse_tid_conf()
17304 mask = rdev->wiphy.tid_config_support.vif; in parse_tid_conf()
17384 if (!wiphy_ext_feature_isset(&rdev->wiphy, in nl80211_color_change()
17515 if (!(wdev->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)) in nl80211_add_link()
17694 if (!rdev->wiphy.hw_timestamp_max_peers) in nl80211_set_hw_timestamp()
17698 rdev->wiphy.hw_timestamp_max_peers != CFG80211_HW_TIMESTAMP_ALL_PEERS) in nl80211_set_hw_timestamp()
17799 cfg80211_put_bss(&rdev->wiphy, req.add_links[link_id].bss); in nl80211_assoc_ml_reconf()
17841 SELECTOR(__sel, WIPHY, \
17946 rdev = wiphy_to_rdev(wdev->wiphy); in nl80211_pre_doit()
18000 wiphy_lock(&rdev->wiphy); in nl80211_pre_doit()
18002 __release(&rdev->wiphy.mtx); in nl80211_pre_doit()
18035 __acquire(&rdev->wiphy.mtx); in nl80211_post_doit()
18036 wiphy_unlock(&rdev->wiphy); in nl80211_post_doit()
18070 if (range_index >= rdev->wiphy.sar_capa->num_freq_ranges) in nl80211_set_sar_sub_specs()
18098 if (!rdev->wiphy.sar_capa || !rdev->ops->set_sar_specs) in nl80211_set_sar_specs()
18112 if (type != rdev->wiphy.sar_capa->type) in nl80211_set_sar_specs()
18119 if (specs > rdev->wiphy.sar_capa->num_freq_ranges) in nl80211_set_sar_specs()
18206 /* we take the wiphy mutex later ourselves */
19071 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_notify_wiphy()
19090 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_notify_iface()
19201 wiphy_to_rdev(req->wiphy)->wiphy_idx) || in nl80211_prep_sched_scan_msg()
19230 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_start()
19260 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_scan_msg()
19277 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(req->wiphy), msg, 0, in nl80211_send_sched_scan()
19310 struct wiphy *wiphy = wiphy_idx_to_wiphy(request->wiphy_idx); in nl80211_reg_change_event_fill() local
19312 if (wiphy && in nl80211_reg_change_event_fill()
19316 if (wiphy && in nl80211_reg_change_event_fill()
19317 wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED && in nl80211_reg_change_event_fill()
19415 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_event()
19487 struct wiphy *wiphy = wdev->wiphy; in cfg80211_rx_unprot_mlme_mgmt() local
19488 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_rx_unprot_mlme_mgmt()
19543 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_mlme_timeout()
19672 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_connect_result()
19776 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_roamed()
19812 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_port_authorized()
19848 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_disconnected()
19859 struct wiphy *wiphy = wdev->wiphy; in cfg80211_links_removed() local
19860 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_links_removed()
19865 lockdep_assert_wiphy(wdev->wiphy); in cfg80211_links_removed()
19917 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_links_removed()
19930 struct wiphy *wiphy = wdev->wiphy; in nl80211_mlo_reconf_add_done() local
19931 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_mlo_reconf_add_done()
19967 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_ibss_bssid()
19980 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_notify_new_peer_candidate()
20010 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_notify_new_peer_candidate()
20048 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_michael_mic_failure()
20056 void nl80211_send_beacon_hint_event(struct wiphy *wiphy, in nl80211_send_beacon_hint_event() argument
20075 * Since we are applying the beacon hint to a wiphy we know its in nl80211_send_beacon_hint_event()
20078 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, get_wiphy_idx(wiphy))) in nl80211_send_beacon_hint_event()
20086 if (nl80211_msg_put_channel(msg, wiphy, channel_before, false)) in nl80211_send_beacon_hint_event()
20095 if (nl80211_msg_put_channel(msg, wiphy, channel_after, false)) in nl80211_send_beacon_hint_event()
20147 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_send_remain_on_chan_event()
20159 struct wiphy *wiphy = wdev->wiphy; in cfg80211_assoc_comeback() local
20160 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_assoc_comeback()
20184 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_assoc_comeback()
20197 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ready_on_channel() local
20198 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ready_on_channel()
20211 struct wiphy *wiphy = wdev->wiphy; in cfg80211_remain_on_channel_expired() local
20212 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_remain_on_channel_expired()
20224 struct wiphy *wiphy = wdev->wiphy; in cfg80211_tx_mgmt_expired() local
20225 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_tx_mgmt_expired()
20236 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_new_sta() local
20237 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_new_sta()
20252 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_new_sta()
20260 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_del_sta_sinfo() local
20261 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_del_sta_sinfo()
20282 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_del_sta_sinfo()
20291 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; in cfg80211_conn_failed() local
20292 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_conn_failed()
20313 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_conn_failed()
20326 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in __nl80211_unexpected_frame()
20352 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in __nl80211_unexpected_frame()
20446 return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in nl80211_send_mgmt()
20457 struct wiphy *wiphy = wdev->wiphy; in nl80211_frame_tx_status() local
20458 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_frame_tx_status()
20499 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_frame_tx_status()
20537 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in __nl80211_rx_control_port()
20579 return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in __nl80211_rx_control_port()
20603 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_prepare_cqm()
20647 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_send_cqm()
20669 wiphy_work_queue(wdev->wiphy, &wdev->cqm_rssi_work); in cfg80211_cqm_rssi_notify()
20675 void cfg80211_cqm_rssi_notify_work(struct wiphy *wiphy, struct wiphy_work *work) in cfg80211_cqm_rssi_notify_work() argument
20679 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_cqm_rssi_notify_work()
20685 cqm_config = wiphy_dereference(wdev->wiphy, wdev->cqm_config); in cfg80211_cqm_rssi_notify_work()
20818 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_gtk_rekey_notify()
20830 struct wiphy *wiphy = wdev->wiphy; in cfg80211_gtk_rekey_notify() local
20831 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_gtk_rekey_notify()
20875 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_pmksa_candidate_notify()
20887 struct wiphy *wiphy = wdev->wiphy; in cfg80211_pmksa_candidate_notify() local
20888 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_pmksa_candidate_notify()
20937 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_ch_switch_notify()
20950 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_notify() local
20951 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_notify()
20953 lockdep_assert_wiphy(wdev->wiphy); in cfg80211_ch_switch_notify()
20995 struct wiphy *wiphy = wdev->wiphy; in cfg80211_ch_switch_started_notify() local
20996 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ch_switch_started_notify()
20998 lockdep_assert_wiphy(wdev->wiphy); in cfg80211_ch_switch_started_notify()
21015 struct wiphy *wiphy = wdev->wiphy; in cfg80211_bss_color_notify() local
21016 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_bss_color_notify()
21020 lockdep_assert_wiphy(wdev->wiphy); in cfg80211_bss_color_notify()
21050 return genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), in cfg80211_bss_color_notify()
21099 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in nl80211_radar_notify()
21113 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_sta_opmode_change_notify()
21152 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_sta_opmode_change_notify()
21167 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_probe_status()
21196 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_probe_status()
21205 void cfg80211_report_obss_beacon_khz(struct wiphy *wiphy, const u8 *frame, in cfg80211_report_obss_beacon_khz() argument
21208 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_report_obss_beacon_khz()
21213 trace_cfg80211_report_obss_beacon(wiphy, frame, len, freq, sig_dbm); in cfg80211_report_obss_beacon_khz()
21240 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, reg->nlportid); in cfg80211_report_obss_beacon_khz()
21315 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_report_wowlan_wakeup()
21320 trace_cfg80211_report_wowlan_wakeup(wdev->wiphy, wdev, wakeup); in cfg80211_report_wowlan_wakeup()
21421 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_report_wowlan_wakeup()
21436 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_tdls_oper_request()
21440 trace_cfg80211_tdls_oper_request(wdev->wiphy, dev, peer, oper, in cfg80211_tdls_oper_request()
21463 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_tdls_oper_request()
21494 wiphy_work_queue(&rdev->wiphy, in nl80211_netlink_notify()
21499 list_for_each_entry_rcu(wdev, &rdev->wiphy.wdev_list, list) { in nl80211_netlink_notify()
21541 struct wiphy *wiphy = netdev->ieee80211_ptr->wiphy; in cfg80211_ft_event() local
21542 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_ft_event()
21546 trace_cfg80211_ft_event(wiphy, netdev, ft_event); in cfg80211_ft_event()
21575 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_ft_event()
21590 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_crit_proto_stopped()
21612 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid); in cfg80211_crit_proto_stopped()
21622 struct wiphy *wiphy = wdev->wiphy; in nl80211_send_ap_stopped() local
21623 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in nl80211_send_ap_stopped()
21645 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), msg, 0, in nl80211_send_ap_stopped()
21657 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_external_auth_request()
21702 genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, in cfg80211_external_auth_request()
21716 struct wiphy *wiphy = netdev->ieee80211_ptr->wiphy; in cfg80211_update_owe_info_event() local
21717 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_update_owe_info_event()
21721 trace_cfg80211_update_owe_info_event(wiphy, netdev, owe_info); in cfg80211_update_owe_info_event()
21753 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_update_owe_info_event()
21765 struct wiphy *wiphy = wdev->wiphy; in cfg80211_schedule_channels_check() local
21769 (wiphy_ext_feature_isset(wiphy, in cfg80211_schedule_channels_check()
21772 wiphy->regulatory_flags & REGULATORY_ENABLE_RELAX_NO_IR))) in cfg80211_schedule_channels_check()
21780 struct wiphy *wiphy = wdev->wiphy; in cfg80211_epcs_changed() local
21781 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_epcs_changed()
21801 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, in cfg80211_epcs_changed()
21813 struct wiphy *wiphy = wdev->wiphy; in cfg80211_next_nan_dw_notif() local
21814 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_next_nan_dw_notif()
21840 genlmsg_unicast(wiphy_net(wiphy), msg, wdev->owner_nlportid); in cfg80211_next_nan_dw_notif()
21853 struct wiphy *wiphy = wdev->wiphy; in cfg80211_nan_cluster_joined() local
21854 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_nan_cluster_joined()
21880 genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), in cfg80211_nan_cluster_joined()
21883 genlmsg_unicast(wiphy_net(wiphy), msg, in cfg80211_nan_cluster_joined()