All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] at76c50x-usb: support cfg80211 scanning
@ 2009-02-17  0:43 Jason Andryuk
  2009-02-18 20:31 ` Kalle Valo
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Andryuk @ 2009-02-17  0:43 UTC (permalink / raw)
  To: linux-wireless, Kalle Valo

With the latest mac80211 stack, the driver needs to be updated for
cfg80211 scanning.  I based the changes off of modifications for
at76_usb found here:
http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch

The trick was that max_signal also needs to be set to avoid a divide
by zero Oops.  I just guessed and used the value 100 for now.

Additionally, I added some ieee80211_{wake,stop}_queues calls that
were contained in the older at76_usb.  There is ambiguity as to
whether at76_join should be called before or after waking the queues.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
--

diff --git a/drivers/net/wireless/at76c50x-usb.c
b/drivers/net/wireless/at76c50x-usb.c
index 2f18248..8d508ca 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1875,8 +1875,10 @@ static void at76_dwork_hw_scan(struct work_struct *work)

     ieee80211_scan_completed(priv->hw, false);

-    if (is_valid_ether_addr(priv->bssid))
+    if (is_valid_ether_addr(priv->bssid)) {
+        ieee80211_wake_queues(priv->hw);
         at76_join(priv);
+    }

     ieee80211_wake_queues(priv->hw);

@@ -1884,14 +1886,16 @@ exit:
     mutex_unlock(&priv->mtx);
 }

-static int at76_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
+static int at76_hw_scan(struct ieee80211_hw *hw,
+            struct cfg80211_scan_request *req)
 {
     struct at76_priv *priv = hw->priv;
     struct at76_req_scan scan;
     int ret;
+    u8 *ssid = NULL;
+    int len = 0;

     at76_dbg(DBG_MAC80211, "%s():", __func__);
-    at76_dbg_dump(DBG_MAC80211, ssid, len, "ssid %zd bytes:", len);

     mutex_lock(&priv->mtx);

@@ -1899,8 +1903,14 @@ static int at76_hw_scan(struct ieee80211_hw
*hw, u8 *ssid, size_t len)

     memset(&scan, 0, sizeof(struct at76_req_scan));
     memset(scan.bssid, 0xFF, ETH_ALEN);
-    scan.scan_type = SCAN_TYPE_ACTIVE;
-    if (priv->essid_size > 0) {
+    if (req->n_ssids) {
+        scan.scan_type = SCAN_TYPE_ACTIVE;
+        ssid = req->ssids[0].ssid;
+        len = req->ssids[0].ssid_len;
+    } else {
+        scan.scan_type = SCAN_TYPE_PASSIVE;
+    }
+    if (len) {
         memcpy(scan.essid, ssid, len);
         scan.essid_size = len;
     }
@@ -1939,10 +1949,13 @@ static int at76_config(struct ieee80211_hw
*hw, u32 changed)

     priv->channel = hw->conf.channel->hw_value;

-    if (is_valid_ether_addr(priv->bssid))
+    if (is_valid_ether_addr(priv->bssid)) {
         at76_join(priv);
-    else
+        ieee80211_wake_queues(priv->hw);
+    } else {
+        ieee80211_stop_queues(priv->hw);
         at76_start_monitor(priv);
+    }

     mutex_unlock(&priv->mtx);

@@ -1962,9 +1975,12 @@ static int at76_config_interface(struct ieee80211_hw *hw,

     memcpy(priv->bssid, conf->bssid, ETH_ALEN);

-    if (is_valid_ether_addr(priv->bssid))
+    if (is_valid_ether_addr(priv->bssid)) {
         /* mac80211 is joining a bss */
+        ieee80211_wake_queues(priv->hw);
         at76_join(priv);
+    } else
+        ieee80211_stop_queues(priv->hw);

     mutex_unlock(&priv->mtx);

@@ -2229,10 +2245,12 @@ static int at76_init_new_device(struct at76_priv *priv,
     priv->scan_mode = SCAN_TYPE_ACTIVE;

     /* mac80211 initialisation */
+    priv->hw->wiphy->max_scan_ssids = 1;
     priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
     priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &at76_supported_band;
     priv->hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
               IEEE80211_HW_SIGNAL_UNSPEC;
+    priv->hw->max_signal = 100;

     SET_IEEE80211_DEV(priv->hw, &interface->dev);
     SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-17  0:43 [PATCH] at76c50x-usb: support cfg80211 scanning Jason Andryuk
@ 2009-02-18 20:31 ` Kalle Valo
  2009-02-19  3:32   ` Jason Andryuk
  0 siblings, 1 reply; 12+ messages in thread
From: Kalle Valo @ 2009-02-18 20:31 UTC (permalink / raw)
  To: Jason Andryuk; +Cc: linux-wireless

Jason Andryuk <jandryuk@gmail.com> writes:

> With the latest mac80211 stack, the driver needs to be updated for
> cfg80211 scanning.  I based the changes off of modifications for
> at76_usb found here:
> http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch
>
> The trick was that max_signal also needs to be set to avoid a divide
> by zero Oops.  I just guessed and used the value 100 for now.

Thank you for doing this. Unfortunately the patch was corrupted, so I
had to manually take your changes. I also included the
ieee80211_scan_compileted() fix to this patch.

> Additionally, I added some ieee80211_{wake,stop}_queues calls that
> were contained in the older at76_usb.  There is ambiguity as to
> whether at76_join should be called before or after waking the queues.

I would like to have a separate patch for this. Also I would like to
know what kind of bug this fixes.

Sorry to be so picky, but I'm going to push the driver into mainline
soon and I try avoid regressions right now.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-18 20:31 ` Kalle Valo
@ 2009-02-19  3:32   ` Jason Andryuk
  2009-02-19  6:33     ` Kalle Valo
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Andryuk @ 2009-02-19  3:32 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Wed, 2009-02-18 at 22:31 +0200, Kalle Valo wrote:
> Jason Andryuk <jandryuk@gmail.com> writes:
> 
> > With the latest mac80211 stack, the driver needs to be updated for
> > cfg80211 scanning.  I based the changes off of modifications for
> > at76_usb found here:
> > http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch
> >
> > The trick was that max_signal also needs to be set to avoid a divide
> > by zero Oops.  I just guessed and used the value 100 for now.
> 
> Thank you for doing this. Unfortunately the patch was corrupted, so I
> had to manually take your changes. I also included the
> ieee80211_scan_compileted() fix to this patch.
> 
> > Additionally, I added some ieee80211_{wake,stop}_queues calls that
> > were contained in the older at76_usb.  There is ambiguity as to
> > whether at76_join should be called before or after waking the queues.
> 
> I would like to have a separate patch for this. Also I would like to
> know what kind of bug this fixes.
> 
> Sorry to be so picky, but I'm going to push the driver into mainline
> soon and I try avoid regressions right now.

