aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.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/iwl-agn.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/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 0c913ea71f1e..b2c5665c516e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2854,6 +2854,8 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
2854 IEEE80211_HW_SUPPORTS_STATIC_SMPS; 2854 IEEE80211_HW_SUPPORTS_STATIC_SMPS;
2855 2855
2856 hw->sta_data_size = sizeof(struct iwl_station_priv); 2856 hw->sta_data_size = sizeof(struct iwl_station_priv);
2857 hw->vif_data_size = sizeof(struct iwl_vif_priv);
2858
2857 hw->wiphy->interface_modes = 2859 hw->wiphy->interface_modes =
2858 BIT(NL80211_IFTYPE_STATION) | 2860 BIT(NL80211_IFTYPE_STATION) |
2859 BIT(NL80211_IFTYPE_ADHOC); 2861 BIT(NL80211_IFTYPE_ADHOC);
@@ -3229,6 +3231,8 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
3229 int ret; 3231 int ret;
3230 u8 sta_id; 3232 u8 sta_id;
3231 3233
3234 sta_priv->common.sta_id = IWL_INVALID_STATION;
3235
3232 IWL_DEBUG_INFO(priv, "received request to add station %pM\n", 3236 IWL_DEBUG_INFO(priv, "received request to add station %pM\n",
3233 sta->addr); 3237 sta->addr);
3234 3238
@@ -3245,12 +3249,14 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
3245 return ret; 3249 return ret;
3246 } 3250 }
3247 3251
3252 sta_priv->common.sta_id = sta_id;
3253
3248 /* Initialize rate scaling */ 3254 /* Initialize rate scaling */
3249 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", 3255 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
3250 sta->addr); 3256 sta->addr);
3251 iwl_rs_rate_init(priv, sta, sta_id); 3257 iwl_rs_rate_init(priv, sta, sta_id);
3252 3258
3253 return ret; 3259 return 0;
3254} 3260}
3255 3261
3256/***************************************************************************** 3262/*****************************************************************************