|
@@ -3437,10 +3437,13 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
|
|
|
bool is_ap = vif->type == NL80211_IFTYPE_STATION;
|
|
|
u8 sta_id;
|
|
|
|
|
|
- sta_priv->common.sta_id = IWL_INVALID_STATION;
|
|
|
-
|
|
|
IWL_DEBUG_INFO(priv, "received request to add station %pM\n",
|
|
|
sta->addr);
|
|
|
+ mutex_lock(&priv->mutex);
|
|
|
+ IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n",
|
|
|
+ sta->addr);
|
|
|
+ sta_priv->common.sta_id = IWL_INVALID_STATION;
|
|
|
+
|
|
|
|
|
|
ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap,
|
|
|
&sta_id);
|
|
@@ -3448,6 +3451,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
|
|
|
IWL_ERR(priv, "Unable to add station %pM (%d)\n",
|
|
|
sta->addr, ret);
|
|
|
/* Should we return success if return code is EEXIST ? */
|
|
|
+ mutex_unlock(&priv->mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
@@ -3457,6 +3461,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
|
|
|
IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
|
|
|
sta->addr);
|
|
|
iwl3945_rs_rate_init(priv, sta, sta_id);
|
|
|
+ mutex_unlock(&priv->mutex);
|
|
|
|
|
|
return 0;
|
|
|
}
|