diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f00484ea1b21..dccb230dd528 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1855,6 +1855,7 @@ static void iwlagn_mac_set_rekey_data(struct ieee80211_hw *hw, | |||
1855 | if (iwlagn_mod_params.sw_crypto) | 1855 | if (iwlagn_mod_params.sw_crypto) |
1856 | return; | 1856 | return; |
1857 | 1857 | ||
1858 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
1858 | mutex_lock(&priv->shrd->mutex); | 1859 | mutex_lock(&priv->shrd->mutex); |
1859 | 1860 | ||
1860 | if (priv->contexts[IWL_RXON_CTX_BSS].vif != vif) | 1861 | if (priv->contexts[IWL_RXON_CTX_BSS].vif != vif) |
@@ -1867,6 +1868,7 @@ static void iwlagn_mac_set_rekey_data(struct ieee80211_hw *hw, | |||
1867 | 1868 | ||
1868 | out: | 1869 | out: |
1869 | mutex_unlock(&priv->shrd->mutex); | 1870 | mutex_unlock(&priv->shrd->mutex); |
1871 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
1870 | } | 1872 | } |
1871 | 1873 | ||
1872 | struct wowlan_key_data { | 1874 | struct wowlan_key_data { |
@@ -2034,6 +2036,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw, | |||
2034 | if (WARN_ON(!wowlan)) | 2036 | if (WARN_ON(!wowlan)) |
2035 | return -EINVAL; | 2037 | return -EINVAL; |
2036 | 2038 | ||
2039 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2037 | mutex_lock(&priv->shrd->mutex); | 2040 | mutex_lock(&priv->shrd->mutex); |
2038 | 2041 | ||
2039 | /* Don't attempt WoWLAN when not associated, tear down instead. */ | 2042 | /* Don't attempt WoWLAN when not associated, tear down instead. */ |
@@ -2203,6 +2206,8 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw, | |||
2203 | out: | 2206 | out: |
2204 | mutex_unlock(&priv->shrd->mutex); | 2207 | mutex_unlock(&priv->shrd->mutex); |
2205 | kfree(key_data.rsc_tsc); | 2208 | kfree(key_data.rsc_tsc); |
2209 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2210 | |||
2206 | return ret; | 2211 | return ret; |
2207 | } | 2212 | } |
2208 | 2213 | ||
@@ -2215,6 +2220,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
2215 | u32 base, status = 0xffffffff; | 2220 | u32 base, status = 0xffffffff; |
2216 | int ret = -EIO; | 2221 | int ret = -EIO; |
2217 | 2222 | ||
2223 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2218 | mutex_lock(&priv->shrd->mutex); | 2224 | mutex_lock(&priv->shrd->mutex); |
2219 | 2225 | ||
2220 | iwl_write32(bus(priv), CSR_UCODE_DRV_GP1_CLR, | 2226 | iwl_write32(bus(priv), CSR_UCODE_DRV_GP1_CLR, |
@@ -2260,6 +2266,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
2260 | iwlagn_set_rxon_chain(priv, ctx); | 2266 | iwlagn_set_rxon_chain(priv, ctx); |
2261 | 2267 | ||
2262 | mutex_unlock(&priv->shrd->mutex); | 2268 | mutex_unlock(&priv->shrd->mutex); |
2269 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2263 | 2270 | ||
2264 | ieee80211_resume_disconnect(vif); | 2271 | ieee80211_resume_disconnect(vif); |
2265 | 2272 | ||
@@ -2402,6 +2409,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2402 | if (!(priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE)) | 2409 | if (!(priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE)) |
2403 | return -EACCES; | 2410 | return -EACCES; |
2404 | 2411 | ||
2412 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2405 | mutex_lock(&priv->shrd->mutex); | 2413 | mutex_lock(&priv->shrd->mutex); |
2406 | 2414 | ||
2407 | switch (action) { | 2415 | switch (action) { |
@@ -2492,7 +2500,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2492 | break; | 2500 | break; |
2493 | } | 2501 | } |
2494 | mutex_unlock(&priv->shrd->mutex); | 2502 | mutex_unlock(&priv->shrd->mutex); |
2495 | 2503 | IWL_DEBUG_MAC80211(priv, "leave\n"); | |
2496 | return ret; | 2504 | return ret; |
2497 | } | 2505 | } |
2498 | 2506 | ||
@@ -2504,10 +2512,10 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
2504 | struct iwl_station_priv *sta_priv = (void *)sta->drv_priv; | 2512 | struct iwl_station_priv *sta_priv = (void *)sta->drv_priv; |
2505 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 2513 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
2506 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; | 2514 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; |
2507 | int ret; | 2515 | int ret = 0; |
2508 | u8 sta_id; | 2516 | u8 sta_id; |
2509 | 2517 | ||
2510 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", | 2518 | IWL_DEBUG_MAC80211(priv, "received request to add station %pM\n", |
2511 | sta->addr); | 2519 | sta->addr); |
2512 | mutex_lock(&priv->shrd->mutex); | 2520 | mutex_lock(&priv->shrd->mutex); |
2513 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", | 2521 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", |
@@ -2524,8 +2532,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
2524 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", | 2532 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", |
2525 | sta->addr, ret); | 2533 | sta->addr, ret); |
2526 | /* Should we return success if return code is EEXIST ? */ | 2534 | /* Should we return success if return code is EEXIST ? */ |
2527 | mutex_unlock(&priv->shrd->mutex); | 2535 | goto out; |
2528 | return ret; | ||
2529 | } | 2536 | } |
2530 | 2537 | ||
2531 | sta_priv->sta_id = sta_id; | 2538 | sta_priv->sta_id = sta_id; |
@@ -2534,9 +2541,11 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
2534 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 2541 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
2535 | sta->addr); | 2542 | sta->addr); |
2536 | iwl_rs_rate_init(priv, sta, sta_id); | 2543 | iwl_rs_rate_init(priv, sta, sta_id); |
2544 | out: | ||
2537 | mutex_unlock(&priv->shrd->mutex); | 2545 | mutex_unlock(&priv->shrd->mutex); |
2546 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2538 | 2547 | ||
2539 | return 0; | 2548 | return ret; |
2540 | } | 2549 | } |
2541 | 2550 | ||
2542 | static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | 2551 | static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, |
@@ -2767,6 +2776,7 @@ static int iwl_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
2767 | if (!(ctx->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT))) | 2776 | if (!(ctx->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT))) |
2768 | return -EOPNOTSUPP; | 2777 | return -EOPNOTSUPP; |
2769 | 2778 | ||
2779 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2770 | mutex_lock(&priv->shrd->mutex); | 2780 | mutex_lock(&priv->shrd->mutex); |
2771 | 2781 | ||
2772 | if (test_bit(STATUS_SCAN_HW, &priv->shrd->status)) { | 2782 | if (test_bit(STATUS_SCAN_HW, &priv->shrd->status)) { |
@@ -2810,6 +2820,7 @@ static int iwl_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
2810 | 2820 | ||
2811 | out: | 2821 | out: |
2812 | mutex_unlock(&priv->shrd->mutex); | 2822 | mutex_unlock(&priv->shrd->mutex); |
2823 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2813 | 2824 | ||
2814 | return err; | 2825 | return err; |
2815 | } | 2826 | } |
@@ -2821,10 +2832,12 @@ static int iwl_mac_cancel_remain_on_channel(struct ieee80211_hw *hw) | |||
2821 | if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN))) | 2832 | if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN))) |
2822 | return -EOPNOTSUPP; | 2833 | return -EOPNOTSUPP; |
2823 | 2834 | ||
2835 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2824 | mutex_lock(&priv->shrd->mutex); | 2836 | mutex_lock(&priv->shrd->mutex); |
2825 | iwl_scan_cancel_timeout(priv, priv->hw_roc_duration); | 2837 | iwl_scan_cancel_timeout(priv, priv->hw_roc_duration); |
2826 | iwlagn_disable_roc(priv); | 2838 | iwlagn_disable_roc(priv); |
2827 | mutex_unlock(&priv->shrd->mutex); | 2839 | mutex_unlock(&priv->shrd->mutex); |
2840 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2828 | 2841 | ||
2829 | return 0; | 2842 | return 0; |
2830 | } | 2843 | } |
@@ -2838,6 +2851,7 @@ static int iwl_mac_tx_sync(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2838 | int ret; | 2851 | int ret; |
2839 | u8 sta_id; | 2852 | u8 sta_id; |
2840 | 2853 | ||
2854 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2841 | mutex_lock(&priv->shrd->mutex); | 2855 | mutex_lock(&priv->shrd->mutex); |
2842 | 2856 | ||
2843 | if (iwl_is_associated_ctx(ctx)) { | 2857 | if (iwl_is_associated_ctx(ctx)) { |
@@ -2871,6 +2885,8 @@ static int iwl_mac_tx_sync(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2871 | iwl_remove_station(priv, sta_id, bssid); | 2885 | iwl_remove_station(priv, sta_id, bssid); |
2872 | out: | 2886 | out: |
2873 | mutex_unlock(&priv->shrd->mutex); | 2887 | mutex_unlock(&priv->shrd->mutex); |
2888 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2889 | |||
2874 | return ret; | 2890 | return ret; |
2875 | } | 2891 | } |
2876 | 2892 | ||
@@ -2883,6 +2899,7 @@ static void iwl_mac_finish_tx_sync(struct ieee80211_hw *hw, | |||
2883 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 2899 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
2884 | struct iwl_rxon_context *ctx = vif_priv->ctx; | 2900 | struct iwl_rxon_context *ctx = vif_priv->ctx; |
2885 | 2901 | ||
2902 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2886 | mutex_lock(&priv->shrd->mutex); | 2903 | mutex_lock(&priv->shrd->mutex); |
2887 | 2904 | ||
2888 | if (iwl_is_associated_ctx(ctx)) | 2905 | if (iwl_is_associated_ctx(ctx)) |
@@ -2893,6 +2910,7 @@ static void iwl_mac_finish_tx_sync(struct ieee80211_hw *hw, | |||
2893 | /* no need to commit */ | 2910 | /* no need to commit */ |
2894 | out: | 2911 | out: |
2895 | mutex_unlock(&priv->shrd->mutex); | 2912 | mutex_unlock(&priv->shrd->mutex); |
2913 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2896 | } | 2914 | } |
2897 | 2915 | ||
2898 | /***************************************************************************** | 2916 | /***************************************************************************** |
@@ -3054,6 +3072,7 @@ static void iwl_mac_rssi_callback(struct ieee80211_hw *hw, | |||
3054 | { | 3072 | { |
3055 | struct iwl_priv *priv = hw->priv; | 3073 | struct iwl_priv *priv = hw->priv; |
3056 | 3074 | ||
3075 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
3057 | mutex_lock(&priv->shrd->mutex); | 3076 | mutex_lock(&priv->shrd->mutex); |
3058 | 3077 | ||
3059 | if (priv->cfg->bt_params && | 3078 | if (priv->cfg->bt_params && |
@@ -3070,6 +3089,7 @@ static void iwl_mac_rssi_callback(struct ieee80211_hw *hw, | |||
3070 | } | 3089 | } |
3071 | 3090 | ||
3072 | mutex_unlock(&priv->shrd->mutex); | 3091 | mutex_unlock(&priv->shrd->mutex); |
3092 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
3073 | } | 3093 | } |
3074 | 3094 | ||
3075 | static int iwl_mac_set_tim(struct ieee80211_hw *hw, | 3095 | static int iwl_mac_set_tim(struct ieee80211_hw *hw, |