I must admit, I do not have the best understanding of the driver.  As
such, I was making modifications to at76c50x-usb to be as similar to
at76_usb+mac80211 as possible to prevent the driver from oops-ing.

I don't know the proper usage of ieee80211_{wake,stop}_queues, but my
understanding is they should be called at different times to indicate
readiness for transmitting frames to the mac80211 stack.

I am having issues with my Linksys WUSB11 adapter.  It has the intersil
3861 and the scan command is reporting Command Status of 0x03 - Invalid
parameter.  For right now, scanning does not work for me.

Sorry about the corrupt patches.  The gmail web interface was causing
problems.

Take care.

Jason


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-19  3:32   ` Jason Andryuk
@ 2009-02-19  6:33     ` Kalle Valo
  2009-02-20  4:07       ` Jason Andryuk
  0 siblings, 1 reply; 12+ messages in thread
From: Kalle Valo @ 2009-02-19  6:33 UTC (permalink / raw)
  To: Jason Andryuk; +Cc: linux-wireless

Jason Andryuk <jandryuk@gmail.com> writes:

> On Wed, 2009-02-18 at 22:31 +0200, Kalle Valo wrote:
>> Jason Andryuk <jandryuk@gmail.com> writes:
>> 
>> > Additionally, I added some ieee80211_{wake,stop}_queues calls that
>> > were contained in the older at76_usb.  There is ambiguity as to
>> > whether at76_join should be called before or after waking the queues.
>> 
>> I would like to have a separate patch for this. Also I would like to
>> know what kind of bug this fixes.
>> 
>> Sorry to be so picky, but I'm going to push the driver into mainline
>> soon and I try avoid regressions right now.
>
> I must admit, I do not have the best understanding of the driver.

Don't worry, we both are new here. I'm not that familiar with usb :)

> As such, I was making modifications to at76c50x-usb to be as similar
> to at76_usb+mac80211 as possible to prevent the driver from
> oops-ing.

I'm very glad that you have been working with that, it has helped me a
lot.

> I don't know the proper usage of ieee80211_{wake,stop}_queues, but my
> understanding is they should be called at different times to indicate
> readiness for transmitting frames to the mac80211 stack.

Yes, you have understood correctly. It's just that I don't see any
problems with my device, so I would like to understand why these
changes are needed and what issue they fix. I didn't analyse this
properly yet, though.

> I am having issues with my Linksys WUSB11 adapter.  It has the intersil
> 3861 and the scan command is reporting Command Status of 0x03 - Invalid
> parameter.  For right now, scanning does not work for me.

Oh, that's bad. And the device is working fine with the old at76_usb
driver? Can you send some debug logs, please? Especially I'm
interested about hardware differences between your Linksys and the
Belkin I have.

> Sorry about the corrupt patches.  The gmail web interface was causing
> problems.

No problem, I'm used to this. For example at work our mail servers are
corrupting all patches. We need to send them as attachments and even
gzip so that the mail don't convert tabs to spaces. Not fun at all :/

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-19  6:33     ` Kalle Valo
@ 2009-02-20  4:07       ` Jason Andryuk
  2009-02-21  7:57         ` Kalle Valo
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Andryuk @ 2009-02-20  4:07 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Thu, Feb 19, 2009 at 1:33 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> Jason Andryuk <jandryuk@gmail.com> writes:
>> I am having issues with my Linksys WUSB11 adapter.  It has the intersil
>> 3861 and the scan command is reporting Command Status of 0x03 - Invalid
>> parameter.  For right now, scanning does not work for me.
>
> Oh, that's bad. And the device is working fine with the old at76_usb
> driver? Can you send some debug logs, please? Especially I'm
> interested about hardware differences between your Linksys and the
> Belkin I have.

