Lines Matching full:local
41 struct ieee80211_local *local; in wiphy_to_ieee80211_hw() local
44 local = wiphy_priv(wiphy); in wiphy_to_ieee80211_hw()
45 return &local->hw; in wiphy_to_ieee80211_hw()
109 int ieee80211_frame_duration(struct ieee80211_local *local, size_t len, in ieee80211_frame_duration() argument
123 if (local->hw.conf.channel->band == IEEE80211_BAND_5GHZ || erp) { in ieee80211_frame_duration()
168 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_generic_frame_duration() local
182 dur = ieee80211_frame_duration(local, frame_len, rate->bitrate, erp, in ieee80211_generic_frame_duration()
193 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_rts_duration() local
201 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_rts_duration()
216 dur = ieee80211_frame_duration(local, 10, rate->bitrate, in ieee80211_rts_duration()
219 dur += ieee80211_frame_duration(local, frame_len, rate->bitrate, in ieee80211_rts_duration()
222 dur += ieee80211_frame_duration(local, 10, rate->bitrate, in ieee80211_rts_duration()
234 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_ctstoself_duration() local
242 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_ctstoself_duration()
256 dur = ieee80211_frame_duration(local, frame_len, rate->bitrate, in ieee80211_ctstoself_duration()
260 dur += ieee80211_frame_duration(local, 10, rate->bitrate, in ieee80211_ctstoself_duration()
271 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_wake_queue() local
274 trace_wake_queue(local, queue, reason); in __ieee80211_wake_queue()
279 __clear_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_wake_queue()
281 if (local->queue_stop_reasons[queue] != 0) in __ieee80211_wake_queue()
285 if (skb_queue_empty(&local->pending[queue])) { in __ieee80211_wake_queue()
287 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in __ieee80211_wake_queue()
294 tasklet_schedule(&local->tx_pending_tasklet); in __ieee80211_wake_queue()
300 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queue_by_reason() local
303 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
305 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
318 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_stop_queue() local
321 trace_stop_queue(local, queue, reason); in __ieee80211_stop_queue()
326 __set_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_stop_queue()
329 list_for_each_entry_rcu(sdata, &local->interfaces, list) in __ieee80211_stop_queue()
337 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queue_by_reason() local
340 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
342 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
352 void ieee80211_add_pending_skb(struct ieee80211_local *local, in ieee80211_add_pending_skb() argument
355 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skb()
365 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
367 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skb()
369 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
372 void ieee80211_add_pending_skbs_fn(struct ieee80211_local *local, in ieee80211_add_pending_skbs_fn() argument
376 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skbs_fn()
381 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs_fn()
395 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skbs_fn()
404 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs_fn()
407 void ieee80211_add_pending_skbs(struct ieee80211_local *local, in ieee80211_add_pending_skbs() argument
410 ieee80211_add_pending_skbs_fn(local, skbs, NULL, NULL); in ieee80211_add_pending_skbs()
416 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queues_by_reason() local
420 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
425 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
437 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_stopped() local
444 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
445 ret = !!local->queue_stop_reasons[queue]; in ieee80211_queue_stopped()
446 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
454 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queues_by_reason() local
458 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
463 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
478 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces() local
481 mutex_lock(&local->iflist_mtx); in ieee80211_iterate_active_interfaces()
483 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_iterate_active_interfaces()
496 mutex_unlock(&local->iflist_mtx); in ieee80211_iterate_active_interfaces()
506 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces_atomic() local
511 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_iterate_active_interfaces_atomic()
535 static bool ieee80211_can_queue_work(struct ieee80211_local *local) in ieee80211_can_queue_work() argument
537 if (WARN(local->suspended && !local->resuming, in ieee80211_can_queue_work()
546 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_work() local
548 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_work()
551 queue_work(local->workqueue, work); in ieee80211_queue_work()
559 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_delayed_work() local
561 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_delayed_work()
564 queue_delayed_work(local->workqueue, dwork, delay); in ieee80211_queue_delayed_work()
742 struct ieee80211_local *local = sdata->local; in ieee80211_set_wmm_default() local
748 if (!local->ops->conf_tx) in ieee80211_set_wmm_default()
753 use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) && in ieee80211_set_wmm_default()
756 for (queue = 0; queue < local_to_hw(local)->queues; queue++) { in ieee80211_set_wmm_default()
801 drv_conf_tx(local, sdata, queue, &qparam); in ieee80211_set_wmm_default()
818 struct ieee80211_local *local = sdata->local; in ieee80211_sta_def_wmm_params() local
826 if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ && in ieee80211_sta_def_wmm_params()
835 u32 ieee80211_mandatory_rates(struct ieee80211_local *local, in ieee80211_mandatory_rates() argument
844 sband = local->hw.wiphy->bands[band]; in ieee80211_mandatory_rates()
847 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_mandatory_rates()
868 struct ieee80211_local *local = sdata->local; in ieee80211_send_auth() local
873 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_send_auth()
878 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_auth()
895 err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); in ieee80211_send_auth()
903 int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, in ieee80211_build_preq_ies() argument
916 sband = local->hw.wiphy->bands[band]; in ieee80211_build_preq_ies()
988 * that calculates local->scan_ies_len. in ieee80211_build_preq_ies()
1007 struct ieee80211_local *local = sdata->local; in ieee80211_build_probe_req() local
1028 local->hw.conf.channel->center_freq); in ieee80211_build_probe_req()
1030 buf_len = ieee80211_build_preq_ies(local, buf, ie, ie_len, in ieee80211_build_probe_req()
1031 local->hw.conf.channel->band, in ieee80211_build_probe_req()
1034 skb = ieee80211_probereq_get(&local->hw, &sdata->vif, in ieee80211_build_probe_req()
1071 u32 ieee80211_sta_get_rates(struct ieee80211_local *local, in ieee80211_sta_get_rates() argument
1080 sband = local->hw.wiphy->bands[band]; in ieee80211_sta_get_rates()
1084 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_sta_get_rates()
1107 void ieee80211_stop_device(struct ieee80211_local *local) in ieee80211_stop_device() argument
1109 ieee80211_led_radio(local, false); in ieee80211_stop_device()
1110 ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO); in ieee80211_stop_device()
1112 cancel_work_sync(&local->reconfig_filter); in ieee80211_stop_device()
1114 flush_workqueue(local->workqueue); in ieee80211_stop_device()
1115 drv_stop(local); in ieee80211_stop_device()
1118 int ieee80211_reconfig(struct ieee80211_local *local) in ieee80211_reconfig() argument
1120 struct ieee80211_hw *hw = &local->hw; in ieee80211_reconfig()
1126 if (local->suspended) in ieee80211_reconfig()
1127 local->resuming = true; in ieee80211_reconfig()
1129 if (local->wowlan) { in ieee80211_reconfig()
1130 local->wowlan = false; in ieee80211_reconfig()
1131 res = drv_resume(local); in ieee80211_reconfig()
1133 local->resuming = false; in ieee80211_reconfig()
1146 if (!local->open_count) in ieee80211_reconfig()
1155 res = drv_start(local); in ieee80211_reconfig()
1157 WARN(local->suspended, "Hardware became unavailable " in ieee80211_reconfig()
1164 drv_set_frag_threshold(local, hw->wiphy->frag_threshold); in ieee80211_reconfig()
1167 drv_set_rts_threshold(local, hw->wiphy->rts_threshold); in ieee80211_reconfig()
1170 drv_set_coverage_class(local, hw->wiphy->coverage_class); in ieee80211_reconfig()
1172 ieee80211_led_radio(local, true); in ieee80211_reconfig()
1173 ieee80211_mod_tpt_led_trig(local, in ieee80211_reconfig()
1177 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1181 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
1185 mutex_lock(&local->sta_mtx); in ieee80211_reconfig()
1186 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
1194 WARN_ON(drv_sta_add(local, sdata, &sta->sta)); in ieee80211_reconfig()
1197 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig()
1200 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1207 drv_conf_tx(local, sdata, i, &sdata->tx_conf[i]); in ieee80211_reconfig()
1211 ieee80211_hw_config(local, ~0); in ieee80211_reconfig()
1213 ieee80211_configure_filter(local); in ieee80211_reconfig()
1216 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1272 ieee80211_recalc_ps(local, -1); in ieee80211_reconfig()
1285 mutex_lock(&local->sta_mtx); in ieee80211_reconfig()
1287 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
1292 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig()
1296 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_reconfig()
1308 if (!local->suspended) in ieee80211_reconfig()
1313 local->suspended = false; in ieee80211_reconfig()
1315 local->resuming = false; in ieee80211_reconfig()
1317 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1333 mod_timer(&local->sta_cleanup, jiffies + 1); in ieee80211_reconfig()
1335 mutex_lock(&local->sta_mtx); in ieee80211_reconfig()
1336 list_for_each_entry(sta, &local->sta_list, list) in ieee80211_reconfig()
1338 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig()
1348 struct ieee80211_local *local; in ieee80211_resume_disconnect() local
1355 local = sdata->local; in ieee80211_resume_disconnect()
1357 if (WARN_ON(!local->resuming)) in ieee80211_resume_disconnect()
1365 mutex_lock(&local->key_mtx); in ieee80211_resume_disconnect()
1368 mutex_unlock(&local->key_mtx); in ieee80211_resume_disconnect()
1392 void ieee80211_recalc_smps(struct ieee80211_local *local) in ieee80211_recalc_smps() argument
1398 lockdep_assert_held(&local->iflist_mtx); in ieee80211_recalc_smps()
1410 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_recalc_smps()
1424 if (smps_mode == local->smps_mode) in ieee80211_recalc_smps()
1428 local->smps_mode = smps_mode; in ieee80211_recalc_smps()
1430 ieee80211_hw_config(local, 0); in ieee80211_recalc_smps()
1634 struct ieee80211_local *local = sdata->local; in ieee80211_add_srates_ie() local
1639 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_add_srates_ie()
1661 struct ieee80211_local *local = sdata->local; in ieee80211_add_ext_srates_ie() local
1666 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; in ieee80211_add_ext_srates_ie()