Commit 14d2aac5 authored by Abhijeet Kolekar's avatar Abhijeet Kolekar Committed by John W. Linville

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: default avatarAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2a4ddaab
...@@ -601,38 +601,6 @@ static void iwl_ht_conf(struct iwl_priv *priv, ...@@ -601,38 +601,6 @@ static void iwl_ht_conf(struct iwl_priv *priv,
IWL_DEBUG_MAC80211(priv, "leave\n"); IWL_DEBUG_MAC80211(priv, "leave\n");
} }
/*
* QoS support
*/
static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
{
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
priv->qos_data.def_qos_parm.qos_flags = 0;
if (priv->qos_data.qos_cap.q_AP.queue_request &&
!priv->qos_data.qos_cap.q_AP.txop_request)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_TXOP_TYPE_MSK;
if (priv->qos_data.qos_active)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_UPDATE_EDCA_MSK;
if (priv->current_ht_config.is_ht)
priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
if (force || iwl_is_associated(priv)) {
IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
priv->qos_data.qos_active,
priv->qos_data.def_qos_parm.qos_flags);
iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM,
sizeof(struct iwl_qosparam_cmd),
&priv->qos_data.def_qos_parm, NULL);
}
}
#define MAX_UCODE_BEACON_INTERVAL 4096 #define MAX_UCODE_BEACON_INTERVAL 4096
static u16 iwl_adjust_beacon_interval(u16 beacon_val) static u16 iwl_adjust_beacon_interval(u16 beacon_val)
......
...@@ -240,6 +240,39 @@ int iwl_hw_nic_init(struct iwl_priv *priv) ...@@ -240,6 +240,39 @@ int iwl_hw_nic_init(struct iwl_priv *priv)
} }
EXPORT_SYMBOL(iwl_hw_nic_init); EXPORT_SYMBOL(iwl_hw_nic_init);
/*
* QoS support
*/
void iwl_activate_qos(struct iwl_priv *priv, u8 force)
{
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
priv->qos_data.def_qos_parm.qos_flags = 0;
if (priv->qos_data.qos_cap.q_AP.queue_request &&
!priv->qos_data.qos_cap.q_AP.txop_request)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_TXOP_TYPE_MSK;
if (priv->qos_data.qos_active)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_UPDATE_EDCA_MSK;
if (priv->current_ht_config.is_ht)
priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
if (force || iwl_is_associated(priv)) {
IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
priv->qos_data.qos_active,
priv->qos_data.def_qos_parm.qos_flags);
iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM,
sizeof(struct iwl_qosparam_cmd),
&priv->qos_data.def_qos_parm, NULL);
}
}
EXPORT_SYMBOL(iwl_activate_qos);
void iwl_reset_qos(struct iwl_priv *priv) void iwl_reset_qos(struct iwl_priv *priv)
{ {
u16 cw_min = 15; u16 cw_min = 15;
......
...@@ -224,6 +224,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, ...@@ -224,6 +224,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
struct ieee80211_ops *hw_ops); struct ieee80211_ops *hw_ops);
void iwl_hw_detect(struct iwl_priv *priv); void iwl_hw_detect(struct iwl_priv *priv);
void iwl_reset_qos(struct iwl_priv *priv); void iwl_reset_qos(struct iwl_priv *priv);
void iwl_activate_qos(struct iwl_priv *priv, u8 force);
void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt);
int iwl_check_rxon_cmd(struct iwl_priv *priv); int iwl_check_rxon_cmd(struct iwl_priv *priv);
int iwl_full_rxon_required(struct iwl_priv *priv); int iwl_full_rxon_required(struct iwl_priv *priv);
......
...@@ -689,48 +689,6 @@ static void iwl3945_unset_hw_params(struct iwl_priv *priv) ...@@ -689,48 +689,6 @@ static void iwl3945_unset_hw_params(struct iwl_priv *priv)
priv->shared_phys); priv->shared_phys);
} }
/*
* QoS support
*/
static int iwl3945_send_qos_params_command(struct iwl_priv *priv,
struct iwl_qosparam_cmd *qos)
{
return iwl_send_cmd_pdu(priv, REPLY_QOS_PARAM,
sizeof(struct iwl_qosparam_cmd), qos);
}
static void iwl3945_activate_qos(struct iwl_priv *priv, u8 force)
{
unsigned long flags;
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
spin_lock_irqsave(&priv->lock, flags);
priv->qos_data.def_qos_parm.qos_flags = 0;
if (priv->qos_data.qos_cap.q_AP.queue_request &&
!priv->qos_data.qos_cap.q_AP.txop_request)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_TXOP_TYPE_MSK;
if (priv->qos_data.qos_active)
priv->qos_data.def_qos_parm.qos_flags |=
QOS_PARAM_FLG_UPDATE_EDCA_MSK;
spin_unlock_irqrestore(&priv->lock, flags);
if (force || iwl_is_associated(priv)) {
IWL_DEBUG_QOS(priv, "send QoS cmd with QoS active %d \n",
priv->qos_data.qos_active);
iwl3945_send_qos_params_command(priv,
&(priv->qos_data.def_qos_parm));
}
}
#define MAX_UCODE_BEACON_INTERVAL 1024 #define MAX_UCODE_BEACON_INTERVAL 1024
#define INTEL_CONN_LISTEN_INTERVAL cpu_to_le16(0xA) #define INTEL_CONN_LISTEN_INTERVAL cpu_to_le16(0xA)
...@@ -3663,7 +3621,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv) ...@@ -3663,7 +3621,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv)
break; break;
} }
iwl3945_activate_qos(priv, 0); iwl_activate_qos(priv, 0);
/* we have just associated, don't start scan too early */ /* we have just associated, don't start scan too early */
priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN; 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,9 +4220,9 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
if (priv->iw_mode == NL80211_IFTYPE_AP) if (priv->iw_mode == NL80211_IFTYPE_AP)
iwl3945_activate_qos(priv, 1); iwl_activate_qos(priv, 1);
else if (priv->assoc_id && iwl_is_associated(priv)) else if (priv->assoc_id && iwl_is_associated(priv))
iwl3945_activate_qos(priv, 0); iwl_activate_qos(priv, 0);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment