diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-04-08 14:26:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:42 -0400 |
commit | 45823531662028a8cbd68906c20e887bb287c85e (patch) | |
tree | e8dc18b6372a1aacbc4f5bf50b1aec091e8f91d0 | |
parent | f5d3026683da45e00c49a24999ad0d256e4651d5 (diff) |
iwlwifi: add set_rxon_chain op
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 |
5 files changed, 28 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index e98849edafd5..ab25e6ab59d5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2278,6 +2278,7 @@ static struct iwl_station_mgmt_ops iwl4965_station_mgmt = { | |||
2278 | static struct iwl_hcmd_ops iwl4965_hcmd = { | 2278 | static struct iwl_hcmd_ops iwl4965_hcmd = { |
2279 | .rxon_assoc = iwl4965_send_rxon_assoc, | 2279 | .rxon_assoc = iwl4965_send_rxon_assoc, |
2280 | .commit_rxon = iwl_commit_rxon, | 2280 | .commit_rxon = iwl_commit_rxon, |
2281 | .set_rxon_chain = iwl_set_rxon_chain, | ||
2281 | }; | 2282 | }; |
2282 | 2283 | ||
2283 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { | 2284 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 52ee77347328..cf622a14bfe2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1482,6 +1482,7 @@ struct iwl_station_mgmt_ops iwl5000_station_mgmt = { | |||
1482 | struct iwl_hcmd_ops iwl5000_hcmd = { | 1482 | struct iwl_hcmd_ops iwl5000_hcmd = { |
1483 | .rxon_assoc = iwl5000_send_rxon_assoc, | 1483 | .rxon_assoc = iwl5000_send_rxon_assoc, |
1484 | .commit_rxon = iwl_commit_rxon, | 1484 | .commit_rxon = iwl_commit_rxon, |
1485 | .set_rxon_chain = iwl_set_rxon_chain, | ||
1485 | }; | 1486 | }; |
1486 | 1487 | ||
1487 | struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { | 1488 | struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 565a441052eb..11e17923ad01 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -246,7 +246,8 @@ int iwl_commit_rxon(struct iwl_priv *priv) | |||
246 | void iwl_update_chain_flags(struct iwl_priv *priv) | 246 | void iwl_update_chain_flags(struct iwl_priv *priv) |
247 | { | 247 | { |
248 | 248 | ||
249 | iwl_set_rxon_chain(priv); | 249 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
250 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
250 | iwlcore_commit_rxon(priv); | 251 | iwlcore_commit_rxon(priv); |
251 | } | 252 | } |
252 | 253 | ||
@@ -590,7 +591,10 @@ static void iwl_setup_rxon_timing(struct iwl_priv *priv) | |||
590 | static int iwl_set_mode(struct iwl_priv *priv, int mode) | 591 | static int iwl_set_mode(struct iwl_priv *priv, int mode) |
591 | { | 592 | { |
592 | iwl_connection_init_rx_config(priv, mode); | 593 | iwl_connection_init_rx_config(priv, mode); |
593 | iwl_set_rxon_chain(priv); | 594 | |
595 | if (priv->cfg->ops->hcmd->set_rxon_chain) | ||
596 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
597 | |||
594 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); | 598 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); |
595 | 599 | ||
596 | priv->cfg->ops->smgmt->clear_station_table(priv); | 600 | priv->cfg->ops->smgmt->clear_station_table(priv); |
@@ -1499,7 +1503,10 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
1499 | } else { | 1503 | } else { |
1500 | /* Initialize our rx_config data */ | 1504 | /* Initialize our rx_config data */ |
1501 | iwl_connection_init_rx_config(priv, priv->iw_mode); | 1505 | iwl_connection_init_rx_config(priv, priv->iw_mode); |
1502 | iwl_set_rxon_chain(priv); | 1506 | |
1507 | if (priv->cfg->ops->hcmd->set_rxon_chain) | ||
1508 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
1509 | |||
1503 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); | 1510 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); |
1504 | } | 1511 | } |
1505 | 1512 | ||
@@ -1878,7 +1885,9 @@ void iwl_post_associate(struct iwl_priv *priv) | |||
1878 | 1885 | ||
1879 | iwl_set_rxon_ht(priv, &priv->current_ht_config); | 1886 | iwl_set_rxon_ht(priv, &priv->current_ht_config); |
1880 | 1887 | ||
1881 | iwl_set_rxon_chain(priv); | 1888 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
1889 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
1890 | |||
1882 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); | 1891 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); |
1883 | 1892 | ||
1884 | IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", | 1893 | 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) | |||
2182 | } | 2191 | } |
2183 | 2192 | ||
2184 | /* call to ensure that 4965 rx_chain is set properly in monitor mode */ | 2193 | /* call to ensure that 4965 rx_chain is set properly in monitor mode */ |
2185 | iwl_set_rxon_chain(priv); | 2194 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
2195 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
2186 | 2196 | ||
2187 | if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) { | 2197 | if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) { |
2188 | if (conf->radio_enabled && | 2198 | if (conf->radio_enabled && |
@@ -2245,7 +2255,8 @@ static void iwl_config_ap(struct iwl_priv *priv) | |||
2245 | IWL_WARN(priv, "REPLY_RXON_TIMING failed - " | 2255 | IWL_WARN(priv, "REPLY_RXON_TIMING failed - " |
2246 | "Attempting to continue.\n"); | 2256 | "Attempting to continue.\n"); |
2247 | 2257 | ||
2248 | iwl_set_rxon_chain(priv); | 2258 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
2259 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
2249 | 2260 | ||
2250 | /* FIXME: what should be the assoc_id for AP? */ | 2261 | /* FIXME: what should be the assoc_id for AP? */ |
2251 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); | 2262 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 0532d99b9085..cca37af3243f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -821,7 +821,8 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info) | |||
821 | 821 | ||
822 | rxon->flags |= cpu_to_le32(val << RXON_FLG_HT_OPERATING_MODE_POS); | 822 | rxon->flags |= cpu_to_le32(val << RXON_FLG_HT_OPERATING_MODE_POS); |
823 | 823 | ||
824 | iwl_set_rxon_chain(priv); | 824 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
825 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
825 | 826 | ||
826 | IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X " | 827 | IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X " |
827 | "rxon flags 0x%X operation mode :0x%X " | 828 | "rxon flags 0x%X operation mode :0x%X " |
@@ -1380,7 +1381,9 @@ int iwl_init_drv(struct iwl_priv *priv) | |||
1380 | priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; | 1381 | priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; |
1381 | 1382 | ||
1382 | /* Choose which receivers/antennas to use */ | 1383 | /* Choose which receivers/antennas to use */ |
1383 | iwl_set_rxon_chain(priv); | 1384 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
1385 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
1386 | |||
1384 | iwl_init_scan_params(priv); | 1387 | iwl_init_scan_params(priv); |
1385 | 1388 | ||
1386 | iwl_reset_qos(priv); | 1389 | iwl_reset_qos(priv); |
@@ -2257,7 +2260,9 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2257 | 2260 | ||
2258 | if (changes & BSS_CHANGED_HT) { | 2261 | if (changes & BSS_CHANGED_HT) { |
2259 | iwl_ht_conf(priv, bss_conf); | 2262 | iwl_ht_conf(priv, bss_conf); |
2260 | iwl_set_rxon_chain(priv); | 2263 | |
2264 | if (priv->cfg->ops->hcmd->set_rxon_chain) | ||
2265 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | ||
2261 | } | 2266 | } |
2262 | 2267 | ||
2263 | if (changes & BSS_CHANGED_ASSOC) { | 2268 | if (changes & BSS_CHANGED_ASSOC) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 383590cd8b02..f5eff747e964 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -95,6 +95,7 @@ struct iwl_station_mgmt_ops { | |||
95 | struct iwl_hcmd_ops { | 95 | struct iwl_hcmd_ops { |
96 | int (*rxon_assoc)(struct iwl_priv *priv); | 96 | int (*rxon_assoc)(struct iwl_priv *priv); |
97 | int (*commit_rxon)(struct iwl_priv *priv); | 97 | int (*commit_rxon)(struct iwl_priv *priv); |
98 | void (*set_rxon_chain)(struct iwl_priv *priv); | ||
98 | }; | 99 | }; |
99 | 100 | ||
100 | struct iwl_hcmd_utils_ops { | 101 | struct iwl_hcmd_utils_ops { |