aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-30 14:30:43 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 18:09:04 -0400
commitfd1af15d0a82ae681ecf34192150e27455c9c494 (patch)
tree828b4532c5aa2df1859f461e828fd8b4606ec43c /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent4ff739747de20506e478269221f22f3d8d24c706 (diff)
iwlwifi: track station IDs
mac80211 allows us to store private data per station, so put the station ID there. This allows us to avoid the station ID lookup when removing regular stations. To also be able to avoid the lookup to remove the special IBSS BSSID station, track its ID in the per-vif private data. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
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 |