I thought before I was not getting any scan results.  I may have been
wrong.  However right now with the driver from wireless-testing
2009-02-18, 4 APs show up in NetworkManager.  Unfortunately, my AP is
not one of them.  No signal strength is reported for any of them.
Curiously, there are distinct results for each of at76c50x-usb, a
semi-operational iwl3945 and the functional rtl8187.

CMD_SCAN is receiving a lot of status 0x03 CMD_STATUS_INVALID_PARAMETER

With debug=0xf022c001 I get the output below.  I was wondering if
status=0x03 was being received because CMD_SET_MIB was called before
CMD_SCAN's status was checked.  Hopefully you can make some sense out
of the below logs.

"calling ieee80211_rx_irqsafe(): 123/0" and "at76_dwork_hw_scan:
CMD_SCAN status 0x03" seem to continue indefinitely.

Jason

Feb 19 22:26:48 rainbow kernel: [ 1040.215351] at76c50x-usb:
downloading firmware atmel_at76c503-i3861.bin
Feb 19 22:26:48 rainbow kernel: [ 1040.215354] usb 3-2: firmware:
requesting atmel_at76c503-i3861.bin
Feb 19 22:26:48 rainbow kernel: [ 1040.227033] at76c50x-usb: got it.
Feb 19 22:26:48 rainbow kernel: [ 1040.227036] usb 3-2: using firmware
atmel_at76c503-i3861.bin (version 0.90.0-44)
Feb 19 22:26:48 rainbow kernel: [ 1040.227039] at76c50x-usb: board 1,
int 104:22228, ext 22332:5832
Feb 19 22:26:48 rainbow kernel: [ 1040.227040] at76c50x-usb: firmware
id 0.90.0-44 Intersil 3861 Copyright (c) 1999-2000 by Atmel
Corporation
Feb 19 22:26:48 rainbow kernel: [ 1040.228351] at76c50x-usb: opmode 1
Feb 19 22:26:48 rainbow kernel: [ 1040.229513] at76c50x-usb: USB
interface: 2 endpoints
Feb 19 22:26:48 rainbow kernel: [ 1040.229515] at76c50x-usb:
at76_alloc_urbs: ENTER
Feb 19 22:26:48 rainbow kernel: [ 1040.229516] at76c50x-usb:
at76_alloc_urbs: NumEndpoints 2
Feb 19 22:26:48 rainbow kernel: [ 1040.229518] at76c50x-usb:
at76_alloc_urbs: 0. endpoint: addr 0x85 attr 0x2
Feb 19 22:26:48 rainbow kernel: [ 1040.229520] at76c50x-usb:
at76_alloc_urbs: 1. endpoint: addr 0x2 attr 0x2
Feb 19 22:26:48 rainbow kernel: [ 1040.229521] at76c50x-usb:
at76_alloc_urbs: EXIT
Feb 19 22:26:48 rainbow kernel: [ 1040.230845] phy3: Selected rate
control algorithm 'minstrel'
Feb 19 22:26:48 rainbow kernel: [ 1040.231471] phy3: USB 3-2:1.0, MAC
00:06:25:00:6a:7a, firmware 0.90.0-2
Feb 19 22:26:48 rainbow kernel: [ 1040.231473] phy3: regulatory domain
0x10: FCC (USA)
Feb 19 22:26:48 rainbow kernel: [ 1040.231492] usbcore: registered new
interface driver at76c50x-usb
Feb 19 22:26:48 rainbow kernel: [ 1040.247748] udev: renamed network
interface wlan0 to wlan3
Feb 19 22:26:52 rainbow kernel: [ 1044.259085] at76c50x-usb:
at76_mac80211_start()
Feb 19 22:26:52 rainbow kernel: [ 1044.259112] at76c50x-usb: issuing
command CMD_STARTUP (0x0b)
Feb 19 22:26:52 rainbow kernel: [ 1044.259120] 00000000: 0b 00 68 00
00 00 08 00 00 06 00 06 82 84 0b 16  ..h.............
Feb 19 22:26:52 rainbow kernel: [ 1044.259126] 00000010: 01 0a 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.259131] 00000020: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.259136] 00000030: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.259140] 00000040: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.259145] 00000050: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.259150] 00000060: 00 00 00 00
00 00 00 00 00 00 64 00              ..........d.
Feb 19 22:26:52 rainbow kernel: [ 1044.262385] at76c50x-usb: phy3:
Waiting on cmd 11, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.262394] at76c50x-usb: issuing
command CMD_RADIO_ON (0x06)
Feb 19 22:26:52 rainbow kernel: [ 1044.262401] 00000000: 06 00 00 00
                                   ....
