Lines Matching +full:out +full:- +full:of +full:- +full:band

1 // SPDX-License-Identifier: GPL-2.0+
2 /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */
87 return -EFAULT; in qtnf_validate_iface_combinations()
90 vif = &mac->iflist[i]; in qtnf_validate_iface_combinations()
91 if (vif->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) in qtnf_validate_iface_combinations()
92 params.iftype_num[vif->wdev.iftype]++; in qtnf_validate_iface_combinations()
97 params.iftype_num[change_vif->wdev.iftype]--; in qtnf_validate_iface_combinations()
121 vif->mac->macid, vif->vifid, type); in qtnf_change_virtual_intf()
126 mac_addr = params->macaddr; in qtnf_change_virtual_intf()
127 use4addr = params->use_4addr; in qtnf_change_virtual_intf()
130 qtnf_scan_done(vif->mac, true); in qtnf_change_virtual_intf()
135 vif->mac->macid, vif->vifid, type); in qtnf_change_virtual_intf()
139 vif->wdev.iftype = type; in qtnf_change_virtual_intf()
145 struct net_device *netdev = wdev->netdev; in qtnf_del_virtual_intf()
150 return -EFAULT; in qtnf_del_virtual_intf()
152 vif = qtnf_netdev_get_priv(wdev->netdev); in qtnf_del_virtual_intf()
154 qtnf_scan_done(vif->mac, true); in qtnf_del_virtual_intf()
161 while ((skb = skb_dequeue(&vif->high_pri_tx_queue))) in qtnf_del_virtual_intf()
164 cancel_work_sync(&vif->high_pri_tx_work); in qtnf_del_virtual_intf()
166 if (netdev->reg_state == NETREG_REGISTERED) in qtnf_del_virtual_intf()
170 pr_err("VIF%u.%u: failed to delete VIF\n", vif->mac->macid, in qtnf_del_virtual_intf()
171 vif->vifid); in qtnf_del_virtual_intf()
173 vif->netdev->ieee80211_ptr = NULL; in qtnf_del_virtual_intf()
174 vif->netdev = NULL; in qtnf_del_virtual_intf()
175 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_del_virtual_intf()
195 return ERR_PTR(-EFAULT); in qtnf_add_virtual_intf()
200 mac->macid, type); in qtnf_add_virtual_intf()
209 pr_err("MAC%u: no free VIF available\n", mac->macid); in qtnf_add_virtual_intf()
210 return ERR_PTR(-EFAULT); in qtnf_add_virtual_intf()
213 eth_zero_addr(vif->mac_addr); in qtnf_add_virtual_intf()
214 eth_zero_addr(vif->bssid); in qtnf_add_virtual_intf()
215 vif->bss_priority = QTNF_DEF_BSS_PRIORITY; in qtnf_add_virtual_intf()
216 memset(&vif->wdev, 0, sizeof(vif->wdev)); in qtnf_add_virtual_intf()
217 vif->wdev.wiphy = wiphy; in qtnf_add_virtual_intf()
218 vif->wdev.iftype = type; in qtnf_add_virtual_intf()
221 pr_err("MAC%u: unsupported IF type %d\n", mac->macid, type); in qtnf_add_virtual_intf()
222 return ERR_PTR(-ENOTSUPP); in qtnf_add_virtual_intf()
226 mac_addr = params->macaddr; in qtnf_add_virtual_intf()
227 use4addr = params->use_4addr; in qtnf_add_virtual_intf()
233 mac->macid, vif->vifid, mac_addr); in qtnf_add_virtual_intf()
237 if (!is_valid_ether_addr(vif->mac_addr)) { in qtnf_add_virtual_intf()
239 mac->macid, vif->vifid, vif->mac_addr); in qtnf_add_virtual_intf()
240 ret = -EINVAL; in qtnf_add_virtual_intf()
246 pr_err("VIF%u.%u: failed to attach netdev\n", mac->macid, in qtnf_add_virtual_intf()
247 vif->vifid); in qtnf_add_virtual_intf()
251 vif->wdev.netdev = vif->netdev; in qtnf_add_virtual_intf()
252 return &vif->wdev; in qtnf_add_virtual_intf()
255 vif->netdev = NULL; in qtnf_add_virtual_intf()
259 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_add_virtual_intf()
269 if (!info->beacon_ies || !info->beacon_ies_len) { in qtnf_mgmt_set_appie()
274 info->beacon_ies, in qtnf_mgmt_set_appie()
275 info->beacon_ies_len); in qtnf_mgmt_set_appie()
279 goto out; in qtnf_mgmt_set_appie()
281 if (!info->proberesp_ies || !info->proberesp_ies_len) { in qtnf_mgmt_set_appie()
288 info->proberesp_ies, in qtnf_mgmt_set_appie()
289 info->proberesp_ies_len); in qtnf_mgmt_set_appie()
293 goto out; in qtnf_mgmt_set_appie()
295 if (!info->assocresp_ies || !info->assocresp_ies_len) { in qtnf_mgmt_set_appie()
302 info->assocresp_ies, in qtnf_mgmt_set_appie()
303 info->assocresp_ies_len); in qtnf_mgmt_set_appie()
306 out: in qtnf_mgmt_set_appie()
326 pr_err("VIF%u.%u: failed to start AP\n", vif->mac->macid, in qtnf_start_ap()
327 vif->vifid); in qtnf_start_ap()
337 qtnf_scan_done(vif->mac, true); in qtnf_stop_ap()
342 vif->mac->macid, vif->vifid); in qtnf_stop_ap()
344 netif_carrier_off(vif->netdev); in qtnf_stop_ap()
357 pr_err("MAC%u: primary VIF is not configured\n", mac->macid); in qtnf_set_wiphy_params()
358 return -EFAULT; in qtnf_set_wiphy_params()
363 pr_err("MAC%u: failed to update PHY params\n", mac->macid); in qtnf_set_wiphy_params()
372 struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev); in qtnf_mgmt_frame_register()
380 new_mask = vif->mgmt_frames_bitmask | BIT(mgmt_type); in qtnf_mgmt_frame_register()
382 new_mask = vif->mgmt_frames_bitmask & ~BIT(mgmt_type); in qtnf_mgmt_frame_register()
384 if (new_mask == vif->mgmt_frames_bitmask) in qtnf_mgmt_frame_register()
403 vif->mac->macid, vif->vifid, in qtnf_mgmt_frame_register()
410 vif->mac->macid, vif->vifid, reg ? "" : "un", in qtnf_mgmt_frame_register()
415 vif->mgmt_frames_bitmask = new_mask; in qtnf_mgmt_frame_register()
417 vif->mac->macid, vif->vifid, reg ? "" : "un", frame_type); in qtnf_mgmt_frame_register()
424 struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev); in qtnf_mgmt_tx()
425 const struct ieee80211_mgmt *mgmt_frame = (void *)params->buf; in qtnf_mgmt_tx()
432 if (params->offchan) in qtnf_mgmt_tx()
435 if (params->no_cck) in qtnf_mgmt_tx()
438 if (params->dont_wait_for_ack) in qtnf_mgmt_tx()
444 if (params->chan) in qtnf_mgmt_tx()
445 freq = params->chan->center_freq; in qtnf_mgmt_tx()
450 wdev->netdev->name, freq, in qtnf_mgmt_tx()
451 le16_to_cpu(mgmt_frame->frame_control), mgmt_frame->da, in qtnf_mgmt_tx()
452 params->len, short_cookie, flags); in qtnf_mgmt_tx()
455 freq, params->buf, params->len); in qtnf_mgmt_tx()
464 sinfo->generation = vif->generation; in qtnf_get_station()
476 switch (vif->wdev.iftype) { in qtnf_dump_station()
478 if (idx != 0 || !vif->wdev.current_bss) in qtnf_dump_station()
479 return -ENOENT; in qtnf_dump_station()
481 ether_addr_copy(mac, vif->bssid); in qtnf_dump_station()
484 sta_node = qtnf_sta_list_lookup_index(&vif->sta_list, idx); in qtnf_dump_station()
486 return -ENOENT; in qtnf_dump_station()
488 ether_addr_copy(mac, sta_node->mac_addr); in qtnf_dump_station()
491 return -ENOTSUPP; in qtnf_dump_station()
496 if (vif->wdev.iftype == NL80211_IFTYPE_AP) { in qtnf_dump_station()
497 if (ret == -ENOENT) { in qtnf_dump_station()
498 cfg80211_del_sta(vif->netdev, mac, GFP_KERNEL); in qtnf_dump_station()
499 sinfo->filled = 0; in qtnf_dump_station()
503 sinfo->generation = vif->generation; in qtnf_dump_station()
518 vif->mac->macid, vif->vifid, params->cipher, key_index, in qtnf_add_key()
532 if (ret == -ENOENT) { in qtnf_del_key()
533 pr_debug("VIF%u.%u: key index %d out of bounds\n", in qtnf_del_key()
534 vif->mac->macid, vif->vifid, key_index); in qtnf_del_key()
537 vif->mac->macid, vif->vifid, in qtnf_del_key()
554 vif->mac->macid, vif->vifid, key_index, unicast, in qtnf_set_default_key()
570 vif->mac->macid, vif->vifid, key_index); in qtnf_set_default_mgmt_key()
585 vif->mac->macid, vif->vifid, mac); in qtnf_change_station()
597 if (params->mac && in qtnf_del_station()
598 (vif->wdev.iftype == NL80211_IFTYPE_AP) && in qtnf_del_station()
599 !is_broadcast_ether_addr(params->mac) && in qtnf_del_station()
600 !qtnf_sta_list_lookup(&vif->sta_list, params->mac)) in qtnf_del_station()
606 vif->mac->macid, vif->vifid, params->mac); in qtnf_del_station()
617 cancel_delayed_work_sync(&mac->scan_timeout); in qtnf_scan()
619 mac->scan_req = request; in qtnf_scan()
623 pr_err("MAC%u: failed to start scan\n", mac->macid); in qtnf_scan()
624 mac->scan_req = NULL; in qtnf_scan()
625 goto out; in qtnf_scan()
628 pr_debug("MAC%u: scan started\n", mac->macid); in qtnf_scan()
629 queue_delayed_work(mac->bus->workqueue, &mac->scan_timeout, in qtnf_scan()
632 out: in qtnf_scan()
643 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) in qtnf_connect()
644 return -EOPNOTSUPP; in qtnf_connect()
646 if (sme->auth_type == NL80211_AUTHTYPE_SAE && in qtnf_connect()
647 !(sme->flags & CONNECT_REQ_EXTERNAL_AUTH_SUPPORT)) { in qtnf_connect()
649 return -EOPNOTSUPP; in qtnf_connect()
652 if (sme->bssid) in qtnf_connect()
653 ether_addr_copy(vif->bssid, sme->bssid); in qtnf_connect()
655 eth_zero_addr(vif->bssid); in qtnf_connect()
660 vif->mac->macid, vif->vifid); in qtnf_connect()
661 goto out; in qtnf_connect()
664 out: in qtnf_connect()
675 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) in qtnf_external_auth()
676 return -EOPNOTSUPP; in qtnf_external_auth()
678 if (!ether_addr_equal(vif->bssid, auth->bssid)) in qtnf_external_auth()
679 pr_warn("unexpected bssid: %pM", auth->bssid); in qtnf_external_auth()
684 vif->mac->macid, vif->vifid); in qtnf_external_auth()
685 goto out; in qtnf_external_auth()
688 out: in qtnf_external_auth()
702 pr_err("MAC%u: primary VIF is not configured\n", mac->macid); in qtnf_disconnect()
703 return -EFAULT; in qtnf_disconnect()
706 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) { in qtnf_disconnect()
707 ret = -EOPNOTSUPP; in qtnf_disconnect()
708 goto out; in qtnf_disconnect()
714 mac->macid, vif->vifid); in qtnf_disconnect()
716 if (vif->wdev.current_bss) { in qtnf_disconnect()
717 netif_carrier_off(vif->netdev); in qtnf_disconnect()
718 cfg80211_disconnected(vif->netdev, reason_code, in qtnf_disconnect()
722 out: in qtnf_disconnect()
731 struct wireless_dev *wdev = dev->ieee80211_ptr; in qtnf_dump_survey()
733 const struct cfg80211_chan_def *chandef = &wdev->chandef; in qtnf_dump_survey()
738 sband = wiphy->bands[NL80211_BAND_2GHZ]; in qtnf_dump_survey()
739 if (sband && idx >= sband->n_channels) { in qtnf_dump_survey()
740 idx -= sband->n_channels; in qtnf_dump_survey()
745 sband = wiphy->bands[NL80211_BAND_5GHZ]; in qtnf_dump_survey()
747 if (!sband || idx >= sband->n_channels) in qtnf_dump_survey()
748 return -ENOENT; in qtnf_dump_survey()
750 chan = &sband->channels[idx]; in qtnf_dump_survey()
753 survey->channel = chan; in qtnf_dump_survey()
754 survey->filled = 0x0; in qtnf_dump_survey()
756 if (chandef->chan) { in qtnf_dump_survey()
757 if (chan->hw_value == chandef->chan->hw_value) in qtnf_dump_survey()
758 survey->filled = SURVEY_INFO_IN_USE; in qtnf_dump_survey()
761 ret = qtnf_cmd_get_chan_stats(mac, chan->hw_value, &stats); in qtnf_dump_survey()
764 if (unlikely(stats.chan_num != chan->hw_value)) { in qtnf_dump_survey()
765 pr_err("received stats for channel %d instead of %d\n", in qtnf_dump_survey()
766 stats.chan_num, chan->hw_value); in qtnf_dump_survey()
767 ret = -EINVAL; in qtnf_dump_survey()
771 survey->filled |= SURVEY_INFO_TIME | in qtnf_dump_survey()
778 survey->time_scan = stats.cca_try; in qtnf_dump_survey()
779 survey->time = stats.cca_try; in qtnf_dump_survey()
780 survey->time_tx = stats.cca_tx; in qtnf_dump_survey()
781 survey->time_rx = stats.cca_rx; in qtnf_dump_survey()
782 survey->time_busy = stats.cca_busy; in qtnf_dump_survey()
783 survey->noise = stats.chan_noise; in qtnf_dump_survey()
785 case -ENOENT: in qtnf_dump_survey()
786 pr_debug("no stats for channel %u\n", chan->hw_value); in qtnf_dump_survey()
791 chan->hw_value); in qtnf_dump_survey()
802 struct net_device *ndev = wdev->netdev; in qtnf_get_channel()
807 return -ENODEV; in qtnf_get_channel()
809 vif = qtnf_netdev_get_priv(wdev->netdev); in qtnf_get_channel()
813 pr_err("%s: failed to get channel: %d\n", ndev->name, ret); in qtnf_get_channel()
814 ret = -ENODATA; in qtnf_get_channel()
815 goto out; in qtnf_get_channel()
820 ndev->name, chandef->chan->center_freq, in qtnf_get_channel()
821 chandef->center_freq1, chandef->center_freq2, in qtnf_get_channel()
822 chandef->width); in qtnf_get_channel()
823 ret = -ENODATA; in qtnf_get_channel()
824 goto out; in qtnf_get_channel()
827 out: in qtnf_get_channel()
837 pr_debug("%s: chan(%u) count(%u) radar(%u) block_tx(%u)\n", dev->name, in qtnf_channel_switch()
838 params->chandef.chan->hw_value, params->count, in qtnf_channel_switch()
839 params->radar_required, params->block_tx); in qtnf_channel_switch()
841 if (!cfg80211_chandef_valid(&params->chandef)) { in qtnf_channel_switch()
842 pr_err("%s: invalid channel\n", dev->name); in qtnf_channel_switch()
843 return -EINVAL; in qtnf_channel_switch()
849 dev->name, params->chandef.chan->hw_value); in qtnf_channel_switch()
863 return -ENOTSUPP; in qtnf_start_radar_detection()
867 pr_err("%s: failed to start CAC ret=%d\n", ndev->name, ret); in qtnf_start_radar_detection()
881 pr_err("%s: failed to set mac ACL ret=%d\n", dev->name, ret); in qtnf_set_mac_acl()
895 pr_err("%s: failed to set PM mode ret=%d\n", dev->name, ret); in qtnf_set_power_mgmt()
909 pr_err("MAC%u: primary VIF is not configured\n", mac->macid); in qtnf_suspend()
910 ret = -EFAULT; in qtnf_suspend()
916 qtnf_virtual_intf_cleanup(vif->netdev); in qtnf_suspend()
920 qtnf_scan_done(vif->mac, true); in qtnf_suspend()
925 mac->macid); in qtnf_suspend()
941 pr_err("MAC%u: primary VIF is not configured\n", mac->macid); in qtnf_resume()
942 ret = -EFAULT; in qtnf_resume()
949 mac->macid); in qtnf_resume()
960 struct qtnf_bus *bus = mac->bus; in qtnf_set_wakeup()
962 device_set_wakeup_enable(bus->dev, enabled); in qtnf_set_wakeup()
1005 enum nl80211_band band; in qtnf_cfg80211_reg_notifier() local
1008 pr_debug("MAC%u: initiator=%d alpha=%c%c\n", mac->macid, req->initiator, in qtnf_cfg80211_reg_notifier()
1009 req->alpha2[0], req->alpha2[1]); in qtnf_cfg80211_reg_notifier()
1014 mac->macid, req->alpha2[0], req->alpha2[1], ret); in qtnf_cfg80211_reg_notifier()
1018 for (band = 0; band < NUM_NL80211_BANDS; ++band) { in qtnf_cfg80211_reg_notifier()
1019 if (!wiphy->bands[band]) in qtnf_cfg80211_reg_notifier()
1022 ret = qtnf_cmd_band_info_get(mac, wiphy->bands[band]); in qtnf_cfg80211_reg_notifier()
1024 pr_err("MAC%u: failed to update band %u\n", in qtnf_cfg80211_reg_notifier()
1025 mac->macid, band); in qtnf_cfg80211_reg_notifier()
1033 if (bus->hw_info.hw_capab & QLINK_HW_CAPAB_DFS_OFFLOAD) in qtnf_wiphy_allocate()
1036 if (!(bus->hw_info.hw_capab & QLINK_HW_CAPAB_PWR_MGMT)) in qtnf_wiphy_allocate()
1043 set_wiphy_dev(wiphy, bus->dev); in qtnf_wiphy_allocate()
1056 if_comb = mac_info->if_comb; in qtnf_wiphy_setup_if_comb()
1057 n_if_comb = mac_info->n_if_comb; in qtnf_wiphy_setup_if_comb()
1060 return -ENOENT; in qtnf_wiphy_setup_if_comb()
1063 if_comb[i].radar_detect_widths = mac_info->radar_detect_widths; in qtnf_wiphy_setup_if_comb()
1069 wiphy->iface_combinations = if_comb; in qtnf_wiphy_setup_if_comb()
1070 wiphy->n_iface_combinations = n_if_comb; in qtnf_wiphy_setup_if_comb()
1071 wiphy->interface_modes = interface_modes; in qtnf_wiphy_setup_if_comb()
1079 struct qtnf_mac_info *macinfo = &mac->macinfo; in qtnf_wiphy_register()
1085 return -EFAULT; in qtnf_wiphy_register()
1088 wiphy->frag_threshold = macinfo->frag_thr; in qtnf_wiphy_register()
1089 wiphy->rts_threshold = macinfo->rts_thr; in qtnf_wiphy_register()
1090 wiphy->retry_short = macinfo->sretry_limit; in qtnf_wiphy_register()
1091 wiphy->retry_long = macinfo->lretry_limit; in qtnf_wiphy_register()
1092 wiphy->coverage_class = macinfo->coverage_class; in qtnf_wiphy_register()
1094 wiphy->max_scan_ssids = in qtnf_wiphy_register()
1095 (hw_info->max_scan_ssids) ? hw_info->max_scan_ssids : 1; in qtnf_wiphy_register()
1096 wiphy->max_scan_ie_len = QTNF_MAX_VSIE_LEN; in qtnf_wiphy_register()
1097 wiphy->mgmt_stypes = qtnf_mgmt_stypes; in qtnf_wiphy_register()
1098 wiphy->max_remain_on_channel_duration = 5000; in qtnf_wiphy_register()
1099 wiphy->max_acl_mac_addrs = macinfo->max_acl_mac_addrs; in qtnf_wiphy_register()
1100 wiphy->max_num_csa_counters = 2; in qtnf_wiphy_register()
1104 goto out; in qtnf_wiphy_register()
1107 wiphy->cipher_suites = qtnf_cipher_suites; in qtnf_wiphy_register()
1108 wiphy->n_cipher_suites = ARRAY_SIZE(qtnf_cipher_suites); in qtnf_wiphy_register()
1109 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; in qtnf_wiphy_register()
1110 wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | in qtnf_wiphy_register()
1116 wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; in qtnf_wiphy_register()
1118 if (hw_info->hw_capab & QLINK_HW_CAPAB_DFS_OFFLOAD) in qtnf_wiphy_register()
1121 if (hw_info->hw_capab & QLINK_HW_CAPAB_SCAN_DWELL) in qtnf_wiphy_register()
1125 wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | in qtnf_wiphy_register()
1128 wiphy->available_antennas_tx = macinfo->num_tx_chain; in qtnf_wiphy_register()
1129 wiphy->available_antennas_rx = macinfo->num_rx_chain; in qtnf_wiphy_register()
1131 wiphy->max_ap_assoc_sta = macinfo->max_ap_assoc_sta; in qtnf_wiphy_register()
1132 wiphy->ht_capa_mod_mask = &macinfo->ht_cap_mod_mask; in qtnf_wiphy_register()
1133 wiphy->vht_capa_mod_mask = &macinfo->vht_cap_mod_mask; in qtnf_wiphy_register()
1135 ether_addr_copy(wiphy->perm_addr, mac->macaddr); in qtnf_wiphy_register()
1137 if (hw_info->hw_capab & QLINK_HW_CAPAB_STA_INACT_TIMEOUT) in qtnf_wiphy_register()
1138 wiphy->features |= NL80211_FEATURE_INACTIVITY_TIMER; in qtnf_wiphy_register()
1140 if (hw_info->hw_capab & QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR) in qtnf_wiphy_register()
1141 wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; in qtnf_wiphy_register()
1143 if (!(hw_info->hw_capab & QLINK_HW_CAPAB_OBSS_SCAN)) in qtnf_wiphy_register()
1144 wiphy->features |= NL80211_FEATURE_NEED_OBSS_SCAN; in qtnf_wiphy_register()
1146 if (hw_info->hw_capab & QLINK_HW_CAPAB_SAE) in qtnf_wiphy_register()
1147 wiphy->features |= NL80211_FEATURE_SAE; in qtnf_wiphy_register()
1150 if (macinfo->wowlan) in qtnf_wiphy_register()
1151 wiphy->wowlan = macinfo->wowlan; in qtnf_wiphy_register()
1154 regdomain_is_known = isalpha(mac->rd->alpha2[0]) && in qtnf_wiphy_register()
1155 isalpha(mac->rd->alpha2[1]); in qtnf_wiphy_register()
1157 if (hw_info->hw_capab & QLINK_HW_CAPAB_REG_UPDATE) { in qtnf_wiphy_register()
1158 wiphy->reg_notifier = qtnf_cfg80211_reg_notifier; in qtnf_wiphy_register()
1160 if (mac->rd->alpha2[0] == '9' && mac->rd->alpha2[1] == '9') { in qtnf_wiphy_register()
1161 wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG | in qtnf_wiphy_register()
1163 wiphy_apply_custom_regulatory(wiphy, mac->rd); in qtnf_wiphy_register()
1165 wiphy->regulatory_flags |= REGULATORY_STRICT_REG; in qtnf_wiphy_register()
1168 wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED; in qtnf_wiphy_register()
1171 if (mac->macinfo.extended_capabilities_len) { in qtnf_wiphy_register()
1172 wiphy->extended_capabilities = in qtnf_wiphy_register()
1173 mac->macinfo.extended_capabilities; in qtnf_wiphy_register()
1174 wiphy->extended_capabilities_mask = in qtnf_wiphy_register()
1175 mac->macinfo.extended_capabilities_mask; in qtnf_wiphy_register()
1176 wiphy->extended_capabilities_len = in qtnf_wiphy_register()
1177 mac->macinfo.extended_capabilities_len; in qtnf_wiphy_register()
1180 strlcpy(wiphy->fw_version, hw_info->fw_version, in qtnf_wiphy_register()
1181 sizeof(wiphy->fw_version)); in qtnf_wiphy_register()
1182 wiphy->hw_version = hw_info->hw_version; in qtnf_wiphy_register()
1186 goto out; in qtnf_wiphy_register()
1188 if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) in qtnf_wiphy_register()
1189 ret = regulatory_set_wiphy_regd(wiphy, mac->rd); in qtnf_wiphy_register()
1191 ret = regulatory_hint(wiphy, mac->rd->alpha2); in qtnf_wiphy_register()
1193 out: in qtnf_wiphy_register()
1203 up ? "UP" : "DOWN", vif->mac->macid, vif->vifid); in qtnf_netdev_updown()
1209 struct qtnf_wmac *mac = wiphy_priv(vif->wdev.wiphy); in qtnf_virtual_intf_cleanup()
1211 if (vif->wdev.iftype == NL80211_IFTYPE_STATION) in qtnf_virtual_intf_cleanup()
1212 qtnf_disconnect(vif->wdev.wiphy, ndev, in qtnf_virtual_intf_cleanup()
1220 if (vif->wdev.iftype == NL80211_IFTYPE_STATION) in qtnf_cfg80211_vif_reset()
1221 cfg80211_disconnected(vif->netdev, WLAN_REASON_DEAUTH_LEAVING, in qtnf_cfg80211_vif_reset()
1224 cfg80211_shutdown_all_interfaces(vif->wdev.wiphy); in qtnf_cfg80211_vif_reset()
1227 void qtnf_band_init_rates(struct ieee80211_supported_band *band) in qtnf_band_init_rates() argument
1229 switch (band->band) { in qtnf_band_init_rates()
1231 band->bitrates = qtnf_rates_2g; in qtnf_band_init_rates()
1232 band->n_bitrates = ARRAY_SIZE(qtnf_rates_2g); in qtnf_band_init_rates()
1235 band->bitrates = qtnf_rates_5g; in qtnf_band_init_rates()
1236 band->n_bitrates = ARRAY_SIZE(qtnf_rates_5g); in qtnf_band_init_rates()
1239 band->bitrates = NULL; in qtnf_band_init_rates()
1240 band->n_bitrates = 0; in qtnf_band_init_rates()