Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215054
b: refs/heads/master
c: bea39d6
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Sep 28, 2010
1 parent 1461eaa commit acf3569
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 10 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: 78abd3207438b20e099b41cbed58d640cbd237a6
refs/heads/master: bea39d6a60b62f16e904be5a520bf55714d73021
39 changes: 39 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,44 @@ struct conf_roam_trigger_settings {
u8 avg_weight_snr_data;
};

struct conf_scan_settings {
/*
* The minimum time to wait on each channel for active scans
*
* Range: 0 - 65536 tu
*/
u16 min_dwell_time_active;

/*
* The maximum time to wait on each channel for active scans
*
* Range: 0 - 65536 tu
*/
u16 max_dwell_time_active;

/*
* The maximum time to wait on each channel for passive scans
*
* Range: 0 - 65536 tu
*/
u16 min_dwell_time_passive;

/*
* The maximum time to wait on each channel for passive scans
*
* Range: 0 - 65536 tu
*/
u16 max_dwell_time_passive;

/*
* Number of probe requests to transmit on each active scan channel
*
* Range: u8
*/
u16 num_probe_reqs;

};

struct conf_drv_settings {
struct conf_sg_settings sg;
struct conf_rx_settings rx;
Expand All @@ -1024,6 +1062,7 @@ struct conf_drv_settings {
struct conf_itrim_settings itrim;
struct conf_pm_config_settings pm_config;
struct conf_roam_trigger_settings roam_trigger;
struct conf_scan_settings scan;
};

#endif
9 changes: 8 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,14 @@ static struct conf_drv_settings default_conf = {
.avg_weight_rssi_data = 10,
.avg_weight_snr_beacon = 20,
.avg_weight_snr_data = 10
}
},
.scan = {
.min_dwell_time_active = 7500,
.max_dwell_time_active = 30000,
.min_dwell_time_passive = 30000,
.max_dwell_time_passive = 60000,
.num_probe_reqs = 2,
},
};

static void __wl1271_op_remove_interface(struct wl1271 *wl);
Expand Down
18 changes: 13 additions & 5 deletions trunk/drivers/net/wireless/wl12xx/wl1271_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
struct basic_scan_channel_params *channels,
enum ieee80211_band band, bool passive)
{
struct conf_scan_settings *c = &wl->conf.scan;
int i, j;
u32 flags;

Expand Down Expand Up @@ -91,10 +92,17 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
wl1271_debug(DEBUG_SCAN, "beacon_found %d",
req->channels[i]->beacon_found);

channels[j].min_duration =
cpu_to_le32(WL1271_SCAN_CHAN_MIN_DURATION);
channels[j].max_duration =
cpu_to_le32(WL1271_SCAN_CHAN_MAX_DURATION);
if (!passive) {
channels[j].min_duration =
cpu_to_le32(c->min_dwell_time_active);
channels[j].max_duration =
cpu_to_le32(c->max_dwell_time_active);
} else {
channels[j].min_duration =
cpu_to_le32(c->min_dwell_time_passive);
channels[j].max_duration =
cpu_to_le32(c->max_dwell_time_passive);
}
channels[j].early_termination = 0;
channels[j].tx_power_att = req->channels[i]->max_power;
channels[j].channel = req->channels[i]->hw_value;
Expand Down Expand Up @@ -151,7 +159,7 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
cmd->params.rx_filter_options =
cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN);

cmd->params.n_probe_reqs = WL1271_SCAN_PROBE_REQS;
cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.tid_trigger = 0;
cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/wl1271_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ void wl1271_scan_complete_work(struct work_struct *work);
#define WL1271_SCAN_OPT_ACTIVE 0
#define WL1271_SCAN_OPT_PASSIVE 1
#define WL1271_SCAN_OPT_PRIORITY_HIGH 4
#define WL1271_SCAN_CHAN_MIN_DURATION 30000 /* TU */
#define WL1271_SCAN_CHAN_MAX_DURATION 60000 /* TU */
#define WL1271_SCAN_BAND_2_4_GHZ 0
#define WL1271_SCAN_BAND_5_GHZ 1
#define WL1271_SCAN_PROBE_REQS 3

#define WL1271_SCAN_TIMEOUT 10000 /* msec */

Expand Down

0 comments on commit acf3569

Please sign in to comment.