Feb 19 22:26:52 rainbow kernel: [ 1044.265387] at76c50x-usb: phy3:
Waiting on cmd 6, status = 2 (CMD_STATUS_UNKNOWN)
Feb 19 22:26:52 rainbow kernel: [ 1044.265394] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.265400] 00000000: 01 00 05 00
01 01 09 00 00                       .........
Feb 19 22:26:52 rainbow kernel: [ 1044.268385] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.268391] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.268396] 00000000: 01 00 06 00
03 02 08 00 00 06                    ..........
Feb 19 22:26:52 rainbow kernel: [ 1044.271397] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.271403] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.271408] 00000000: 01 00 06 00
03 02 0a 00 00 06                    ..........
Feb 19 22:26:52 rainbow kernel: [ 1044.274383] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.274389] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.274394] 00000000: 01 00 05 00
01 01 03 00 01                       .........
Feb 19 22:26:52 rainbow kernel: [ 1044.277398] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.277404] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.277410] 00000000: 01 00 05 00
05 01 35 00 01                       ......5..
Feb 19 22:26:52 rainbow kernel: [ 1044.280669] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.280674] at76c50x-usb: issuing
command CMD_SCAN (0x03)
Feb 19 22:26:52 rainbow kernel: [ 1044.280679] 00000000: 03 00 30 00
ff ff ff ff ff ff 00 00 00 00 00 00  ..0.............
Feb 19 22:26:52 rainbow kernel: [ 1044.280685] 00000010: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.280690] 00000020: 00 00 00 00
00 00 00 00 00 00 01 0a 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.280695] 00000030: 00 00 00 00
                                   ....
