aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-07-18 21:41:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-04 15:09:10 -0400
commitb5d7be5e665f29274cfe6645b661acb38cb1d19b (patch)
tree2a303ae42492b790be68e92675b5be79a8e4c984 /drivers
parente170402e5459c12ed8f5bfaa11e6550eba09e57a (diff)
iwlwifi: use dtim_period from association, and set listen_interval
This patch uses dtim_period from association, and sets the listen_interval. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index cd6d668f4e00..5e57f3ae2ea6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -666,8 +666,7 @@ struct iwl4965_rxon_assoc_cmd {
666 __le16 reserved; 666 __le16 reserved;
667} __attribute__ ((packed)); 667} __attribute__ ((packed));
668 668
669 669#define IWL_CONN_MAX_LISTEN_INTERVAL 10
670
671 670
672/* 671/*
673 * REPLY_RXON_TIMING = 0x14 (command, has simple generic response) 672 * REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 60d443e77c38..96beacf703a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -827,6 +827,7 @@ int iwl_setup_mac(struct iwl_priv *priv)
827 hw->ampdu_queues = priv->cfg->mod_params->num_of_ampdu_queues; 827 hw->ampdu_queues = priv->cfg->mod_params->num_of_ampdu_queues;
828 828
829 hw->conf.beacon_int = 100; 829 hw->conf.beacon_int = 100;
830 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL;
830 831
831 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels) 832 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
832 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 833 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 9db6aac02185..f71b3f3f81ba 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -639,7 +639,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
639} 639}
640 640
641#define MAX_UCODE_BEACON_INTERVAL 4096 641#define MAX_UCODE_BEACON_INTERVAL 4096
642#define INTEL_CONN_LISTEN_INTERVAL __constant_cpu_to_le16(0xA)
643 642
644static __le16 iwl4965_adjust_beacon_interval(u16 beacon_val) 643static __le16 iwl4965_adjust_beacon_interval(u16 beacon_val)
645{ 644{
@@ -669,7 +668,7 @@ static void iwl4965_setup_rxon_timing(struct iwl_priv *priv)
669 priv->rxon_timing.timestamp.dw[0] = 668 priv->rxon_timing.timestamp.dw[0] =
670 cpu_to_le32(priv->timestamp & 0xFFFFFFFF); 669 cpu_to_le32(priv->timestamp & 0xFFFFFFFF);
671 670
672 priv->rxon_timing.listen_interval = INTEL_CONN_LISTEN_INTERVAL; 671 priv->rxon_timing.listen_interval = cpu_to_le16(conf->listen_interval);
673 672
674 tsf = priv->timestamp; 673 tsf = priv->timestamp;
675 674
@@ -2835,6 +2834,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
2835 2834
2836 spin_lock_irqsave(&priv->lock, flags); 2835 spin_lock_irqsave(&priv->lock, flags);
2837 2836
2837
2838 /* if we are switching from ht to 2.4 clear flags 2838 /* if we are switching from ht to 2.4 clear flags
2839 * from any ht related info since 2.4 does not 2839 * from any ht related info since 2.4 does not
2840 * support ht */ 2840 * support ht */
@@ -3164,6 +3164,7 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
3164 if (bss_conf->assoc) { 3164 if (bss_conf->assoc) {
3165 priv->assoc_id = bss_conf->aid; 3165 priv->assoc_id = bss_conf->aid;
3166 priv->beacon_int = bss_conf->beacon_int; 3166 priv->beacon_int = bss_conf->beacon_int;
3167 priv->power_data.dtim_period = bss_conf->dtim_period;
3167 priv->timestamp = bss_conf->timestamp; 3168 priv->timestamp = bss_conf->timestamp;
3168 priv->assoc_capability = bss_conf->assoc_capability; 3169 priv->assoc_capability = bss_conf->assoc_capability;
3169 priv->next_scan_jiffies = jiffies + 3170 priv->next_scan_jiffies = jiffies +