aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-03-26 13:14:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:27 -0400
commit488829f1b141858944a24fd793220fa1d52cd9a6 (patch)
tree5b6f99c906ee6c1beba6ca98909a66b5727318e8 /drivers
parent6da3a13e4fcab0ff58592087d28bd283caf23d88 (diff)
iwl3945: use iwl_mac_conf_tx
3945 now uses iwl_mac_conf_tx. 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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c43
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c43
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c48
4 files changed, 46 insertions, 90 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 2cb073efb95d..1f5ee55778f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2628,49 +2628,6 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2628 return ret; 2628 return ret;
2629} 2629}
2630 2630
2631static int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
2632 const struct ieee80211_tx_queue_params *params)
2633{
2634 struct iwl_priv *priv = hw->priv;
2635 unsigned long flags;
2636 int q;
2637
2638 IWL_DEBUG_MAC80211(priv, "enter\n");
2639
2640 if (!iwl_is_ready_rf(priv)) {
2641 IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
2642 return -EIO;
2643 }
2644
2645 if (queue >= AC_NUM) {
2646 IWL_DEBUG_MAC80211(priv, "leave - queue >= AC_NUM %d\n", queue);
2647 return 0;
2648 }
2649
2650 q = AC_NUM - 1 - queue;
2651
2652 spin_lock_irqsave(&priv->lock, flags);
2653
2654 priv->qos_data.def_qos_parm.ac[q].cw_min = cpu_to_le16(params->cw_min);
2655 priv->qos_data.def_qos_parm.ac[q].cw_max = cpu_to_le16(params->cw_max);
2656 priv->qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
2657 priv->qos_data.def_qos_parm.ac[q].edca_txop =
2658 cpu_to_le16((params->txop * 32));
2659
2660 priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
2661 priv->qos_data.qos_active = 1;
2662
2663 if (priv->iw_mode == NL80211_IFTYPE_AP)
2664 iwl_activate_qos(priv, 1);
2665 else if (priv->assoc_id && iwl_is_associated(priv))
2666 iwl_activate_qos(priv, 0);
2667
2668 spin_unlock_irqrestore(&priv->lock, flags);
2669
2670 IWL_DEBUG_MAC80211(priv, "leave\n");
2671 return 0;
2672}
2673
2674static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, 2631static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
2675 enum ieee80211_ampdu_mlme_action action, 2632 enum ieee80211_ampdu_mlme_action action,
2676 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 2633 struct ieee80211_sta *sta, u16 tid, u16 *ssn)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 2e44d6e19e2b..7609bfced10f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2112,6 +2112,49 @@ void iwl_rx_reply_error(struct iwl_priv *priv,
2112} 2112}
2113EXPORT_SYMBOL(iwl_rx_reply_error); 2113EXPORT_SYMBOL(iwl_rx_reply_error);
2114 2114
2115int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
2116 const struct ieee80211_tx_queue_params *params)
2117{
2118 struct iwl_priv *priv = hw->priv;
2119 unsigned long flags;
2120 int q;
2121
2122 IWL_DEBUG_MAC80211(priv, "enter\n");
2123
2124 if (!iwl_is_ready_rf(priv)) {
2125 IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
2126 return -EIO;
2127 }
2128
2129 if (queue >= AC_NUM) {
2130 IWL_DEBUG_MAC80211(priv, "leave - queue >= AC_NUM %d\n", queue);
2131 return 0;
2132 }
2133
2134 q = AC_NUM - 1 - queue;
2135
2136 spin_lock_irqsave(&priv->lock, flags);
2137
2138 priv->qos_data.def_qos_parm.ac[q].cw_min = cpu_to_le16(params->cw_min);
2139 priv->qos_data.def_qos_parm.ac[q].cw_max = cpu_to_le16(params->cw_max);
2140 priv->qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
2141 priv->qos_data.def_qos_parm.ac[q].edca_txop =
2142 cpu_to_le16((params->txop * 32));
2143
2144 priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
2145 priv->qos_data.qos_active = 1;
2146
2147 if (priv->iw_mode == NL80211_IFTYPE_AP)
2148 iwl_activate_qos(priv, 1);
2149 else if (priv->assoc_id && iwl_is_associated(priv))
2150 iwl_activate_qos(priv, 0);
2151
2152 spin_unlock_irqrestore(&priv->lock, flags);
2153
2154 IWL_DEBUG_MAC80211(priv, "leave\n");
2155 return 0;
2156}
2157EXPORT_SYMBOL(iwl_mac_conf_tx);
2115#ifdef CONFIG_PM 2158#ifdef CONFIG_PM
2116 2159
2117int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) 2160int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 5d4904584686..d56edcd97aa0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -225,6 +225,8 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
225void iwl_hw_detect(struct iwl_priv *priv); 225void iwl_hw_detect(struct iwl_priv *priv);
226void iwl_reset_qos(struct iwl_priv *priv); 226void iwl_reset_qos(struct iwl_priv *priv);
227void iwl_activate_qos(struct iwl_priv *priv, u8 force); 227void iwl_activate_qos(struct iwl_priv *priv, u8 force);
228int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
229 const struct ieee80211_tx_queue_params *params);
228void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); 230void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt);
229int iwl_check_rxon_cmd(struct iwl_priv *priv); 231int iwl_check_rxon_cmd(struct iwl_priv *priv);
230int iwl_full_rxon_required(struct iwl_priv *priv); 232int iwl_full_rxon_required(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index afb838b39a6c..ed31030c7643 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4100,52 +4100,6 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
4100 return ret; 4100 return ret;
4101} 4101}
4102 4102
4103static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
4104 const struct ieee80211_tx_queue_params *params)
4105{
4106 struct iwl_priv *priv = hw->priv;
4107 unsigned long flags;
4108 int q;
4109
4110 IWL_DEBUG_MAC80211(priv, "enter\n");
4111
4112 if (!iwl_is_ready_rf(priv)) {
4113 IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
4114 return -EIO;
4115 }
4116
4117 if (queue >= AC_NUM) {
4118 IWL_DEBUG_MAC80211(priv, "leave - queue >= AC_NUM %d\n", queue);
4119 return 0;
4120 }
4121
4122 q = AC_NUM - 1 - queue;
4123
4124 spin_lock_irqsave(&priv->lock, flags);
4125
4126 priv->qos_data.def_qos_parm.ac[q].cw_min = cpu_to_le16(params->cw_min);
4127 priv->qos_data.def_qos_parm.ac[q].cw_max = cpu_to_le16(params->cw_max);
4128 priv->qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
4129 priv->qos_data.def_qos_parm.ac[q].edca_txop =
4130 cpu_to_le16((params->txop * 32));
4131
4132 priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
4133 priv->qos_data.qos_active = 1;
4134
4135 spin_unlock_irqrestore(&priv->lock, flags);
4136
4137 mutex_lock(&priv->mutex);
4138 if (priv->iw_mode == NL80211_IFTYPE_AP)
4139 iwl_activate_qos(priv, 1);
4140 else if (priv->assoc_id && iwl_is_associated(priv))
4141 iwl_activate_qos(priv, 0);
4142
4143 mutex_unlock(&priv->mutex);
4144
4145 IWL_DEBUG_MAC80211(priv, "leave\n");
4146 return 0;
4147}
4148
4149static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, 4103static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw,
4150 struct ieee80211_tx_queue_stats *stats) 4104 struct ieee80211_tx_queue_stats *stats)
4151{ 4105{
@@ -4809,7 +4763,7 @@ static struct ieee80211_ops iwl3945_hw_ops = {
4809 .configure_filter = iwl_configure_filter, 4763 .configure_filter = iwl_configure_filter,
4810 .set_key = iwl3945_mac_set_key, 4764 .set_key = iwl3945_mac_set_key,
4811 .get_tx_stats = iwl3945_mac_get_tx_stats, 4765 .get_tx_stats = iwl3945_mac_get_tx_stats,
4812 .conf_tx = iwl3945_mac_conf_tx, 4766 .conf_tx = iwl_mac_conf_tx,
4813 .reset_tsf = iwl3945_mac_reset_tsf, 4767 .reset_tsf = iwl3945_mac_reset_tsf,
4814 .bss_info_changed = iwl3945_bss_info_changed, 4768 .bss_info_changed = iwl3945_bss_info_changed,
4815 .hw_scan = iwl_mac_hw_scan 4769 .hw_scan = iwl_mac_hw_scan