Feb 19 22:26:52 rainbow kernel: [ 1044.283425] at76c50x-usb:
at76_add_interface()
Feb 19 22:26:52 rainbow kernel: [ 1044.291401] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 61/0
Feb 19 22:26:52 rainbow kernel: [ 1044.292072] at76c50x-usb:
at76_configure_filter(): changed_flags=0x00000000
total_flags=0x80000000 mc_count=0
Feb 19 22:26:52 rainbow kernel: [ 1044.292122] at76c50x-usb:
at76_config(): channel 1 radio 1
Feb 19 22:26:52 rainbow kernel: [ 1044.292126] at76c50x-usb: bssid:
Feb 19 22:26:52 rainbow kernel: [ 1044.292131] 00000000: 00 00 00 00
00 00                                ......
Feb 19 22:26:52 rainbow kernel: [ 1044.292136] at76c50x-usb: issuing
command CMD_SCAN (0x03)
Feb 19 22:26:52 rainbow kernel: [ 1044.292141] 00000000: 03 00 30 00
ff ff ff ff ff ff 00 00 00 00 00 00  ..0.............
Feb 19 22:26:52 rainbow kernel: [ 1044.292146] 00000010: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.292151] 00000020: 00 00 00 00
00 00 00 00 00 00 01 01 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.292156] 00000030: 00 00 00 00
                                   ....
Feb 19 22:26:52 rainbow kernel: [ 1044.295393] at76c50x-usb:
at76_configure_filter(): changed_flags=0x00000001
total_flags=0x80000000 mc_count=1
Feb 19 22:26:52 rainbow kernel: [ 1044.295420] at76c50x-usb:
at76_configure_filter(): changed_flags=0x00000001
total_flags=0x80000000 mc_count=2
Feb 19 22:26:52 rainbow kernel: [ 1044.295623] at76c50x-usb: issuing
command CMD_SET_MIB (0x01)
Feb 19 22:26:52 rainbow kernel: [ 1044.295630] 00000000: 01 00 05 00
01 01 06 00 01                       .........
Feb 19 22:26:52 rainbow kernel: [ 1044.296495] ADDRCONF(NETDEV_UP):
wlan3: link is not ready
Feb 19 22:26:52 rainbow kernel: [ 1044.296504] at76c50x-usb:
at76_configure_filter(): changed_flags=0x00000001
total_flags=0x80000000 mc_count=2
Feb 19 22:26:52 rainbow kernel: [ 1044.302400] at76c50x-usb: phy3:
Waiting on cmd 1, status = 1 (CMD_STATUS_COMPLETE)
Feb 19 22:26:52 rainbow kernel: [ 1044.302410] at76c50x-usb: at76_hw_scan():
Feb 19 22:26:52 rainbow kernel: [ 1044.302415] at76c50x-usb:
at76_hw_scan: sending CMD_SCAN
Feb 19 22:26:52 rainbow kernel: [ 1044.302420] at76c50x-usb: issuing
command CMD_SCAN (0x03)
Feb 19 22:26:52 rainbow kernel: [ 1044.302426] 00000000: 03 00 30 00
ff ff ff ff ff ff 00 00 00 00 00 00  ..0.............
Feb 19 22:26:52 rainbow kernel: [ 1044.302433] 00000010: 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00  ................
Feb 19 22:26:52 rainbow kernel: [ 1044.302438] 00000020: 00 00 00 00
00 00 00 00 00 00 00 00 10 27 0a 00  .............'..
Feb 19 22:26:52 rainbow kernel: [ 1044.302444] 00000030: 78 00 00 00
                                   x...
