diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-04-08 14:26:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:41 -0400 |
commit | e0158e61108bdadd70865c2149dc829a5c84dd73 (patch) | |
tree | 7ef8284cf26e6b3bc98ff8c47a407e1d87d8edaa /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 9944b938f23fdd1ce2f5da190f771f176bb51eef (diff) |
iwlwifi: add commit_rxon lib
Patch adds commit_rxon lib operation to iwlwifi and iwl3945 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 124a477ebd99..50ef649b1c97 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -102,7 +102,7 @@ MODULE_ALIAS("iwl4965"); | |||
102 | * function correctly transitions out of the RXON_ASSOC_MSK state if | 102 | * function correctly transitions out of the RXON_ASSOC_MSK state if |
103 | * a HW tune is required based on the RXON structure changes. | 103 | * a HW tune is required based on the RXON structure changes. |
104 | */ | 104 | */ |
105 | static int iwl_commit_rxon(struct iwl_priv *priv) | 105 | int iwl_commit_rxon(struct iwl_priv *priv) |
106 | { | 106 | { |
107 | /* cast away the const for active_rxon in this function */ | 107 | /* cast away the const for active_rxon in this function */ |
108 | struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; | 108 | struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; |
@@ -247,7 +247,7 @@ void iwl_update_chain_flags(struct iwl_priv *priv) | |||
247 | { | 247 | { |
248 | 248 | ||
249 | iwl_set_rxon_chain(priv); | 249 | iwl_set_rxon_chain(priv); |
250 | iwl_commit_rxon(priv); | 250 | iwlcore_commit_rxon(priv); |
251 | } | 251 | } |
252 | 252 | ||
253 | static void iwl_clear_free_frames(struct iwl_priv *priv) | 253 | static void iwl_clear_free_frames(struct iwl_priv *priv) |
@@ -606,7 +606,7 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode) | |||
606 | return -EAGAIN; | 606 | return -EAGAIN; |
607 | } | 607 | } |
608 | 608 | ||
609 | iwl_commit_rxon(priv); | 609 | iwlcore_commit_rxon(priv); |
610 | 610 | ||
611 | return 0; | 611 | return 0; |
612 | } | 612 | } |
@@ -1000,7 +1000,7 @@ static void iwl_error_recovery(struct iwl_priv *priv) | |||
1000 | memcpy(&priv->staging_rxon, &priv->recovery_rxon, | 1000 | memcpy(&priv->staging_rxon, &priv->recovery_rxon, |
1001 | sizeof(priv->staging_rxon)); | 1001 | sizeof(priv->staging_rxon)); |
1002 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1002 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1003 | iwl_commit_rxon(priv); | 1003 | iwlcore_commit_rxon(priv); |
1004 | 1004 | ||
1005 | iwl_rxon_add_station(priv, priv->bssid, 1); | 1005 | iwl_rxon_add_station(priv, priv->bssid, 1); |
1006 | 1006 | ||
@@ -1509,7 +1509,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
1509 | iwl_reset_run_time_calib(priv); | 1509 | iwl_reset_run_time_calib(priv); |
1510 | 1510 | ||
1511 | /* Configure the adapter for unassociated operation */ | 1511 | /* Configure the adapter for unassociated operation */ |
1512 | iwl_commit_rxon(priv); | 1512 | iwlcore_commit_rxon(priv); |
1513 | 1513 | ||
1514 | /* At this point, the NIC is initialized and operational */ | 1514 | /* At this point, the NIC is initialized and operational */ |
1515 | iwl_rf_kill_ct_config(priv); | 1515 | iwl_rf_kill_ct_config(priv); |
@@ -1865,7 +1865,7 @@ void iwl_post_associate(struct iwl_priv *priv) | |||
1865 | conf = ieee80211_get_hw_conf(priv->hw); | 1865 | conf = ieee80211_get_hw_conf(priv->hw); |
1866 | 1866 | ||
1867 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1867 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1868 | iwl_commit_rxon(priv); | 1868 | iwlcore_commit_rxon(priv); |
1869 | 1869 | ||
1870 | iwl_setup_rxon_timing(priv); | 1870 | iwl_setup_rxon_timing(priv); |
1871 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, | 1871 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, |
@@ -1900,7 +1900,7 @@ void iwl_post_associate(struct iwl_priv *priv) | |||
1900 | 1900 | ||
1901 | } | 1901 | } |
1902 | 1902 | ||
1903 | iwl_commit_rxon(priv); | 1903 | iwlcore_commit_rxon(priv); |
1904 | 1904 | ||
1905 | switch (priv->iw_mode) { | 1905 | switch (priv->iw_mode) { |
1906 | case NL80211_IFTYPE_STATION: | 1906 | case NL80211_IFTYPE_STATION: |
@@ -2211,7 +2211,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2211 | 2211 | ||
2212 | if (memcmp(&priv->active_rxon, | 2212 | if (memcmp(&priv->active_rxon, |
2213 | &priv->staging_rxon, sizeof(priv->staging_rxon))) | 2213 | &priv->staging_rxon, sizeof(priv->staging_rxon))) |
2214 | iwl_commit_rxon(priv); | 2214 | iwlcore_commit_rxon(priv); |
2215 | else | 2215 | else |
2216 | IWL_DEBUG_INFO(priv, "No re-sending same RXON configuration.\n"); | 2216 | IWL_DEBUG_INFO(priv, "No re-sending same RXON configuration.\n"); |
2217 | 2217 | ||
@@ -2235,7 +2235,7 @@ static void iwl_config_ap(struct iwl_priv *priv) | |||
2235 | 2235 | ||
2236 | /* RXON - unassoc (to set timing command) */ | 2236 | /* RXON - unassoc (to set timing command) */ |
2237 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2237 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2238 | iwl_commit_rxon(priv); | 2238 | iwlcore_commit_rxon(priv); |
2239 | 2239 | ||
2240 | /* RXON Timing */ | 2240 | /* RXON Timing */ |
2241 | iwl_setup_rxon_timing(priv); | 2241 | iwl_setup_rxon_timing(priv); |
@@ -2271,7 +2271,7 @@ static void iwl_config_ap(struct iwl_priv *priv) | |||
2271 | } | 2271 | } |
2272 | /* restore RXON assoc */ | 2272 | /* restore RXON assoc */ |
2273 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; | 2273 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; |
2274 | iwl_commit_rxon(priv); | 2274 | iwlcore_commit_rxon(priv); |
2275 | spin_lock_irqsave(&priv->lock, flags); | 2275 | spin_lock_irqsave(&priv->lock, flags); |
2276 | iwl_activate_qos(priv, 1); | 2276 | iwl_activate_qos(priv, 1); |
2277 | spin_unlock_irqrestore(&priv->lock, flags); | 2277 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -2365,7 +2365,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2365 | if (priv->iw_mode == NL80211_IFTYPE_AP) | 2365 | if (priv->iw_mode == NL80211_IFTYPE_AP) |
2366 | iwl_config_ap(priv); | 2366 | iwl_config_ap(priv); |
2367 | else { | 2367 | else { |
2368 | rc = iwl_commit_rxon(priv); | 2368 | rc = iwlcore_commit_rxon(priv); |
2369 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) | 2369 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) |
2370 | iwl_rxon_add_station( | 2370 | iwl_rxon_add_station( |
2371 | priv, priv->active_rxon.bssid_addr, 1); | 2371 | priv, priv->active_rxon.bssid_addr, 1); |
@@ -2374,7 +2374,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2374 | } else { | 2374 | } else { |
2375 | iwl_scan_cancel_timeout(priv, 100); | 2375 | iwl_scan_cancel_timeout(priv, 100); |
2376 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2376 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2377 | iwl_commit_rxon(priv); | 2377 | iwlcore_commit_rxon(priv); |
2378 | } | 2378 | } |
2379 | 2379 | ||
2380 | done: | 2380 | done: |
@@ -2396,7 +2396,7 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
2396 | if (iwl_is_ready_rf(priv)) { | 2396 | if (iwl_is_ready_rf(priv)) { |
2397 | iwl_scan_cancel_timeout(priv, 100); | 2397 | iwl_scan_cancel_timeout(priv, 100); |
2398 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2398 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2399 | iwl_commit_rxon(priv); | 2399 | iwlcore_commit_rxon(priv); |
2400 | } | 2400 | } |
2401 | if (priv->vif == conf->vif) { | 2401 | if (priv->vif == conf->vif) { |
2402 | priv->vif = NULL; | 2402 | priv->vif = NULL; |
@@ -2623,7 +2623,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
2623 | if (priv->iw_mode != NL80211_IFTYPE_AP) { | 2623 | if (priv->iw_mode != NL80211_IFTYPE_AP) { |
2624 | iwl_scan_cancel_timeout(priv, 100); | 2624 | iwl_scan_cancel_timeout(priv, 100); |
2625 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2625 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2626 | iwl_commit_rxon(priv); | 2626 | iwlcore_commit_rxon(priv); |
2627 | } | 2627 | } |
2628 | 2628 | ||
2629 | iwl_power_update_mode(priv, 0); | 2629 | iwl_power_update_mode(priv, 0); |
@@ -2803,7 +2803,7 @@ static ssize_t store_flags(struct device *d, | |||
2803 | else { | 2803 | else { |
2804 | IWL_DEBUG_INFO(priv, "Commit rxon.flags = 0x%04X\n", flags); | 2804 | IWL_DEBUG_INFO(priv, "Commit rxon.flags = 0x%04X\n", flags); |
2805 | priv->staging_rxon.flags = cpu_to_le32(flags); | 2805 | priv->staging_rxon.flags = cpu_to_le32(flags); |
2806 | iwl_commit_rxon(priv); | 2806 | iwlcore_commit_rxon(priv); |
2807 | } | 2807 | } |
2808 | } | 2808 | } |
2809 | mutex_unlock(&priv->mutex); | 2809 | mutex_unlock(&priv->mutex); |
@@ -2844,7 +2844,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
2844 | "0x%04X\n", filter_flags); | 2844 | "0x%04X\n", filter_flags); |
2845 | priv->staging_rxon.filter_flags = | 2845 | priv->staging_rxon.filter_flags = |
2846 | cpu_to_le32(filter_flags); | 2846 | cpu_to_le32(filter_flags); |
2847 | iwl_commit_rxon(priv); | 2847 | iwlcore_commit_rxon(priv); |
2848 | } | 2848 | } |
2849 | } | 2849 | } |
2850 | mutex_unlock(&priv->mutex); | 2850 | mutex_unlock(&priv->mutex); |