Lines Matching refs:local

121 	if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
137 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
317 while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef,
344 struct ieee80211_local *local = sdata->local;
376 sband = local->hw.wiphy->bands[chan->band];
444 rate_control_rate_update(local, sband, sta,
458 rate_control_rate_update(local, sband, sta,
589 struct ieee80211_local *local = sdata->local;
614 sband = local->hw.wiphy->bands[chan->band];
644 skb = alloc_skb(local->hw.extra_tx_headroom +
658 skb_reserve(skb, local->hw.extra_tx_headroom);
663 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE))
665 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE))
673 (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
691 cpu_to_le16(local->hw.conf.listen_interval);
700 cpu_to_le16(local->hw.conf.listen_interval);
857 drv_mgd_prepare_tx(local, sdata);
860 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
866 void ieee80211_send_pspoll(struct ieee80211_local *local,
872 skb = ieee80211_pspoll_get(&local->hw, &sdata->vif);
883 void ieee80211_send_nullfunc(struct ieee80211_local *local,
891 skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif);
902 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
911 static void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
921 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 30);
925 skb_reserve(skb, local->hw.extra_tx_headroom);
946 struct ieee80211_local *local = sdata->local;
954 mutex_lock(&local->mtx);
955 mutex_lock(&local->chanctx_mtx);
984 ieee80211_queue_work(&sdata->local->hw,
996 ieee80211_queue_work(&sdata->local->hw,
1008 ieee80211_wake_vif_queues(local, sdata,
1017 mutex_unlock(&local->chanctx_mtx);
1018 mutex_unlock(&local->mtx);
1031 ieee80211_queue_work(&sdata->local->hw,
1034 ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
1044 ieee80211_queue_work(&sdata->local->hw, &sdata->u.mgd.chswitch_work);
1052 struct ieee80211_local *local = sdata->local;
1066 if (local->scanning)
1079 ieee80211_queue_work(&local->hw,
1084 if (!cfg80211_chandef_usable(local->hw.wiphy, &csa_ie.chandef,
1092 ieee80211_queue_work(&local->hw,
1097 mutex_lock(&local->mtx);
1098 mutex_lock(&local->chanctx_mtx);
1100 lockdep_is_held(&local->chanctx_mtx));
1104 ieee80211_queue_work(&local->hw,
1106 mutex_unlock(&local->chanctx_mtx);
1107 mutex_unlock(&local->mtx);
1113 if (local->use_chanctx) {
1115 list_for_each_entry(chanctx, &local->chanctx_list, list)
1119 !(local->hw.flags & IEEE80211_HW_CHANCTX_STA_CSA)) {
1122 ieee80211_queue_work(&local->hw,
1124 mutex_unlock(&local->chanctx_mtx);
1125 mutex_unlock(&local->mtx);
1136 ieee80211_queue_work(&local->hw,
1138 mutex_unlock(&local->chanctx_mtx);
1139 mutex_unlock(&local->mtx);
1142 mutex_unlock(&local->chanctx_mtx);
1149 ieee80211_stop_vif_queues(local, sdata,
1151 mutex_unlock(&local->mtx);
1153 if (local->ops->channel_switch) {
1162 drv_channel_switch(local, &ch_switch);
1168 ieee80211_queue_work(&local->hw, &ifmgd->chswitch_work);
1306 static void ieee80211_enable_ps(struct ieee80211_local *local,
1309 struct ieee80211_conf *conf = &local->hw.conf;
1315 if (local->scanning)
1319 !(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)) {
1320 mod_timer(&local->dynamic_ps_timer, jiffies +
1323 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
1324 ieee80211_send_nullfunc(local, sdata, 1);
1326 if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
1327 (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS))
1331 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
1335 static void ieee80211_change_ps(struct ieee80211_local *local)
1337 struct ieee80211_conf *conf = &local->hw.conf;
1339 if (local->ps_sdata) {
1340 ieee80211_enable_ps(local, local->ps_sdata);
1343 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
1344 del_timer_sync(&local->dynamic_ps_timer);
1345 cancel_work_sync(&local->dynamic_ps_enable_work);
1380 void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
1386 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) {
1387 local->ps_sdata = NULL;
1391 list_for_each_entry(sdata, &local->interfaces, list) {
1417 timeout = local->dynamic_ps_forced_timeout;
1432 local->hw.conf.dynamic_ps_timeout = timeout;
1435 local->ps_sdata = NULL;
1447 local->hw.conf.max_sleep_period = maxslp;
1448 local->hw.conf.ps_dtim_period = dtimper;
1449 local->ps_sdata = found;
1452 local->ps_sdata = NULL;
1455 ieee80211_change_ps(local);
1470 struct ieee80211_local *local =
1474 if (local->hw.conf.flags & IEEE80211_CONF_PS) {
1475 local->hw.conf.flags &= ~IEEE80211_CONF_PS;
1476 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
1479 ieee80211_wake_queues_by_reason(&local->hw,
1487 struct ieee80211_local *local =
1490 struct ieee80211_sub_if_data *sdata = local->ps_sdata;
1501 if (local->hw.conf.flags & IEEE80211_CONF_PS)
1504 if (local->hw.conf.dynamic_ps_timeout > 0) {
1506 if (drv_tx_frames_pending(local)) {
1507 mod_timer(&local->dynamic_ps_timer, jiffies +
1509 local->hw.conf.dynamic_ps_timeout));
1518 spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
1519 for (q = 0; q < local->hw.queues; q++) {
1520 if (local->queue_stop_reasons[q]) {
1521 spin_unlock_irqrestore(&local->queue_stop_reason_lock,
1523 mod_timer(&local->dynamic_ps_timer, jiffies +
1525 local->hw.conf.dynamic_ps_timeout));
1529 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
1532 if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
1534 if (drv_tx_frames_pending(local)) {
1535 mod_timer(&local->dynamic_ps_timer, jiffies +
1537 local->hw.conf.dynamic_ps_timeout));
1539 ieee80211_send_nullfunc(local, sdata, 1);
1541 ieee80211_flush_queues(local, sdata);
1545 if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
1546 (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) ||
1549 local->hw.conf.flags |= IEEE80211_CONF_PS;
1550 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
1556 struct ieee80211_local *local = (void *) data;
1558 if (local->quiescing || local->suspended)
1561 ieee80211_queue_work(&local->hw, &local->dynamic_ps_enable_work);
1573 mutex_lock(&sdata->local->mtx);
1580 mutex_unlock(&sdata->local->mtx);
1584 static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
1595 if (!local->ops->conf_tx)
1598 if (local->hw.queues < IEEE80211_NUM_ACS)
1672 if (drv_conf_tx(local, sdata, queue, &params))
1685 lockdep_assert_held(&sdata->local->mtx);
1688 ieee80211_run_deferred_scan(sdata->local);
1693 mutex_lock(&sdata->local->mtx);
1695 mutex_unlock(&sdata->local->mtx);
1742 struct ieee80211_local *local = sdata->local;
1782 ieee80211_led_assoc(local, 1);
1812 mutex_lock(&local->iflist_mtx);
1813 ieee80211_recalc_ps(local, -1);
1814 mutex_unlock(&local->iflist_mtx);
1827 struct ieee80211_local *local = sdata->local;
1848 if (local->hw.conf.flags & IEEE80211_CONF_PS) {
1849 local->hw.conf.flags &= ~IEEE80211_CONF_PS;
1850 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
1852 local->ps_sdata = NULL;
1859 ieee80211_flush_queues(local, sdata);
1868 ieee80211_flush_queues(local, sdata);
1879 ieee80211_led_assoc(local, 0);
1895 del_timer_sync(&local->dynamic_ps_timer);
1896 cancel_work_sync(&local->dynamic_ps_enable_work);
1923 mutex_lock(&local->mtx);
1928 ieee80211_wake_vif_queues(local, sdata,
1932 mutex_unlock(&local->mtx);
1957 struct ieee80211_local *local = sdata->local;
1959 mutex_lock(&local->mtx);
1965 mutex_lock(&local->iflist_mtx);
1966 ieee80211_recalc_ps(local, -1);
1967 mutex_unlock(&local->iflist_mtx);
1969 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
1983 mutex_unlock(&local->mtx);
1998 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
2030 if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
2032 ieee80211_send_nullfunc(sdata->local, sdata, 0);
2051 if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
2052 ieee80211_flush_queues(sdata->local, sdata);
2069 mutex_lock(&sdata->local->mtx);
2071 if (sdata->local->tmp_channel || sdata->local->scanning) {
2072 mutex_unlock(&sdata->local->mtx);
2102 mutex_unlock(&sdata->local->mtx);
2107 mutex_lock(&sdata->local->iflist_mtx);
2108 ieee80211_recalc_ps(sdata->local, -1);
2109 mutex_unlock(&sdata->local->iflist_mtx);
2160 struct ieee80211_local *local = sdata->local;
2173 mutex_lock(&local->mtx);
2176 ieee80211_wake_vif_queues(local, sdata,
2180 mutex_unlock(&local->mtx);
2224 struct ieee80211_hw *hw = &sdata->local->hw;
2236 struct ieee80211_hw *hw = &sdata->local->hw;
2259 mutex_lock(&sdata->local->mtx);
2261 mutex_unlock(&sdata->local->mtx);
2264 cfg80211_put_bss(sdata->local->hw.wiphy, auth_data->bss);
2272 struct ieee80211_local *local = sdata->local;
2283 drv_mgd_prepare_tx(sdata->local, sdata);
2284 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
2372 mutex_lock(&sdata->local->sta_mtx);
2382 mutex_unlock(&sdata->local->sta_mtx);
2387 mutex_unlock(&sdata->local->sta_mtx);
2566 mutex_lock(&sdata->local->mtx);
2568 mutex_unlock(&sdata->local->mtx);
2580 struct ieee80211_local *local = sdata->local;
2705 mutex_lock(&sdata->local->sta_mtx);
2712 mutex_unlock(&sdata->local->sta_mtx);
2717 sband = local->hw.wiphy->bands[ieee80211_get_sdata_band(sdata)];
2765 mutex_unlock(&sdata->local->sta_mtx);
2770 mutex_unlock(&sdata->local->sta_mtx);
2781 ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
2798 ieee80211_send_4addr_nullfunc(local, sdata);
2907 struct ieee80211_local *local = sdata->local;
2913 channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq);
2917 bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems,
2921 ieee80211_rx_bss_put(local, bss);
2997 struct ieee80211_local *local = sdata->local;
3041 if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) {
3092 drv_rssi_callback(local, sdata, RSSI_EVENT_HIGH);
3097 drv_rssi_callback(local, sdata, RSSI_EVENT_LOW);
3142 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
3147 if (local->hw.conf.dynamic_ps_timeout > 0) {
3148 if (local->hw.conf.flags & IEEE80211_CONF_PS) {
3149 local->hw.conf.flags &= ~IEEE80211_CONF_PS;
3150 ieee80211_hw_config(local,
3153 ieee80211_send_nullfunc(local, sdata, 0);
3154 } else if (!local->pspolling && sdata->u.mgd.powersave) {
3155 local->pspolling = true;
3165 ieee80211_send_pspoll(local, sdata);
3210 ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
3225 if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) {
3240 mutex_lock(&local->iflist_mtx);
3241 ieee80211_recalc_ps(local, -1);
3242 mutex_unlock(&local->iflist_mtx);
3257 mutex_lock(&local->sta_mtx);
3263 mutex_unlock(&local->sta_mtx);
3275 mutex_unlock(&local->sta_mtx);
3373 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
3390 struct ieee80211_local *local = sdata->local;
3410 cfg80211_unlink_bss(local->hw.wiphy, auth_data->bss);
3415 drv_mgd_prepare_tx(local, sdata);
3433 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
3482 struct ieee80211_local *local = sdata->local;
3495 cfg80211_unlink_bss(local->hw.wiphy, assoc_data->bss);
3505 if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) {
3523 struct ieee80211_local *local = sdata->local;
3529 ieee80211_queue_work(&local->hw, &sdata->work);
3534 struct ieee80211_local *local = sdata->local;
3607 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
3632 else if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
3649 wiphy_debug(local->hw.wiphy,
3667 struct ieee80211_local *local = sdata->local;
3669 if (local->quiescing)
3676 ieee80211_queue_work(&sdata->local->hw,
3685 struct ieee80211_local *local = sdata->local;
3687 if (local->quiescing)
3693 ieee80211_queue_work(&local->hw, &ifmgd->monitor_work);
3713 flags = sdata->local->hw.flags;
3715 ieee80211_queue_work(&sdata->local->hw,
3718 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
3805 ifmgd->uapsd_queues = sdata->local->hw.uapsd_queues;
3806 ifmgd->uapsd_max_sp_len = sdata->local->hw.uapsd_max_sp_len;
3809 if (sdata->local->hw.wiphy->features & NL80211_FEATURE_DYNAMIC_SMPS)
3816 void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
3822 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
3833 struct ieee80211_local *local =
3837 mutex_lock(&local->iflist_mtx);
3838 ieee80211_recalc_ps(local, latency_usec);
3839 mutex_unlock(&local->iflist_mtx);
3891 struct ieee80211_local *local = sdata->local;
3900 sband = local->hw.wiphy->bands[cbss->channel->band];
3955 local->rx_chains);
3962 mutex_lock(&local->mtx);
3982 mutex_unlock(&local->mtx);
3989 struct ieee80211_local *local = sdata->local;
4020 sband = local->hw.wiphy->bands[cbss->channel->band];
4024 sta_info_free(local, new_sta);
4033 sta_info_free(local, new_sta);
4088 } else if (!(local->hw.flags &
4129 struct ieee80211_local *local = sdata->local;
4142 if (IS_ERR(local->wep_tx_tfm))
4227 cfg80211_ref_bss(local->hw.wiphy, auth_data->bss);
4280 struct ieee80211_local *local = sdata->local;
4338 (local->hw.queues >= IEEE80211_NUM_ACS);
4400 sband = local->hw.wiphy->bands[req->bss->channel->band];
4402 local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used ||
4413 local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used ||
4465 (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) {
4496 sdata->encrypt_headroom = ieee80211_cs_headroom(local, &req->crypto,
4512 if (sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC &&
4539 if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) {
4587 "aborting authentication with %pM by local choice (Reason: %u=%s)\n",
4591 drv_mgd_prepare_tx(sdata->local, sdata);
4606 "deauthenticating from %pM by local choice (Reason: %u=%s)\n",
4637 "disassociating from %pM by local choice (Reason: %u=%s)\n",