Feb 19 22:26:52 rainbow kernel: [ 1044.353434] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:52 rainbow kernel: [ 1044.455471] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:52 rainbow kernel: [ 1044.549532] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:52 rainbow kernel: [ 1044.558532] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:52 rainbow kernel: [ 1044.660587] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:52 rainbow kernel: [ 1044.682597] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:52 rainbow kernel: [ 1044.763601] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1044.797651] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:53 rainbow kernel: [ 1044.887702] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:53 rainbow kernel: [ 1044.968742] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1045.045776] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:53 rainbow kernel: [ 1045.070790] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1045.293899] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:53 rainbow kernel: [ 1045.378910] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1045.542031] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:53 rainbow kernel: [ 1045.583049] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1045.687101] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:53 rainbow kernel: [ 1045.707111] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1045.790152] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:54 rainbow kernel: [ 1045.810161] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1045.890199] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:54 rainbow kernel: [ 1045.912207] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.014267] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.037275] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:54 rainbow kernel: [ 1046.117316] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.219360] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.285400] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03
Feb 19 22:26:54 rainbow kernel: [ 1046.300403] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:54 rainbow kernel: [ 1046.402455] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 123/0
Feb 19 22:26:54 rainbow kernel: [ 1046.424471] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.526519] at76c50x-usb: calling
ieee80211_rx_irqsafe(): 110/0
Feb 19 22:26:54 rainbow kernel: [ 1046.534514] at76c50x-usb:
at76_dwork_hw_scan: CMD_SCAN status 0x03

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-20  4:07       ` Jason Andryuk
@ 2009-02-21  7:57         ` Kalle Valo
  2009-02-21 21:44           ` Jason Andryuk
  0 siblings, 1 reply; 12+ messages in thread
From: Kalle Valo @ 2009-02-21  7:57 UTC (permalink / raw)
  To: Jason Andryuk; +Cc: linux-wireless

Jason Andryuk <jandryuk@gmail.com> writes:

> I thought before I was not getting any scan results.  I may have been
> wrong.  However right now with the driver from wireless-testing
> 2009-02-18, 4 APs show up in NetworkManager.  Unfortunately, my AP is
> not one of them.  

What's your distance to the AP?

> No signal strength is reported for any of them.

Yes, this is a know issue. I'll try to fix it soon.

> Curiously, there are distinct results for each of at76c50x-usb, a
> semi-operational iwl3945 and the functional rtl8187.
>
> CMD_SCAN is receiving a lot of status 0x03 CMD_STATUS_INVALID_PARAMETER
>
> With debug=0xf022c001 I get the output below.  I was wondering if
> status=0x03 was being received because CMD_SET_MIB was called before
> CMD_SCAN's status was checked.  Hopefully you can make some sense out
> of the below logs.

After a quick look I didn't find anything, but I will investigate this
more.

Is at76_usb (the staging driver) is working fine with your device? Can
you take logs from it so that we can compare?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-21  7:57         ` Kalle Valo
@ 2009-02-21 21:44           ` Jason Andryuk
  2009-02-21 22:00             ` Jason Andryuk
  2009-02-22 11:46             ` Kalle Valo
  0 siblings, 2 replies; 12+ messages in thread
From: Jason Andryuk @ 2009-02-21 21:44 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Sat, Feb 21, 2009 at 2:57 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> Jason Andryuk <jandryuk@gmail.com> writes:
>
>> I thought before I was not getting any scan results.  I may have been
>> wrong.  However right now with the driver from wireless-testing
>> 2009-02-18, 4 APs show up in NetworkManager.  Unfortunately, my AP is
>> not one of them.
>
> What's your distance to the AP?

Maybe twenty feet through some walls.  I successfully tested with a
Windows machine and the adapter in more or less the same place.

>> No signal strength is reported for any of them.
>
> Yes, this is a know issue. I'll try to fix it soon.
>
>> Curiously, there are distinct results for each of at76c50x-usb, a
>> semi-operational iwl3945 and the functional rtl8187.
>>
>> CMD_SCAN is receiving a lot of status 0x03 CMD_STATUS_INVALID_PARAMETER
>>
>> With debug=0xf022c001 I get the output below.  I was wondering if
>> status=0x03 was being received because CMD_SET_MIB was called before
>> CMD_SCAN's status was checked.  Hopefully you can make some sense out
>> of the below logs.
>
> After a quick look I didn't find anything, but I will investigate this
> more.
>
> Is at76_usb (the staging driver) is working fine with your device? Can
> you take logs from it so that we can compare?

How do scan results get returned from the device to the host computer?
 I can't see any place that the scans are actually received.  Does the
rx_tasklet handle this?  Are the few listed scan results just those
that are extracted by mac80211?  I ask because you can see the calls
to ieee80211_rx_irqsafe.

I was trying at76_usb + mac80211 when that was in staging, but I have
not tried ~ at76c503a.berlios.de staging version.  I can take a look.

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-21 21:44           ` Jason Andryuk
@ 2009-02-21 22:00             ` Jason Andryuk
  2009-02-22 11:49               ` Kalle Valo
  2009-02-22 11:46             ` Kalle Valo
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Andryuk @ 2009-02-21 22:00 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Sat, Feb 21, 2009 at 4:44 PM, Jason Andryuk <jandryuk@gmail.com> wrote:
> I was trying at76_usb + mac80211 when that was in staging, but I have
> not tried ~ at76c503a.berlios.de staging version.  I can take a look.

at76_usb in staging does not compile.

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-21 21:44           ` Jason Andryuk
  2009-02-21 22:00             ` Jason Andryuk
@ 2009-02-22 11:46             ` Kalle Valo
  1 sibling, 0 replies; 12+ messages in thread
