linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IWL3945 problems in 2.6.35-rc1
@ 2010-06-01 12:25 Maxim Levitsky
  2010-06-01 14:57 ` Maxim Levitsky
  2010-06-18  9:28 ` Johannes Berg
  0 siblings, 2 replies; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-01 12:25 UTC (permalink / raw)
  To: linux-wireless; +Cc: iwlwifi maling list

Hi,

in 2.6.35-rc1 the wireless became just unusable.

These are problems that I have:

1. very frequent oopses.This appears to be mention on the list already,
but patches I tried don't help.

I currently use this bandaid patch, and I still get some crashes:

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 3e5bffb..1aef988 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
        if (!sband)
                return 0;
 
+       if(!priv->scan_request) {
+               WARN_ON(1);
+               return 0;
+       }
+
        active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
        passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);


2. mulicast/broadcast is broken.
this results in DHCP non working on open access point.
It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
It can be worked around by doing (sudo ifconfig wlan0 promisc)


Best regards,
	Maxim Levitsky



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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 12:25 IWL3945 problems in 2.6.35-rc1 Maxim Levitsky
@ 2010-06-01 14:57 ` Maxim Levitsky
  2010-06-01 15:21   ` Sedat Dilek
  2010-06-18  9:28 ` Johannes Berg
  1 sibling, 1 reply; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-01 14:57 UTC (permalink / raw)
  To: linux-wireless; +Cc: iwlwifi maling list

On Tue, 2010-06-01 at 15:25 +0300, Maxim Levitsky wrote: 
> Hi,
> 
> in 2.6.35-rc1 the wireless became just unusable.
> 
> These are problems that I have:
> 
> 1. very frequent oopses.This appears to be mention on the list already,
> but patches I tried don't help.
> 
> I currently use this bandaid patch, and I still get some crashes:


The crash happens here:

0xec3d is in iwl3945_request_scan (/home/maxim/software/kernel/linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c:1878).
1873			if (chan->band != band)
1874				continue;
1875	
1876			scan_ch->channel = chan->hw_value;
1877	
1878			ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
1879			if (!is_channel_valid(ch_info)) {
1880				IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n",
1881					       scan_ch->channel);
1882				continue;


The backtrace:

<1>[14212.708840] BUG: unable to handle kernel paging request at 00000002ffffffb1
<1>[14212.709870] IP: [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
<4>[14212.710763] PGD 0 
<0>[14212.711636] Oops: 0000 [#1] PREEMPT SMP 
<0>[14212.712519] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/temp1_input
<4>[14212.713416] CPU 0 
<4>[14212.713432] Modules linked in: tg3 libphy iwl3945 iwlcore mac80211 cfg80211 ntfs vfat msdos fat lirc_ene0100 lirc_dev af_packet nfsd exportfs nfs lockd nfs_acl auth_rpcgss usb_storage usb_libusual cpufreq_powersave cpufreq_conservative r852 snd_hda_codec_realtek uvcvideo sm_common cpufreq_userspace acpi_cpufreq snd_hda_intel videodev mperf nand snd_hda_codec nand_ids sdhci_pci iTCO_wdt v4l2_compat_ioctl32 joydev snd_hwdep nand_ecc uhci_hcd sunrpc iTCO_vendor_support sdhci ehci_hcd psmouse snd_pcm mmc_core mtd usbcore coretemp ac sg battery evdev serio_raw snd_page_alloc video nouveau ttm drm_kms_helper drm i2c_algo_bit [last unloaded: cfg80211]
<4>[14212.718797] 
<4>[14212.718797] Pid: 4263, comm: iwl3945 Not tainted 2.6.35-rc1 #30 Nettiling/Aspire 5720     
<4>[14212.718797] RIP: 0010:[<ffffffffa0305c0d>]  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
<4>[14212.718797] RSP: 0018:ffff88006ce91c80  EFLAGS: 00010297
<4>[14212.718797] RAX: ffff880066e74100 RBX: ffff88001b2c1dc0 RCX: 00000002ffffffb1
<4>[14212.718797] RDX: 0000000000000000 RSI: 00000000ffff8800 RDI: ffff88001b2c1dc0
<4>[14212.718797] RBP: ffff88006ce91d70 R08: 000000000000030e R09: 00000000ffffffff
<4>[14212.718797] R10: 0000000000000058 R11: 0000000000000001 R12: 0000000000000000
<4>[14212.718797] R13: ffff88001b295800 R14: 0000000000000000 R15: ffff88001b2958f2
<4>[14212.718797] FS:  0000000000000000(0000) GS:ffff880002400000(0000) knlGS:0000000000000000
<4>[14212.718797] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
<4>[14212.718797] CR2: 00000002ffffffb1 CR3: 000000000155b000 CR4: 00000000000006f0
<4>[14212.718797] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
<4>[14212.718797] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
<4>[14212.718797] Process iwl3945 (pid: 4263, threadinfo ffff88006ce90000, task ffff88006d04a280)
<0>[14212.718797] Stack:
<4>[14212.718797]  ffffffffa02c3810 ffff88006d04a2f0 ffff88006ce91cb0 ffffffff81036911
<4>[14212.718797] <0> 0000000000000000 0000000000000001 ffff88006ce91cd0 ffffffff00000000
<4>[14212.718797] <0> 0057000000000246 0000005800000021 ffff88006ce91fd8 0058ffff813a07bf
<0>[14212.718797] Call Trace:
<4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
<4>[14212.718797]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
<4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
<4>[14212.718797]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
<4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
<4>[14212.718797]  [<ffffffff81056e50>] worker_thread+0x220/0x390
<4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
<4>[14212.718797]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
<4>[14212.718797]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
<4>[14212.718797]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
<4>[14212.718797]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
<4>[14212.718797]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
<4>[14212.718797]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
<0>[14212.718797] Code: ff ff 41 8d 52 ff 66 89 95 56 ff ff ff eb 14 0f 1f 80 00 00 00 00 41 ff c4 44 3b 60 0c 0f 83 eb 00 00 00 49 63 d4 48 8b 4c d0 38 <44> 3b 31 75 e6 0f b7 41 06 44 89 f6 41 88 47 01 0f b6 d0 48 89 
<1>[14212.718797] RIP  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
<4>[14212.718797]  RSP <ffff88006ce91c80>
<0>[14212.718797] CR2: 00000002ffffffb1
<4>[14212.760163] ---[ end trace 7075fd19298c88a3 ]---
<0>[14212.761267] Kernel panic - not syncing: Fatal exception
<4>[14212.762226] Pid: 4263, comm: iwl3945 Tainted: G      D     2.6.35-rc1 #30
<4>[14212.763193] Call Trace:
<4>[14212.764143]  [<ffffffff8139e487>] panic+0x90/0x10a
<4>[14212.765084]  [<ffffffff8100737c>] oops_end+0xcc/0xe0
<4>[14212.765095]  [<ffffffff81027c13>] no_context+0xf3/0x260
<4>[14212.765106]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
<4>[14212.765116]  [<ffffffff81027e95>] __bad_area_nosemaphore+0x115/0x1d0
<4>[14212.765128]  [<ffffffff81027f5e>] bad_area_nosemaphore+0xe/0x10
<4>[14212.765138]  [<ffffffff810283c6>] do_page_fault+0x2e6/0x390
<4>[14212.765148]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
<4>[14212.765158]  [<ffffffff81062410>] ? sched_clock_cpu+0xc0/0x110
<4>[14212.765169]  [<ffffffff8100add7>] ? native_sched_clock+0x27/0x80
<4>[14212.765179]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
<4>[14212.765191]  [<ffffffff813a309f>] page_fault+0x1f/0x30
<4>[14212.765207]  [<ffffffffa0305c0d>] ? iwl3945_request_scan+0x61d/0xf90 [iwl3945]
<4>[14212.765232]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
<4>[14212.765246]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
<4>[14212.765266]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
<4>[14212.765286]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
<4>[14212.765299]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
<4>[14212.765310]  [<ffffffff81056e50>] worker_thread+0x220/0x390
<4>[14212.765320]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
<4>[14212.765333]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
<4>[14212.765344]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
<4>[14212.765353]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
<4>[14212.765365]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
<4>[14212.765376]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
<4>[14212.765386]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
<3>[14212.765402] [drm:drm_fb_helper_panic] *ERROR* panic occurred, switching back to text console
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 3e5bffb..1aef988 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
>         if (!sband)
>                 return 0;
>  
> +       if(!priv->scan_request) {
> +               WARN_ON(1);
> +               return 0;
> +       }
> +
>         active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
>         passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
> 
> 
> 2. mulicast/broadcast is broken.
> this results in DHCP non working on open access point.
> It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
> It can be worked around by doing (sudo ifconfig wlan0 promisc)
> 
> 
Best regards,
	Maxim Levitsky


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 14:57 ` Maxim Levitsky
@ 2010-06-01 15:21   ` Sedat Dilek
  2010-06-01 18:12     ` Maxim Levitsky
  2010-06-01 19:03     ` Abhijeet Kolekar
  0 siblings, 2 replies; 16+ messages in thread
From: Sedat Dilek @ 2010-06-01 15:21 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-wireless, iwlwifi maling list

[-- Attachment #1: Type: text/plain, Size: 9308 bytes --]

Hi Maxim,

that's a known issue... and there were several mails to LKML and here
on the ML (as I see you are very active on both lists :-)).
Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.

I am attaching the original patch and give it a meaningfull name, so
people see it on patchwork.kernel.org (linux-wireless).

Kind Regards,
- Sedat -

[1] http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208

On Tue, Jun 1, 2010 at 4:57 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> On Tue, 2010-06-01 at 15:25 +0300, Maxim Levitsky wrote:
>> Hi,
>>
>> in 2.6.35-rc1 the wireless became just unusable.
>>
>> These are problems that I have:
>>
>> 1. very frequent oopses.This appears to be mention on the list already,
>> but patches I tried don't help.
>>
>> I currently use this bandaid patch, and I still get some crashes:
>
>
> The crash happens here:
>
> 0xec3d is in iwl3945_request_scan (/home/maxim/software/kernel/linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c:1878).
> 1873                    if (chan->band != band)
> 1874                            continue;
> 1875
> 1876                    scan_ch->channel = chan->hw_value;
> 1877
> 1878                    ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
> 1879                    if (!is_channel_valid(ch_info)) {
> 1880                            IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n",
> 1881                                           scan_ch->channel);
> 1882                            continue;
>
>
> The backtrace:
>
> <1>[14212.708840] BUG: unable to handle kernel paging request at 00000002ffffffb1
> <1>[14212.709870] IP: [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> <4>[14212.710763] PGD 0
> <0>[14212.711636] Oops: 0000 [#1] PREEMPT SMP
> <0>[14212.712519] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/temp1_input
> <4>[14212.713416] CPU 0
> <4>[14212.713432] Modules linked in: tg3 libphy iwl3945 iwlcore mac80211 cfg80211 ntfs vfat msdos fat lirc_ene0100 lirc_dev af_packet nfsd exportfs nfs lockd nfs_acl auth_rpcgss usb_storage usb_libusual cpufreq_powersave cpufreq_conservative r852 snd_hda_codec_realtek uvcvideo sm_common cpufreq_userspace acpi_cpufreq snd_hda_intel videodev mperf nand snd_hda_codec nand_ids sdhci_pci iTCO_wdt v4l2_compat_ioctl32 joydev snd_hwdep nand_ecc uhci_hcd sunrpc iTCO_vendor_support sdhci ehci_hcd psmouse snd_pcm mmc_core mtd usbcore coretemp ac sg battery evdev serio_raw snd_page_alloc video nouveau ttm drm_kms_helper drm i2c_algo_bit [last unloaded: cfg80211]
> <4>[14212.718797]
> <4>[14212.718797] Pid: 4263, comm: iwl3945 Not tainted 2.6.35-rc1 #30 Nettiling/Aspire 5720
> <4>[14212.718797] RIP: 0010:[<ffffffffa0305c0d>]  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> <4>[14212.718797] RSP: 0018:ffff88006ce91c80  EFLAGS: 00010297
> <4>[14212.718797] RAX: ffff880066e74100 RBX: ffff88001b2c1dc0 RCX: 00000002ffffffb1
> <4>[14212.718797] RDX: 0000000000000000 RSI: 00000000ffff8800 RDI: ffff88001b2c1dc0
> <4>[14212.718797] RBP: ffff88006ce91d70 R08: 000000000000030e R09: 00000000ffffffff
> <4>[14212.718797] R10: 0000000000000058 R11: 0000000000000001 R12: 0000000000000000
> <4>[14212.718797] R13: ffff88001b295800 R14: 0000000000000000 R15: ffff88001b2958f2
> <4>[14212.718797] FS:  0000000000000000(0000) GS:ffff880002400000(0000) knlGS:0000000000000000
> <4>[14212.718797] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> <4>[14212.718797] CR2: 00000002ffffffb1 CR3: 000000000155b000 CR4: 00000000000006f0
> <4>[14212.718797] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> <4>[14212.718797] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> <4>[14212.718797] Process iwl3945 (pid: 4263, threadinfo ffff88006ce90000, task ffff88006d04a280)
> <0>[14212.718797] Stack:
> <4>[14212.718797]  ffffffffa02c3810 ffff88006d04a2f0 ffff88006ce91cb0 ffffffff81036911
> <4>[14212.718797] <0> 0000000000000000 0000000000000001 ffff88006ce91cd0 ffffffff00000000
> <4>[14212.718797] <0> 0057000000000246 0000005800000021 ffff88006ce91fd8 0058ffff813a07bf
> <0>[14212.718797] Call Trace:
> <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> <4>[14212.718797]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> <4>[14212.718797]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> <4>[14212.718797]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> <4>[14212.718797]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> <4>[14212.718797]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> <4>[14212.718797]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> <4>[14212.718797]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> <4>[14212.718797]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> <4>[14212.718797]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> <0>[14212.718797] Code: ff ff 41 8d 52 ff 66 89 95 56 ff ff ff eb 14 0f 1f 80 00 00 00 00 41 ff c4 44 3b 60 0c 0f 83 eb 00 00 00 49 63 d4 48 8b 4c d0 38 <44> 3b 31 75 e6 0f b7 41 06 44 89 f6 41 88 47 01 0f b6 d0 48 89
> <1>[14212.718797] RIP  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> <4>[14212.718797]  RSP <ffff88006ce91c80>
> <0>[14212.718797] CR2: 00000002ffffffb1
> <4>[14212.760163] ---[ end trace 7075fd19298c88a3 ]---
> <0>[14212.761267] Kernel panic - not syncing: Fatal exception
> <4>[14212.762226] Pid: 4263, comm: iwl3945 Tainted: G      D     2.6.35-rc1 #30
> <4>[14212.763193] Call Trace:
> <4>[14212.764143]  [<ffffffff8139e487>] panic+0x90/0x10a
> <4>[14212.765084]  [<ffffffff8100737c>] oops_end+0xcc/0xe0
> <4>[14212.765095]  [<ffffffff81027c13>] no_context+0xf3/0x260
> <4>[14212.765106]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> <4>[14212.765116]  [<ffffffff81027e95>] __bad_area_nosemaphore+0x115/0x1d0
> <4>[14212.765128]  [<ffffffff81027f5e>] bad_area_nosemaphore+0xe/0x10
> <4>[14212.765138]  [<ffffffff810283c6>] do_page_fault+0x2e6/0x390
> <4>[14212.765148]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> <4>[14212.765158]  [<ffffffff81062410>] ? sched_clock_cpu+0xc0/0x110
> <4>[14212.765169]  [<ffffffff8100add7>] ? native_sched_clock+0x27/0x80
> <4>[14212.765179]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> <4>[14212.765191]  [<ffffffff813a309f>] page_fault+0x1f/0x30
> <4>[14212.765207]  [<ffffffffa0305c0d>] ? iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> <4>[14212.765232]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> <4>[14212.765246]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> <4>[14212.765266]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> <4>[14212.765286]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> <4>[14212.765299]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> <4>[14212.765310]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> <4>[14212.765320]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> <4>[14212.765333]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> <4>[14212.765344]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> <4>[14212.765353]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> <4>[14212.765365]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> <4>[14212.765376]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> <4>[14212.765386]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> <3>[14212.765402] [drm:drm_fb_helper_panic] *ERROR* panic occurred, switching back to text console
>>
>> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> index 3e5bffb..1aef988 100644
>> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> @@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
>>         if (!sband)
>>                 return 0;
>>
>> +       if(!priv->scan_request) {
>> +               WARN_ON(1);
>> +               return 0;
>> +       }
>> +
>>         active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
>>         passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
>>
>>
>> 2. mulicast/broadcast is broken.
>> this results in DHCP non working on open access point.
>> It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
>> It can be worked around by doing (sudo ifconfig wlan0 promisc)
>>
>>
> Best regards,
>        Maxim Levitsky
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[-- Attachment #2: iwl3945-Fix-internal-scan-races.patch --]
[-- Type: text/x-diff, Size: 3295 bytes --]

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 71aebbb..6e53154 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1783,6 +1783,74 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
 #endif
 }
 
+static int iwl3945_get_single_channel_for_scan(struct iwl_priv *priv,
+					   struct ieee80211_vif *vif,
+					   enum ieee80211_band band,
+					   struct iwl3945_scan_channel *scan_ch)
+{
+	const struct ieee80211_supported_band *sband;
+	const struct iwl_channel_info *ch_info;
+	u16 passive_dwell = 0;
+	u16 active_dwell = 0;
+	int i, added = 0;
+	u16 channel = 0;
+
+	sband = iwl_get_hw_mode(priv, band);
+	if (!sband) {
+		IWL_ERR(priv, "invalid band\n");
+		return added;
+	}
+
+	active_dwell = iwl_get_active_dwell_time(priv, band, 0);
+	passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
+
+	if (passive_dwell <= active_dwell)
+		passive_dwell = active_dwell + 1;
+
+	/* only scan single channel, good enough to reset the RF */
+	/* pick the first valid not in-use channel */
+	if (band == IEEE80211_BAND_5GHZ) {
+		for (i = 14; i < priv->channel_count; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+				channel = priv->channel_info[i].channel;
+				ch_info = iwl_get_channel_info(priv,
+					band, channel);
+				if (is_channel_valid(ch_info))
+					break;
+			}
+		}
+	} else {
+		for (i = 0; i < 14; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+					channel =
+						priv->channel_info[i].channel;
+					ch_info = iwl_get_channel_info(priv,
+						band, channel);
+					if (is_channel_valid(ch_info))
+						break;
+			}
+		}
+	}
+
+	if (channel) {
+		scan_ch->channel = cpu_to_le16(channel);
+		scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
+		scan_ch->active_dwell = cpu_to_le16(active_dwell);
+		scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
+		/* Set txpower levels to defaults */
+		scan_ch->tpc.dsp_atten = 110;
+		if (band == IEEE80211_BAND_5GHZ)
+			scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
+		else
+			scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
+		added++;
+	} else
+		IWL_ERR(priv, "no valid channel found\n");
+	return added;
+}
+
 static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
 					 enum ieee80211_band band,
 				     u8 is_active, u8 n_probes,
@@ -2933,10 +3001,23 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	/* select Rx antennas */
 	scan->flags |= iwl3945_get_antenna_flags(priv);
 
-	scan->channel_count =
+	if (priv->is_internal_short_scan) {
+		scan->channel_count =
+			iwl3945_get_single_channel_for_scan(priv, vif, band,
+				(void *)&scan->data[le16_to_cpu(
+				scan->tx_cmd.len)]);
+	} else {
+		scan->channel_count =
+			iwl3945_get_channels_for_scan(priv, band,
+				is_active, n_probes,
+				(void *)&scan->data[le16_to_cpu(
+				scan->tx_cmd.len)], vif);
+	}
+
+	/*scan->channel_count =
 		iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
 			(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
-
+*/
 	if (scan->channel_count == 0) {
 		IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
 		goto done;

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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 15:21   ` Sedat Dilek
@ 2010-06-01 18:12     ` Maxim Levitsky
  2010-06-02 16:53       ` Maxim Levitsky
  2010-06-01 19:03     ` Abhijeet Kolekar
  1 sibling, 1 reply; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-01 18:12 UTC (permalink / raw)
  To: sedat.dilek; +Cc: linux-wireless, iwlwifi maling list

On Tue, 2010-06-01 at 17:21 +0200, Sedat Dilek wrote: 
> Hi Maxim,
> 
> that's a known issue... and there were several mails to LKML and here
> on the ML (as I see you are very active on both lists :-)).
> Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
> 
> I am attaching the original patch and give it a meaningfull name, so
> people see it on patchwork.kernel.org (linux-wireless).

The patch appears the work, Thanks!

Now the only problem remains is that I can associate only when device is
in promisc mode.
I think it doesn't receive broadcast frames.

Best regards,
Maxim Levitsky



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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 15:21   ` Sedat Dilek
  2010-06-01 18:12     ` Maxim Levitsky
@ 2010-06-01 19:03     ` Abhijeet Kolekar
  2010-06-01 19:59       ` Maxim Levitsky
  2010-06-02  8:35       ` Sedat Dilek
  1 sibling, 2 replies; 16+ messages in thread
