aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-12-02 15:14:07 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:35:56 -0500
commit011a03300bdd60782f465b97c3aefd58bfaae316 (patch)
treeacceb5357eca2edcae466e1ff978cf36f603c871 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parenta0987a8d68c86562f267efa97be01314c490c496 (diff)
iwl3945 : Fix a-band association for passive channels
Patch does following things 1) This patch fixes the a-band association for passive channels with new uCode feature that it allows direct scan on passive channels after auto-switch from passive to active. This enables sending of direct probes on passive channels, as long as some traffic is detected on that channel. This improves the scanning for hidden SSIDs in A-band,which is all passive channels. This patch fixes the bug no 1748. http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1748 2) This fix will only work with uCode version 15.28.2.8 and above. Prior versions of uCode would work only if we heard the traffic within active dwell time, which is much shorter than passive dwell time and is shorter than typical beacon periods. This patch also provids full active dwell time even if we hear traffic late in passive dwell. 3) uCode API version is incremented to 2. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 1d3efa9d01b4..1a411c2d83e6 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4785,17 +4785,33 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
4785 continue; 4785 continue;
4786 } 4786 }
4787 4787
4788 scan_ch->active_dwell = cpu_to_le16(active_dwell);
4789 scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
4790 /* If passive , set up for auto-switch
4791 * and use long active_dwell time.
4792 */
4788 if (!is_active || is_channel_passive(ch_info) || 4793 if (!is_active || is_channel_passive(ch_info) ||
4789 (channels[i].flags & IEEE80211_CHAN_PASSIVE_SCAN)) 4794 (channels[i].flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
4790 scan_ch->type = 0; /* passive */ 4795 scan_ch->type = 0; /* passive */
4791 else 4796 if (IWL_UCODE_API(priv->ucode_ver) == 1)
4797 scan_ch->active_dwell = cpu_to_le16(passive_dwell - 1);
4798 } else {
4792 scan_ch->type = 1; /* active */ 4799 scan_ch->type = 1; /* active */
4800 }
4793 4801
4794 if ((scan_ch->type & 1) && n_probes) 4802 /* Set direct probe bits. These may be used both for active
4795 scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); 4803 * scan channels (probes gets sent right away),
4796 4804 * or for passive channels (probes get se sent only after
4797 scan_ch->active_dwell = cpu_to_le16(active_dwell); 4805 * hearing clear Rx packet).*/
4798 scan_ch->passive_dwell = cpu_to_le16(passive_dwell); 4806 if (IWL_UCODE_API(priv->ucode_ver) >= 2) {
4807 if (n_probes)
4808 scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes);
4809 } else {
4810 /* uCode v1 does not allow setting direct probe bits on
4811 * passive channel. */
4812 if ((scan_ch->type & 1) && n_probes)
4813 scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes);
4814 }
4799 4815
4800 /* Set txpower levels to defaults */ 4816 /* Set txpower levels to defaults */
4801 scan_ch->tpc.dsp_atten = 110; 4817 scan_ch->tpc.dsp_atten = 110;