aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-04-15 19:01:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 16:00:00 -0400
commit7e8c519ecbd44cbe017f1749eb1f0f87d86d6ea2 (patch)
treed38d4391d34e817fa958d132a627bff706bf4b9b /drivers/net/wireless/iwlwifi/iwl-4965.c
parent3c424c281a9887733ab936477c327cdb2a7ae367 (diff)
iwlwifi: move rxon associated command to hcmd
This patch run rxon associated command from hcmd handler Signed-off-by: Tomas Winkler <tomas.winkler@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-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 9fa803ad9cf7..2e747129f6b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2884,6 +2884,46 @@ out:
2884 return ret; 2884 return ret;
2885} 2885}
2886 2886
2887static int iwl4965_send_rxon_assoc(struct iwl_priv *priv)
2888{
2889 int ret = 0;
2890 struct iwl4965_rxon_assoc_cmd rxon_assoc;
2891 const struct iwl4965_rxon_cmd *rxon1 = &priv->staging_rxon;
2892 const struct iwl4965_rxon_cmd *rxon2 = &priv->active_rxon;
2893
2894 if ((rxon1->flags == rxon2->flags) &&
2895 (rxon1->filter_flags == rxon2->filter_flags) &&
2896 (rxon1->cck_basic_rates == rxon2->cck_basic_rates) &&
2897 (rxon1->ofdm_ht_single_stream_basic_rates ==
2898 rxon2->ofdm_ht_single_stream_basic_rates) &&
2899 (rxon1->ofdm_ht_dual_stream_basic_rates ==
2900 rxon2->ofdm_ht_dual_stream_basic_rates) &&
2901 (rxon1->rx_chain == rxon2->rx_chain) &&
2902 (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) {
2903 IWL_DEBUG_INFO("Using current RXON_ASSOC. Not resending.\n");
2904 return 0;
2905 }
2906
2907 rxon_assoc.flags = priv->staging_rxon.flags;
2908 rxon_assoc.filter_flags = priv->staging_rxon.filter_flags;
2909 rxon_assoc.ofdm_basic_rates = priv->staging_rxon.ofdm_basic_rates;
2910 rxon_assoc.cck_basic_rates = priv->staging_rxon.cck_basic_rates;
2911 rxon_assoc.reserved = 0;
2912 rxon_assoc.ofdm_ht_single_stream_basic_rates =
2913 priv->staging_rxon.ofdm_ht_single_stream_basic_rates;
2914 rxon_assoc.ofdm_ht_dual_stream_basic_rates =
2915 priv->staging_rxon.ofdm_ht_dual_stream_basic_rates;
2916 rxon_assoc.rx_chain_select_flags = priv->staging_rxon.rx_chain;
2917
2918 ret = iwl_send_cmd_pdu_async(priv, REPLY_RXON_ASSOC,
2919 sizeof(rxon_assoc), &rxon_assoc, NULL);
2920 if (ret)
2921 return ret;
2922
2923 return ret;
2924}
2925
2926
2887int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel) 2927int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel)
2888{ 2928{
2889 int rc; 2929 int rc;
@@ -4907,6 +4947,7 @@ void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv)
4907 4947
4908 4948
4909static struct iwl_hcmd_ops iwl4965_hcmd = { 4949static struct iwl_hcmd_ops iwl4965_hcmd = {
4950 .rxon_assoc = iwl4965_send_rxon_assoc,
4910}; 4951};
4911 4952
4912static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { 4953static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = {