浏览代码

wl12xx: add separate config value for DFS dwell time on sched scan

Use a different value for DFS dwell time when performing a scheduled
scan.  Previously we were using the same value as for normal passive
scans.  This adds some flexibility between these two different types
of passive scan.

For now we use 150 TUs for DFS channel dwell time.  This may need to
be fine-tuned in the future.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho 14 年之前
父节点
当前提交
50a66d7f04
共有 3 个文件被更改,包括 9 次插入2 次删除
  1. 3 0
      drivers/net/wireless/wl12xx/conf.h
  2. 1 0
      drivers/net/wireless/wl12xx/main.c
  3. 5 2
      drivers/net/wireless/wl12xx/scan.c

+ 3 - 0
drivers/net/wireless/wl12xx/conf.h

@@ -1157,6 +1157,9 @@ struct conf_sched_scan_settings {
 	/* time to wait on the channel for passive scans (in TUs) */
 	/* time to wait on the channel for passive scans (in TUs) */
 	u32 dwell_time_passive;
 	u32 dwell_time_passive;
 
 
+	/* time to wait on the channel for DFS scans (in TUs) */
+	u32 dwell_time_dfs;
+
 	/* number of probe requests to send on each channel in active scans */
 	/* number of probe requests to send on each channel in active scans */
 	u8 num_probe_reqs;
 	u8 num_probe_reqs;
 
 

+ 1 - 0
drivers/net/wireless/wl12xx/main.c

@@ -311,6 +311,7 @@ static struct conf_drv_settings default_conf = {
 		.min_dwell_time_active = 8,
 		.min_dwell_time_active = 8,
 		.max_dwell_time_active = 30,
 		.max_dwell_time_active = 30,
 		.dwell_time_passive    = 100,
 		.dwell_time_passive    = 100,
+		.dwell_time_dfs        = 150,
 		.num_probe_reqs        = 2,
 		.num_probe_reqs        = 2,
 		.rssi_threshold        = -90,
 		.rssi_threshold        = -90,
 		.snr_threshold         = 0,
 		.snr_threshold         = 0,

+ 5 - 2
drivers/net/wireless/wl12xx/scan.c

@@ -352,9 +352,12 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
 			wl1271_debug(DEBUG_SCAN, "max_power %d",
 			wl1271_debug(DEBUG_SCAN, "max_power %d",
 				     req->channels[i]->max_power);
 				     req->channels[i]->max_power);
 
 
-			if (flags & IEEE80211_CHAN_RADAR)
+			if (flags & IEEE80211_CHAN_RADAR) {
 				channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS;
 				channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS;
-			if (flags & IEEE80211_CHAN_PASSIVE_SCAN) {
+				channels[j].passive_duration =
+					cpu_to_le16(c->dwell_time_dfs);
+			}
+			else if (flags & IEEE80211_CHAN_PASSIVE_SCAN) {
 				channels[j].passive_duration =
 				channels[j].passive_duration =
 					cpu_to_le16(c->dwell_time_passive);
 					cpu_to_le16(c->dwell_time_passive);
 			} else {
 			} else {