diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-09-02 23:26:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-08 14:23:15 -0400 |
commit | 17e72782f02fe732d687e5bc2bb0ce10424d2819 (patch) | |
tree | e7928fdbe015f1266cf30f5303beef5630993143 | |
parent | 681c0050ea3ac2e90c83d5af397d73eed848a372 (diff) |
iwlwifi: align set channel with mac80211
This patch makes use of mac80211 defaults for channel and band.
Older code that uses G band channel 6 was removed. This patch also
changes iwl_set_rxon_channel signature.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7b8af9609e08..df5763c77af6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2841,7 +2841,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
2841 | ) | 2841 | ) |
2842 | priv->staging_rxon.flags = 0; | 2842 | priv->staging_rxon.flags = 0; |
2843 | 2843 | ||
2844 | iwl_set_rxon_channel(priv, conf->channel->band, channel); | 2844 | iwl_set_rxon_channel(priv, conf->channel); |
2845 | 2845 | ||
2846 | iwl_set_flags_for_band(priv, conf->channel->band); | 2846 | iwl_set_flags_for_band(priv, conf->channel->band); |
2847 | 2847 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 0a511ef8e354..0f9f8b65bf57 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -773,7 +773,7 @@ void iwl_set_rxon_chain(struct iwl_priv *priv) | |||
773 | EXPORT_SYMBOL(iwl_set_rxon_chain); | 773 | EXPORT_SYMBOL(iwl_set_rxon_chain); |
774 | 774 | ||
775 | /** | 775 | /** |
776 | * iwlcore_set_rxon_channel - Set the phymode and channel values in staging RXON | 776 | * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON |
777 | * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz | 777 | * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz |
778 | * @channel: Any channel valid for the requested phymode | 778 | * @channel: Any channel valid for the requested phymode |
779 | 779 | ||
@@ -782,10 +782,11 @@ EXPORT_SYMBOL(iwl_set_rxon_chain); | |||
782 | * NOTE: Does not commit to the hardware; it sets appropriate bit fields | 782 | * NOTE: Does not commit to the hardware; it sets appropriate bit fields |
783 | * in the staging RXON flag structure based on the phymode | 783 | * in the staging RXON flag structure based on the phymode |
784 | */ | 784 | */ |
785 | int iwl_set_rxon_channel(struct iwl_priv *priv, | 785 | int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch) |
786 | enum ieee80211_band band, | ||
787 | u16 channel) | ||
788 | { | 786 | { |
787 | enum ieee80211_band band = ch->band; | ||
788 | u16 channel = ieee80211_frequency_to_channel(ch->center_freq); | ||
789 | |||
789 | if (!iwl_get_channel_info(priv, band, channel)) { | 790 | if (!iwl_get_channel_info(priv, band, channel)) { |
790 | IWL_DEBUG_INFO("Could not set channel to %d [%d]\n", | 791 | IWL_DEBUG_INFO("Could not set channel to %d [%d]\n", |
791 | channel, band); | 792 | channel, band); |
@@ -910,8 +911,6 @@ int iwl_init_drv(struct iwl_priv *priv) | |||
910 | priv->qos_data.qos_active = 0; | 911 | priv->qos_data.qos_active = 0; |
911 | priv->qos_data.qos_cap.val = 0; | 912 | priv->qos_data.qos_cap.val = 0; |
912 | 913 | ||
913 | iwl_set_rxon_channel(priv, IEEE80211_BAND_2GHZ, 6); | ||
914 | |||
915 | priv->rates_mask = IWL_RATES_MASK; | 914 | priv->rates_mask = IWL_RATES_MASK; |
916 | /* If power management is turned on, default to AC mode */ | 915 | /* If power management is turned on, default to AC mode */ |
917 | priv->power_mode = IWL_POWER_AC; | 916 | priv->power_mode = IWL_POWER_AC; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 64f139e97444..ff86abc668ba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -189,9 +189,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv); | |||
189 | void iwl_free_calib_results(struct iwl_priv *priv); | 189 | void iwl_free_calib_results(struct iwl_priv *priv); |
190 | void iwl_reset_qos(struct iwl_priv *priv); | 190 | void iwl_reset_qos(struct iwl_priv *priv); |
191 | void iwl_set_rxon_chain(struct iwl_priv *priv); | 191 | void iwl_set_rxon_chain(struct iwl_priv *priv); |
192 | int iwl_set_rxon_channel(struct iwl_priv *priv, | 192 | int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch); |
193 | enum ieee80211_band band, | ||
194 | u16 channel); | ||
195 | void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info); | 193 | void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info); |
196 | u8 iwl_is_fat_tx_allowed(struct iwl_priv *priv, | 194 | u8 iwl_is_fat_tx_allowed(struct iwl_priv *priv, |
197 | struct ieee80211_ht_info *sta_ht_inf); | 195 | struct ieee80211_ht_info *sta_ht_inf); |