From: Kalle Valo @ 2009-02-22 11:46 UTC (permalink / raw)
  To: Jason Andryuk; +Cc: linux-wireless

Jason Andryuk <jandryuk@gmail.com> writes:

> On Sat, Feb 21, 2009 at 2:57 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
>> Jason Andryuk <jandryuk@gmail.com> writes:
>>
>>> I thought before I was not getting any scan results.  I may have been
>>> wrong.  However right now with the driver from wireless-testing
>>> 2009-02-18, 4 APs show up in NetworkManager.  Unfortunately, my AP is
>>> not one of them.
>>
>> What's your distance to the AP?
>
> Maybe twenty feet through some walls.  I successfully tested with a
> Windows machine and the adapter in more or less the same place.

It might be that the windows driver is doing something differently and
hence has better sensivity. Can you try closer, just in case?

>> Is at76_usb (the staging driver) is working fine with your device? Can
>> you take logs from it so that we can compare?
>
> How do scan results get returned from the device to the host
> computer?

Through the normal rx path, similary like data frames are received.
Driver sends CMD_SCAN, firmware starts sending probe requests to each
channel and forwards the received probe responses and beacons back to the
driver.

>  I can't see any place that the scans are actually received.  Does the
> rx_tasklet handle this?

Yes.

> Are the few listed scan results just those that are extracted by
> mac80211? 