From: Abhijeet Kolekar @ 2010-06-01 19:03 UTC (permalink / raw)
  To: sedat.dilek@gmail.com; +Cc: Maxim Levitsky, linux-wireless, iwlwifi maling list

[-- Attachment #1: Type: text/plain, Size: 9385 bytes --]

Hello,
   Please check the following version of the patch.

Abhijeet
On Tue, 2010-06-01 at 08:21 -0700, Sedat Dilek wrote:
> Hi Maxim,
> 
> that's a known issue... and there were several mails to LKML and here
> on the ML (as I see you are very active on both lists :-)).
> Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
> 
> I am attaching the original patch and give it a meaningfull name, so
> people see it on patchwork.kernel.org (linux-wireless).
> 
> Kind Regards,
> - Sedat -
> 
> [1] http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208
> 
> On Tue, Jun 1, 2010 at 4:57 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > On Tue, 2010-06-01 at 15:25 +0300, Maxim Levitsky wrote:
> >> Hi,
> >>
> >> in 2.6.35-rc1 the wireless became just unusable.
> >>
> >> These are problems that I have:
> >>
> >> 1. very frequent oopses.This appears to be mention on the list already,
> >> but patches I tried don't help.
> >>
> >> I currently use this bandaid patch, and I still get some crashes:
> >
> >
> > The crash happens here:
> >
> > 0xec3d is in iwl3945_request_scan (/home/maxim/software/kernel/linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c:1878).
> > 1873                    if (chan->band != band)
> > 1874                            continue;
> > 1875
> > 1876                    scan_ch->channel = chan->hw_value;
> > 1877
> > 1878                    ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
> > 1879                    if (!is_channel_valid(ch_info)) {
> > 1880                            IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n",
> > 1881                                           scan_ch->channel);
> > 1882                            continue;
> >
> >
> > The backtrace:
> >
> > <1>[14212.708840] BUG: unable to handle kernel paging request at 00000002ffffffb1
> > <1>[14212.709870] IP: [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > <4>[14212.710763] PGD 0
> > <0>[14212.711636] Oops: 0000 [#1] PREEMPT SMP
> > <0>[14212.712519] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/temp1_input
> > <4>[14212.713416] CPU 0
> > <4>[14212.713432] Modules linked in: tg3 libphy iwl3945 iwlcore mac80211 cfg80211 ntfs vfat msdos fat lirc_ene0100 lirc_dev af_packet nfsd exportfs nfs lockd nfs_acl auth_rpcgss usb_storage usb_libusual cpufreq_powersave cpufreq_conservative r852 snd_hda_codec_realtek uvcvideo sm_common cpufreq_userspace acpi_cpufreq snd_hda_intel videodev mperf nand snd_hda_codec nand_ids sdhci_pci iTCO_wdt v4l2_compat_ioctl32 joydev snd_hwdep nand_ecc uhci_hcd sunrpc iTCO_vendor_support sdhci ehci_hcd psmouse snd_pcm mmc_core mtd usbcore coretemp ac sg battery evdev serio_raw snd_page_alloc video nouveau ttm drm_kms_helper drm i2c_algo_bit [last unloaded: cfg80211]
> > <4>[14212.718797]
> > <4>[14212.718797] Pid: 4263, comm: iwl3945 Not tainted 2.6.35-rc1 #30 Nettiling/Aspire 5720
> > <4>[14212.718797] RIP: 0010:[<ffffffffa0305c0d>]  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > <4>[14212.718797] RSP: 0018:ffff88006ce91c80  EFLAGS: 00010297
> > <4>[14212.718797] RAX: ffff880066e74100 RBX: ffff88001b2c1dc0 RCX: 00000002ffffffb1
> > <4>[14212.718797] RDX: 0000000000000000 RSI: 00000000ffff8800 RDI: ffff88001b2c1dc0
> > <4>[14212.718797] RBP: ffff88006ce91d70 R08: 000000000000030e R09: 00000000ffffffff
> > <4>[14212.718797] R10: 0000000000000058 R11: 0000000000000001 R12: 0000000000000000
> > <4>[14212.718797] R13: ffff88001b295800 R14: 0000000000000000 R15: ffff88001b2958f2
> > <4>[14212.718797] FS:  0000000000000000(0000) GS:ffff880002400000(0000) knlGS:0000000000000000
> > <4>[14212.718797] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > <4>[14212.718797] CR2: 00000002ffffffb1 CR3: 000000000155b000 CR4: 00000000000006f0
> > <4>[14212.718797] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > <4>[14212.718797] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > <4>[14212.718797] Process iwl3945 (pid: 4263, threadinfo ffff88006ce90000, task ffff88006d04a280)
> > <0>[14212.718797] Stack:
> > <4>[14212.718797]  ffffffffa02c3810 ffff88006d04a2f0 ffff88006ce91cb0 ffffffff81036911
> > <4>[14212.718797] <0> 0000000000000000 0000000000000001 ffff88006ce91cd0 ffffffff00000000
> > <4>[14212.718797] <0> 0057000000000246 0000005800000021 ffff88006ce91fd8 0058ffff813a07bf
> > <0>[14212.718797] Call Trace:
> > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > <4>[14212.718797]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > <4>[14212.718797]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > <4>[14212.718797]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > <4>[14212.718797]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> > <4>[14212.718797]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> > <4>[14212.718797]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> > <4>[14212.718797]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> > <4>[14212.718797]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> > <4>[14212.718797]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> > <0>[14212.718797] Code: ff ff 41 8d 52 ff 66 89 95 56 ff ff ff eb 14 0f 1f 80 00 00 00 00 41 ff c4 44 3b 60 0c 0f 83 eb 00 00 00 49 63 d4 48 8b 4c d0 38 <44> 3b 31 75 e6 0f b7 41 06 44 89 f6 41 88 47 01 0f b6 d0 48 89
> > <1>[14212.718797] RIP  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > <4>[14212.718797]  RSP <ffff88006ce91c80>
> > <0>[14212.718797] CR2: 00000002ffffffb1
> > <4>[14212.760163] ---[ end trace 7075fd19298c88a3 ]---
> > <0>[14212.761267] Kernel panic - not syncing: Fatal exception
> > <4>[14212.762226] Pid: 4263, comm: iwl3945 Tainted: G      D     2.6.35-rc1 #30
> > <4>[14212.763193] Call Trace:
> > <4>[14212.764143]  [<ffffffff8139e487>] panic+0x90/0x10a
> > <4>[14212.765084]  [<ffffffff8100737c>] oops_end+0xcc/0xe0
> > <4>[14212.765095]  [<ffffffff81027c13>] no_context+0xf3/0x260
> > <4>[14212.765106]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > <4>[14212.765116]  [<ffffffff81027e95>] __bad_area_nosemaphore+0x115/0x1d0
> > <4>[14212.765128]  [<ffffffff81027f5e>] bad_area_nosemaphore+0xe/0x10
> > <4>[14212.765138]  [<ffffffff810283c6>] do_page_fault+0x2e6/0x390
> > <4>[14212.765148]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > <4>[14212.765158]  [<ffffffff81062410>] ? sched_clock_cpu+0xc0/0x110
> > <4>[14212.765169]  [<ffffffff8100add7>] ? native_sched_clock+0x27/0x80
> > <4>[14212.765179]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > <4>[14212.765191]  [<ffffffff813a309f>] page_fault+0x1f/0x30
> > <4>[14212.765207]  [<ffffffffa0305c0d>] ? iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > <4>[14212.765232]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > <4>[14212.765246]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> > <4>[14212.765266]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > <4>[14212.765286]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> > <4>[14212.765299]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > <4>[14212.765310]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> > <4>[14212.765320]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > <4>[14212.765333]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> > <4>[14212.765344]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> > <4>[14212.765353]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> > <4>[14212.765365]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> > <4>[14212.765376]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> > <4>[14212.765386]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> > <3>[14212.765402] [drm:drm_fb_helper_panic] *ERROR* panic occurred, switching back to text console
> >>
> >> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> >> index 3e5bffb..1aef988 100644
> >> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> >> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> >> @@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
> >>         if (!sband)
> >>                 return 0;
> >>
> >> +       if(!priv->scan_request) {
> >> +               WARN_ON(1);
> >> +               return 0;
> >> +       }
> >> +
> >>         active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
> >>         passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
> >>
> >>
> >> 2. mulicast/broadcast is broken.
> >> this results in DHCP non working on open access point.
> >> It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
> >> It can be worked around by doing (sudo ifconfig wlan0 promisc)
> >>
> >>
> > Best regards,
> >        Maxim Levitsky
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >


[-- Attachment #2: 0001-iwl3945-fix-internal-scan.patch --]
[-- Type: text/x-patch, Size: 7288 bytes --]

>From 9b6e4d25dd20941d20dae102096c4b2fb7626af6 Mon Sep 17 00:00:00 2001
From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Date: Wed, 26 May 2010 10:49:22 -0700
Subject: [PATCH V2] iwl3945: fix internal scan

Port of internal scan to iwl3945 missed introduction
of iwl3945_get_single_channel_for_scan.

Fix the following bug by introducing the iwl3945_get_single_channel_for_scan
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
---
v2: rearrange code. Put duplicate code in single function.
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |   30 +-------------
 drivers/net/wireless/iwlwifi/iwl-core.c     |   39 ++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   56 +++++++++++++++++++++++++-
 4 files changed, 96 insertions(+), 31 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 1176a64..c7d5251 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -992,10 +992,9 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
 					   struct iwl_scan_channel *scan_ch)
 {
 	const struct ieee80211_supported_band *sband;
-	const struct iwl_channel_info *ch_info;
 	u16 passive_dwell = 0;
 	u16 active_dwell = 0;
-	int i, added = 0;
+	int added = 0;
 	u16 channel = 0;
 
 	sband = iwl_get_hw_mode(priv, band);
@@ -1010,32 +1009,7 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
 	if (passive_dwell <= active_dwell)
 		passive_dwell = active_dwell + 1;
 
-	/* only scan single channel, good enough to reset the RF */
-	/* pick the first valid not in-use channel */
-	if (band == IEEE80211_BAND_5GHZ) {
-		for (i = 14; i < priv->channel_count; i++) {
-			if (priv->channel_info[i].channel !=
-			    le16_to_cpu(priv->staging_rxon.channel)) {
-				channel = priv->channel_info[i].channel;
-				ch_info = iwl_get_channel_info(priv,
-					band, channel);
-				if (is_channel_valid(ch_info))
-					break;
-			}
-		}
-	} else {
-		for (i = 0; i < 14; i++) {
-			if (priv->channel_info[i].channel !=
-			    le16_to_cpu(priv->staging_rxon.channel)) {
-					channel =
-						priv->channel_info[i].channel;
-					ch_info = iwl_get_channel_info(priv,
-						band, channel);
-					if (is_channel_valid(ch_info))
-						break;
-			}
-		}
-	}
+	channel = iwl_get_single_channel_number(priv, band);
 	if (channel) {
 		scan_ch->channel = cpu_to_le16(channel);
 		scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 9d4010e..0dc8b9c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -856,6 +856,45 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
 }
 EXPORT_SYMBOL(iwl_set_rxon_chain);
 
+/* Return valid channel */
+u16 iwl_get_single_channel_number(struct iwl_priv *priv,
+				  enum ieee80211_band band)
+{
+	const struct iwl_channel_info *ch_info;
+	int i;
+	u16 channel = 0;
+
+	/* only scan single channel, good enough to reset the RF */
+	/* pick the first valid not in-use channel */
+	if (band == IEEE80211_BAND_5GHZ) {
+		for (i = 14; i < priv->channel_count; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+				channel = priv->channel_info[i].channel;
+				ch_info = iwl_get_channel_info(priv,
+					band, channel);
+				if (is_channel_valid(ch_info))
+					break;
+			}
+		}
+	} else {
+		for (i = 0; i < 14; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+					channel =
+						priv->channel_info[i].channel;
+					ch_info = iwl_get_channel_info(priv,
+						band, channel);
+					if (is_channel_valid(ch_info))
+						break;
+			}
+		}
+	}
+
+	return channel;
+}
+EXPORT_SYMBOL(iwl_get_single_channel_number);
+
 /**
  * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON
  * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 87dd573..007e104 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -347,6 +347,8 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv);
 int iwl_full_rxon_required(struct iwl_priv *priv);
 void iwl_set_rxon_chain(struct iwl_priv *priv);
 int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
+u16 iwl_get_single_channel_number(struct iwl_priv *priv,
+				  enum ieee80211_band band);
 void iwl_set_flags_for_band(struct iwl_priv *priv,
 			    enum ieee80211_band band,
 			    struct ieee80211_vif *vif);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 71aebbb..67ebda5 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1783,6 +1783,49 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
 #endif
 }
 
+static int iwl3945_get_single_channel_for_scan(struct iwl_priv *priv,
+					       struct ieee80211_vif *vif,
+					       enum ieee80211_band band,
+					       struct iwl3945_scan_channel *scan_ch)
+{
+	const struct ieee80211_supported_band *sband;
+	u16 passive_dwell = 0;
+	u16 active_dwell = 0;
+	int added = 0;
+	u16 channel = 0;
+
+	sband = iwl_get_hw_mode(priv, band);
+	if (!sband) {
+		IWL_ERR(priv, "invalid band\n");
+		return added;
+	}
+
+	active_dwell = iwl_get_active_dwell_time(priv, band, 0);
+	passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
+
+	if (passive_dwell <= active_dwell)
+		passive_dwell = active_dwell + 1;
+
+
+	channel = iwl_get_single_channel_number(priv, band);
+
+	if (channel) {
+		scan_ch->channel = cpu_to_le16(channel);
+		scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
+		scan_ch->active_dwell = cpu_to_le16(active_dwell);
+		scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
+		/* Set txpower levels to defaults */
+		scan_ch->tpc.dsp_atten = 110;
+		if (band == IEEE80211_BAND_5GHZ)
+			scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
+		else
+			scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
+		added++;
+	} else
+		IWL_ERR(priv, "no valid channel found\n");
+	return added;
+}
+
 static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
 					 enum ieee80211_band band,
 				     u8 is_active, u8 n_probes,
