-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi, i can not use the larry patch as is(dont work for me and get errors
when aplied)
but i patched manually my files to a fresh git wireless-2.6

i can announce that the radio button respond now
i get the messages when press it (it is a good advance):

bcm43xx: Radio hardware status changed to disabled
bcm43xx: Radio hardware status changed to enabled
bcm43xx: Radio hardware status changed to disabled
bcm43xx: Radio hardware status changed to enabled

i still no see the leds on and the access point in scanning

anybody was test this hard in windows os?
ist possible to sniff or something to see what happen in the chipset
when the button is pressed? i cant get a mass_storage device at weekend
and try to install some win$ if this can help.

thanks to larry for you effort!

pd: i attach the larry patch that wok for me to git wireless-2.6 and my
dmesg output

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFgcANz8H9Vs7bTsMRAhKhAJ0R3ipGMbLAP5BgDtEXPr6M4DLF2wCggob5
rAQ1msC0Q68wI4Cfei7ds+8=
=D+18
-----END PGP SIGNATURE-----
Linux version 2.6.19w26 ([EMAIL PROTECTED]) (gcc version 4.1.2 20061028 
(prerelease) (Debian 4.1.1-19)) #1 SMP PREEMPT Thu Dec 14 17:22:56 ART 2006
BIOS-provided physical RAM map:
sanitize start
sanitize end
copy_e820_map() start: 0000000000000000 size: 000000000009fc00 end: 
000000000009fc00 type: 1
copy_e820_map() type is E820_RAM
copy_e820_map() start: 000000000009fc00 size: 0000000000000400 end: 
00000000000a0000 type: 2
copy_e820_map() start: 00000000000e0000 size: 0000000000020000 end: 
0000000000100000 type: 2
copy_e820_map() start: 0000000000100000 size: 000000000f6d0000 end: 
000000000f7d0000 type: 1
copy_e820_map() type is E820_RAM
copy_e820_map() start: 000000000f7d0000 size: 0000000000015600 end: 
000000000f7e5600 type: 2
copy_e820_map() start: 000000000f7e5600 size: 0000000000012a00 end: 
000000000f7f8000 type: 4
copy_e820_map() start: 000000000f7f8000 size: 0000000000008000 end: 
000000000f800000 type: 2
copy_e820_map() start: 00000000fec00000 size: 0000000000001000 end: 
00000000fec01000 type: 2
copy_e820_map() start: 00000000fed20000 size: 000000000007b000 end: 
00000000fed9b000 type: 2
copy_e820_map() start: 00000000feda0000 size: 0000000000020000 end: 
00000000fedc0000 type: 2
copy_e820_map() start: 00000000fee00000 size: 0000000000001000 end: 
00000000fee01000 type: 2
copy_e820_map() start: 00000000ffb00000 size: 0000000000100000 end: 
00000000ffc00000 type: 2
copy_e820_map() start: 00000000fff00000 size: 0000000000100000 end: 
0000000100000000 type: 2
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000000f7d0000 (usable)
 BIOS-e820: 000000000f7d0000 - 000000000f7e5600 (reserved)
 BIOS-e820: 000000000f7e5600 - 000000000f7f8000 (ACPI NVS)
 BIOS-e820: 000000000f7f8000 - 000000000f800000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
 BIOS-e820: 00000000fed20000 - 00000000fed9b000 (reserved)
 BIOS-e820: 00000000feda0000 - 00000000fedc0000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffb00000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
247MB LOWMEM available.
Entering add_active_range(0, 0, 63440) 0 entries of 256 used
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->    63440
  HighMem     63440 ->    63440
early_node_map[1] active PFN ranges
    0:        0 ->    63440
On node 0 totalpages: 63440
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 463 pages used for memmap
  Normal zone: 58881 pages, LIFO batch:15
  HighMem zone: 0 pages used for memmap
