aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sta.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-04-08 14:26:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:42 -0400
commite11bc0286a4ff8f4e5cdefbcce0878d29c03c630 (patch)
tree0c0c6ee326fd19403fe884217af0e60a7570accc /drivers/net/wireless/iwlwifi/iwl-sta.c
parent40ace5b385ccf8a4d4d096b353b7f1baac1d014b (diff)
iwlwifi: use station management ops
Patch replaces station management functions with ops declared. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 5798fe49c77..5816368ffc4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -75,7 +75,7 @@ int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
75 return IWL_AP_ID; 75 return IWL_AP_ID;
76 } else { 76 } else {
77 u8 *da = ieee80211_get_DA(hdr); 77 u8 *da = ieee80211_get_DA(hdr);
78 return iwl_find_station(priv, da); 78 return priv->cfg->ops->smgmt->find_station(priv, da);
79 } 79 }
80} 80}
81EXPORT_SYMBOL(iwl_get_ra_sta_id); 81EXPORT_SYMBOL(iwl_get_ra_sta_id);
@@ -300,7 +300,7 @@ EXPORT_SYMBOL(iwl_add_station_flags);
300static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) 300static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
301{ 301{
302 unsigned long flags; 302 unsigned long flags;
303 u8 sta_id = iwl_find_station(priv, addr); 303 u8 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
304 304
305 BUG_ON(sta_id == IWL_INVALID_STATION); 305 BUG_ON(sta_id == IWL_INVALID_STATION);
306 306
@@ -758,7 +758,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
758 int i; 758 int i;
759 DECLARE_MAC_BUF(mac); 759 DECLARE_MAC_BUF(mac);
760 760
761 sta_id = iwl_find_station(priv, addr); 761 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
762 if (sta_id == IWL_INVALID_STATION) { 762 if (sta_id == IWL_INVALID_STATION) {
763 IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", 763 IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n",
764 addr); 764 addr);
@@ -1019,7 +1019,7 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
1019 rcu_read_unlock(); 1019 rcu_read_unlock();
1020 } 1020 }
1021 1021
1022 sta_id = iwl_add_station_flags(priv, addr, is_ap, 1022 sta_id = priv->cfg->ops->smgmt->add_station_ht(priv, addr, is_ap,
1023 0, cur_ht_config); 1023 0, cur_ht_config);
1024 1024
1025 /* Set up default rate scaling table in device's station table */ 1025 /* Set up default rate scaling table in device's station table */
@@ -1053,7 +1053,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
1053 1053
1054 /* If we are an AP, then find the station, or use BCAST */ 1054 /* If we are an AP, then find the station, or use BCAST */
1055 case NL80211_IFTYPE_AP: 1055 case NL80211_IFTYPE_AP:
1056 sta_id = iwl_find_station(priv, hdr->addr1); 1056 sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1);
1057 if (sta_id != IWL_INVALID_STATION) 1057 if (sta_id != IWL_INVALID_STATION)
1058 return sta_id; 1058 return sta_id;
1059 return priv->hw_params.bcast_sta_id; 1059 return priv->hw_params.bcast_sta_id;
@@ -1061,12 +1061,12 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
1061 /* If this frame is going out to an IBSS network, find the station, 1061 /* If this frame is going out to an IBSS network, find the station,
1062 * or create a new station table entry */ 1062 * or create a new station table entry */
1063 case NL80211_IFTYPE_ADHOC: 1063 case NL80211_IFTYPE_ADHOC:
1064 sta_id = iwl_find_station(priv, hdr->addr1); 1064 sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1);
1065 if (sta_id != IWL_INVALID_STATION) 1065 if (sta_id != IWL_INVALID_STATION)
1066 return sta_id; 1066 return sta_id;
1067 1067
1068 /* Create new station table entry */ 1068 /* Create new station table entry */
1069 sta_id = iwl_add_station_flags(priv, hdr->addr1, 1069 sta_id = priv->cfg->ops->smgmt->add_station_ht(priv, hdr->addr1,
1070 0, CMD_ASYNC, NULL); 1070 0, CMD_ASYNC, NULL);
1071 1071
1072 if (sta_id != IWL_INVALID_STATION) 1072 if (sta_id != IWL_INVALID_STATION)
@@ -1115,7 +1115,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv,
1115 unsigned long flags; 1115 unsigned long flags;
1116 int sta_id; 1116 int sta_id;
1117 1117
1118 sta_id = iwl_find_station(priv, addr); 1118 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
1119 if (sta_id == IWL_INVALID_STATION) 1119 if (sta_id == IWL_INVALID_STATION)
1120 return -ENXIO; 1120 return -ENXIO;
1121 1121
@@ -1137,7 +1137,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid)
1137 unsigned long flags; 1137 unsigned long flags;
1138 int sta_id; 1138 int sta_id;
1139 1139
1140 sta_id = iwl_find_station(priv, addr); 1140 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
1141 if (sta_id == IWL_INVALID_STATION) { 1141 if (sta_id == IWL_INVALID_STATION) {
1142 IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); 1142 IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid);
1143 return -ENXIO; 1143 return -ENXIO;
@@ -1172,7 +1172,7 @@ static void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
1172void iwl_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr) 1172void iwl_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr)
1173{ 1173{
1174 /* FIXME: need locking over ps_status ??? */ 1174 /* FIXME: need locking over ps_status ??? */
1175 u8 sta_id = iwl_find_station(priv, addr); 1175 u8 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
1176 1176
1177 if (sta_id != IWL_INVALID_STATION) { 1177 if (sta_id != IWL_INVALID_STATION) {
1178 u8 sta_awake = priv->stations[sta_id]. 1178 u8 sta_awake = priv->stations[sta_id].