@@ -2933,9 +2976,16 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	/* select Rx antennas */
 	scan->flags |= iwl3945_get_antenna_flags(priv);
 
-	scan->channel_count =
-		iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
-			(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
+	if (priv->is_internal_short_scan) {
+		scan->channel_count =
+			iwl3945_get_single_channel_for_scan(priv, vif, band,
+				(void *)&scan->data[le16_to_cpu(
+				scan->tx_cmd.len)]);
+	} else {
+		scan->channel_count =
+			iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
+				(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
+	}
 
 	if (scan->channel_count == 0) {
 		IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
-- 
1.6.3.3


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 19:03     ` Abhijeet Kolekar
@ 2010-06-01 19:59       ` Maxim Levitsky
  2010-06-02  8:35       ` Sedat Dilek
  1 sibling, 0 replies; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-01 19:59 UTC (permalink / raw)
  To: Abhijeet Kolekar
  Cc: sedat.dilek@gmail.com, linux-wireless, iwlwifi maling list

On Tue, 2010-06-01 at 12:03 -0700, Abhijeet Kolekar wrote: 
> Hello,
>    Please check the following version of the patch.
> 
> Abhijeet
> On Tue, 2010-06-01 at 08:21 -0700, Sedat Dilek wrote:
> > Hi Maxim,
> > 
> > that's a known issue... and there were several mails to LKML and here
> > on the ML (as I see you are very active on both lists :-)).
> > Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
> > 
> > I am attaching the original patch and give it a meaningfull name, so
> > people see it on patchwork.kernel.org (linux-wireless).
> > 
> > Kind Regards,
> > - Sedat -
> > 
> > [1] http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208
> > 
> > On Tue, Jun 1, 2010 at 4:57 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > On Tue, 2010-06-01 at 15:25 +0300, Maxim Levitsky wrote:
> > >> Hi,
> > >>
> > >> in 2.6.35-rc1 the wireless became just unusable.
> > >>
> > >> These are problems that I have:
> > >>
> > >> 1. very frequent oopses.This appears to be mention on the list already,
> > >> but patches I tried don't help.
> > >>
> > >> I currently use this bandaid patch, and I still get some crashes:
> > >
> > >
> > > The crash happens here:
> > >
> > > 0xec3d is in iwl3945_request_scan (/home/maxim/software/kernel/linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c:1878).
> > > 1873                    if (chan->band != band)
> > > 1874                            continue;
> > > 1875
> > > 1876                    scan_ch->channel = chan->hw_value;
> > > 1877
> > > 1878                    ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
> > > 1879                    if (!is_channel_valid(ch_info)) {
> > > 1880                            IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n",
> > > 1881                                           scan_ch->channel);
> > > 1882                            continue;
> > >
> > >
> > > The backtrace:
> > >
> > > <1>[14212.708840] BUG: unable to handle kernel paging request at 00000002ffffffb1
> > > <1>[14212.709870] IP: [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > > <4>[14212.710763] PGD 0
> > > <0>[14212.711636] Oops: 0000 [#1] PREEMPT SMP
> > > <0>[14212.712519] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/temp1_input
> > > <4>[14212.713416] CPU 0
> > > <4>[14212.713432] Modules linked in: tg3 libphy iwl3945 iwlcore mac80211 cfg80211 ntfs vfat msdos fat lirc_ene0100 lirc_dev af_packet nfsd exportfs nfs lockd nfs_acl auth_rpcgss usb_storage usb_libusual cpufreq_powersave cpufreq_conservative r852 snd_hda_codec_realtek uvcvideo sm_common cpufreq_userspace acpi_cpufreq snd_hda_intel videodev mperf nand snd_hda_codec nand_ids sdhci_pci iTCO_wdt v4l2_compat_ioctl32 joydev snd_hwdep nand_ecc uhci_hcd sunrpc iTCO_vendor_support sdhci ehci_hcd psmouse snd_pcm mmc_core mtd usbcore coretemp ac sg battery evdev serio_raw snd_page_alloc video nouveau ttm drm_kms_helper drm i2c_algo_bit [last unloaded: cfg80211]
> > > <4>[14212.718797]
> > > <4>[14212.718797] Pid: 4263, comm: iwl3945 Not tainted 2.6.35-rc1 #30 Nettiling/Aspire 5720
> > > <4>[14212.718797] RIP: 0010:[<ffffffffa0305c0d>]  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > > <4>[14212.718797] RSP: 0018:ffff88006ce91c80  EFLAGS: 00010297
> > > <4>[14212.718797] RAX: ffff880066e74100 RBX: ffff88001b2c1dc0 RCX: 00000002ffffffb1
> > > <4>[14212.718797] RDX: 0000000000000000 RSI: 00000000ffff8800 RDI: ffff88001b2c1dc0
> > > <4>[14212.718797] RBP: ffff88006ce91d70 R08: 000000000000030e R09: 00000000ffffffff
> > > <4>[14212.718797] R10: 0000000000000058 R11: 0000000000000001 R12: 0000000000000000
> > > <4>[14212.718797] R13: ffff88001b295800 R14: 0000000000000000 R15: ffff88001b2958f2
> > > <4>[14212.718797] FS:  0000000000000000(0000) GS:ffff880002400000(0000) knlGS:0000000000000000
> > > <4>[14212.718797] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > > <4>[14212.718797] CR2: 00000002ffffffb1 CR3: 000000000155b000 CR4: 00000000000006f0
> > > <4>[14212.718797] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > > <4>[14212.718797] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > > <4>[14212.718797] Process iwl3945 (pid: 4263, threadinfo ffff88006ce90000, task ffff88006d04a280)
> > > <0>[14212.718797] Stack:
> > > <4>[14212.718797]  ffffffffa02c3810 ffff88006d04a2f0 ffff88006ce91cb0 ffffffff81036911
> > > <4>[14212.718797] <0> 0000000000000000 0000000000000001 ffff88006ce91cd0 ffffffff00000000
> > > <4>[14212.718797] <0> 0057000000000246 0000005800000021 ffff88006ce91fd8 0058ffff813a07bf
> > > <0>[14212.718797] Call Trace:
> > > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > > <4>[14212.718797]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> > > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > > <4>[14212.718797]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> > > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > > <4>[14212.718797]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> > > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > > <4>[14212.718797]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> > > <4>[14212.718797]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> > > <4>[14212.718797]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> > > <4>[14212.718797]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> > > <4>[14212.718797]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> > > <4>[14212.718797]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> > > <0>[14212.718797] Code: ff ff 41 8d 52 ff 66 89 95 56 ff ff ff eb 14 0f 1f 80 00 00 00 00 41 ff c4 44 3b 60 0c 0f 83 eb 00 00 00 49 63 d4 48 8b 4c d0 38 <44> 3b 31 75 e6 0f b7 41 06 44 89 f6 41 88 47 01 0f b6 d0 48 89
> > > <1>[14212.718797] RIP  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > > <4>[14212.718797]  RSP <ffff88006ce91c80>
> > > <0>[14212.718797] CR2: 00000002ffffffb1
> > > <4>[14212.760163] ---[ end trace 7075fd19298c88a3 ]---
> > > <0>[14212.761267] Kernel panic - not syncing: Fatal exception
> > > <4>[14212.762226] Pid: 4263, comm: iwl3945 Tainted: G      D     2.6.35-rc1 #30
> > > <4>[14212.763193] Call Trace:
> > > <4>[14212.764143]  [<ffffffff8139e487>] panic+0x90/0x10a
> > > <4>[14212.765084]  [<ffffffff8100737c>] oops_end+0xcc/0xe0
> > > <4>[14212.765095]  [<ffffffff81027c13>] no_context+0xf3/0x260
> > > <4>[14212.765106]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > > <4>[14212.765116]  [<ffffffff81027e95>] __bad_area_nosemaphore+0x115/0x1d0
> > > <4>[14212.765128]  [<ffffffff81027f5e>] bad_area_nosemaphore+0xe/0x10
> > > <4>[14212.765138]  [<ffffffff810283c6>] do_page_fault+0x2e6/0x390
> > > <4>[14212.765148]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > > <4>[14212.765158]  [<ffffffff81062410>] ? sched_clock_cpu+0xc0/0x110
> > > <4>[14212.765169]  [<ffffffff8100add7>] ? native_sched_clock+0x27/0x80
> > > <4>[14212.765179]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
> > > <4>[14212.765191]  [<ffffffff813a309f>] page_fault+0x1f/0x30
> > > <4>[14212.765207]  [<ffffffffa0305c0d>] ? iwl3945_request_scan+0x61d/0xf90 [iwl3945]
> > > <4>[14212.765232]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > > <4>[14212.765246]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
> > > <4>[14212.765266]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
> > > <4>[14212.765286]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
> > > <4>[14212.765299]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > > <4>[14212.765310]  [<ffffffff81056e50>] worker_thread+0x220/0x390
> > > <4>[14212.765320]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
> > > <4>[14212.765333]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
> > > <4>[14212.765344]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
> > > <4>[14212.765353]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
> > > <4>[14212.765365]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
> > > <4>[14212.765376]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
> > > <4>[14212.765386]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
> > > <3>[14212.765402] [drm:drm_fb_helper_panic] *ERROR* panic occurred, switching back to text console
> > >>
> > >> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > >> index 3e5bffb..1aef988 100644
> > >> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > >> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > >> @@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
> > >>         if (!sband)
> > >>                 return 0;
> > >>
> > >> +       if(!priv->scan_request) {
> > >> +               WARN_ON(1);
> > >> +               return 0;
> > >> +       }
> > >> +
> > >>         active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
> > >>         passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
> > >>
> > >>
> > >> 2. mulicast/broadcast is broken.
> > >> this results in DHCP non working on open access point.
> > >> It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
> > >> It can be worked around by doing (sudo ifconfig wlan0 promisc)
> > >>
> > >>
> > > Best regards,
> > >        Maxim Levitsky
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > >
> 

Doesn't apply.




maxim@maxim-laptop:~/software/kernel/linux-2.6$ patch -p1 --dry-run < ../0001-iwl3945-fix-internal-scan.patch 
patching file drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Hunk #1 succeeded at 1119 (offset 127 lines).
Hunk #2 succeeded at 1136 (offset 127 lines).
patching file drivers/net/wireless/iwlwifi/iwl-core.c
Hunk #1 succeeded at 854 (offset -2 lines).
patching file drivers/net/wireless/iwlwifi/iwl-core.h
Hunk #1 FAILED at 347.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/wireless/iwlwifi/iwl-core.h.rej
patching file drivers/net/wireless/iwlwifi/iwl3945-base.c
Hunk #1 succeeded at 1844 (offset 61 lines).
Hunk #2 succeeded at 3035 (offset 59 lines).

The other patch I received today does work.

Best regards.
	Maxim Levitsky


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 19:03     ` Abhijeet Kolekar
  2010-06-01 19:59       ` Maxim Levitsky
@ 2010-06-02  8:35       ` Sedat Dilek
  2010-06-03  6:00         ` reinette chatre
  1 sibling, 1 reply; 16+ messages in thread
From: Sedat Dilek @ 2010-06-02  8:35 UTC (permalink / raw)
  To: Abhijeet Kolekar; +Cc: Maxim Levitsky, linux-wireless, iwlwifi maling list

This patch seems to be done against iwlwifi-2.6 GIT master.

Can you please offer a patch against vanilla 2.6.35-rc1 as requested
so we can try and give feedback?

- Sedat -

[...]
Applying patch iwlwifi-fix/0001-iwl3945-fix-internal-scan.patch
patching file drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Hunk #1 succeeded at 1119 (offset 127 lines).
Hunk #2 succeeded at 1136 (offset 127 lines).
patching file drivers/net/wireless/iwlwifi/iwl-core.c
Hunk #1 succeeded at 854 (offset -2 lines).
patching file drivers/net/wireless/iwlwifi/iwl-core.h
Hunk #1 FAILED at 347.
1 out of 1 hunk FAILED -- rejects in file
drivers/net/wireless/iwlwifi/iwl-core.h
patching file drivers/net/wireless/iwlwifi/iwl3945-base.c
Hunk #1 succeeded at 1844 (offset 61 lines).
Hunk #2 succeeded at 3035 (offset 59 lines).
Patch iwlwifi-fix/0001-iwl3945-fix-internal-scan.patch does not apply
(enforce with -f)
ERROR: failed to apply patch series!
[...]

On Tue, Jun 1, 2010 at 9:03 PM, Abhijeet Kolekar
<abhijeet.kolekar@intel.com> wrote:
> Hello,
>   Please check the following version of the patch.
>
> Abhijeet
> On Tue, 2010-06-01 at 08:21 -0700, Sedat Dilek wrote:
>> Hi Maxim,
>>
>> that's a known issue... and there were several mails to LKML and here
>> on the ML (as I see you are very active on both lists :-)).
>> Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
>>
>> I am attaching the original patch and give it a meaningfull name, so
>> people see it on patchwork.kernel.org (linux-wireless).
>>
>> Kind Regards,
>> - Sedat -
>>
>> [1] http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208
>>
>> On Tue, Jun 1, 2010 at 4:57 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>> > On Tue, 2010-06-01 at 15:25 +0300, Maxim Levitsky wrote:
>> >> Hi,
>> >>
>> >> in 2.6.35-rc1 the wireless became just unusable.
>> >>
>> >> These are problems that I have:
>> >>
>> >> 1. very frequent oopses.This appears to be mention on the list already,
>> >> but patches I tried don't help.
>> >>
>> >> I currently use this bandaid patch, and I still get some crashes:
>> >
>> >
>> > The crash happens here:
>> >
>> > 0xec3d is in iwl3945_request_scan (/home/maxim/software/kernel/linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c:1878).
>> > 1873                    if (chan->band != band)
>> > 1874                            continue;
>> > 1875
>> > 1876                    scan_ch->channel = chan->hw_value;
>> > 1877
>> > 1878                    ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
>> > 1879                    if (!is_channel_valid(ch_info)) {
>> > 1880                            IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n",
>> > 1881                                           scan_ch->channel);
>> > 1882                            continue;
>> >
>> >
>> > The backtrace:
>> >
>> > <1>[14212.708840] BUG: unable to handle kernel paging request at 00000002ffffffb1
>> > <1>[14212.709870] IP: [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
>> > <4>[14212.710763] PGD 0
>> > <0>[14212.711636] Oops: 0000 [#1] PREEMPT SMP
>> > <0>[14212.712519] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/temp1_input
>> > <4>[14212.713416] CPU 0
>> > <4>[14212.713432] Modules linked in: tg3 libphy iwl3945 iwlcore mac80211 cfg80211 ntfs vfat msdos fat lirc_ene0100 lirc_dev af_packet nfsd exportfs nfs lockd nfs_acl auth_rpcgss usb_storage usb_libusual cpufreq_powersave cpufreq_conservative r852 snd_hda_codec_realtek uvcvideo sm_common cpufreq_userspace acpi_cpufreq snd_hda_intel videodev mperf nand snd_hda_codec nand_ids sdhci_pci iTCO_wdt v4l2_compat_ioctl32 joydev snd_hwdep nand_ecc uhci_hcd sunrpc iTCO_vendor_support sdhci ehci_hcd psmouse snd_pcm mmc_core mtd usbcore coretemp ac sg battery evdev serio_raw snd_page_alloc video nouveau ttm drm_kms_helper drm i2c_algo_bit [last unloaded: cfg80211]
>> > <4>[14212.718797]
>> > <4>[14212.718797] Pid: 4263, comm: iwl3945 Not tainted 2.6.35-rc1 #30 Nettiling/Aspire 5720
>> > <4>[14212.718797] RIP: 0010:[<ffffffffa0305c0d>]  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
>> > <4>[14212.718797] RSP: 0018:ffff88006ce91c80  EFLAGS: 00010297
>> > <4>[14212.718797] RAX: ffff880066e74100 RBX: ffff88001b2c1dc0 RCX: 00000002ffffffb1
>> > <4>[14212.718797] RDX: 0000000000000000 RSI: 00000000ffff8800 RDI: ffff88001b2c1dc0
>> > <4>[14212.718797] RBP: ffff88006ce91d70 R08: 000000000000030e R09: 00000000ffffffff
>> > <4>[14212.718797] R10: 0000000000000058 R11: 0000000000000001 R12: 0000000000000000
>> > <4>[14212.718797] R13: ffff88001b295800 R14: 0000000000000000 R15: ffff88001b2958f2
>> > <4>[14212.718797] FS:  0000000000000000(0000) GS:ffff880002400000(0000) knlGS:0000000000000000
>> > <4>[14212.718797] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>> > <4>[14212.718797] CR2: 00000002ffffffb1 CR3: 000000000155b000 CR4: 00000000000006f0
>> > <4>[14212.718797] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> > <4>[14212.718797] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>> > <4>[14212.718797] Process iwl3945 (pid: 4263, threadinfo ffff88006ce90000, task ffff88006d04a280)
>> > <0>[14212.718797] Stack:
>> > <4>[14212.718797]  ffffffffa02c3810 ffff88006d04a2f0 ffff88006ce91cb0 ffffffff81036911
>> > <4>[14212.718797] <0> 0000000000000000 0000000000000001 ffff88006ce91cd0 ffffffff00000000
>> > <4>[14212.718797] <0> 0057000000000246 0000005800000021 ffff88006ce91fd8 0058ffff813a07bf
>> > <0>[14212.718797] Call Trace:
>> > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
>> > <4>[14212.718797]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
>> > <4>[14212.718797]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
>> > <4>[14212.718797]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
>> > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
>> > <4>[14212.718797]  [<ffffffff81056e50>] worker_thread+0x220/0x390
>> > <4>[14212.718797]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
>> > <4>[14212.718797]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
>> > <4>[14212.718797]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
>> > <4>[14212.718797]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
>> > <4>[14212.718797]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
>> > <4>[14212.718797]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
>> > <4>[14212.718797]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
>> > <0>[14212.718797] Code: ff ff 41 8d 52 ff 66 89 95 56 ff ff ff eb 14 0f 1f 80 00 00 00 00 41 ff c4 44 3b 60 0c 0f 83 eb 00 00 00 49 63 d4 48 8b 4c d0 38 <44> 3b 31 75 e6 0f b7 41 06 44 89 f6 41 88 47 01 0f b6 d0 48 89
>> > <1>[14212.718797] RIP  [<ffffffffa0305c0d>] iwl3945_request_scan+0x61d/0xf90 [iwl3945]
>> > <4>[14212.718797]  RSP <ffff88006ce91c80>
>> > <0>[14212.718797] CR2: 00000002ffffffb1
>> > <4>[14212.760163] ---[ end trace 7075fd19298c88a3 ]---
>> > <0>[14212.761267] Kernel panic - not syncing: Fatal exception
>> > <4>[14212.762226] Pid: 4263, comm: iwl3945 Tainted: G      D     2.6.35-rc1 #30
>> > <4>[14212.763193] Call Trace:
>> > <4>[14212.764143]  [<ffffffff8139e487>] panic+0x90/0x10a
>> > <4>[14212.765084]  [<ffffffff8100737c>] oops_end+0xcc/0xe0
>> > <4>[14212.765095]  [<ffffffff81027c13>] no_context+0xf3/0x260
>> > <4>[14212.765106]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
>> > <4>[14212.765116]  [<ffffffff81027e95>] __bad_area_nosemaphore+0x115/0x1d0
>> > <4>[14212.765128]  [<ffffffff81027f5e>] bad_area_nosemaphore+0xe/0x10
>> > <4>[14212.765138]  [<ffffffff810283c6>] do_page_fault+0x2e6/0x390
>> > <4>[14212.765148]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
>> > <4>[14212.765158]  [<ffffffff81062410>] ? sched_clock_cpu+0xc0/0x110
>> > <4>[14212.765169]  [<ffffffff8100add7>] ? native_sched_clock+0x27/0x80
>> > <4>[14212.765179]  [<ffffffff810622e5>] ? sched_clock_local+0x25/0x90
>> > <4>[14212.765191]  [<ffffffff813a309f>] page_fault+0x1f/0x30
>> > <4>[14212.765207]  [<ffffffffa0305c0d>] ? iwl3945_request_scan+0x61d/0xf90 [iwl3945]
>> > <4>[14212.765232]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
>> > <4>[14212.765246]  [<ffffffff81036911>] ? get_parent_ip+0x11/0x50
>> > <4>[14212.765266]  [<ffffffffa02c3810>] ? iwl_bg_start_internal_scan+0x0/0x3d0 [iwlcore]
>> > <4>[14212.765286]  [<ffffffffa02c3b2a>] iwl_bg_start_internal_scan+0x31a/0x3d0 [iwlcore]
>> > <4>[14212.765299]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
>> > <4>[14212.765310]  [<ffffffff81056e50>] worker_thread+0x220/0x390
>> > <4>[14212.765320]  [<ffffffff81056dfe>] ? worker_thread+0x1ce/0x390
>> > <4>[14212.765333]  [<ffffffff8105bc80>] ? autoremove_wake_function+0x0/0x40
>> > <4>[14212.765344]  [<ffffffff81056c30>] ? worker_thread+0x0/0x390
>> > <4>[14212.765353]  [<ffffffff8105b7fe>] kthread+0xae/0xc0
>> > <4>[14212.765365]  [<ffffffff81003b94>] kernel_thread_helper+0x4/0x10
>> > <4>[14212.765376]  [<ffffffff8105b750>] ? kthread+0x0/0xc0
>> > <4>[14212.765386]  [<ffffffff81003b90>] ? kernel_thread_helper+0x0/0x10
>> > <3>[14212.765402] [drm:drm_fb_helper_panic] *ERROR* panic occurred, switching back to text console
>> >>
>> >> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> >> index 3e5bffb..1aef988 100644
>> >> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> >> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
>> >> @@ -1861,6 +1861,11 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
>> >>         if (!sband)
>> >>                 return 0;
>> >>
>> >> +       if(!priv->scan_request) {
>> >> +               WARN_ON(1);
>> >> +               return 0;
>> >> +       }
>> >> +
>> >>         active_dwell = iwl_get_active_dwell_time(priv, band, n_probes);
>> >>         passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
>> >>
>> >>
>> >> 2. mulicast/broadcast is broken.
>> >> this results in DHCP non working on open access point.
>> >> It seems that DHCP does work on my home wireless, but avahi-autoipd doesn't see any neighbours, and this is annoying.
>> >> It can be worked around by doing (sudo ifconfig wlan0 promisc)
>> >>
>> >>
>> > Best regards,
>> >        Maxim Levitsky
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>
>

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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 18:12     ` Maxim Levitsky
@ 2010-06-02 16:53       ` Maxim Levitsky
  2010-06-02 18:01         ` Sedat Dilek
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-02 16:53 UTC (permalink / raw)
  To: sedat.dilek; +Cc: linux-wireless, iwlwifi maling list

On Tue, 2010-06-01 at 21:12 +0300, Maxim Levitsky wrote: 
> On Tue, 2010-06-01 at 17:21 +0200, Sedat Dilek wrote: 
> > Hi Maxim,
> > 
> > that's a known issue... and there were several mails to LKML and here
> > on the ML (as I see you are very active on both lists :-)).
> > Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
> > 
> > I am attaching the original patch and give it a meaningfull name, so
> > people see it on patchwork.kernel.org (linux-wireless).
> 
> The patch appears the work, Thanks!
And it still works.


> 
> Now the only problem remains is that I can associate only when device is
> in promisc mode.
> I think it doesn't receive broadcast frames.
Any update on this?
This is going to be real show stopper for normal users.
Its pretty much not possible to connect to open AP now unless promisc
mode is enabled. 


Best regards,
Maxim Levitsky
|



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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-02 16:53       ` Maxim Levitsky
@ 2010-06-02 18:01         ` Sedat Dilek
  0 siblings, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2010-06-02 18:01 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: wireless, ipw3945-devel, ilw

[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]

Hi Maxim,

I have tested here with the patches from wireless-2.6 plus this patch
in my series against 2.6.35-rc1:

# patch from <https://patchwork.kernel.org/patch/103133/>
linux-wireless/2.6.34-mac80211-fix-blockack-req-processing.patch

Unfortunately, I have here no open AP and I am not in a real test mood :-).

I could not test "mac80211: process station blockack action frames
from work" [1] yet.
It is Cc: stable@kernel.org.

All mentionned patches apply cleanly against vanilla 2.6.35-rc1 (see
below, patches attached as tarball).

- Sedat -

[1] https://patchwork.kernel.org/patch/102892/

[ patch-series ]

Applying patch wireless-2.6/0001-Revert-rt2x00-Fix-rt2800usb-TX-descriptor-writing.patch
patching file drivers/net/wireless/rt2x00/rt2800usb.c

Applying patch wireless-2.6/0002-ar9170usb-fix-read-from-freed-driver-context.patch
patching file drivers/net/wireless/ath/ar9170/usb.c

Applying patch wireless-2.6/0003-ath9k-Fix-ath_print-in-xmit-for-hardware-reset.patch
patching file drivers/net/wireless/ath/ath9k/xmit.c

Applying patch wireless-2.6/0004-ath9k-Fix-bug-in-the-way-bf_tx_aborted-of-struct-ath.patch
patching file drivers/net/wireless/ath/ath9k/xmit.c

Applying patch wireless-2.6/0005-libertas-fix-uninitialized-variable-warning.patch
patching file drivers/net/wireless/libertas/rx.c

Applying patch wireless-2.6/0006-mac80211-make-a-function-static.patch
patching file net/mac80211/chan.c

Applying patch wireless-2.6/0007-ssb-fix-NULL-ptr-deref-when-pcihost_wrapper-is-used.patch
patching file drivers/ssb/pci.c
patching file drivers/ssb/sprom.c

Applying patch iwlwifi-fix/iwl3945-Fix-internal-scan-races.patch
patching file drivers/net/wireless/iwlwifi/iwl3945-base.c
Hunk #1 succeeded at 1844 (offset 61 lines).
Hunk #2 succeeded at 3060 (offset 59 lines).

Applying patch linux-wireless/2.6.34-mac80211-fix-blockack-req-processing.patch
patching file net/mac80211/rx.c
Hunk #1 succeeded at 1818 (offset -1 lines).

Applying patch linux-wireless/mac80211-process-station-blockack-action-frames-from-work.patch
patching file net/mac80211/mlme.c
patching file net/mac80211/rx.c
Hunk #1 succeeded at 1944 (offset 8 lines).

--- EOT ---

On Wed, Jun 2, 2010 at 6:53 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> On Tue, 2010-06-01 at 21:12 +0300, Maxim Levitsky wrote:
>> On Tue, 2010-06-01 at 17:21 +0200, Sedat Dilek wrote:
>> > Hi Maxim,
>> >
>> > that's a known issue... and there were several mails to LKML and here
>> > on the ML (as I see you are very active on both lists :-)).
>> > Unfortunately, the patch in [1] didnt go into any (GIT) reposoitory. I know.
>> >
>> > I am attaching the original patch and give it a meaningfull name, so
>> > people see it on patchwork.kernel.org (linux-wireless).
>>
>> The patch appears the work, Thanks!
> And it still works.
>
>
>>
>> Now the only problem remains is that I can associate only when device is
>> in promisc mode.
>> I think it doesn't receive broadcast frames.
> Any update on this?
> This is going to be real show stopper for normal users.
> Its pretty much not possible to connect to open AP now unless promisc
> mode is enabled.
>
>
> Best regards,
> Maxim Levitsky
> |
>
>
>

