Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122522
b: refs/heads/master
c: 011a033
h: refs/heads/master
v: v3
  • Loading branch information
Abhijeet Kolekar authored and John W. Linville committed Dec 5, 2008
1 parent d9dc11f commit e889326
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0987a8d68c86562f267efa97be01314c490c496
refs/heads/master: 011a03300bdd60782f465b97c3aefd58bfaae316
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern struct pci_device_id iwl3945_hw_card_ids[];
#include "iwl-3945-led.h"

/* Highest firmware API version supported */
#define IWL3945_UCODE_API_MAX 1
#define IWL3945_UCODE_API_MAX 2

/* Lowest firmware API version supported */
#define IWL3945_UCODE_API_MIN 1
Expand Down
30 changes: 23 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -4785,17 +4785,33 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
continue;
}

scan_ch->active_dwell = cpu_to_le16(active_dwell);
scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
/* If passive , set up for auto-switch
* and use long active_dwell time.
*/
if (!is_active || is_channel_passive(ch_info) ||
(channels[i].flags & IEEE80211_CHAN_PASSIVE_SCAN))
(channels[i].flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
scan_ch->type = 0; /* passive */
else
if (IWL_UCODE_API(priv->ucode_ver) == 1)
scan_ch->active_dwell = cpu_to_le16(passive_dwell - 1);
} else {
scan_ch->type = 1; /* active */
}

if ((scan_ch->type & 1) && n_probes)
scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes);

scan_ch->active_dwell = cpu_to_le16(active_dwell);
scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
/* Set direct probe bits. These may be used both for active
* scan channels (probes gets sent right away),
* or for passive channels (probes get se sent only after
* hearing clear Rx packet).*/
if (IWL_UCODE_API(priv->ucode_ver) >= 2) {
if (n_probes)
scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes);
} else {
/* uCode v1 does not allow setting direct probe bits on
* passive channel. */
if ((scan_ch->type & 1) && n_probes)
scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes);
}

/* Set txpower levels to defaults */
scan_ch->tpc.dsp_atten = 110;
Expand Down

0 comments on commit e889326

Please sign in to comment.