DMI 2.4 present.
ACPI: RSDP (v002 HP                                    ) @ 0x000f7e50
ACPI: XSDT (v001 HP     30A2     0x28070620 HP   0x00000001) @ 0x0f7e57b4
ACPI: FADT (v004 HP     30A2     0x00000003 HP   0x00000001) @ 0x0f7e5684
ACPI: MADT (v001 HP     30A2     0x00000001 HP   0x00000001) @ 0x0f7e5808
ACPI: MCFG (v001 HP     30A2     0x00000001 HP   0x00000001) @ 0x0f7e5870
ACPI: TCPA (v002 HP     30A2     0x00000001 HP   0x00000001) @ 0x0f7e58ac
ACPI: SSDT (v001 HP       HPQSAT 0x00000001 MSFT 0x0100000e) @ 0x0f7f4b3e
ACPI: DSDT (v001 HP       nx7400 0x00010000 MSFT 0x0100000e) @ 0x00000000
ACPI: PM-Timer IO Port: 0x1008
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:14 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:14 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 10000000 (gap: 0f800000:ef400000)
Detected 1596.157 MHz processor.
Built 1 zonelists.  Total pages: 62945
Kernel command line: root=/dev/sda1 ro 
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 248280k/253760k available (1586k kernel code, 4988k reserved, 653k 
data, 200k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff9d000 - 0xfffff000   ( 392 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xd0000000 - 0xff7fe000   ( 759 MB)
    lowmem  : 0xc0000000 - 0xcf7d0000   ( 247 MB)
      .init : 0xc0335000 - 0xc0367000   ( 200 kB)
      .data : 0xc028c90f - 0xc032fdb4   ( 653 kB)
      .text : 0xc0100000 - 0xc028c90f   (1586 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 3195.84 BogoMIPS (lpj=6391680)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfe9fbff 00100000 00000000 00000000 0000c189 
00000000 00000000
monitor/mwait feature present.
using mwait in idle threads.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU: After all inits, caps: bfe9fbff 00100000 00000000 00002940 0000c189 
00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
ACPI: Core revision 20060707
CPU0: Intel Genuine Intel(R) CPU           T2050  @ 1.60GHz stepping 08
SMP alternatives: switching to SMP code
Booting processor 1/1 eip 3000
Initializing CPU#1
Calibrating delay using timer specific routine.. 3192.31 BogoMIPS (lpj=6384630)
CPU: After generic identify, caps: bfe9fbff 00100000 00000000 00000000 0000c189 
00000000 00000000
monitor/mwait feature present.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
CPU: After all inits, caps: bfe9fbff 00100000 00000000 00002940 0000c189 
00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel Genuine Intel(R) CPU           T2050  @ 1.60GHz stepping 08
Total of 2 processors activated (6388.15 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
checking TSC synchronization across 2 CPUs: passed.
Brought up 2 CPUs
migration_cost=75
HP Compaq Laptop series board detected. Selecting BIOS-method for reboots.
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: BIOS Bug: MCFG area at f8000000 is not E820-reserved
PCI: Not using MMCONFIG.
PCI: PCI BIOS revision 2.10 entry at 0xf0322, last bus=32
PCI: Using configuration type 1
Setting up standard PCI resources
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [C002] (0000:00)
PCI: Probing PCI hardware (bus 00)
ACPI: Assume root bridge [\_SB_.C002] bus is 0
Boot video device is 0000:00:02.0
PCI quirk: region 1000-107f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 1100-113f claimed by ICH6 GPIO
PCI: Transparent bridge - 0000:00:1e.0
PCI: Bus #03 (-#06) is hidden behind transparent bridge #02 (-#03) (try 
'pci=assign-busses')
Please report the result to linux-kernel to fix this permanently
ACPI: PCI Interrupt Routing Table [\_SB_.C002._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C002.C093._PRT]
ACPI: Power Resource [C1F8] (on)
ACPI: Power Resource [C211] (on)
ACPI: PCI Interrupt Routing Table [\_SB_.C002.C0FC._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C002.C10C._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C002.C112._PRT]
ACPI: Power Resource [C21A] (off)
ACPI: PCI Interrupt Link [C108] (IRQs *10 11)
ACPI: PCI Interrupt Link [C109] (IRQs *10 11)
ACPI: PCI Interrupt Link [C10A] (IRQs 10 *11)
ACPI: PCI Interrupt Link [C10B] (IRQs *10 11)
ACPI: PCI Interrupt Link [C124] (IRQs *10 11)
ACPI: PCI Interrupt Link [C125] (IRQs 10 11) *0, disabled.
ACPI: PCI Interrupt Link [C126] (IRQs 10 11) *0, disabled.
ACPI Exception (pci_link-0180): AE_NOT_FOUND, Evaluating _PRS [20060707]
ACPI: Power Resource [C30E] (off)
ACPI: Power Resource [C30F] (off)
ACPI: Power Resource [C310] (off)
ACPI: Power Resource [C311] (off)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 12 devices
SCSI subsystem initialized
libata version 2.00 loaded.
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
pnp: 00:0a: ioport range 0x4d0-0x4d1 has been reserved
pnp: 00:0a: ioport range 0x1000-0x107f could not be reserved
pnp: 00:0a: ioport range 0x1100-0x113f has been reserved
pnp: 00:0a: ioport range 0x1200-0x121f has been reserved
PCI: Ignore bogus resource 6 [0:0] of 0000:00:02.0
PCI: Bridge: 0000:00:1c.0
  IO window: disabled.
  MEM window: disabled.
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.1
  IO window: disabled.
  MEM window: f4000000-f40fffff
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.3
  IO window: 2000-3fff
  MEM window: f0000000-f3ffffff
  PREFETCH window: disabled.
PCI: Bus 3, cardbus bridge: 0000:02:06.0
  IO window: 00005000-000050ff
  IO window: 00005400-000054ff
  PREFETCH window: 10000000-11ffffff
  MEM window: 12000000-13ffffff
PCI: Bridge: 0000:00:1e.0
  IO window: 5000-5fff
  MEM window: f4100000-f43fffff
  PREFETCH window: 10000000-11ffffff
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.0 to 64
ACPI: PCI Interrupt 0000:00:1c.1[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1c.1 to 64
ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1c.3 to 64
PCI: Setting latency timer of device 0000:00:1e.0 to 64
ACPI: PCI Interrupt 0000:02:06.0[A] -> GSI 18 (level, low) -> IRQ 19
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 98304 bytes)
TCP bind hash table entries: 4096 (order: 3, 49152 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1166129554.900:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
io scheduler noop registered (default)
PCI: Setting latency timer of device 0000:00:1c.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.0:pcie00]
Allocate Port Service[0000:00:1c.0:pcie02]
PCI: Setting latency timer of device 0000:00:1c.1 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.1:pcie00]
Allocate Port Service[0000:00:1c.1:pcie02]
PCI: Setting latency timer of device 0000:00:1c.3 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.3:pcie00]
Allocate Port Service[0000:00:1c.3:pcie02]
Linux agpgart interface v0.101 (c) Dave Jones
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
ahci 0000:00:1f.2: version 2.0
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 1.5 Gbps 0x1 impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq ilck stag pm led clo pmp pio slum part 
ata1: SATA max UDMA/133 cmd 0xD0016100 ctl 0x0 bmdma 0x0 irq 220
ata2: SATA max UDMA/133 cmd 0xD0016180 ctl 0x0 bmdma 0x0 irq 220
ata3: SATA max UDMA/133 cmd 0xD0016200 ctl 0x0 bmdma 0x0 irq 220
ata4: SATA max UDMA/133 cmd 0xD0016280 ctl 0x0 bmdma 0x0 irq 220
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7, max UDMA/100, 117231408 sectors: LBA48 
ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/100
scsi1 : ahci
ata2: SATA link down (SStatus 0 SControl 0)
scsi2 : ahci
ata3: SATA link down (SStatus 0 SControl 0)
scsi3 : ahci
ata4: SATA link down (SStatus 0 SControl 0)
scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHV2060B 892C PQ: 0 ANSI: 5
SCSI device sda: 117231408 512-byte hdwr sectors (60022 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
SCSI device sda: 117231408 512-byte hdwr sectors (60022 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
 sda: sda1 sda2 < sda5 >
sd 0:0:0:0: Attached scsi disk sda
ata_piix 0000:00:1f.1: version 2.00ac7
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata5: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x40A0 irq 14
ata6: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x40A8 irq 15
scsi4 : ata_piix
ata5.00: ATAPI, max MWDMA2
ata5.00: configured for MWDMA2
scsi5 : ata_piix
ata6: port disabled. ignoring.
scsi 4:0:0:0: CD-ROM            MATSHITA UJDA770 DVD/CDRW 1.03 PQ: 0 ANSI: 5
PNP: PS/2 Controller [PNP0303:C20E,PNP0f13:C20F] at 0x60,0x64 irq 1,12
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input0
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Starting balanced_irq
Using IPI No-Shortcut mode
ACPI: (supports S0 S3 S4 S5)
Time: tsc clocksource has been installed.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 200k freed
Adding 738948k swap on /dev/sda5.  Priority:-1 extents:1 across:738948k
EXT3 FS on sda1, internal journal
ieee80211_crypt: no version for "struct_module" found: kernel tainted.
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <[EMAIL PROTECTED]>
bcm43xx driver
ACPI: PCI Interrupt 0000:10:00.0[A] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:10:00.0 to 64
bcm43xx: Chip ID 0x4311, rev 0x1
bcm43xx: Number of cores: 4
bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243
bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243
bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243
bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243
bcm43xx: PHY connected
bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
bcm43xx: Radio turned off
bcm43xx: Radio turned off
bcm43xx: PHY connected
bcm43xx: Microcode rev 0x127, pl 0xe (2005-04-18  02:36:27)
bcm43xx: Radio turned on
bcm43xx: Radio disabled by hardware
bcm43xx: Chip initialized
bcm43xx: 32-bit DMA initialized
bcm43xx: Keys cleared
bcm43xx: Selected 802.11 core (phytype 2)
bcm43xx: Radio hardware status changed to enabled
bcm43xx: Radio hardware status changed to disabled
bcm43xx: Radio hardware status changed to enabled
SoftMAC: Scanning finished: scanned 14 channels starting with channel 1
SoftMAC: Scanning finished: scanned 14 channels starting with channel 1
SoftMAC: Scanning finished: scanned 14 channels starting with channel 1
SoftMAC: Scanning finished: scanned 14 channels starting with channel 1
bcm43xx: Radio hardware status changed to disabled
bcm43xx: Radio hardware status changed to enabled
bcm43xx: Radio hardware status changed to disabled
bcm43xx: Radio hardware status changed to enabled
diff -up wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h temp/drivers/net/wireless/bcm43xx/bcm43xx.h
--- wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h	2006-12-14 15:39:24.000000000 -0300
+++ temp/drivers/net/wireless/bcm43xx/bcm43xx.h	2006-12-14 17:14:13.000000000 -0300
@@ -352,6 +352,11 @@
 #define BCM43xx_UCODEFLAG_UNKPACTRL	0x0040
 #define BCM43xx_UCODEFLAG_JAPAN		0x0080
 
+ /* Hardware Radio Enable masks */
+ #define BCM43xx_MMIO_RADIO_HWENABLED_HI_MASK (1 << 16)
+ #define BCM43xx_MMIO_RADIO_HWENABLED_LO_MASK (1 << 4)
+ 
+
 /* Generic-Interrupt reasons. */
 #define BCM43xx_IRQ_READY		(1 << 0)
 #define BCM43xx_IRQ_BEACON		(1 << 1)
@@ -758,7 +763,9 @@ struct bcm43xx_private {
 	    bad_frames_preempt:1,	/* Use "Bad Frames Preemption" (default off) */
 	    reg124_set_0x4:1,		/* Some variable to keep track of IRQ stuff. */
 	    short_preamble:1,		/* TRUE, if short preamble is enabled. */
-	    firmware_norelease:1;	/* Do not release the firmware. Used on suspend. */
+	    firmware_norelease:1,	/* Do not release the firmware. Used on suspend. */
+ 	    radio_hw_enable:1;		/* TRUE if radio is hardware enabled */
+
 
 	struct bcm43xx_stats stats;
 
diff -up wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c temp/drivers/net/wireless/bcm43xx/bcm43xx_main.c
--- wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-12-14 15:39:24.000000000 -0300
+++ temp/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-12-14 16:50:21.000000000 -0300
@@ -2378,6 +2378,7 @@ static int bcm43xx_chip_init(struct bcm4
 	int i, tmp;
 	u32 value32;
 	u16 value16;
+ 	struct bcm43xx_led *led2, *led3;
 
 	bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD,
 			BCM43xx_SBF_CORE_READY
@@ -2441,6 +2442,19 @@ static int bcm43xx_chip_init(struct bcm4
 	if (err)
 		goto err_gpio_cleanup;
 	bcm43xx_radio_turn_on(bcm);
+ 	bcm->radio_hw_enable = bcm43xx_is_hw_radio_enabled(bcm);
+ 	printk(KERN_INFO PFX "Radio %s by hardware\n",
+ 		(bcm->radio_hw_enable == 0) ? "disabled" : "enabled");
+ 
+ 	led2 = &bcm->leds[2];
+ 	led3 = &bcm->leds[3];
+ 	if (bcm->radio_hw_enable != 0) {
+ 		led2->behaviour = BCM43xx_LED_OFF;
+ 		led3->behaviour = BCM43xx_LED_ON;
+ 	} else {
+ 		led2->behaviour = BCM43xx_LED_ON;
+ 		led3->behaviour = BCM43xx_LED_OFF;
+ 	}
 
 	bcm43xx_write16(bcm, 0x03E6, 0x0000);
 	err = bcm43xx_phy_init(bcm);
@@ -3172,8 +3186,32 @@ static void bcm43xx_periodic_every30sec(
 
 static void bcm43xx_periodic_every15sec(struct bcm43xx_private *bcm)
 {
+ }
+ 
+ static void bcm43xx_periodic_every1sec(struct bcm43xx_private *bcm)
+ {
 	struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm);
 	struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm);
+ 	struct bcm43xx_led *led2, *led3;
+ 	int radio_hw_enable;
+ 
+ 	/* check if radio hardware enabled status changed */
+ 	radio_hw_enable = bcm43xx_is_hw_radio_enabled(bcm);
+ 	if (unlikely(bcm->radio_hw_enable != radio_hw_enable)) {
+ 		bcm->radio_hw_enable = radio_hw_enable;
+ 		printk(KERN_INFO PFX "Radio hardware status changed to %s\n",
+ 		       (radio_hw_enable == 0) ? "disabled" : "enabled");
+ 		/* Setting the LED for radio on */
+ 		led2 = &bcm->leds[2];
+ 		led3 = &bcm->leds[3];
+ 		if (radio_hw_enable) {
+ 			led2->behaviour = BCM43xx_LED_OFF;
+ 			led3->behaviour = BCM43xx_LED_ON;
+ 		} else {
+ 			led2->behaviour = BCM43xx_LED_ON;
+ 			led3->behaviour = BCM43xx_LED_OFF;
+ 		}
+ 	}
 
 	if (phy->type == BCM43xx_PHYTYPE_G) {
 		//TODO: update_aci_moving_average
@@ -3204,15 +3242,17 @@ static void bcm43xx_periodic_every15sec(
 
 static void do_periodic_work(struct bcm43xx_private *bcm)
 {
-	if (bcm->periodic_state % 8 == 0)
-		bcm43xx_periodic_every120sec(bcm);
-	if (bcm->periodic_state % 4 == 0)
-		bcm43xx_periodic_every60sec(bcm);
-	if (bcm->periodic_state % 2 == 0)
-		bcm43xx_periodic_every30sec(bcm);
-	bcm43xx_periodic_every15sec(bcm);
-
-	schedule_delayed_work(&bcm->periodic_work, HZ * 15);
+ 	if (bcm->periodic_state % 120 == 0)
+  		bcm43xx_periodic_every120sec(bcm);
+ 	if (bcm->periodic_state % 60 == 0)
+   		bcm43xx_periodic_every60sec(bcm);
+ 	if (bcm->periodic_state % 30 == 0)
+   		bcm43xx_periodic_every30sec(bcm);
+ 	if (bcm->periodic_state % 15 == 0)
+ 		bcm43xx_periodic_every15sec(bcm);
+ 	bcm43xx_periodic_every1sec(bcm);
+  
+ 	schedule_delayed_work(&bcm->periodic_work, HZ);
 }
 
 static void bcm43xx_periodic_work_handler(struct work_struct *work)
@@ -3225,7 +3265,7 @@ static void bcm43xx_periodic_work_handle
 	unsigned long orig_trans_start = 0;
 
 	mutex_lock(&bcm->mutex);
-	if (unlikely(bcm->periodic_state % 4 == 0)) {
+ 	if (unlikely(bcm->periodic_state % 60 == 0)) {
 		/* Periodic work will take a long time, so we want it to
 		 * be preemtible.
 		 */
@@ -3257,7 +3297,7 @@ static void bcm43xx_periodic_work_handle
 
 	do_periodic_work(bcm);
 
-	if (unlikely(bcm->periodic_state % 4 == 0)) {
+ 	if (unlikely(bcm->periodic_state % 60 == 0)) {
 		spin_lock_irqsave(&bcm->irq_lock, flags);
 		tasklet_enable(&bcm->isr_tasklet);
 		bcm43xx_interrupt_enable(bcm, savedirqs);
diff -up wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_radio.h temp/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
--- wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_radio.h	2006-12-14 15:39:24.000000000 -0300
+++ temp/drivers/net/wireless/bcm43xx/bcm43xx_radio.h	2006-12-14 16:52:13.000000000 -0300
@@ -64,6 +64,22 @@ void bcm43xx_radio_init2060(struct bcm43
 
 void bcm43xx_radio_turn_on(struct bcm43xx_private *bcm);
 void bcm43xx_radio_turn_off(struct bcm43xx_private *bcm);
+ static inline
+ int bcm43xx_is_hw_radio_enabled(struct bcm43xx_private *bcm)
+ {
+ 	/* function to return state of hardware enable of radio
+ 	 * returns 0 if radio disabled, 1 if radio enabled
+ 	 */
+ 	if (likely(bcm->current_core->rev >= 3))
+ 		return ((bcm43xx_read32(bcm, BCM43xx_MMIO_RADIO_HWENABLED_HI)
+ 					& BCM43xx_MMIO_RADIO_HWENABLED_HI_MASK)
+ 					== 0) ? 1 : 0;
+ 	else
+ 		return ((bcm43xx_read16(bcm, BCM43xx_MMIO_RADIO_HWENABLED_LO)
+ 					& BCM43xx_MMIO_RADIO_HWENABLED_LO_MASK)
+ 					== 0) ? 0 : 1;
+ }
+ 
 
 int bcm43xx_radio_selectchannel(struct bcm43xx_private *bcm, u8 channel,
 				int synthetic_pu_workaround);
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to