[-- Attachment #2: for_maxim.tar.xz --]
[-- Type: application/octet-stream, Size: 8080 bytes --]

[-- Attachment #3: for_maxim.tar.xz.sha256sum --]
[-- Type: application/octet-stream, Size: 83 bytes --]

72367e5f69dcdc3f45399666f5e887445f528ca18d7ddef5244c24cf14b0bcb7  for_maxim.tar.xz

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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-02  8:35       ` Sedat Dilek
@ 2010-06-03  6:00         ` reinette chatre
  2010-06-03  9:18           ` Sedat Dilek
  0 siblings, 1 reply; 16+ messages in thread
From: reinette chatre @ 2010-06-03  6:00 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Kolekar, Abhijeet, Maxim Levitsky, linux-wireless,
	iwlwifi maling list

On Wed, 2010-06-02 at 01:35 -0700, Sedat Dilek wrote:
> This patch seems to be done against iwlwifi-2.6 GIT master.
> 
> Can you please offer a patch against vanilla 2.6.35-rc1 as requested
> so we can try and give feedback?

Sorry that you did not get this. Please try this patch:

>From 364614af1fbabe2989bb3e1434d50255a631546b Mon Sep 17 00:00:00 2001
From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Date: Wed, 2 Jun 2010 21:15:10 -0700
Subject: [PATCH] iwl3945: fix internal scan

Port of internal scan to iwl3945 missed introduction
of iwl3945_get_single_channel_for_scan.

Fix the following bug by introducing the iwl3945_get_single_channel_for_scan
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |   30 +-------------
 drivers/net/wireless/iwlwifi/iwl-core.c     |   39 ++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   56 +++++++++++++++++++++++++-
 4 files changed, 96 insertions(+), 31 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 59aeb2e..ac4031e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1031,10 +1031,9 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
 					   struct iwl_scan_channel *scan_ch)
 {
 	const struct ieee80211_supported_band *sband;
-	const struct iwl_channel_info *ch_info;
 	u16 passive_dwell = 0;
 	u16 active_dwell = 0;
-	int i, added = 0;
+	int added = 0;
 	u16 channel = 0;
 
 	sband = iwl_get_hw_mode(priv, band);
@@ -1049,32 +1048,7 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
 	if (passive_dwell <= active_dwell)
 		passive_dwell = active_dwell + 1;
 
-	/* only scan single channel, good enough to reset the RF */
-	/* pick the first valid not in-use channel */
-	if (band == IEEE80211_BAND_5GHZ) {
-		for (i = 14; i < priv->channel_count; i++) {
-			if (priv->channel_info[i].channel !=
-			    le16_to_cpu(priv->staging_rxon.channel)) {
-				channel = priv->channel_info[i].channel;
-				ch_info = iwl_get_channel_info(priv,
-					band, channel);
-				if (is_channel_valid(ch_info))
-					break;
-			}
-		}
-	} else {
-		for (i = 0; i < 14; i++) {
-			if (priv->channel_info[i].channel !=
-			    le16_to_cpu(priv->staging_rxon.channel)) {
-					channel =
-						priv->channel_info[i].channel;
-					ch_info = iwl_get_channel_info(priv,
-						band, channel);
-					if (is_channel_valid(ch_info))
-						break;
-			}
-		}
-	}
+	channel = iwl_get_single_channel_number(priv, band);
 	if (channel) {
 		scan_ch->channel = cpu_to_le16(channel);
 		scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 3ed3dbf..11b20ba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -855,6 +855,45 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
 }
 EXPORT_SYMBOL(iwl_set_rxon_chain);
 
+/* Return valid channel */
+u8 iwl_get_single_channel_number(struct iwl_priv *priv,
+				  enum ieee80211_band band)
+{
+	const struct iwl_channel_info *ch_info;
+	int i;
+	u8 channel = 0;
+
+	/* only scan single channel, good enough to reset the RF */
+	/* pick the first valid not in-use channel */
+	if (band == IEEE80211_BAND_5GHZ) {
+		for (i = 14; i < priv->channel_count; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+				channel = priv->channel_info[i].channel;
+				ch_info = iwl_get_channel_info(priv,
+					band, channel);
+				if (is_channel_valid(ch_info))
+					break;
+			}
+		}
+	} else {
+		for (i = 0; i < 14; i++) {
+			if (priv->channel_info[i].channel !=
+			    le16_to_cpu(priv->staging_rxon.channel)) {
+					channel =
+						priv->channel_info[i].channel;
+					ch_info = iwl_get_channel_info(priv,
+						band, channel);
+					if (is_channel_valid(ch_info))
+						break;
+			}
+		}
+	}
+
+	return channel;
+}
+EXPORT_SYMBOL(iwl_get_single_channel_number);
+
 /**
  * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON
  * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 87dd573..244d163 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -347,6 +347,8 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv);
 int iwl_full_rxon_required(struct iwl_priv *priv);
 void iwl_set_rxon_chain(struct iwl_priv *priv);
 int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
+u8 iwl_get_single_channel_number(struct iwl_priv *priv,
+				  enum ieee80211_band band);
 void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
 u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
 			 struct ieee80211_sta_ht_cap *sta_ht_inf);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index a527895..2366394 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1785,6 +1785,49 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
 #endif
 }
 
+static int iwl3945_get_single_channel_for_scan(struct iwl_priv *priv,
+					       struct ieee80211_vif *vif,
+					       enum ieee80211_band band,
+					       struct iwl3945_scan_channel *scan_ch)
+{
+	const struct ieee80211_supported_band *sband;
+	u16 passive_dwell = 0;
+	u16 active_dwell = 0;
+	int added = 0;
+	u8 channel = 0;
+
+	sband = iwl_get_hw_mode(priv, band);
+	if (!sband) {
+		IWL_ERR(priv, "invalid band\n");
+		return added;
+	}
+
+	active_dwell = iwl_get_active_dwell_time(priv, band, 0);
+	passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
+
+	if (passive_dwell <= active_dwell)
+		passive_dwell = active_dwell + 1;
+
+
+	channel = iwl_get_single_channel_number(priv, band);
+
+	if (channel) {
+		scan_ch->channel = channel;
+		scan_ch->type = 0;	/* passive */
+		scan_ch->active_dwell = cpu_to_le16(active_dwell);
+		scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
+		/* Set txpower levels to defaults */
+		scan_ch->tpc.dsp_atten = 110;
+		if (band == IEEE80211_BAND_5GHZ)
+			scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
+		else
+			scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
+		added++;
+	} else
+		IWL_ERR(priv, "no valid channel found\n");
+	return added;
+}
+
 static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
 					 enum ieee80211_band band,
 				     u8 is_active, u8 n_probes,
@@ -2935,9 +2978,16 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	/* select Rx antennas */
 	scan->flags |= iwl3945_get_antenna_flags(priv);
 
-	scan->channel_count =
-		iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
-			(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
+	if (priv->is_internal_short_scan) {
+		scan->channel_count =
+			iwl3945_get_single_channel_for_scan(priv, vif, band,
+				(void *)&scan->data[le16_to_cpu(
+				scan->tx_cmd.len)]);
+	} else {
+		scan->channel_count =
+			iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
+				(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
+	}
 
 	if (scan->channel_count == 0) {
 		IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
-- 
1.7.0.4




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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-03  6:00         ` reinette chatre
@ 2010-06-03  9:18           ` Sedat Dilek
  2010-06-03 15:55             ` reinette chatre
  0 siblings, 1 reply; 16+ messages in thread
From: Sedat Dilek @ 2010-06-03  9:18 UTC (permalink / raw)
  To: reinette chatre
  Cc: Kolekar, Abhijeet, Maxim Levitsky, linux-wireless,
	iwlwifi maling list

The good news at first:
Your patch applies against 2.6.35-rc1 vanilla (tested with linux-2.6 GIT).

BUT....
This patch should be renamed to "iwl3945-fix-internal-scan-2.6.35-rc1.patch".

It differs from the one in iwiwifi-2.6 (see below).
Thus, I said to myself let's dig deeper into it.

First, here is my GIT workflow (I use linux-2.6 rcX, later pull in
wireless-2.6 and finally iwlwifi-2.6 master GIT)

[CODE]
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

$ git reset --hard v2.6.35-rc1

$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
master:wireless-2.6

$ git pull http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
master:iwlwifi-2.6
[/CODE]

If I do so, I get NON-iwlwifi related stuff pulled in and that should
not be the case?
I am not a git tool expert, there might be some magic tricks I do not know.
Thanks for any hints on git tool :-).

It would be very helpfull (if you want people to follow iwlwifi
development) to have something similiar like in linux-wireless GIT
trees - just a proposal:

iwlwifi-2.6 -> wireless-2.6 -> net-2.6 -> linux-2.6
iwlwifi-next-2.6 -> wireless-next-2.6 -> net-next-2.6 -> linux-next
iwlwifi-testing -> wireless-testing

As I said I am no git expert, so I don't know if you want to setup 3
diverse GIT repsoitories (as John did for wireless-* trees) or have 3
different GIT branches within existing iwlwifi-2.6 GIT repository as
in drm-2.6 [1].
Me thinks your (re)base in development should be the counterpart in
wireless GIT tree (see above).

Just my two coins.

Kind Regards,
- Sedat -

[1] "drm git branches revisited"
http://article.gmane.org/gmane.comp.video.dri.devel/40626

[ GIT PULL iwlwifi-2.6 master ]
...
Merge made by recursive.
 Documentation/feature-removal-schedule.txt      |   20 +
 drivers/net/wireless/ath/ath9k/ar5008_phy.c     |    2 +
 drivers/net/wireless/iwlwifi/Kconfig            |    6 +-
 drivers/net/wireless/iwlwifi/iwl-1000.c         |    2 +
 drivers/net/wireless/iwlwifi/iwl-3945-debugfs.c |   28 +-
 drivers/net/wireless/iwlwifi/iwl-3945.c         |  198 +-------
 drivers/net/wireless/iwlwifi/iwl-4965.c         |   87 +++-
 drivers/net/wireless/iwlwifi/iwl-5000.c         |   60 ++-
 drivers/net/wireless/iwlwifi/iwl-6000.c         |  345 ++++++++++++-
 drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c  |   91 ++--
 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c     |   26 +-
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c      |  255 +++-------
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c       |   72 ++-
 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c    |  123 +++++
 drivers/net/wireless/iwlwifi/iwl-agn.c          |  635 +++++++++++++++--------
 drivers/net/wireless/iwlwifi/iwl-agn.h          |   34 ++
 drivers/net/wireless/iwlwifi/iwl-commands.h     |    3 +-
 drivers/net/wireless/iwlwifi/iwl-core.c         |  301 +++++------
 drivers/net/wireless/iwlwifi/iwl-core.h         |   25 +-
 drivers/net/wireless/iwlwifi/iwl-debugfs.c      |   94 ++---
 drivers/net/wireless/iwlwifi/iwl-dev.h          |   84 ++--
 drivers/net/wireless/iwlwifi/iwl-helpers.h      |   27 +
 drivers/net/wireless/iwlwifi/iwl-rx.c           |   63 ++--
 drivers/net/wireless/iwlwifi/iwl-scan.c         |   40 +-
 drivers/net/wireless/iwlwifi/iwl-sta.c          |   76 ++--
 drivers/net/wireless/iwlwifi/iwl-sta.h          |   29 +
 drivers/net/wireless/iwlwifi/iwl-tx.c           |   17 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c     |  195 +++----
 drivers/net/wireless/libertas_tf/main.c         |    1 -
 drivers/net/wireless/rt2x00/rt2800usb.c         |    2 +-
 localversion-wireless                           |    1 +
 net/mac80211/scan.c                             |    1 +
 32 files changed, 1782 insertions(+), 1161 deletions(-)
 create mode 100644 localversion-wireless

$ diff -Naur iwl3945-fix-internal-scan-2.6.35-rc1.patch
iwl3945-fix-internal-scan-from-iwlwifi-2.6.patch
--- iwl3945-fix-internal-scan-2.6.35-rc1.patch	2010-06-03
10:13:25.000000000 +0200
+++ iwl3945-fix-internal-scan-from-iwlwifi-2.6.patch	2010-06-03
10:41:08.435292314 +0200
@@ -1,27 +1,4 @@
-From patchwork Thu Jun  3 06:00:03 2010
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: IWL3945 problems in 2.6.35-rc1
-Date: Thu, 03 Jun 2010 06:00:03 -0000
-From: reinette chatre <reinette.chatre@intel.com>
-X-Patchwork-Id: 104010
-Message-Id: <1275544803.2091.30386.camel@rchatre-DESK>
-To: "sedat.dilek@gmail.com" <sedat.dilek@gmail.com>
-Cc: "Kolekar, Abhijeet" <abhijeet.kolekar@intel.com>,
-	Maxim Levitsky <maximlevitsky@gmail.com>,
-	linux-wireless <linux-wireless@vger.kernel.org>,
-	iwlwifi maling list <ipw3945-devel@lists.sourceforge.net>
-
-On Wed, 2010-06-02 at 01:35 -0700, Sedat Dilek wrote:
-> This patch seems to be done against iwlwifi-2.6 GIT master.
->
-> Can you please offer a patch against vanilla 2.6.35-rc1 as requested
-> so we can try and give feedback?
-
-Sorry that you did not get this. Please try this patch:
-
->From 364614af1fbabe2989bb3e1434d50255a631546b Mon Sep 17 00:00:00 2001
+From 364614af1fbabe2989bb3e1434d50255a631546b Mon Sep 17 00:00:00 2001
 From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
 Date: Wed, 2 Jun 2010 21:15:10 -0700
 Subject: [PATCH] iwl3945: fix internal scan
@@ -34,9 +11,8 @@

 Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-
 ---
-drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |   30 +-------------
+ drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |   30 +-------------
  drivers/net/wireless/iwlwifi/iwl-core.c     |   39 ++++++++++++++++++
  drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +
  drivers/net/wireless/iwlwifi/iwl3945-base.c |   56 +++++++++++++++++++++++++-
@@ -152,9 +128,9 @@
  int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
 +u8 iwl_get_single_channel_number(struct iwl_priv *priv,
 +				  enum ieee80211_band band);
- void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
- u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
- 			 struct ieee80211_sta_ht_cap *sta_ht_inf);
+ void iwl_set_flags_for_band(struct iwl_priv *priv,
+ 			    enum ieee80211_band band,
+ 			    struct ieee80211_vif *vif);
 diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c
