aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index eb71a8c021ac..697fa6caaceb 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3363,10 +3363,13 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
3363 bool is_ap = vif->type == NL80211_IFTYPE_STATION; 3363 bool is_ap = vif->type == NL80211_IFTYPE_STATION;
3364 u8 sta_id; 3364 u8 sta_id;
3365 3365
3366 sta_priv->common.sta_id = IWL_INVALID_STATION;
3367
3368 IWL_DEBUG_INFO(priv, "received request to add station %pM\n", 3366 IWL_DEBUG_INFO(priv, "received request to add station %pM\n",
3369 sta->addr); 3367 sta->addr);
3368 mutex_lock(&priv->mutex);
3369 IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n",
3370 sta->addr);
3371 sta_priv->common.sta_id = IWL_INVALID_STATION;
3372
3370 3373
3371 ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap, 3374 ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap,
3372 &sta_id); 3375 &sta_id);
@@ -3374,6 +3377,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
3374 IWL_ERR(priv, "Unable to add station %pM (%d)\n", 3377 IWL_ERR(priv, "Unable to add station %pM (%d)\n",
3375 sta->addr, ret); 3378 sta->addr, ret);
3376 /* Should we return success if return code is EEXIST ? */ 3379 /* Should we return success if return code is EEXIST ? */
3380 mutex_unlock(&priv->mutex);
3377 return ret; 3381 return ret;
3378 } 3382 }
3379 3383
@@ -3383,6 +3387,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
3383 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", 3387 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
3384 sta->addr); 3388 sta->addr);
3385 iwl3945_rs_rate_init(priv, sta, sta_id); 3389 iwl3945_rs_rate_init(priv, sta, sta_id);
3390 mutex_unlock(&priv->mutex);
3386 3391
3387 return 0; 3392 return 0;
3388} 3393}