diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-04-08 14:26:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:42 -0400 |
commit | 06fd3d86a426848dbd8db27b7257a4eb4be8cfae (patch) | |
tree | df400bd19773a995e8c84788b11495e23f0ce947 | |
parent | e11bc0286a4ff8f4e5cdefbcce0878d29c03c630 (diff) |
iwl3945/iwlwifi: unify add_station function
Patch unifies the add_station function for 3945 and iwlwifi drivers.
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 12 |
9 files changed, 17 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index af6b9d444778..f63a9c5ba262 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -719,7 +719,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
719 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pm\n", | 719 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pm\n", |
720 | hdr->addr1); | 720 | hdr->addr1); |
721 | sta_id = iwl3945_add_station(priv, | 721 | sta_id = iwl3945_add_station(priv, |
722 | hdr->addr1, 0, CMD_ASYNC); | 722 | hdr->addr1, 0, CMD_ASYNC, NULL); |
723 | } | 723 | } |
724 | if (sta_id != IWL_INVALID_STATION) | 724 | if (sta_id != IWL_INVALID_STATION) |
725 | rs_sta->ibss_sta_added = 1; | 725 | rs_sta->ibss_sta_added = 1; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 7c0c7992b596..a854feba82c8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -2125,7 +2125,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | /* Add the broadcast address so we can send broadcast frames */ | 2127 | /* Add the broadcast address so we can send broadcast frames */ |
2128 | if (priv->cfg->ops->smgmt->add_station(priv, iwl_bcast_addr, 0, 0) == | 2128 | if (priv->cfg->ops->smgmt->add_station(priv, iwl_bcast_addr, 0, 0, NULL) == |
2129 | IWL_INVALID_STATION) { | 2129 | IWL_INVALID_STATION) { |
2130 | IWL_ERR(priv, "Error adding BROADCAST address for transmit.\n"); | 2130 | IWL_ERR(priv, "Error adding BROADCAST address for transmit.\n"); |
2131 | return -EIO; | 2131 | return -EIO; |
@@ -2136,7 +2136,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
2136 | if (iwl_is_associated(priv) && | 2136 | if (iwl_is_associated(priv) && |
2137 | (priv->iw_mode == NL80211_IFTYPE_STATION)) | 2137 | (priv->iw_mode == NL80211_IFTYPE_STATION)) |
2138 | if (priv->cfg->ops->smgmt->add_station(priv, | 2138 | if (priv->cfg->ops->smgmt->add_station(priv, |
2139 | priv->active_rxon.bssid_addr, 1, 0) | 2139 | priv->active_rxon.bssid_addr, 1, 0, NULL) |
2140 | == IWL_INVALID_STATION) { | 2140 | == IWL_INVALID_STATION) { |
2141 | IWL_ERR(priv, "Error adding AP address for transmit\n"); | 2141 | IWL_ERR(priv, "Error adding AP address for transmit\n"); |
2142 | return -EIO; | 2142 | return -EIO; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index 8e3e8161526a..88628b23efd9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -206,7 +206,7 @@ struct iwl3945_addsta_cmd; | |||
206 | extern int iwl3945_send_add_station(struct iwl_priv *priv, | 206 | extern int iwl3945_send_add_station(struct iwl_priv *priv, |
207 | struct iwl3945_addsta_cmd *sta, u8 flags); | 207 | struct iwl3945_addsta_cmd *sta, u8 flags); |
208 | extern u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *bssid, | 208 | extern u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *bssid, |
209 | int is_ap, u8 flags); | 209 | int is_ap, u8 flags, struct ieee80211_sta_ht_cap *ht_info); |
210 | extern void iwl3945_clear_stations_table(struct iwl_priv *priv); | 210 | extern void iwl3945_clear_stations_table(struct iwl_priv *priv); |
211 | extern int iwl3945_power_init_handle(struct iwl_priv *priv); | 211 | extern int iwl3945_power_init_handle(struct iwl_priv *priv); |
212 | extern int iwl3945_eeprom_init(struct iwl_priv *priv); | 212 | extern int iwl3945_eeprom_init(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index e3d1e30e62b5..e98849edafd5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2269,7 +2269,7 @@ static void iwl4965_cancel_deferred_work(struct iwl_priv *priv) | |||
2269 | } | 2269 | } |
2270 | 2270 | ||
2271 | static struct iwl_station_mgmt_ops iwl4965_station_mgmt = { | 2271 | static struct iwl_station_mgmt_ops iwl4965_station_mgmt = { |
2272 | .add_station_ht = iwl_add_station_flags, | 2272 | .add_station = iwl_add_station_flags, |
2273 | .remove_station = iwl_remove_station, | 2273 | .remove_station = iwl_remove_station, |
2274 | .find_station = iwl_find_station, | 2274 | .find_station = iwl_find_station, |
2275 | .clear_station_table = iwl_clear_stations_table, | 2275 | .clear_station_table = iwl_clear_stations_table, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 26f30a7ecb1a..52ee77347328 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1473,7 +1473,7 @@ int iwl5000_calc_rssi(struct iwl_priv *priv, | |||
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | struct iwl_station_mgmt_ops iwl5000_station_mgmt = { | 1475 | struct iwl_station_mgmt_ops iwl5000_station_mgmt = { |
1476 | .add_station_ht = iwl_add_station_flags, | 1476 | .add_station = iwl_add_station_flags, |
1477 | .remove_station = iwl_remove_station, | 1477 | .remove_station = iwl_remove_station, |
1478 | .find_station = iwl_find_station, | 1478 | .find_station = iwl_find_station, |
1479 | .clear_station_table = iwl_clear_stations_table, | 1479 | .clear_station_table = iwl_clear_stations_table, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index a99512807f63..b1818a3d1e51 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2459,7 +2459,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
2459 | if (sta_id == IWL_INVALID_STATION) { | 2459 | if (sta_id == IWL_INVALID_STATION) { |
2460 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", | 2460 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", |
2461 | hdr->addr1); | 2461 | hdr->addr1); |
2462 | sta_id = priv->cfg->ops->smgmt->add_station_ht(priv, | 2462 | sta_id = priv->cfg->ops->smgmt->add_station(priv, |
2463 | hdr->addr1, 0, | 2463 | hdr->addr1, 0, |
2464 | CMD_ASYNC, NULL); | 2464 | CMD_ASYNC, NULL); |
2465 | } | 2465 | } |
@@ -2536,7 +2536,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband, | |||
2536 | 2536 | ||
2537 | if (sta_id == IWL_INVALID_STATION) { | 2537 | if (sta_id == IWL_INVALID_STATION) { |
2538 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); | 2538 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); |
2539 | sta_id = priv->cfg->ops->smgmt->add_station_ht(priv, | 2539 | sta_id = priv->cfg->ops->smgmt->add_station(priv, |
2540 | sta->addr, 0, | 2540 | sta->addr, 0, |
2541 | CMD_ASYNC, NULL); | 2541 | CMD_ASYNC, NULL); |
2542 | } | 2542 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 8b7f5bd2c8e3..383590cd8b02 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -84,10 +84,8 @@ struct iwl_cmd; | |||
84 | #define IWL_SKU_N 0x8 | 84 | #define IWL_SKU_N 0x8 |
85 | 85 | ||
86 | struct iwl_station_mgmt_ops { | 86 | struct iwl_station_mgmt_ops { |
87 | u8 (*add_station_ht)(struct iwl_priv *priv, const u8 *addr, | ||
88 | int is_ap, u8 flags, struct ieee80211_sta_ht_cap *ht_info); | ||
89 | u8 (*add_station)(struct iwl_priv *priv, const u8 *addr, | 87 | u8 (*add_station)(struct iwl_priv *priv, const u8 *addr, |
90 | int is_ap, u8 flags); | 88 | int is_ap, u8 flags, struct ieee80211_sta_ht_cap *ht_info); |
91 | int (*remove_station)(struct iwl_priv *priv, const u8 *addr, | 89 | int (*remove_station)(struct iwl_priv *priv, const u8 *addr, |
92 | int is_ap); | 90 | int is_ap); |
93 | u8 (*find_station)(struct iwl_priv *priv, const u8 *addr); | 91 | u8 (*find_station)(struct iwl_priv *priv, const u8 *addr); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 5816368ffc40..b8f18c697888 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -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 = priv->cfg->ops->smgmt->add_station_ht(priv, addr, is_ap, | 1022 | sta_id = priv->cfg->ops->smgmt->add_station(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 */ |
@@ -1066,7 +1066,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
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 = priv->cfg->ops->smgmt->add_station_ht(priv, hdr->addr1, | 1069 | sta_id = priv->cfg->ops->smgmt->add_station(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) |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f5f39cc28102..566914569104 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -164,7 +164,7 @@ void iwl3945_clear_stations_table(struct iwl_priv *priv) | |||
164 | /** | 164 | /** |
165 | * iwl3945_add_station - Add station to station tables in driver and device | 165 | * iwl3945_add_station - Add station to station tables in driver and device |
166 | */ | 166 | */ |
167 | u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags) | 167 | u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags, struct ieee80211_sta_ht_cap *ht_info) |
168 | { | 168 | { |
169 | int i; | 169 | int i; |
170 | int index = IWL_INVALID_STATION; | 170 | int index = IWL_INVALID_STATION; |
@@ -748,7 +748,7 @@ static int iwl3945_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
748 | return sta_id; | 748 | return sta_id; |
749 | 749 | ||
750 | sta_id = priv->cfg->ops->smgmt->add_station(priv, | 750 | sta_id = priv->cfg->ops->smgmt->add_station(priv, |
751 | hdr->addr1, 0, CMD_ASYNC); | 751 | hdr->addr1, 0, CMD_ASYNC, NULL); |
752 | 752 | ||
753 | if (sta_id != IWL_INVALID_STATION) | 753 | if (sta_id != IWL_INVALID_STATION) |
754 | return sta_id; | 754 | return sta_id; |
@@ -1884,7 +1884,7 @@ static void iwl3945_error_recovery(struct iwl_priv *priv) | |||
1884 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1884 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1885 | iwlcore_commit_rxon(priv); | 1885 | iwlcore_commit_rxon(priv); |
1886 | 1886 | ||
1887 | priv->cfg->ops->smgmt->add_station(priv, priv->bssid, 1, 0); | 1887 | priv->cfg->ops->smgmt->add_station(priv, priv->bssid, 1, 0, NULL); |
1888 | 1888 | ||
1889 | spin_lock_irqsave(&priv->lock, flags); | 1889 | spin_lock_irqsave(&priv->lock, flags); |
1890 | priv->assoc_id = le16_to_cpu(priv->staging_rxon.assoc_id); | 1890 | priv->assoc_id = le16_to_cpu(priv->staging_rxon.assoc_id); |
@@ -3333,7 +3333,7 @@ void iwl3945_post_associate(struct iwl_priv *priv) | |||
3333 | case NL80211_IFTYPE_ADHOC: | 3333 | case NL80211_IFTYPE_ADHOC: |
3334 | 3334 | ||
3335 | priv->assoc_id = 1; | 3335 | priv->assoc_id = 1; |
3336 | priv->cfg->ops->smgmt->add_station(priv, priv->bssid, 0, 0); | 3336 | priv->cfg->ops->smgmt->add_station(priv, priv->bssid, 0, 0, NULL); |
3337 | iwl3945_sync_sta(priv, IWL_STA_ID, | 3337 | iwl3945_sync_sta(priv, IWL_STA_ID, |
3338 | (priv->band == IEEE80211_BAND_5GHZ) ? | 3338 | (priv->band == IEEE80211_BAND_5GHZ) ? |
3339 | IWL_RATE_6M_PLCP : IWL_RATE_1M_PLCP, | 3339 | IWL_RATE_6M_PLCP : IWL_RATE_1M_PLCP, |
@@ -3661,7 +3661,7 @@ static void iwl3945_config_ap(struct iwl_priv *priv) | |||
3661 | /* restore RXON assoc */ | 3661 | /* restore RXON assoc */ |
3662 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; | 3662 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; |
3663 | iwlcore_commit_rxon(priv); | 3663 | iwlcore_commit_rxon(priv); |
3664 | priv->cfg->ops->smgmt->add_station(priv, iwl_bcast_addr, 0, 0); | 3664 | priv->cfg->ops->smgmt->add_station(priv, iwl_bcast_addr, 0, 0, NULL); |
3665 | } | 3665 | } |
3666 | iwl3945_send_beacon_cmd(priv); | 3666 | iwl3945_send_beacon_cmd(priv); |
3667 | 3667 | ||
@@ -3754,7 +3754,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
3754 | rc = iwlcore_commit_rxon(priv); | 3754 | rc = iwlcore_commit_rxon(priv); |
3755 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) | 3755 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) |
3756 | priv->cfg->ops->smgmt->add_station(priv, | 3756 | priv->cfg->ops->smgmt->add_station(priv, |
3757 | priv->active_rxon.bssid_addr, 1, 0); | 3757 | priv->active_rxon.bssid_addr, 1, 0, NULL); |
3758 | } | 3758 | } |
3759 | 3759 | ||
3760 | } else { | 3760 | } else { |