Lines Matching full:local
36 void ieee80211_configure_filter(struct ieee80211_local *local) in ieee80211_configure_filter() argument
42 if (atomic_read(&local->iff_allmultis)) in ieee80211_configure_filter()
45 if (local->monitors || test_bit(SCAN_SW_SCANNING, &local->scanning) || in ieee80211_configure_filter()
46 test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning)) in ieee80211_configure_filter()
49 if (local->fif_probe_req || local->probe_req_reg) in ieee80211_configure_filter()
52 if (local->fif_fcsfail) in ieee80211_configure_filter()
55 if (local->fif_plcpfail) in ieee80211_configure_filter()
58 if (local->fif_control) in ieee80211_configure_filter()
61 if (local->fif_other_bss) in ieee80211_configure_filter()
64 if (local->fif_pspoll) in ieee80211_configure_filter()
67 if (local->rx_mcast_action_reg) in ieee80211_configure_filter()
70 spin_lock_bh(&local->filter_lock); in ieee80211_configure_filter()
71 changed_flags = local->filter_flags ^ new_flags; in ieee80211_configure_filter()
73 mc = drv_prepare_multicast(local, &local->mc_list); in ieee80211_configure_filter()
74 spin_unlock_bh(&local->filter_lock); in ieee80211_configure_filter()
79 drv_configure_filter(local, changed_flags, &new_flags, mc); in ieee80211_configure_filter()
83 local->filter_flags = new_flags & ~(1<<31); in ieee80211_configure_filter()
88 struct ieee80211_local *local = in ieee80211_reconfig_filter() local
91 ieee80211_configure_filter(local); in ieee80211_reconfig_filter()
94 static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local) in ieee80211_hw_conf_chan() argument
102 offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
104 if (local->scan_chandef.chan) { in ieee80211_hw_conf_chan()
105 chandef = local->scan_chandef; in ieee80211_hw_conf_chan()
106 } else if (local->tmp_channel) { in ieee80211_hw_conf_chan()
107 chandef.chan = local->tmp_channel; in ieee80211_hw_conf_chan()
112 chandef = local->_oper_chandef; in ieee80211_hw_conf_chan()
120 if (!cfg80211_chandef_identical(&chandef, &local->_oper_chandef)) in ieee80211_hw_conf_chan()
121 local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
123 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
125 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
128 !cfg80211_chandef_identical(&local->hw.conf.chandef, in ieee80211_hw_conf_chan()
129 &local->_oper_chandef)) { in ieee80211_hw_conf_chan()
130 local->hw.conf.chandef = chandef; in ieee80211_hw_conf_chan()
134 if (!conf_is_ht(&local->hw.conf)) { in ieee80211_hw_conf_chan()
140 local->hw.conf.smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_hw_conf_chan()
141 } else if (local->hw.conf.smps_mode != local->smps_mode) { in ieee80211_hw_conf_chan()
142 local->hw.conf.smps_mode = local->smps_mode; in ieee80211_hw_conf_chan()
149 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_hw_conf_chan()
160 if (local->hw.conf.power_level != power) { in ieee80211_hw_conf_chan()
162 local->hw.conf.power_level = power; in ieee80211_hw_conf_chan()
168 int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) in ieee80211_hw_config() argument
174 if (!local->use_chanctx) in ieee80211_hw_config()
175 changed |= ieee80211_hw_conf_chan(local); in ieee80211_hw_config()
180 if (changed && local->open_count) { in ieee80211_hw_config()
181 ret = drv_config(local, changed); in ieee80211_hw_config()
205 struct ieee80211_local *local = sdata->local; in ieee80211_bss_info_change_notify() local
210 drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed); in ieee80211_bss_info_change_notify()
225 struct ieee80211_local *local = from_tasklet(local, t, tasklet); in ieee80211_tasklet_handler() local
228 while ((skb = skb_dequeue(&local->skb_queue)) || in ieee80211_tasklet_handler()
229 (skb = skb_dequeue(&local->skb_queue_unreliable))) { in ieee80211_tasklet_handler()
235 ieee80211_rx(&local->hw, skb); in ieee80211_tasklet_handler()
239 ieee80211_tx_status(&local->hw, skb); in ieee80211_tasklet_handler()
252 struct ieee80211_local *local = in ieee80211_restart_work() local
258 flush_workqueue(local->workqueue); in ieee80211_restart_work()
259 flush_work(&local->sched_scan_stopped_work); in ieee80211_restart_work()
260 flush_work(&local->radar_detected_work); in ieee80211_restart_work()
264 wiphy_lock(local->hw.wiphy); in ieee80211_restart_work()
266 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), in ieee80211_restart_work()
269 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_restart_work()
297 ieee80211_scan_cancel(local); in ieee80211_restart_work()
299 /* make sure any new ROC will consider local->in_reconfig */ in ieee80211_restart_work()
300 flush_delayed_work(&local->roc_work); in ieee80211_restart_work()
301 flush_work(&local->hw_roc_done); in ieee80211_restart_work()
306 ret = ieee80211_reconfig(local); in ieee80211_restart_work()
307 wiphy_unlock(local->hw.wiphy); in ieee80211_restart_work()
310 cfg80211_shutdown_all_interfaces(local->hw.wiphy); in ieee80211_restart_work()
317 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_restart_hw() local
319 trace_api_restart_hw(local); in ieee80211_restart_hw()
333 local->in_reconfig = true; in ieee80211_restart_hw()
336 queue_work(system_freezable_wq, &local->restart_work); in ieee80211_restart_hw()
345 struct ieee80211_local *local = in ieee80211_ifa_changed() local
360 if (wdev->wiphy != local->hw.wiphy) in ieee80211_ifa_changed()
406 struct ieee80211_local *local = in ieee80211_ifa6_changed() local
412 if (!wdev || wdev->wiphy != local->hw.wiphy) in ieee80211_ifa6_changed()
424 drv_ipv6_addr_change(local, sdata, idev); in ieee80211_ifa6_changed()
547 struct ieee80211_local *local; in ieee80211_alloc_hw_nm() local
583 priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len; in ieee80211_alloc_hw_nm()
644 local = wiphy_priv(wiphy); in ieee80211_alloc_hw_nm()
646 if (sta_info_init(local)) in ieee80211_alloc_hw_nm()
649 local->hw.wiphy = wiphy; in ieee80211_alloc_hw_nm()
651 local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN); in ieee80211_alloc_hw_nm()
653 local->ops = ops; in ieee80211_alloc_hw_nm()
654 local->use_chanctx = use_chanctx; in ieee80211_alloc_hw_nm()
660 * second, so 7 is ~8ms of queued data. Only affects local TCP in ieee80211_alloc_hw_nm()
663 * for local reasons (longer buffers, longer completion time, or in ieee80211_alloc_hw_nm()
666 local->hw.tx_sk_pacing_shift = 7; in ieee80211_alloc_hw_nm()
669 local->hw.queues = 1; in ieee80211_alloc_hw_nm()
670 local->hw.max_rates = 1; in ieee80211_alloc_hw_nm()
671 local->hw.max_report_rates = 0; in ieee80211_alloc_hw_nm()
672 local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; in ieee80211_alloc_hw_nm()
673 local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; in ieee80211_alloc_hw_nm()
674 local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE; in ieee80211_alloc_hw_nm()
675 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; in ieee80211_alloc_hw_nm()
676 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; in ieee80211_alloc_hw_nm()
677 local->hw.radiotap_mcs_details = IEEE80211_RADIOTAP_MCS_HAVE_MCS | in ieee80211_alloc_hw_nm()
680 local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | in ieee80211_alloc_hw_nm()
682 local->hw.uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES; in ieee80211_alloc_hw_nm()
683 local->hw.uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN; in ieee80211_alloc_hw_nm()
684 local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; in ieee80211_alloc_hw_nm()
685 local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; in ieee80211_alloc_hw_nm()
689 local->ext_capa[7] = WLAN_EXT_CAPA8_OPMODE_NOTIF; in ieee80211_alloc_hw_nm()
691 wiphy->extended_capabilities = local->ext_capa; in ieee80211_alloc_hw_nm()
692 wiphy->extended_capabilities_mask = local->ext_capa; in ieee80211_alloc_hw_nm()
694 ARRAY_SIZE(local->ext_capa); in ieee80211_alloc_hw_nm()
696 INIT_LIST_HEAD(&local->interfaces); in ieee80211_alloc_hw_nm()
697 INIT_LIST_HEAD(&local->mon_list); in ieee80211_alloc_hw_nm()
699 __hw_addr_init(&local->mc_list); in ieee80211_alloc_hw_nm()
701 mutex_init(&local->iflist_mtx); in ieee80211_alloc_hw_nm()
702 mutex_init(&local->mtx); in ieee80211_alloc_hw_nm()
704 mutex_init(&local->key_mtx); in ieee80211_alloc_hw_nm()
705 spin_lock_init(&local->filter_lock); in ieee80211_alloc_hw_nm()
706 spin_lock_init(&local->rx_path_lock); in ieee80211_alloc_hw_nm()
707 spin_lock_init(&local->queue_stop_reason_lock); in ieee80211_alloc_hw_nm()
710 struct airtime_sched_info *air_sched = &local->airtime[i]; in ieee80211_alloc_hw_nm()
720 local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX; in ieee80211_alloc_hw_nm()
721 local->aql_threshold = IEEE80211_AQL_THRESHOLD; in ieee80211_alloc_hw_nm()
722 atomic_set(&local->aql_total_pending_airtime, 0); in ieee80211_alloc_hw_nm()
724 INIT_LIST_HEAD(&local->chanctx_list); in ieee80211_alloc_hw_nm()
725 mutex_init(&local->chanctx_mtx); in ieee80211_alloc_hw_nm()
727 INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); in ieee80211_alloc_hw_nm()
729 INIT_WORK(&local->restart_work, ieee80211_restart_work); in ieee80211_alloc_hw_nm()
731 INIT_WORK(&local->radar_detected_work, in ieee80211_alloc_hw_nm()
734 INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter); in ieee80211_alloc_hw_nm()
735 local->smps_mode = IEEE80211_SMPS_OFF; in ieee80211_alloc_hw_nm()
737 INIT_WORK(&local->dynamic_ps_enable_work, in ieee80211_alloc_hw_nm()
739 INIT_WORK(&local->dynamic_ps_disable_work, in ieee80211_alloc_hw_nm()
741 timer_setup(&local->dynamic_ps_timer, ieee80211_dynamic_ps_timer, 0); in ieee80211_alloc_hw_nm()
743 INIT_WORK(&local->sched_scan_stopped_work, in ieee80211_alloc_hw_nm()
746 spin_lock_init(&local->ack_status_lock); in ieee80211_alloc_hw_nm()
747 idr_init(&local->ack_status_frames); in ieee80211_alloc_hw_nm()
750 skb_queue_head_init(&local->pending[i]); in ieee80211_alloc_hw_nm()
751 atomic_set(&local->agg_queue_stop[i], 0); in ieee80211_alloc_hw_nm()
753 tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending); in ieee80211_alloc_hw_nm()
756 tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs); in ieee80211_alloc_hw_nm()
758 tasklet_setup(&local->tasklet, ieee80211_tasklet_handler); in ieee80211_alloc_hw_nm()
760 skb_queue_head_init(&local->skb_queue); in ieee80211_alloc_hw_nm()
761 skb_queue_head_init(&local->skb_queue_unreliable); in ieee80211_alloc_hw_nm()
763 ieee80211_alloc_led_names(local); in ieee80211_alloc_hw_nm()
765 ieee80211_roc_setup(local); in ieee80211_alloc_hw_nm()
767 local->hw.radiotap_timestamp.units_pos = -1; in ieee80211_alloc_hw_nm()
768 local->hw.radiotap_timestamp.accuracy = -1; in ieee80211_alloc_hw_nm()
770 return &local->hw; in ieee80211_alloc_hw_nm()
777 static int ieee80211_init_cipher_suites(struct ieee80211_local *local) in ieee80211_init_cipher_suites() argument
780 bool have_mfp = ieee80211_hw_check(&local->hw, MFP_CAPABLE); in ieee80211_init_cipher_suites()
800 if (ieee80211_hw_check(&local->hw, SW_CRYPTO_CONTROL) || in ieee80211_init_cipher_suites()
801 local->hw.wiphy->cipher_suites) { in ieee80211_init_cipher_suites()
809 if (!local->hw.wiphy->n_cipher_suites) in ieee80211_init_cipher_suites()
813 suites = kmemdup(local->hw.wiphy->cipher_suites, in ieee80211_init_cipher_suites()
814 sizeof(u32) * local->hw.wiphy->n_cipher_suites, in ieee80211_init_cipher_suites()
819 for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { in ieee80211_init_cipher_suites()
820 u32 suite = local->hw.wiphy->cipher_suites[r]; in ieee80211_init_cipher_suites()
827 } else if (!local->hw.cipher_schemes) { in ieee80211_init_cipher_suites()
832 local->hw.wiphy->cipher_suites = cipher_suites; in ieee80211_init_cipher_suites()
833 local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); in ieee80211_init_cipher_suites()
836 local->hw.wiphy->n_cipher_suites -= 4; in ieee80211_init_cipher_suites()
839 local->hw.wiphy->cipher_suites += 2; in ieee80211_init_cipher_suites()
840 local->hw.wiphy->n_cipher_suites -= 2; in ieee80211_init_cipher_suites()
848 cs = local->hw.cipher_schemes; in ieee80211_init_cipher_suites()
856 n_suites = local->hw.n_cipher_schemes + 5; in ieee80211_init_cipher_suites()
890 for (r = 0; r < local->hw.n_cipher_schemes; r++) { in ieee80211_init_cipher_suites()
899 local->hw.wiphy->cipher_suites = suites; in ieee80211_init_cipher_suites()
900 local->hw.wiphy->n_cipher_suites = w; in ieee80211_init_cipher_suites()
901 local->wiphy_ciphers_allocated = true; in ieee80211_init_cipher_suites()
908 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_register_hw() local
916 (local->hw.offchannel_tx_hw_queue == IEEE80211_INVAL_HW_QUEUE || in ieee80211_register_hw()
917 local->hw.offchannel_tx_hw_queue >= local->hw.queues)) in ieee80211_register_hw()
921 (!local->ops->tdls_channel_switch || in ieee80211_register_hw()
922 !local->ops->tdls_cancel_channel_switch || in ieee80211_register_hw()
923 !local->ops->tdls_recv_channel_switch)) in ieee80211_register_hw()
927 !local->ops->set_frag_threshold)) in ieee80211_register_hw()
930 if (WARN_ON(local->hw.wiphy->interface_modes & in ieee80211_register_hw()
932 (!local->ops->start_nan || !local->ops->stop_nan))) in ieee80211_register_hw()
936 if (hw->wiphy->wowlan && (!local->ops->suspend || !local->ops->resume)) in ieee80211_register_hw()
940 if (!local->use_chanctx) { in ieee80211_register_hw()
941 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { in ieee80211_register_hw()
944 comb = &local->hw.wiphy->iface_combinations[i]; in ieee80211_register_hw()
951 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { in ieee80211_register_hw()
954 comb = &local->hw.wiphy->iface_combinations[i]; in ieee80211_register_hw()
969 local->rx_chains = 1; in ieee80211_register_hw()
984 sband = local->hw.wiphy->bands[band]; in ieee80211_register_hw()
1004 if (!local->use_chanctx && !local->_oper_chandef.chan) { in ieee80211_register_hw()
1005 local->hw.conf.chandef = dflt_chandef; in ieee80211_register_hw()
1006 local->_oper_chandef = dflt_chandef; in ieee80211_register_hw()
1008 local->monitor_chandef = dflt_chandef; in ieee80211_register_hw()
1027 if (WARN_ON(local->hw.queues < IEEE80211_NUM_ACS && in ieee80211_register_hw()
1035 local->rx_chains = in ieee80211_register_hw()
1037 local->rx_chains); in ieee80211_register_hw()
1048 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP) && in ieee80211_register_hw()
1049 !ieee80211_hw_check(&local->hw, SW_CRYPTO_CONTROL)) { in ieee80211_register_hw()
1071 local->int_scan_req = kzalloc(sizeof(*local->int_scan_req) + in ieee80211_register_hw()
1073 if (!local->int_scan_req) in ieee80211_register_hw()
1077 if (!local->hw.wiphy->bands[band]) in ieee80211_register_hw()
1079 local->int_scan_req->rates[band] = (u32) -1; in ieee80211_register_hw()
1084 local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT); in ieee80211_register_hw()
1089 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) in ieee80211_register_hw()
1090 local->hw.wiphy->flags |= WIPHY_FLAG_MESH_AUTH; in ieee80211_register_hw()
1093 local->hw.wiphy->flags |= WIPHY_FLAG_CONTROL_PORT_PROTOCOL; in ieee80211_register_hw()
1095 if (ieee80211_hw_check(&local->hw, SIGNAL_DBM)) { in ieee80211_register_hw()
1096 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; in ieee80211_register_hw()
1097 } else if (ieee80211_hw_check(&local->hw, SIGNAL_UNSPEC)) { in ieee80211_register_hw()
1098 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; in ieee80211_register_hw()
1108 if (!local->ops->set_key) { in ieee80211_register_hw()
1109 wiphy_ext_feature_set(local->hw.wiphy, in ieee80211_register_hw()
1111 wiphy_ext_feature_set(local->hw.wiphy, in ieee80211_register_hw()
1115 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_ADHOC)) in ieee80211_register_hw()
1116 wiphy_ext_feature_set(local->hw.wiphy, in ieee80211_register_hw()
1125 local->scan_ies_len = 4 + max_bitrates /* (ext) supp rates */ + in ieee80211_register_hw()
1128 local->scan_ies_len += 2 + sizeof(struct ieee80211_ht_cap); in ieee80211_register_hw()
1131 local->scan_ies_len += in ieee80211_register_hw()
1141 local->scan_ies_len += in ieee80211_register_hw()
1146 if (!local->ops->hw_scan) { in ieee80211_register_hw()
1148 local->hw.wiphy->max_scan_ssids = 4; in ieee80211_register_hw()
1149 local->hw.wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; in ieee80211_register_hw()
1159 if (local->hw.wiphy->max_scan_ie_len) in ieee80211_register_hw()
1160 local->hw.wiphy->max_scan_ie_len -= local->scan_ies_len; in ieee80211_register_hw()
1162 if (WARN_ON(!ieee80211_cs_list_valid(local->hw.cipher_schemes, in ieee80211_register_hw()
1163 local->hw.n_cipher_schemes))) { in ieee80211_register_hw()
1168 result = ieee80211_init_cipher_suites(local); in ieee80211_register_hw()
1172 if (!local->ops->remain_on_channel) in ieee80211_register_hw()
1173 local->hw.wiphy->max_remain_on_channel_duration = 5000; in ieee80211_register_hw()
1176 if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) in ieee80211_register_hw()
1177 local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP; in ieee80211_register_hw()
1180 if (ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA)) in ieee80211_register_hw()
1181 local->ext_capa[0] |= WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING; in ieee80211_register_hw()
1184 if (ieee80211_hw_check(&local->hw, SUPPORTS_MULTI_BSSID)) { in ieee80211_register_hw()
1185 local->hw.wiphy->support_mbssid = true; in ieee80211_register_hw()
1186 if (ieee80211_hw_check(&local->hw, in ieee80211_register_hw()
1188 local->hw.wiphy->support_only_he_mbssid = true; in ieee80211_register_hw()
1190 local->ext_capa[2] |= in ieee80211_register_hw()
1194 local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CNTDWN_COUNTERS_NUM; in ieee80211_register_hw()
1203 local->workqueue = in ieee80211_register_hw()
1204 alloc_ordered_workqueue("%s", 0, wiphy_name(local->hw.wiphy)); in ieee80211_register_hw()
1205 if (!local->workqueue) { in ieee80211_register_hw()
1215 local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, in ieee80211_register_hw()
1222 if (local->hw.max_listen_interval == 0) in ieee80211_register_hw()
1223 local->hw.max_listen_interval = 5; in ieee80211_register_hw()
1225 local->hw.conf.listen_interval = local->hw.max_listen_interval; in ieee80211_register_hw()
1227 local->dynamic_ps_forced_timeout = -1; in ieee80211_register_hw()
1229 if (!local->hw.max_nan_de_entries) in ieee80211_register_hw()
1230 local->hw.max_nan_de_entries = IEEE80211_MAX_NAN_INSTANCE_ID; in ieee80211_register_hw()
1232 if (!local->hw.weight_multiplier) in ieee80211_register_hw()
1233 local->hw.weight_multiplier = 1; in ieee80211_register_hw()
1235 ieee80211_wep_init(local); in ieee80211_register_hw()
1237 local->hw.conf.flags = IEEE80211_CONF_IDLE; in ieee80211_register_hw()
1239 ieee80211_led_init(local); in ieee80211_register_hw()
1241 result = ieee80211_txq_setup_flows(local); in ieee80211_register_hw()
1246 result = ieee80211_init_rate_ctrl_alg(local, in ieee80211_register_hw()
1250 wiphy_debug(local->hw.wiphy, in ieee80211_register_hw()
1255 if (local->rate_ctrl) { in ieee80211_register_hw()
1257 if (local->rate_ctrl->ops->capa & RATE_CTRL_CAPA_VHT_EXT_NSS_BW) in ieee80211_register_hw()
1269 BUILD_BUG_ON(NUM_NL80211_BANDS > 8 * sizeof(local->sband_allocated)); in ieee80211_register_hw()
1276 sband = local->hw.wiphy->bands[band]; in ieee80211_register_hw()
1298 local->hw.wiphy->bands[band] = sband; in ieee80211_register_hw()
1299 local->sband_allocated |= BIT(band); in ieee80211_register_hw()
1302 result = wiphy_register(local->hw.wiphy); in ieee80211_register_hw()
1306 debugfs_hw_add(local); in ieee80211_register_hw()
1307 rate_control_add_debugfs(local); in ieee80211_register_hw()
1313 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION) && in ieee80211_register_hw()
1317 result = ieee80211_if_add(local, "wlan%d", NET_NAME_ENUM, NULL, in ieee80211_register_hw()
1320 wiphy_warn(local->hw.wiphy, in ieee80211_register_hw()
1328 local->ifa_notifier.notifier_call = ieee80211_ifa_changed; in ieee80211_register_hw()
1329 result = register_inetaddr_notifier(&local->ifa_notifier); in ieee80211_register_hw()
1335 local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; in ieee80211_register_hw()
1336 result = register_inet6addr_notifier(&local->ifa6_notifier); in ieee80211_register_hw()
1346 unregister_inetaddr_notifier(&local->ifa_notifier); in ieee80211_register_hw()
1352 wiphy_unregister(local->hw.wiphy); in ieee80211_register_hw()
1355 rate_control_deinitialize(local); in ieee80211_register_hw()
1356 ieee80211_remove_interfaces(local); in ieee80211_register_hw()
1360 ieee80211_led_exit(local); in ieee80211_register_hw()
1361 destroy_workqueue(local->workqueue); in ieee80211_register_hw()
1363 if (local->wiphy_ciphers_allocated) in ieee80211_register_hw()
1364 kfree(local->hw.wiphy->cipher_suites); in ieee80211_register_hw()
1365 kfree(local->int_scan_req); in ieee80211_register_hw()
1372 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_unregister_hw() local
1374 tasklet_kill(&local->tx_pending_tasklet); in ieee80211_unregister_hw()
1375 tasklet_kill(&local->tasklet); in ieee80211_unregister_hw()
1378 unregister_inetaddr_notifier(&local->ifa_notifier); in ieee80211_unregister_hw()
1381 unregister_inet6addr_notifier(&local->ifa6_notifier); in ieee80211_unregister_hw()
1391 ieee80211_remove_interfaces(local); in ieee80211_unregister_hw()
1395 cancel_delayed_work_sync(&local->roc_work); in ieee80211_unregister_hw()
1396 cancel_work_sync(&local->restart_work); in ieee80211_unregister_hw()
1397 cancel_work_sync(&local->reconfig_filter); in ieee80211_unregister_hw()
1398 flush_work(&local->sched_scan_stopped_work); in ieee80211_unregister_hw()
1399 flush_work(&local->radar_detected_work); in ieee80211_unregister_hw()
1401 ieee80211_clear_tx_pending(local); in ieee80211_unregister_hw()
1402 rate_control_deinitialize(local); in ieee80211_unregister_hw()
1404 if (skb_queue_len(&local->skb_queue) || in ieee80211_unregister_hw()
1405 skb_queue_len(&local->skb_queue_unreliable)) in ieee80211_unregister_hw()
1406 wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); in ieee80211_unregister_hw()
1407 skb_queue_purge(&local->skb_queue); in ieee80211_unregister_hw()
1408 skb_queue_purge(&local->skb_queue_unreliable); in ieee80211_unregister_hw()
1410 wiphy_unregister(local->hw.wiphy); in ieee80211_unregister_hw()
1411 destroy_workqueue(local->workqueue); in ieee80211_unregister_hw()
1412 ieee80211_led_exit(local); in ieee80211_unregister_hw()
1413 kfree(local->int_scan_req); in ieee80211_unregister_hw()
1426 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_free_hw() local
1429 mutex_destroy(&local->iflist_mtx); in ieee80211_free_hw()
1430 mutex_destroy(&local->mtx); in ieee80211_free_hw()
1432 if (local->wiphy_ciphers_allocated) in ieee80211_free_hw()
1433 kfree(local->hw.wiphy->cipher_suites); in ieee80211_free_hw()
1435 idr_for_each(&local->ack_status_frames, in ieee80211_free_hw()
1437 idr_destroy(&local->ack_status_frames); in ieee80211_free_hw()
1439 sta_info_stop(local); in ieee80211_free_hw()
1441 ieee80211_free_led_names(local); in ieee80211_free_hw()
1444 if (!(local->sband_allocated & BIT(band))) in ieee80211_free_hw()
1446 kfree(local->hw.wiphy->bands[band]); in ieee80211_free_hw()
1449 wiphy_free(local->hw.wiphy); in ieee80211_free_hw()