Most probably. I didn't check the contents, though. You can make
educated guesses from the length also.

> I was trying at76_usb + mac80211 when that was in staging, but I have
> not tried ~ at76c503a.berlios.de staging version.  I can take a look.

Thanks for testing.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-21 22:00             ` Jason Andryuk
@ 2009-02-22 11:49               ` Kalle Valo
  2009-02-22 23:54                 ` Jason Andryuk
  0 siblings, 1 reply; 12+ messages in thread
From: Kalle Valo @ 2009-02-22 11:49 UTC (permalink / raw)
  To: Jason Andryuk; +Cc: linux-wireless

Jason Andryuk <jandryuk@gmail.com> writes:

> On Sat, Feb 21, 2009 at 4:44 PM, Jason Andryuk <jandryuk@gmail.com> wrote:
>> I was trying at76_usb + mac80211 when that was in staging, but I have
>> not tried ~ at76c503a.berlios.de staging version.  I can take a look.
>
> at76_usb in staging does not compile.

This is in linux-wireless, right? That's because net/ieee80211.h was
just removed. I'll have a patch ready for at76_usb and I'll send it to
Greg.

at76_usb compiles in Linus' tree (ie. linux-2.6), though. Or if you
want to use wireless-testing wait for my patch.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-22 11:49               ` Kalle Valo
@ 2009-02-22 23:54                 ` Jason Andryuk
  2009-02-23  3:29                   ` Jason Andryuk
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Andryuk @ 2009-02-22 23:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Sun, Feb 22, 2009 at 6:49 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> Jason Andryuk <jandryuk@gmail.com> writes:
>> at76_usb in staging does not compile.
>
> This is in linux-wireless, right? That's because net/ieee80211.h was
> just removed. I'll have a patch ready for at76_usb and I'll send it to
> Greg.

Thanks for making the changes.  Yes, it was with the wireless-testing
git tree.  I did replace net/ieee80211.h with linux/iee80211.h, but I
gave up when compilations errors were still reported.

The good news it, I am writing this email with the staging/at76_usb
driver.  It is working at the same location as the Windows driver was
tested.

I'll start looking into what may have changed.

Thanks again.

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] at76c50x-usb: support cfg80211 scanning
  2009-02-22 23:54                 ` Jason Andryuk
@ 2009-02-23  3:29                   ` Jason Andryuk
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Andryuk @ 2009-02-23  3:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Sun, Feb 22, 2009 at 6:54 PM, Jason Andryuk <jandryuk@gmail.com> wrote:
> The good news it, I am writing this email with the staging/at76_usb
> driver.  It is working at the same location as the Windows driver was
> tested.

I left the machine and returned maybe an hour or more later.  By then
the adapter had become unresponsive and further attempts to
(re-)associate with the AP failed.

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-02-23  3:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-17  0:43 [PATCH] at76c50x-usb: support cfg80211 scanning Jason Andryuk
2009-02-18 20:31 ` Kalle Valo
2009-02-19  3:32   ` Jason Andryuk
2009-02-19  6:33     ` Kalle Valo
2009-02-20  4:07       ` Jason Andryuk
2009-02-21  7:57         ` Kalle Valo
2009-02-21 21:44           ` Jason Andryuk
2009-02-21 22:00             ` Jason Andryuk
2009-02-22 11:49               ` Kalle Valo
2009-02-22 23:54                 ` Jason Andryuk
2009-02-23  3:29                   ` Jason Andryuk
2009-02-22 11:46             ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.