Skip to contentSkip to conversation

at76c50x-usb: Supply additional parameters to at76_start_monitor scan request

PATCH In review Jason Andryuk 3 participants 3 messages Nov 9, 2009 – Nov 11, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at76c50x-usb: Supply additional parameters to at76_start_monitor scan request

For my Linksys WUSB11 at76c503-i3861 device, scanning fails without probe_delay, min_channel_time, and max_channel_time specified for the scan request. These values were found by checking scan requests from the at76_usb driver.

--
Prior to this patch, the driver did not produce any scan results on my device.

drivers/net/wireless/at76c50x-usb.c +3 -0
index d9f2c52..4a3f4ff 100644
@@ -1180,6 +1180,9 @@ static int at76_start_monitor(struct at76_priv *priv)
        scan.channel = priv->channel;
        scan.scan_type = SCAN_TYPE_PASSIVE;
        scan.international_scan = 0;
+       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(0);
 
        ret = at76_set_card_command(priv->udev, CMD_SCAN, &scan, sizeof(scan));
        if (ret >= 0)
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jason Andryuk

For my Linksys WUSB11 at76c503-i3861 device, scanning fails without probe_delay, min_channel_time, and max_channel_time specified for the scan request. These values were found by checking scan requests from the at76_usb driver.

Thank you for finding this.

Signature · 1 line
Kalle Valo
#2 lore raw
In reply to Jason Andryuk
Quoted 15 lines · Jason Andryuk

For my Linksys WUSB11 at76c503-i3861 device, scanning fails without probe_delay, min_channel_time, and max_channel_time specified for the scan request. These values were found by checking scan requests from the at76_usb driver.

--
Prior to this patch, the driver did not produce any scan results on my device.

drivers/net/wireless/at76c50x-usb.c +0 -0
index d9f2c52..4a3f4ff 100644

drivers/net/wireless/at76c50x-usb.c static int at76_start_monitor(struct at76_priv *priv) · line 1188

Quoted 9 lines
drivers/net/wireless/at76c50x-usb.c +3 -0
@@ -1180,6 +1180,9 @@ static int at76_start_monitor(struct at76_priv *priv)
        scan.channel = priv->channel;
        scan.scan_type = SCAN_TYPE_PASSIVE;
        scan.international_scan = 0;
+       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(0);
 
        ret = at76_set_card_command(priv->udev, CMD_SCAN, &scan, sizeof(scan));
        if (ret >= 0)

This patch was whitespace-damaged. I've manually fixed it, but please adjust your mailer appropriate for any future patches...

Thanks,

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.