diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 9 |
3 files changed, 17 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7726e67044c0..24aff654fa9c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3391,10 +3391,12 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3391 | int ret; | 3391 | int ret; |
3392 | u8 sta_id; | 3392 | u8 sta_id; |
3393 | 3393 | ||
3394 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3395 | |||
3396 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", | 3394 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", |
3397 | sta->addr); | 3395 | sta->addr); |
3396 | mutex_lock(&priv->mutex); | ||
3397 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", | ||
3398 | sta->addr); | ||
3399 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3398 | 3400 | ||
3399 | atomic_set(&sta_priv->pending_frames, 0); | 3401 | atomic_set(&sta_priv->pending_frames, 0); |
3400 | if (vif->type == NL80211_IFTYPE_AP) | 3402 | if (vif->type == NL80211_IFTYPE_AP) |
@@ -3406,6 +3408,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3406 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", | 3408 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", |
3407 | sta->addr, ret); | 3409 | sta->addr, ret); |
3408 | /* Should we return success if return code is EEXIST ? */ | 3410 | /* Should we return success if return code is EEXIST ? */ |
3411 | mutex_unlock(&priv->mutex); | ||
3409 | return ret; | 3412 | return ret; |
3410 | } | 3413 | } |
3411 | 3414 | ||
@@ -3415,6 +3418,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3415 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 3418 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
3416 | sta->addr); | 3419 | sta->addr); |
3417 | iwl_rs_rate_init(priv, sta, sta_id); | 3420 | iwl_rs_rate_init(priv, sta, sta_id); |
3421 | mutex_unlock(&priv->mutex); | ||
3418 | 3422 | ||
3419 | return 0; | 3423 | return 0; |
3420 | } | 3424 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 83a26361a9b5..c27c13fbb1ae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -1373,10 +1373,14 @@ int iwl_mac_sta_remove(struct ieee80211_hw *hw, | |||
1373 | 1373 | ||
1374 | IWL_DEBUG_INFO(priv, "received request to remove station %pM\n", | 1374 | IWL_DEBUG_INFO(priv, "received request to remove station %pM\n", |
1375 | sta->addr); | 1375 | sta->addr); |
1376 | mutex_lock(&priv->mutex); | ||
1377 | IWL_DEBUG_INFO(priv, "proceeding to remove station %pM\n", | ||
1378 | sta->addr); | ||
1376 | ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr); | 1379 | ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr); |
1377 | if (ret) | 1380 | if (ret) |
1378 | IWL_ERR(priv, "Error removing station %pM\n", | 1381 | IWL_ERR(priv, "Error removing station %pM\n", |
1379 | sta->addr); | 1382 | sta->addr); |
1383 | mutex_unlock(&priv->mutex); | ||
1380 | return ret; | 1384 | return ret; |
1381 | } | 1385 | } |
1382 | EXPORT_SYMBOL(iwl_mac_sta_remove); | 1386 | EXPORT_SYMBOL(iwl_mac_sta_remove); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 6c353cacc8d6..a27872de4106 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3437,10 +3437,13 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3437 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; | 3437 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; |
3438 | u8 sta_id; | 3438 | u8 sta_id; |
3439 | 3439 | ||
3440 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3441 | |||
3442 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", | 3440 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", |
3443 | sta->addr); | 3441 | sta->addr); |
3442 | mutex_lock(&priv->mutex); | ||
3443 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", | ||
3444 | sta->addr); | ||
3445 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3446 | |||
3444 | 3447 | ||
3445 | ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap, | 3448 | ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap, |
3446 | &sta_id); | 3449 | &sta_id); |
@@ -3448,6 +3451,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3448 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", | 3451 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", |
3449 | sta->addr, ret); | 3452 | sta->addr, ret); |
3450 | /* Should we return success if return code is EEXIST ? */ | 3453 | /* Should we return success if return code is EEXIST ? */ |
3454 | mutex_unlock(&priv->mutex); | ||
3451 | return ret; | 3455 | return ret; |
3452 | } | 3456 | } |
3453 | 3457 | ||
@@ -3457,6 +3461,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3457 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 3461 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
3458 | sta->addr); | 3462 | sta->addr); |
3459 | iwl3945_rs_rate_init(priv, sta, sta_id); | 3463 | iwl3945_rs_rate_init(priv, sta, sta_id); |
3464 | mutex_unlock(&priv->mutex); | ||
3460 | 3465 | ||
3461 | return 0; | 3466 | return 0; |
3462 | } | 3467 | } |