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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 1a445711e34a..48fb59bbfbd9 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3378,10 +3378,13 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
3378 struct ieee80211_sta *sta) 3378 struct ieee80211_sta *sta)
3379{ 3379{
3380 struct iwl_priv *priv = hw->priv; 3380 struct iwl_priv *priv = hw->priv;
3381 struct iwl3945_sta_priv *sta_priv = (void *)sta->drv_priv;
3381 int ret; 3382 int ret;
3382 bool is_ap = priv->iw_mode == NL80211_IFTYPE_STATION; 3383 bool is_ap = vif->type == NL80211_IFTYPE_STATION;
3383 u8 sta_id; 3384 u8 sta_id;
3384 3385
3386 sta_priv->common.sta_id = IWL_INVALID_STATION;
3387
3385 IWL_DEBUG_INFO(priv, "received request to add station %pM\n", 3388 IWL_DEBUG_INFO(priv, "received request to add station %pM\n",
3386 sta->addr); 3389 sta->addr);
3387 3390
@@ -3394,16 +3397,14 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
3394 return ret; 3397 return ret;
3395 } 3398 }
3396 3399
3400 sta_priv->common.sta_id = sta_id;
3401
3397 /* Initialize rate scaling */ 3402 /* Initialize rate scaling */
3398 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", 3403 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
3399 sta->addr); 3404 sta->addr);
3400 iwl3945_rs_rate_init(priv, sta, sta_id); 3405 iwl3945_rs_rate_init(priv, sta, sta_id);
3401 3406
3402 return 0; 3407 return 0;
3403
3404
3405
3406 return ret;
3407} 3408}
3408/***************************************************************************** 3409/*****************************************************************************
3409 * 3410 *
@@ -3887,6 +3888,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
3887 3888
3888 hw->rate_control_algorithm = "iwl-3945-rs"; 3889 hw->rate_control_algorithm = "iwl-3945-rs";
3889 hw->sta_data_size = sizeof(struct iwl3945_sta_priv); 3890 hw->sta_data_size = sizeof(struct iwl3945_sta_priv);
3891 hw->vif_data_size = sizeof(struct iwl_vif_priv);
3890 3892
3891 /* Tell mac80211 our characteristics */ 3893 /* Tell mac80211 our characteristics */
3892 hw->flags = IEEE80211_HW_SIGNAL_DBM | 3894 hw->flags = IEEE80211_HW_SIGNAL_DBM |