diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index c7a73c68bdab..b6d2683da3a9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -526,7 +526,8 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw, | |||
526 | } | 526 | } |
527 | 527 | ||
528 | if (IEEE80211_SKB_CB(skb)->hw_queue == IWL_MVM_OFFCHANNEL_QUEUE && | 528 | if (IEEE80211_SKB_CB(skb)->hw_queue == IWL_MVM_OFFCHANNEL_QUEUE && |
529 | !test_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status)) | 529 | !test_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status) && |
530 | !test_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status)) | ||
530 | goto drop; | 531 | goto drop; |
531 | 532 | ||
532 | /* treat non-bufferable MMPDUs as broadcast if sta is sleeping */ | 533 | /* treat non-bufferable MMPDUs as broadcast if sta is sleeping */ |
@@ -787,6 +788,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) | |||
787 | 788 | ||
788 | mvm->scan_status = IWL_MVM_SCAN_NONE; | 789 | mvm->scan_status = IWL_MVM_SCAN_NONE; |
789 | mvm->ps_disabled = false; | 790 | mvm->ps_disabled = false; |
791 | mvm->calibrating = false; | ||
790 | 792 | ||
791 | /* just in case one was running */ | 793 | /* just in case one was running */ |
792 | ieee80211_remain_on_channel_expired(mvm->hw); | 794 | ieee80211_remain_on_channel_expired(mvm->hw); |
@@ -1734,6 +1736,13 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm, | |||
1734 | if (changes & BSS_CHANGED_BEACON && | 1736 | if (changes & BSS_CHANGED_BEACON && |
1735 | iwl_mvm_mac_ctxt_beacon_changed(mvm, vif)) | 1737 | iwl_mvm_mac_ctxt_beacon_changed(mvm, vif)) |
1736 | IWL_WARN(mvm, "Failed updating beacon data\n"); | 1738 | IWL_WARN(mvm, "Failed updating beacon data\n"); |
1739 | |||
1740 | if (changes & BSS_CHANGED_TXPOWER) { | ||
1741 | IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d\n", | ||
1742 | bss_conf->txpower); | ||
1743 | iwl_mvm_set_tx_power(mvm, vif, bss_conf->txpower); | ||
1744 | } | ||
1745 | |||
1737 | } | 1746 | } |
1738 | 1747 | ||
1739 | static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw, | 1748 | static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw, |
@@ -2367,14 +2376,19 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm, | |||
2367 | /* Set the node address */ | 2376 | /* Set the node address */ |
2368 | memcpy(aux_roc_req.node_addr, vif->addr, ETH_ALEN); | 2377 | memcpy(aux_roc_req.node_addr, vif->addr, ETH_ALEN); |
2369 | 2378 | ||
2379 | lockdep_assert_held(&mvm->mutex); | ||
2380 | |||
2381 | spin_lock_bh(&mvm->time_event_lock); | ||
2382 | |||
2383 | if (WARN_ON(te_data->id == HOT_SPOT_CMD)) { | ||
2384 | spin_unlock_bh(&mvm->time_event_lock); | ||
2385 | return -EIO; | ||
2386 | } | ||
2387 | |||
2370 | te_data->vif = vif; | 2388 | te_data->vif = vif; |
2371 | te_data->duration = duration; | 2389 | te_data->duration = duration; |
2372 | te_data->id = HOT_SPOT_CMD; | 2390 | te_data->id = HOT_SPOT_CMD; |
2373 | 2391 | ||
2374 | lockdep_assert_held(&mvm->mutex); | ||
2375 | |||
2376 | spin_lock_bh(&mvm->time_event_lock); | ||
2377 | list_add_tail(&te_data->list, &mvm->time_event_list); | ||
2378 | spin_unlock_bh(&mvm->time_event_lock); | 2392 | spin_unlock_bh(&mvm->time_event_lock); |
2379 | 2393 | ||
2380 | /* | 2394 | /* |
@@ -2430,22 +2444,29 @@ static int iwl_mvm_roc(struct ieee80211_hw *hw, | |||
2430 | IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value, | 2444 | IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value, |
2431 | duration, type); | 2445 | duration, type); |
2432 | 2446 | ||
2447 | mutex_lock(&mvm->mutex); | ||
2448 | |||
2433 | switch (vif->type) { | 2449 | switch (vif->type) { |
2434 | case NL80211_IFTYPE_STATION: | 2450 | case NL80211_IFTYPE_STATION: |
2435 | /* Use aux roc framework (HS20) */ | 2451 | if (mvm->fw->ucode_capa.capa[0] & |
2436 | ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, | 2452 | IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT) { |
2437 | vif, duration); | 2453 | /* Use aux roc framework (HS20) */ |
2438 | return ret; | 2454 | ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, |
2455 | vif, duration); | ||
2456 | goto out_unlock; | ||
2457 | } | ||
2458 | IWL_ERR(mvm, "hotspot not supported\n"); | ||
2459 | ret = -EINVAL; | ||
2460 | goto out_unlock; | ||
2439 | case NL80211_IFTYPE_P2P_DEVICE: | 2461 | case NL80211_IFTYPE_P2P_DEVICE: |
2440 | /* handle below */ | 2462 | /* handle below */ |
2441 | break; | 2463 | break; |
2442 | default: | 2464 | default: |
2443 | IWL_ERR(mvm, "vif isn't P2P_DEVICE: %d\n", vif->type); | 2465 | IWL_ERR(mvm, "vif isn't P2P_DEVICE: %d\n", vif->type); |
2444 | return -EINVAL; | 2466 | ret = -EINVAL; |
2467 | goto out_unlock; | ||
2445 | } | 2468 | } |
2446 | 2469 | ||
2447 | mutex_lock(&mvm->mutex); | ||
2448 | |||
2449 | for (i = 0; i < NUM_PHY_CTX; i++) { | 2470 | for (i = 0; i < NUM_PHY_CTX; i++) { |
2450 | phy_ctxt = &mvm->phy_ctxts[i]; | 2471 | phy_ctxt = &mvm->phy_ctxts[i]; |
2451 | if (phy_ctxt->ref == 0 || mvmvif->phy_ctxt == phy_ctxt) | 2472 | if (phy_ctxt->ref == 0 || mvmvif->phy_ctxt == phy_ctxt) |