Modify

Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#5978 closed enhancement (fixed)

Move forward to compat-wireless 2009-09-14 to enable experimental LP-PHY support

Reported by: LeXa2 Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Current openwrt trunk uses compat-wireless-2009-08-20, which doesn't support LP-PHY. It makes impossible to use Wifi on my DLink DIR-320 with kernel 2.6. Since 2009-08-20 there were a lot of commits to the linux-wireless that add support of LP PHY for b43 (ex.: http://patchwork.kernel.org/patch/47471/). It might be reasonable to try to update openwrt mac80211 package to the newer version of compat-wireless.

Doing so will give users with LP PHY hardware a chance to bring their wifi to life.

Thanks in advance.

Attachments (2)

mac80211.patch (22.0 KB) - added by Jason 8 years ago.
b43-fwsquash-LP-PHY.patch (1.1 KB) - added by Alexey Loukianov <mooroon2@…> 8 years ago.
Patch for b43-fwsquash.py to correctly handle LP PHY firmware files and core revs.13, 14 and 15.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 8 years ago by Kofec

It is great idea. If someone have a while please do it

Changed 8 years ago by Jason

comment:2 Changed 8 years ago by Jason

I haven't tested the attached patch, but I did verify it does compile. It updates the dependency to compat-wireless 2009-10-09. I had to remove the new SDIO support in order to get b43 to compile.

I've never done a svn patch before, so let me know if this doesn't work.

comment:3 Changed 8 years ago by LeXa2

Revision r18023 moved up compat-wireless to a version with an LP PHY support inside. However package mac80211 still has got LP PHY disabled through path 010-b43_config.patch. Modifying this patch so it leaves CONFIG_B43_PHY_LP=y uncommented enables WiFi on Dir-320 with 2.6 kernel.

I think that it's just the right time to enable LP PHY in openwrt HEAD, and it also might be good to update compat-wireless once again to the latest available version: time marches on, there were some fixes for b43 in upstream repo.

comment:4 Changed 8 years ago by anonymous

P.S. Required b43 firmware files lp*.fw do not get into final image when building from current HEAD. Looks like there's also a bug in the python script that strips unneeded firmware files from b43-fwcutter output. I was forced to add them later to jffs in order to get WiFi up.

comment:5 Changed 8 years ago by agb

  • Resolution set to fixed
  • Status changed from new to closed

compat-wireless updated to 2009-11-03 in [18294]

comment:6 Changed 8 years ago by agb

  • Resolution fixed deleted
  • Status changed from closed to reopened

ugh, premature closing, did not see that the lp phy is still disable via config, reopening.

comment:7 Changed 8 years ago by anonymous

Unfortunately it introduced #5996, which still persist after r18294 (mac80211: update to 2009-11-03). If it does not enable LP-PHY anyway, could you please consider reverting to the last working compat-wireless? (It does not help the people with LP-PHY, but it makes the wireless unusable for the ones with brcm47xx+4318 [wl-500gPv1 for instance])

comment:8 Changed 8 years ago by LeXa2

Disagreed.
My Dir-320 works more-or-less good with WiFi using current trunk (latest firmware I built was from r18314). Two issues seen so far are slow wifi throughput comparing with bcrm-2.4 speeds, and some sporadic 'kernel bugs' showing up in dmesg once is a day or two.

In order to make wifi work I have to make two changes to openwrt source:

  1. Change patch 010-b43_config.patch to enable LP PHY support to be built.
  2. Copy lp0*.fw to jffs after flashing.

Second one may be fixed by modifying b43-fwsquash.py, which has LP PHY support broken.

Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Patch for b43-fwsquash.py to correctly handle LP PHY firmware files and core revs.13, 14 and 15.

comment:9 follow-up: Changed 8 years ago by kofec

Can someone help ? I did as it is suggested above and wifi in my dir-320(H/W A1) still doesn't work. Some can also send me the binary file kofec(at)interia(dot)pl

