aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-09-02 23:26:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-08 14:23:15 -0400
commit17e72782f02fe732d687e5bc2bb0ce10424d2819 (patch)
treee7928fdbe015f1266cf30f5303beef5630993143 /drivers/net/wireless/iwlwifi/iwl-core.c
parent681c0050ea3ac2e90c83d5af397d73eed848a372 (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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c11
1 files changed, 5 insertions, 6 deletions
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)
773EXPORT_SYMBOL(iwl_set_rxon_chain); 773EXPORT_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 */
785int iwl_set_rxon_channel(struct iwl_priv *priv, 785int 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;