diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-02-27 19:21:24 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:36 -0500 |
commit | 14d2aac580993ac8faeac0d903207e316c0881c3 (patch) | |
tree | 54f7cf756c8e26148303cdb00a793b17535870b9 /drivers/net/wireless | |
parent | 2a4ddaabe0055962fbfffb72633a97eadc7e93ac (diff) |
iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.
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-agn.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 48 |
4 files changed, 37 insertions, 77 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 18f6f680756..31e64bd96d1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -601,38 +601,6 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
601 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 601 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
602 | } | 602 | } |
603 | 603 | ||
604 | /* | ||
605 | * QoS support | ||
606 | */ | ||
607 | static void iwl_activate_qos(struct iwl_priv *priv, u8 force) | ||
608 | { | ||
609 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
610 | return; | ||
611 | |||
612 | priv->qos_data.def_qos_parm.qos_flags = 0; | ||
613 | |||
614 | if (priv->qos_data.qos_cap.q_AP.queue_request && | ||
615 | !priv->qos_data.qos_cap.q_AP.txop_request) | ||
616 | priv->qos_data.def_qos_parm.qos_flags |= | ||
617 | QOS_PARAM_FLG_TXOP_TYPE_MSK; | ||
618 | if (priv->qos_data.qos_active) | ||
619 | priv->qos_data.def_qos_parm.qos_flags |= | ||
620 | QOS_PARAM_FLG_UPDATE_EDCA_MSK; | ||
621 | |||
622 | if (priv->current_ht_config.is_ht) | ||
623 | priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; | ||
624 | |||
625 | if (force || iwl_is_associated(priv)) { | ||
626 | IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n", | ||
627 | priv->qos_data.qos_active, | ||
628 | priv->qos_data.def_qos_parm.qos_flags); | ||
629 | |||
630 | iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM, | ||
631 | sizeof(struct iwl_qosparam_cmd), | ||
632 | &priv->qos_data.def_qos_parm, NULL); | ||
633 | } | ||
634 | } | ||
635 | |||
636 | #define MAX_UCODE_BEACON_INTERVAL 4096 | 604 | #define MAX_UCODE_BEACON_INTERVAL 4096 |
637 | 605 | ||
638 | static u16 iwl_adjust_beacon_interval(u16 beacon_val) | 606 | static u16 iwl_adjust_beacon_interval(u16 beacon_val) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 37069d4c6c9..085e9cf1cac 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -240,6 +240,39 @@ int iwl_hw_nic_init(struct iwl_priv *priv) | |||
240 | } | 240 | } |
241 | EXPORT_SYMBOL(iwl_hw_nic_init); | 241 | EXPORT_SYMBOL(iwl_hw_nic_init); |
242 | 242 | ||
243 | /* | ||
244 | * QoS support | ||
245 | */ | ||
246 | void iwl_activate_qos(struct iwl_priv *priv, u8 force) | ||
247 | { | ||
248 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
249 | return; | ||
250 | |||
251 | priv->qos_data.def_qos_parm.qos_flags = 0; | ||
252 | |||
253 | if (priv->qos_data.qos_cap.q_AP.queue_request && | ||
254 | !priv->qos_data.qos_cap.q_AP.txop_request) | ||
255 | priv->qos_data.def_qos_parm.qos_flags |= | ||
256 | QOS_PARAM_FLG_TXOP_TYPE_MSK; | ||
257 | if (priv->qos_data.qos_active) | ||
258 | priv->qos_data.def_qos_parm.qos_flags |= | ||
259 | QOS_PARAM_FLG_UPDATE_EDCA_MSK; | ||
260 | |||
261 | if (priv->current_ht_config.is_ht) | ||
262 | priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; | ||
263 | |||
264 | if (force || iwl_is_associated(priv)) { | ||
265 | IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n", | ||
266 | priv->qos_data.qos_active, | ||
267 | priv->qos_data.def_qos_parm.qos_flags); | ||
268 | |||
269 | iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM, | ||
270 | sizeof(struct iwl_qosparam_cmd), | ||
271 | &priv->qos_data.def_qos_parm, NULL); | ||
272 | } | ||
273 | } | ||
274 | EXPORT_SYMBOL(iwl_activate_qos); | ||
275 | |||
243 | void iwl_reset_qos(struct iwl_priv *priv) | 276 | void iwl_reset_qos(struct iwl_priv *priv) |
244 | { | 277 | { |
245 | u16 cw_min = 15; | 278 | u16 cw_min = 15; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 7427d75b8c8..27310fec2e4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -224,6 +224,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, | |||
224 | struct ieee80211_ops *hw_ops); | 224 | struct ieee80211_ops *hw_ops); |
225 | void iwl_hw_detect(struct iwl_priv *priv); | 225 | void iwl_hw_detect(struct iwl_priv *priv); |
226 | void iwl_reset_qos(struct iwl_priv *priv); | 226 | void iwl_reset_qos(struct iwl_priv *priv); |
227 | void iwl_activate_qos(struct iwl_priv *priv, u8 force); | ||
227 | void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); | 228 | void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); |
228 | int iwl_check_rxon_cmd(struct iwl_priv *priv); | 229 | int iwl_check_rxon_cmd(struct iwl_priv *priv); |
229 | int iwl_full_rxon_required(struct iwl_priv *priv); | 230 | int 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 da020c35689..a2bde78e548 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -689,48 +689,6 @@ static void iwl3945_unset_hw_params(struct iwl_priv *priv) | |||
689 | priv->shared_phys); | 689 | priv->shared_phys); |
690 | } | 690 | } |
691 | 691 | ||
692 | /* | ||
693 | * QoS support | ||
694 | */ | ||
695 | static int iwl3945_send_qos_params_command(struct iwl_priv *priv, | ||
696 | struct iwl_qosparam_cmd *qos) | ||
697 | { | ||
698 | |||
699 | return iwl_send_cmd_pdu(priv, REPLY_QOS_PARAM, | ||
700 | sizeof(struct iwl_qosparam_cmd), qos); | ||
701 | } | ||
702 | |||
703 | static void iwl3945_activate_qos(struct iwl_priv *priv, u8 force) | ||
704 | { | ||
705 | unsigned long flags; | ||
706 | |||
707 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
708 | return; | ||
709 | |||
710 | spin_lock_irqsave(&priv->lock, flags); | ||
711 | priv->qos_data.def_qos_parm.qos_flags = 0; | ||
712 | |||
713 | if (priv->qos_data.qos_cap.q_AP.queue_request && | ||
714 | !priv->qos_data.qos_cap.q_AP.txop_request) | ||
715 | priv->qos_data.def_qos_parm.qos_flags |= | ||
716 | QOS_PARAM_FLG_TXOP_TYPE_MSK; | ||
717 | |||
718 | if (priv->qos_data.qos_active) | ||
719 | priv->qos_data.def_qos_parm.qos_flags |= | ||
720 | QOS_PARAM_FLG_UPDATE_EDCA_MSK; | ||
721 | |||
722 | spin_unlock_irqrestore(&priv->lock, flags); | ||
723 | |||
724 | if (force || iwl_is_associated(priv)) { | ||
725 | IWL_DEBUG_QOS(priv, "send QoS cmd with QoS active %d \n", | ||
726 | priv->qos_data.qos_active); | ||
727 | |||
728 | iwl3945_send_qos_params_command(priv, | ||
729 | &(priv->qos_data.def_qos_parm)); | ||
730 | } | ||
731 | } | ||
732 | |||
733 | |||
734 | #define MAX_UCODE_BEACON_INTERVAL 1024 | 692 | #define MAX_UCODE_BEACON_INTERVAL 1024 |
735 | #define INTEL_CONN_LISTEN_INTERVAL cpu_to_le16(0xA) | 693 | #define INTEL_CONN_LISTEN_INTERVAL cpu_to_le16(0xA) |
736 | 694 | ||
@@ -3663,7 +3621,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv) | |||
3663 | break; | 3621 | break; |
3664 | } | 3622 | } |
3665 | 3623 | ||
3666 | iwl3945_activate_qos(priv, 0); | 3624 | iwl_activate_qos(priv, 0); |
3667 | 3625 | ||
3668 | /* we have just associated, don't start scan too early */ | 3626 | /* we have just associated, don't start scan too early */ |
3669 | priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN; | 3627 | priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN; |
@@ -4262,9 +4220,9 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
4262 | 4220 | ||
4263 | mutex_lock(&priv->mutex); | 4221 | mutex_lock(&priv->mutex); |
4264 | if (priv->iw_mode == NL80211_IFTYPE_AP) | 4222 | if (priv->iw_mode == NL80211_IFTYPE_AP) |
4265 | iwl3945_activate_qos(priv, 1); | 4223 | iwl_activate_qos(priv, 1); |
4266 | else if (priv->assoc_id && iwl_is_associated(priv)) | 4224 | else if (priv->assoc_id && iwl_is_associated(priv)) |
4267 | iwl3945_activate_qos(priv, 0); | 4225 | iwl_activate_qos(priv, 0); |
4268 | 4226 | ||
4269 | mutex_unlock(&priv->mutex); | 4227 | mutex_unlock(&priv->mutex); |
4270 | 4228 | ||