Linux version 2.6.30.9 () (gcc version 4.3.3 (GCC) ) #5 Wed N                                                        ov 11 09:16:31 CET 2009
CPU revision is: 00029029 (Broadcom BCM3302)
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x14, vendor 0x4243)
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x09, vendor 0x4243)
ssb: Core 2 found: MIPS 3302 (cc 0x816, rev 0x08, vendor 0x4243)
ssb: Core 3 found: USB 2.0 Host (cc 0x819, rev 0x02, vendor 0x4243)
ssb: Core 4 found: MEMC SDRAM (cc 0x80F, rev 0x04, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x0D, vendor 0x4243)
ssb: Core 6 found: Roboswitch (cc 0x81C, rev 0x02, vendor 0x4243)
ssb: Found rev 0 PMU (capabilities 0x04A63400)
ssb: Initializing MIPS core...
ssb: core 0x0800, irq : 2(S)  3* 4  5  6  D  I
ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I
ssb: core 0x0816, irq : 2(S)  3  4  5* 6  D  I
ssb: core 0x0819, irq : 2(S)  3  4  5  6* D  I
ssb: core 0x080f, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0812, irq : 2(S)* 3  4  5  6  D  I
ssb: core 0x081c, irq : 2(S)  3  4  5  6  D  I*
ssb: set_irq: core 0x0806, irq 4 => 4
ssb: set_irq: core 0x0816, irq 5 => 2
ssb: set_irq: core 0x0812, irq 2 => 5
ssb: after irq reconfiguration
ssb: core 0x0800, irq : 2(S)  3* 4  5  6  D  I
ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I
ssb: core 0x0816, irq : 2(S)* 3  4  5  6  D  I
ssb: core 0x0819, irq : 2(S)  3  4  5  6* D  I
ssb: core 0x080f, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0812, irq : 2(S)  3  4  5* 6  D  I
ssb: core 0x081c, irq : 2(S)  3  4  5  6  D  I*
ssb: Sonics Silicon Backplane found at address 0x18000000
Serial init done.
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 8027b680, node_mem_map 81000000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd cons                                                        ole=ttyS0,115200
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
NR_IRQS:128
PID hash table entries: 128 (order: 7, 512 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29680k/32768k available (2144k kernel code, 3088k reserved, 396k data, 1                                                        28k init, 0k highmem)
Calibrating delay loop... 239.61 BogoMIPS (lpj=479232)
Mount-cache hash table entries: 512
net_namespace: 528 bytes
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switched to high resolution mode on CPU 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  Š 2001-2006 Red Hat, Inc.
msgmni has been set to 57
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:90:4c:c0:00:00
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 8-bit bank
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
 Amd/Fujitsu Extended Query Table at 0x0040
Physically mapped flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Updating TRX offsets and length:
old trx = [0x0000001c, 0x00000974, 0x000d2000], len=0x00291000 crc32=0x9631c787
new trx = [0x0000001c, 0x00000974, 0x000d2000], len=0x000d2000 crc32=0xeb2b7a5e
Done
Creating 4 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000003f0000 : "linux"
0x000000112000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary or be s                                                        maller than an erase block -- forcing read-only
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2C0000, len=130000
0x0000002c0000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 128k freed
Please be patient, while OpenWrt loads ...
diag: Detected 'D-Link DIR-320'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found a 5325! It's a 5350.
b44: eth0: powering down PHY
jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
device eth0.0 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.0) entering forwarding state
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
b43-phy0: Broadcom 5354 WLAN found (core revision 13)
phy0: Selected rate control algorithm 'minstrel'
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
Registered led device: b43-phy0::radio
Broadcom 43xx driver loaded [ Features: PL, Firmware-ID: FW13 ]
Broadcom 43xx-legacy driver loaded [ Features: PLID, Firmware-ID: FW10 ]
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
Driver 'sd' needs updating - please use bus_type methods
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd ssb0:1: SSB OHCI Controller
ohci_hcd ssb0:1: new USB bus registered, assigned bus number 1
ohci_hcd ssb0:1: irq 6, io mem 0x18003000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd ssb0:1: SSB EHCI Controller
ohci_hcd ssb0:1: new USB bus registered, assigned bus number 2
ohci_hcd ssb0:1: irq 6, io mem 0x18003800
ohci_hcd ssb0:1: USB 0.0 started, EHCI 1.00
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 2-1: new high speed USB device using ohci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access     starline Flash Disk       5.00 PQ: 0 ANSI: 2
usb-storage: device scan complete
sd 0:0:0:0: [sda] 128576 512-byte hardware sectors: (65.8 MB/62.7 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
EXT2-fs warning (device sda1): ext2_fill_super: mounting ext3 filesystem as ext2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

comment:10 in reply to: ↑ 9 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Replying to kofec:

Can someone help ? I did as it is suggested above and wifi in my dir-320(H/W A1) still doesn't work. Some can also send me the binary file kofec(at)interia(dot)pl

Well, looking at the dmesg log you provided I can't tell if there is any problem with b43 driver. Did you configure /etc/config/wireless to enable wifi? It should look something like this:

config wifi-device wifi0

option type mac80211
option channel 5
option macaddr 00:90:4c:c1:00:a2
option hwmode 11g
option disabled 0

config wifi-iface

option device wifi0
option network lan
option mode ap
option ssid YourSSIDHere
option encryption psk
option key "your_key_here_8_chars_minimum"
option hidden 0

After reconfiguring /etc/config/wireless you should do either "/etc/init.d/network restart" or "wifi up". After that kernel will try to load firmware and activate b43 PHY, and in case you've done all the things right - your access point will be ready for client devices to join. If not - do dmesg, read it, satisfy your kernel and try again.

My dlink320's wifi works OK for about 3 days, now acting in client mode connecting to another d-link wifi-router. Transfer speed isn't perfect - about 10Mbit in both ways and wifi link refuses to run at bitrate more than 24Mbit (and it is stable enough for everyday use only at 18Mbit). But at least it works now, and that is great.

comment:11 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Argh, stupid wiki-formatting, it screwed up /etc/config/wireless contents.
Here they are again:

config wifi-device wifi0

    option type mac80211
    option channel 5
    option macaddr 00:90:4c:c1:00:a2 
    option hwmode 11g 
    option disabled 0

config wifi-iface

    option device wifi0 
    option network lan 
    option mode ap 
    option ssid YourSSIDHere 
    option encryption psk 
    option key "your_key_here_8_chars_minimum" 
    option hidden 0

Also, don't forget that if you want your dir320 to be ap, you should include hostapd in firmare, and if you're going to use wifi client mode you should install wpa_supplicant.

comment:12 Changed 8 years ago by kofec

Thanks a lot, it helped. I didn't know that the wifi is disable by default.

comment:13 Changed 8 years ago by hauke

  • Resolution set to fixed
  • Status changed from reopened to closed

This is fixed in r18935

The L-PHY firmware is included by default.

comment:14 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.