diff options
-rw-r--r-- | at76_usb.c | 43 | ||||
-rw-r--r-- | at76_usb.h | 3 |
2 files changed, 8 insertions, 38 deletions
@@ -183,8 +183,6 @@ static int preamble_type = PREAMBLE_TYPE_LONG; static int auth_mode; static int international_roaming; /* = IR_OFF */ static int default_iw_mode = IW_MODE_INFRA; -static int monitor_scan_min_time = 50; -static int monitor_scan_max_time = 600; /* the supported rates of this hardware, bit7 marks a basic rate */ static const u8 hw_rates[] = { 0x82, 0x84, 0x0b, 0x16 }; @@ -1502,11 +1500,7 @@ static int at76_start_scan(struct at76_priv *priv, int use_essid, int ir_step) /* INFO: For probe_delay, not multiplying by 1024 as this will be slightly less than min_channel_time (per spec: probe delay < min. channel time) */ - if (priv->istate == MONITORING) { - scan.min_channel_time = cpu_to_le16(priv->monitor_scan_min_time); - scan.max_channel_time = cpu_to_le16(priv->monitor_scan_max_time); - scan.probe_delay = cpu_to_le16(priv->monitor_scan_min_time * 1000); - } else { + if (priv->istate != MONITORING) { scan.min_channel_time = cpu_to_le16(priv->scan_min_time); scan.max_channel_time = cpu_to_le16(priv->scan_max_time); scan.probe_delay = cpu_to_le16(priv->scan_min_time * 1000); @@ -2811,20 +2805,11 @@ static int at76_iw_handler_set_scan(struct net_device *netdev, priv->scan_mode = SCAN_TYPE_ACTIVE; /* Sanity check values? */ - if (req->min_channel_time > 0) { - if (priv->istate == MONITORING) - priv->monitor_scan_min_time = - req->min_channel_time; - else - priv->scan_min_time = req->min_channel_time; - } - if (req->max_channel_time > 0) { - if (priv->istate == MONITORING) - priv->monitor_scan_max_time = - req->max_channel_time; - else - priv->scan_max_time = req->max_channel_time; - } + if (req->min_channel_time > 0) + priv->scan_min_time = req->min_channel_time; + + if (req->max_channel_time > 0) + priv->scan_max_time = req->max_channel_time; } /* change to scanning state */ @@ -3476,14 +3461,8 @@ static int at76_iw_set_scan_times(struct net_device *netdev, if (mint <= 0 || maxt <= 0 || mint > maxt) { ret = -EINVAL; } else { - if (priv->istate == MONITORING) { - priv->monitor_scan_min_time = mint; - priv->monitor_scan_max_time = maxt; - ret = 0; - } else { - priv->scan_min_time = mint; - priv->scan_max_time = maxt; - } + priv->scan_min_time = mint; + priv->scan_max_time = maxt; } return ret; @@ -4113,8 +4092,6 @@ static int at76_init_new_device(struct at76_priv *priv) priv->scan_min_time = scan_min_time; priv->scan_max_time = scan_max_time; priv->scan_mode = scan_mode; - priv->monitor_scan_min_time = monitor_scan_min_time; - priv->monitor_scan_max_time = monitor_scan_max_time; netdev->flags &= ~IFF_MULTICAST; /* not yet or never */ netdev->open = at76_open; @@ -6378,10 +6355,6 @@ module_param(international_roaming, int, 0400); MODULE_PARM_DESC(international_roaming, "enable international roaming: 0 (no, default), 1 (yes)"); module_param(default_iw_mode, int, 0400); MODULE_PARM_DESC(default_iw_mode, "default IW mode for a new device: 1 (ad-hoc), 2 (infrastructure, def.), 6 (monitor mode)"); -module_param(monitor_scan_min_time, int, 0400); -MODULE_PARM_DESC(monitor_scan_min_time, "scan min channel time in MONITOR MODE (default: 50)"); -module_param(monitor_scan_max_time, int, 0400); -MODULE_PARM_DESC(monitor_scan_max_time, "scan max channel time in MONITOR MODE (default: 600)"); module_init(at76_mod_init); module_exit(at76_mod_exit); @@ -584,9 +584,6 @@ struct at76_priv { struct set_mib_buffer mib_buf; /* global buffer for set_mib calls */ /* beacon counting */ - int monitor_scan_min_time; - int monitor_scan_max_time; - int beacon_period; /* period of mgmt beacons */ int beacons_received; unsigned long beacons_last_qual; /* last time we reset beacons_received = 0 */ |