]> Pileus Git - ~andy/linux/commitdiff
iwlwifi: add set_rxon_chain op
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Wed, 8 Apr 2009 18:26:44 +0000 (11:26 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Apr 2009 20:54:42 +0000 (16:54 -0400)
add set_rxon_chain op to iwlwifi cfg ops in preparation of
future 3945 porting work.

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>
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h

index e98849edafd59d76d4ec20a0d3d77c3b7c2e1c59..ab25e6ab59d57a1a9555ec20165abcf7c9405a05 100644 (file)
@@ -2278,6 +2278,7 @@ static struct iwl_station_mgmt_ops iwl4965_station_mgmt = {
 static struct iwl_hcmd_ops iwl4965_hcmd = {
        .rxon_assoc = iwl4965_send_rxon_assoc,
        .commit_rxon = iwl_commit_rxon,
+       .set_rxon_chain = iwl_set_rxon_chain,
 };
 
 static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = {
index 52ee7734732841fc45c7ff40c79838d5c8dd9510..cf622a14bfe28d7425e6dedd6e0cbb5509ab911c 100644 (file)
@@ -1482,6 +1482,7 @@ struct iwl_station_mgmt_ops iwl5000_station_mgmt = {
 struct iwl_hcmd_ops iwl5000_hcmd = {
        .rxon_assoc = iwl5000_send_rxon_assoc,
        .commit_rxon = iwl_commit_rxon,
+       .set_rxon_chain = iwl_set_rxon_chain,
 };
 
 struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {
index 565a441052eb306328c09a4b24f786a9f6606837..11e17923ad01dd91f1a7fd923e43be12d8ad3b36 100644 (file)
@@ -246,7 +246,8 @@ int iwl_commit_rxon(struct iwl_priv *priv)
 void iwl_update_chain_flags(struct iwl_priv *priv)
 {
 
-       iwl_set_rxon_chain(priv);
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
        iwlcore_commit_rxon(priv);
 }
 
@@ -590,7 +591,10 @@ static void iwl_setup_rxon_timing(struct iwl_priv *priv)
 static int iwl_set_mode(struct iwl_priv *priv, int mode)
 {
        iwl_connection_init_rx_config(priv, mode);
-       iwl_set_rxon_chain(priv);
+
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
+
        memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
 
        priv->cfg->ops->smgmt->clear_station_table(priv);
@@ -1499,7 +1503,10 @@ static void iwl_alive_start(struct iwl_priv *priv)
        } else {
                /* Initialize our rx_config data */
                iwl_connection_init_rx_config(priv, priv->iw_mode);
-               iwl_set_rxon_chain(priv);
+
+               if (priv->cfg->ops->hcmd->set_rxon_chain)
+                       priv->cfg->ops->hcmd->set_rxon_chain(priv);
+
                memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
        }
 
@@ -1878,7 +1885,9 @@ void iwl_post_associate(struct iwl_priv *priv)
 
        iwl_set_rxon_ht(priv, &priv->current_ht_config);
 
-       iwl_set_rxon_chain(priv);
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
+
        priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
 
        IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n",
@@ -2182,7 +2191,8 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
        }
 
        /* call to ensure that 4965 rx_chain is set properly in monitor mode */
-       iwl_set_rxon_chain(priv);
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
 
        if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) {
                if (conf->radio_enabled &&
@@ -2245,7 +2255,8 @@ static void iwl_config_ap(struct iwl_priv *priv)
                        IWL_WARN(priv, "REPLY_RXON_TIMING failed - "
                                        "Attempting to continue.\n");
 
-               iwl_set_rxon_chain(priv);
+               if (priv->cfg->ops->hcmd->set_rxon_chain)
+                       priv->cfg->ops->hcmd->set_rxon_chain(priv);
 
                /* FIXME: what should be the assoc_id for AP? */
                priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
index 0532d99b90855662aedb129c82b15ad1a3e3bd9c..cca37af3243f6cb0fd25252f004c52904ba2222b 100644 (file)
@@ -821,7 +821,8 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
 
        rxon->flags |= cpu_to_le32(val << RXON_FLG_HT_OPERATING_MODE_POS);
 
-       iwl_set_rxon_chain(priv);
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
 
        IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X "
                        "rxon flags 0x%X operation mode :0x%X "
@@ -1380,7 +1381,9 @@ int iwl_init_drv(struct iwl_priv *priv)
        priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED;
 
        /* Choose which receivers/antennas to use */
-       iwl_set_rxon_chain(priv);
+       if (priv->cfg->ops->hcmd->set_rxon_chain)
+               priv->cfg->ops->hcmd->set_rxon_chain(priv);
+
        iwl_init_scan_params(priv);
 
        iwl_reset_qos(priv);
@@ -2257,7 +2260,9 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
 
        if (changes & BSS_CHANGED_HT) {
                iwl_ht_conf(priv, bss_conf);
-               iwl_set_rxon_chain(priv);
+
+               if (priv->cfg->ops->hcmd->set_rxon_chain)
+                       priv->cfg->ops->hcmd->set_rxon_chain(priv);
        }
 
        if (changes & BSS_CHANGED_ASSOC) {
index 383590cd8b0201f6d33c95cf7b9d97b906a2b7c4..f5eff747e964b5796bb2b1c8f62ab62bc5c9f3b0 100644 (file)
@@ -95,6 +95,7 @@ struct iwl_station_mgmt_ops {
 struct iwl_hcmd_ops {
        int (*rxon_assoc)(struct iwl_priv *priv);
        int (*commit_rxon)(struct iwl_priv *priv);
+       void (*set_rxon_chain)(struct iwl_priv *priv);
 };
 
 struct iwl_hcmd_utils_ops {