b/drivers/net/wireless/iwlwifi/iwl3945-base.c
 index a527895..2366394 100644
 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -229,3 +205,6 @@

  	if (scan->channel_count == 0) {
  		IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
+--
+1.7.1
+

--- EOT ---

On Thu, Jun 3, 2010 at 8:00 AM, reinette chatre
<reinette.chatre@intel.com> wrote:
> On Wed, 2010-06-02 at 01:35 -0700, Sedat Dilek wrote:
>> This patch seems to be done against iwlwifi-2.6 GIT master.
>>
>> Can you please offer a patch against vanilla 2.6.35-rc1 as requested
>> so we can try and give feedback?
>
> Sorry that you did not get this. Please try this patch:
>
> >From 364614af1fbabe2989bb3e1434d50255a631546b Mon Sep 17 00:00:00 2001
> From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
> Date: Wed, 2 Jun 2010 21:15:10 -0700
> Subject: [PATCH] iwl3945: fix internal scan
>
> Port of internal scan to iwl3945 missed introduction
> of iwl3945_get_single_channel_for_scan.
>
> Fix the following bug by introducing the iwl3945_get_single_channel_for_scan
> http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208
>
> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |   30 +-------------
>  drivers/net/wireless/iwlwifi/iwl-core.c     |   39 ++++++++++++++++++
>  drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +
>  drivers/net/wireless/iwlwifi/iwl3945-base.c |   56 +++++++++++++++++++++++++-
>  4 files changed, 96 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> index 59aeb2e..ac4031e 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> @@ -1031,10 +1031,9 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
>                                           struct iwl_scan_channel *scan_ch)
>  {
>        const struct ieee80211_supported_band *sband;
> -       const struct iwl_channel_info *ch_info;
>        u16 passive_dwell = 0;
>        u16 active_dwell = 0;
> -       int i, added = 0;
> +       int added = 0;
>        u16 channel = 0;
>
>        sband = iwl_get_hw_mode(priv, band);
> @@ -1049,32 +1048,7 @@ static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
>        if (passive_dwell <= active_dwell)
>                passive_dwell = active_dwell + 1;
>
> -       /* only scan single channel, good enough to reset the RF */
> -       /* pick the first valid not in-use channel */
> -       if (band == IEEE80211_BAND_5GHZ) {
> -               for (i = 14; i < priv->channel_count; i++) {
> -                       if (priv->channel_info[i].channel !=
> -                           le16_to_cpu(priv->staging_rxon.channel)) {
> -                               channel = priv->channel_info[i].channel;
> -                               ch_info = iwl_get_channel_info(priv,
> -                                       band, channel);
> -                               if (is_channel_valid(ch_info))
> -                                       break;
> -                       }
> -               }
> -       } else {
> -               for (i = 0; i < 14; i++) {
> -                       if (priv->channel_info[i].channel !=
> -                           le16_to_cpu(priv->staging_rxon.channel)) {
> -                                       channel =
> -                                               priv->channel_info[i].channel;
> -                                       ch_info = iwl_get_channel_info(priv,
> -                                               band, channel);
> -                                       if (is_channel_valid(ch_info))
> -                                               break;
> -                       }
> -               }
> -       }
> +       channel = iwl_get_single_channel_number(priv, band);
>        if (channel) {
>                scan_ch->channel = cpu_to_le16(channel);
>                scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
> index 3ed3dbf..11b20ba 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -855,6 +855,45 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
>  }
>  EXPORT_SYMBOL(iwl_set_rxon_chain);
>
> +/* Return valid channel */
> +u8 iwl_get_single_channel_number(struct iwl_priv *priv,
> +                                 enum ieee80211_band band)
> +{
> +       const struct iwl_channel_info *ch_info;
> +       int i;
> +       u8 channel = 0;
> +
> +       /* only scan single channel, good enough to reset the RF */
> +       /* pick the first valid not in-use channel */
> +       if (band == IEEE80211_BAND_5GHZ) {
> +               for (i = 14; i < priv->channel_count; i++) {
> +                       if (priv->channel_info[i].channel !=
> +                           le16_to_cpu(priv->staging_rxon.channel)) {
> +                               channel = priv->channel_info[i].channel;
> +                               ch_info = iwl_get_channel_info(priv,
> +                                       band, channel);
> +                               if (is_channel_valid(ch_info))
> +                                       break;
> +                       }
> +               }
> +       } else {
> +               for (i = 0; i < 14; i++) {
> +                       if (priv->channel_info[i].channel !=
> +                           le16_to_cpu(priv->staging_rxon.channel)) {
> +                                       channel =
> +                                               priv->channel_info[i].channel;
> +                                       ch_info = iwl_get_channel_info(priv,
> +                                               band, channel);
> +                                       if (is_channel_valid(ch_info))
> +                                               break;
> +                       }
> +               }
> +       }
> +
> +       return channel;
> +}
> +EXPORT_SYMBOL(iwl_get_single_channel_number);
> +
>  /**
>  * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON
>  * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
> index 87dd573..244d163 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.h
> @@ -347,6 +347,8 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv);
>  int iwl_full_rxon_required(struct iwl_priv *priv);
>  void iwl_set_rxon_chain(struct iwl_priv *priv);
>  int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
> +u8 iwl_get_single_channel_number(struct iwl_priv *priv,
> +                                 enum ieee80211_band band);
>  void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
>  u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
>                         struct ieee80211_sta_ht_cap *sta_ht_inf);
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index a527895..2366394 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -1785,6 +1785,49 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
>  #endif
>  }
>
> +static int iwl3945_get_single_channel_for_scan(struct iwl_priv *priv,
> +                                              struct ieee80211_vif *vif,
> +                                              enum ieee80211_band band,
> +                                              struct iwl3945_scan_channel *scan_ch)
> +{
> +       const struct ieee80211_supported_band *sband;
> +       u16 passive_dwell = 0;
> +       u16 active_dwell = 0;
> +       int added = 0;
> +       u8 channel = 0;
> +
> +       sband = iwl_get_hw_mode(priv, band);
> +       if (!sband) {
> +               IWL_ERR(priv, "invalid band\n");
> +               return added;
> +       }
> +
> +       active_dwell = iwl_get_active_dwell_time(priv, band, 0);
> +       passive_dwell = iwl_get_passive_dwell_time(priv, band, vif);
> +
> +       if (passive_dwell <= active_dwell)
> +               passive_dwell = active_dwell + 1;
> +
> +
> +       channel = iwl_get_single_channel_number(priv, band);
> +
> +       if (channel) {
> +               scan_ch->channel = channel;
> +               scan_ch->type = 0;      /* passive */
> +               scan_ch->active_dwell = cpu_to_le16(active_dwell);
> +               scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
> +               /* Set txpower levels to defaults */
> +               scan_ch->tpc.dsp_atten = 110;
> +               if (band == IEEE80211_BAND_5GHZ)
> +                       scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
> +               else
> +                       scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
> +               added++;
> +       } else
> +               IWL_ERR(priv, "no valid channel found\n");
> +       return added;
> +}
> +
>  static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
>                                         enum ieee80211_band band,
>                                     u8 is_active, u8 n_probes,
> @@ -2935,9 +2978,16 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
>        /* select Rx antennas */
>        scan->flags |= iwl3945_get_antenna_flags(priv);
>
> -       scan->channel_count =
> -               iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
> -                       (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
> +       if (priv->is_internal_short_scan) {
> +               scan->channel_count =
> +                       iwl3945_get_single_channel_for_scan(priv, vif, band,
> +                               (void *)&scan->data[le16_to_cpu(
> +                               scan->tx_cmd.len)]);
> +       } else {
> +               scan->channel_count =
> +                       iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
> +                               (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif);
> +       }
>
>        if (scan->channel_count == 0) {
>                IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
> --
> 1.7.0.4
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-03  9:18           ` Sedat Dilek
@ 2010-06-03 15:55             ` reinette chatre
  0 siblings, 0 replies; 16+ messages in thread
From: reinette chatre @ 2010-06-03 15:55 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Kolekar, Abhijeet, Maxim Levitsky, linux-wireless,
	iwlwifi maling list

Hi Sedat,

On Thu, 2010-06-03 at 02:18 -0700, Sedat Dilek wrote:
> The good news at first:
> Your patch applies against 2.6.35-rc1 vanilla (tested with linux-2.6 GIT).

That was what you asked for.

> BUT....
> This patch should be renamed to "iwl3945-fix-internal-scan-2.6.35-rc1.patch".

Feel free to rename it.


> It differs from the one in iwiwifi-2.6 (see below).

Right, I had to make a change to the patch to get it to apply to
2.6.35-rc1.

> Thus, I said to myself let's dig deeper into it.
> 
> First, here is my GIT workflow (I use linux-2.6 rcX, later pull in
> wireless-2.6 and finally iwlwifi-2.6 master GIT)
> 
> [CODE]
> $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> 
> $ git reset --hard v2.6.35-rc1
> 
> $ git pull git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
> master:wireless-2.6

ok so far.

> 
> $ git pull http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
> master:iwlwifi-2.6

Don't do this. iwlwifi-2.6's master branch is a clone of
wireless-testing's master branch plus all the iwlwifi patches that has
not been sent to wireless-testing yet.

> [/CODE]
> 
> If I do so, I get NON-iwlwifi related stuff pulled in and that should
> not be the case?

This is how we work. iwlwifi-2.6's master branch tracks upstream
wireless development from wireless-testing. 

> I am not a git tool expert, there might be some magic tricks I do not know.
> Thanks for any hints on git tool :-).
> 
> It would be very helpfull (if you want people to follow iwlwifi
> development) to have something similiar like in linux-wireless GIT
> trees - just a proposal:
> 
> iwlwifi-2.6 -> wireless-2.6 -> net-2.6 -> linux-2.6
> iwlwifi-next-2.6 -> wireless-next-2.6 -> net-next-2.6 -> linux-next
> iwlwifi-testing -> wireless-testing

iwlwifi-2.6 has a wireless-2.6 and wireless-next-2.6 branch that
accomplishes this. We do not see the need for more repositories.

> As I said I am no git expert, so I don't know if you want to setup 3
> diverse GIT repsoitories (as John did for wireless-* trees) or have 3
> different GIT branches within existing iwlwifi-2.6 GIT repository as
> in drm-2.6 [1].

We have three branches.

Reinette


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-01 12:25 IWL3945 problems in 2.6.35-rc1 Maxim Levitsky
  2010-06-01 14:57 ` Maxim Levitsky
@ 2010-06-18  9:28 ` Johannes Berg
  2010-06-18 10:19   ` Maxim Levitsky
  1 sibling, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2010-06-18  9:28 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-wireless, Reinette Chatre

Maxim,

> 2. mulicast/broadcast is broken.
> this results in DHCP non working on open access point.
> It seems that DHCP does work on my home wireless, but avahi-autoipd
> doesn't see any neighbours, and this is annoying.
> It can be worked around by doing (sudo ifconfig wlan0 promisc)

Reinette has reverted the patch in iwlwifi-2.6, but I think I actually
just now identified the problem. Can you try one or two things for me?

 1) with the patch reverted, which is what presumably you're running
    now, can you try
    ifconfig wlan0 allmulti
    ifconfig wlan0 -allmulti

    I think this will *break* the driver right now.

 2) with the patch *not* reverted, apply the patch below and see if that
    fixes the problem as well (if it gets mangled, just remove the one
    CHK() line manually)

Actually, (2) is obviously more important to me, but (1) would indicate
that my guess is correct wrt. what's causing the problem

Thanks,
Johannes

---
 drivers/net/wireless/iwlwifi/iwl-core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-core.c	2010-06-18 11:22:34.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-core.c	2010-06-18 11:27:00.000000000 +0200
@@ -1331,7 +1331,6 @@ void iwl_configure_filter(struct ieee802
 			changed_flags, *total_flags);
 
 	CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
-	CHK(FIF_ALLMULTI, RXON_FILTER_ACCEPT_GRP_MSK);
 	CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
 	CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
 
@@ -1346,6 +1345,12 @@ void iwl_configure_filter(struct ieee802
 
 	mutex_unlock(&priv->mutex);
 
+	/*
+	 * Receiving all multicast frames is always enabled by the
+	 * default flags setup in iwl_connection_init_rx_config()
+	 * since we currently do not support programming multicast
+	 * filters into the device.
+	 */
 	*total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
 			FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
 }




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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-18  9:28 ` Johannes Berg
@ 2010-06-18 10:19   ` Maxim Levitsky
  2010-06-18 10:30     ` Johannes Berg
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-18 10:19 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

On Fri, 2010-06-18 at 11:28 +0200, Johannes Berg wrote: 
> Maxim,
> 
> > 2. mulicast/broadcast is broken.
> > this results in DHCP non working on open access point.
> > It seems that DHCP does work on my home wireless, but avahi-autoipd
> > doesn't see any neighbours, and this is annoying.
> > It can be worked around by doing (sudo ifconfig wlan0 promisc)
> 
> Reinette has reverted the patch in iwlwifi-2.6, but I think I actually
> just now identified the problem. Can you try one or two things for me?
> 
>  1) with the patch reverted, which is what presumably you're running
>     now, can you try
>     ifconfig wlan0 allmulti
>     ifconfig wlan0 -allmulti
> 
>     I think this will *break* the driver right now.

