aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
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
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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c20
5 files changed, 29 insertions, 25 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 1344943a5f36..26f30a7ecb1a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -678,7 +678,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
678 goto restart; 678 goto restart;
679 } 679 }
680 680
681 iwl_clear_stations_table(priv); 681 priv->cfg->ops->smgmt->clear_station_table(priv);
682 ret = priv->cfg->ops->lib->alive_notify(priv); 682 ret = priv->cfg->ops->lib->alive_notify(priv);
683 if (ret) { 683 if (ret) {
684 IWL_WARN(priv, 684 IWL_WARN(priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 7cdbcfe483f3..a99512807f63 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2453,13 +2453,15 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2453 2453
2454 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) && 2454 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
2455 !lq_sta->ibss_sta_added) { 2455 !lq_sta->ibss_sta_added) {
2456 u8 sta_id = iwl_find_station(priv, hdr->addr1); 2456 u8 sta_id = priv->cfg->ops->smgmt->find_station(priv,
2457 hdr->addr1);
2457 2458
2458 if (sta_id == IWL_INVALID_STATION) { 2459 if (sta_id == IWL_INVALID_STATION) {
2459 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", 2460 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n",
2460 hdr->addr1); 2461 hdr->addr1);
2461 sta_id = iwl_add_station_flags(priv, hdr->addr1, 2462 sta_id = priv->cfg->ops->smgmt->add_station_ht(priv,
2462 0, CMD_ASYNC, NULL); 2463 hdr->addr1, 0,
2464 CMD_ASYNC, NULL);
2463 } 2465 }
2464 if ((sta_id != IWL_INVALID_STATION)) { 2466 if ((sta_id != IWL_INVALID_STATION)) {
2465 lq_sta->lq.sta_id = sta_id; 2467 lq_sta->lq.sta_id = sta_id;
@@ -2526,15 +2528,17 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
2526 2528
2527 lq_sta->ibss_sta_added = 0; 2529 lq_sta->ibss_sta_added = 0;
2528 if (priv->iw_mode == NL80211_IFTYPE_AP) { 2530 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2529 u8 sta_id = iwl_find_station(priv, sta->addr); 2531 u8 sta_id = priv->cfg->ops->smgmt->find_station(priv,
2532 sta->addr);
2530 2533
2531 /* for IBSS the call are from tasklet */ 2534 /* for IBSS the call are from tasklet */
2532 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); 2535 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr);
2533 2536
2534 if (sta_id == IWL_INVALID_STATION) { 2537 if (sta_id == IWL_INVALID_STATION) {
2535 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); 2538 IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr);
2536 sta_id = iwl_add_station_flags(priv, sta->addr, 2539 sta_id = priv->cfg->ops->smgmt->add_station_ht(priv,
2537 0, CMD_ASYNC, NULL); 2540 sta->addr, 0,
2541 CMD_ASYNC, NULL);
2538 } 2542 }
2539 if ((sta_id != IWL_INVALID_STATION)) { 2543 if ((sta_id != IWL_INVALID_STATION)) {
2540 lq_sta->lq.sta_id = sta_id; 2544 lq_sta->lq.sta_id = sta_id;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 50ef649b1c97..565a441052eb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -188,7 +188,7 @@ int iwl_commit_rxon(struct iwl_priv *priv)
188 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 188 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
189 } 189 }
190 190
191 iwl_clear_stations_table(priv); 191 priv->cfg->ops->smgmt->clear_station_table(priv);
192 192
193 if (!priv->error_recovering) 193 if (!priv->error_recovering)
194 priv->start_calib = 0; 194 priv->start_calib = 0;
@@ -593,7 +593,7 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode)
593 iwl_set_rxon_chain(priv); 593 iwl_set_rxon_chain(priv);
594 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 594 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
595 595
596 iwl_clear_stations_table(priv); 596 priv->cfg->ops->smgmt->clear_station_table(priv);
597 597
598 /* dont commit rxon if rf-kill is on*/ 598 /* dont commit rxon if rf-kill is on*/
599 if (!iwl_is_ready_rf(priv)) 599 if (!iwl_is_ready_rf(priv))
@@ -1471,7 +1471,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
1471 goto restart; 1471 goto restart;
1472 } 1472 }
1473 1473
1474 iwl_clear_stations_table(priv); 1474 priv->cfg->ops->smgmt->clear_station_table(priv);
1475 ret = priv->cfg->ops->lib->alive_notify(priv); 1475 ret = priv->cfg->ops->lib->alive_notify(priv);
1476 if (ret) { 1476 if (ret) {
1477 IWL_WARN(priv, 1477 IWL_WARN(priv,
@@ -1557,7 +1557,7 @@ static void __iwl_down(struct iwl_priv *priv)
1557 1557
1558 iwl_leds_unregister(priv); 1558 iwl_leds_unregister(priv);
1559 1559
1560 iwl_clear_stations_table(priv); 1560 priv->cfg->ops->smgmt->clear_station_table(priv);
1561 1561
1562 /* Unblock any waiting calls */ 1562 /* Unblock any waiting calls */
1563 wake_up_interruptible_all(&priv->wait_command_queue); 1563 wake_up_interruptible_all(&priv->wait_command_queue);
@@ -1708,7 +1708,7 @@ static int __iwl_up(struct iwl_priv *priv)
1708 1708
1709 for (i = 0; i < MAX_HW_RESTARTS; i++) { 1709 for (i = 0; i < MAX_HW_RESTARTS; i++) {
1710 1710
1711 iwl_clear_stations_table(priv); 1711 priv->cfg->ops->smgmt->clear_station_table(priv);
1712 1712
1713 /* load bootstrap state machine, 1713 /* load bootstrap state machine,
1714 * load bootstrap program into processor's memory, 1714 * load bootstrap program into processor's memory,
@@ -2439,7 +2439,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2439 return -EOPNOTSUPP; 2439 return -EOPNOTSUPP;
2440 } 2440 }
2441 addr = sta ? sta->addr : iwl_bcast_addr; 2441 addr = sta ? sta->addr : iwl_bcast_addr;
2442 sta_id = iwl_find_station(priv, addr); 2442 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr);
2443 if (sta_id == IWL_INVALID_STATION) { 2443 if (sta_id == IWL_INVALID_STATION) {
2444 IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", 2444 IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n",
2445 addr); 2445 addr);
@@ -3311,7 +3311,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
3311 iwl_rx_queue_free(priv, &priv->rxq); 3311 iwl_rx_queue_free(priv, &priv->rxq);
3312 iwl_hw_txq_ctx_free(priv); 3312 iwl_hw_txq_ctx_free(priv);
3313 3313
3314 iwl_clear_stations_table(priv); 3314 priv->cfg->ops->smgmt->clear_station_table(priv);
3315 iwl_eeprom_free(priv); 3315 iwl_eeprom_free(priv);
3316 3316
3317 3317
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index eaeeb4dae0ed..0532d99b9085 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1368,7 +1368,7 @@ int iwl_init_drv(struct iwl_priv *priv)
1368 mutex_init(&priv->mutex); 1368 mutex_init(&priv->mutex);
1369 1369
1370 /* Clear the driver's (not device's) station table */ 1370 /* Clear the driver's (not device's) station table */
1371 iwl_clear_stations_table(priv); 1371 priv->cfg->ops->smgmt->clear_station_table(priv);
1372 1372
1373 priv->data_retry_limit = -1; 1373 priv->data_retry_limit = -1;
1374 priv->ieee_channels = NULL; 1374 priv->ieee_channels = NULL;
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 5798fe49c771..5816368ffc40 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].