summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-30 11:30:43 -0700
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 15:09:04 -0700
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,
struct ieee80211_sta *sta)
{
struct iwl_priv *priv = hw->priv;
+ struct iwl3945_sta_priv *sta_priv = (void *)sta->drv_priv;
int ret;
- bool is_ap = priv->iw_mode == NL80211_IFTYPE_STATION;
+ 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);
@@ -3394,16 +3397,14 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
return ret;
}
+ sta_priv->common.sta_id = sta_id;
+
/* Initialize rate scaling */
IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
sta->addr);
iwl3945_rs_rate_init(priv, sta, sta_id);
return 0;
-
-
-
- return ret;
}
/*****************************************************************************
*
@@ -3887,6 +3888,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
hw->rate_control_algorithm = "iwl-3945-rs";
hw->sta_data_size = sizeof(struct iwl3945_sta_priv);
+ hw->vif_data_size = sizeof(struct iwl_vif_priv);
/* Tell mac80211 our characteristics */
hw->flags = IEEE80211_HW_SIGNAL_DBM |