I didn't exactly understand how this supposed to break it.


> 
>  2) with the patch *not* reverted, apply the patch below and see if that
>     fixes the problem as well (if it gets mangled, just remove the one
>     CHK() line manually)
> 
> Actually, (2) is obviously more important to me, but (1) would indicate
> that my guess is correct wrt. what's causing the problem
I tested (2) and it works.



Best regards,
Maximm Levitsky


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-18 10:19   ` Maxim Levitsky
@ 2010-06-18 10:30     ` Johannes Berg
  2010-06-18 10:40       ` Maxim Levitsky
  0 siblings, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2010-06-18 10:30 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-wireless, Reinette Chatre

Maxim,

Thanks for the quick reply!

> >  1) with the patch reverted, which is what presumably you're running
> >     now, can you try
> >     ifconfig wlan0 allmulti
> >     ifconfig wlan0 -allmulti
> > 
> >     I think this will *break* the driver right now.
> 
> I didn't exactly understand how this supposed to break it.

Ok this needs some more explaining.

The old code did:

if (allmulti changed)
	"set grp-filter in hw according to allmulti"

the new code just did

"set grp-filter in hw according to allmulti"


During normal operation the "allmulti changed" condition is never true.
Therefore, the old code, despite being incorrect, never broke things.
The above would make the condition true, and lead to it being broken
because it would change to on/off and then the grp-filter in hw would be
off, although it's required to be on.

Thus the real bug was there before my change, but it never triggered,
and when I "optimised away" the condition I broke it.

> >  2) with the patch *not* reverted, apply the patch below and see if that
> >     fixes the problem as well (if it gets mangled, just remove the one
> >     CHK() line manually)
> > 
> > Actually, (2) is obviously more important to me, but (1) would indicate
> > that my guess is correct wrt. what's causing the problem

> I tested (2) and it works.

Thank you. I'll submit this patch instead.

johannes


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

* Re: IWL3945 problems in 2.6.35-rc1
  2010-06-18 10:30     ` Johannes Berg
@ 2010-06-18 10:40       ` Maxim Levitsky
  0 siblings, 0 replies; 16+ messages in thread
From: Maxim Levitsky @ 2010-06-18 10:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

On Fri, 2010-06-18 at 12:30 +0200, Johannes Berg wrote: 
> Maxim,
> 
> Thanks for the quick reply!
> 
> > >  1) with the patch reverted, which is what presumably you're running
> > >     now, can you try
> > >     ifconfig wlan0 allmulti
> > >     ifconfig wlan0 -allmulti
> > > 
> > >     I think this will *break* the driver right now.
> > 
> > I didn't exactly understand how this supposed to break it.
> 
> Ok this needs some more explaining.
> 
> The old code did:
> 
> if (allmulti changed)
> 	"set grp-filter in hw according to allmulti"
> 
> the new code just did
> 
> "set grp-filter in hw according to allmulti"
> 
> 
> During normal operation the "allmulti changed" condition is never true.
> Therefore, the old code, despite being incorrect, never broke things.
> The above would make the condition true, and lead to it being broken
> because it would change to on/off and then the grp-filter in hw would be
> off, although it's required to be on.
> 
> Thus the real bug was there before my change, but it never triggered,
> and when I "optimised away" the condition I broke it.
Got it.

> 
> > >  2) with the patch *not* reverted, apply the patch below and see if that
> > >     fixes the problem as well (if it gets mangled, just remove the one
> > >     CHK() line manually)
> > > 
> > > Actually, (2) is obviously more important to me, but (1) would indicate
> > > that my guess is correct wrt. what's causing the problem
> 
> > I tested (2) and it works.
> 
> Thank you. I'll submit this patch instead.
> 
> johannes
> 

Best regards,
Maxim Levitsky


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

end of thread, other threads:[~2010-06-18 10:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 12:25 IWL3945 problems in 2.6.35-rc1 Maxim Levitsky
2010-06-01 14:57 ` Maxim Levitsky
2010-06-01 15:21   ` Sedat Dilek
2010-06-01 18:12     ` Maxim Levitsky
2010-06-02 16:53       ` Maxim Levitsky
2010-06-02 18:01         ` Sedat Dilek
2010-06-01 19:03     ` Abhijeet Kolekar
2010-06-01 19:59       ` Maxim Levitsky
2010-06-02  8:35       ` Sedat Dilek
2010-06-03  6:00         ` reinette chatre
2010-06-03  9:18           ` Sedat Dilek
2010-06-03 15:55             ` reinette chatre
2010-06-18  9:28 ` Johannes Berg
2010-06-18 10:19   ` Maxim Levitsky
2010-06-18 10:30     ` Johannes Berg
2010-06-18 10:40       ` Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).