Thursday, January 27 2011

brcm47xx goes 802.11n

Ποιος θα το περίμενε, και όμως το ανοιχτό λογισμικό μπορεί να κάνει ότι θέλουμε και ότι του ζητήσουμε !! Φυσικά το όλο θέμα έχει να κάνει περισσότερο με proof of concept και μελέτη μια και το συγκεκριμένο hardware δεν μπορεί να υποστηρίξει ικανοποιητικά τις αυξανόμενες ανάγκες σε επιδόσεις που προσφέρει το 802.11n.

Linux version 2.6.37 (alex@motard) (gcc version 4.5.2 (GCC) ) #6 Thu Jan 27 14:31:38 EET 2011
CFE's entrypoint seal doesn't match.
CPU revision is: 00024000 (Broadcom BMIPS32)
ssb: Core 0 found: SDRAM (cc 0x803, rev 0x00, vendor 0x4243)
ssb: Core 1 found: ILine 20 (cc 0x801, rev 0x00, vendor 0x4243)
ssb: Core 2 found: Fast Ethernet (cc 0x806, rev 0x00, vendor 0x4243)
ssb: Core 3 found: V90 (cc 0x807, rev 0x00, vendor 0x4243)
ssb: Core 4 found: USB 1.1 Hostdev (cc 0x808, rev 0x00, vendor 0x4243)
ssb: Core 5 found: PCI (cc 0x804, rev 0x00, vendor 0x4243)
ssb: Core 6 found: MIPS (cc 0x805, rev 0x00, vendor 0x4243)
ssb: Core 7 found: EXTIF (cc 0x811, rev 0x00, vendor 0x4243)
ssb: Core 8 found: Fast Ethernet (cc 0x806, rev 0x00, vendor 0x4243)
ssb: Initializing MIPS core...
ssb: set_irq: core 0x0806, irq 4 => 4
ssb: set_irq: core 0x0811, irq 7 => 2
ssb: set_irq: core 0x0801, irq 5 => 2
ssb: set_irq: core 0x0806, irq 7 => 5
ssb: after irq reconfiguration
ssb: core 0x0803, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0801, irq : 2(S)* 3  4  5  6  D  I 
ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I 
ssb: core 0x0807, irq : 2(S)  3  4  5  6  D* I 
ssb: core 0x0808, irq : 2(S)  3* 4  5  6  D  I 
ssb: core 0x0804, irq : 2(S)  3  4  5  6* D  I 
ssb: core 0x0805, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0811, irq : 2(S)* 3  4  5  6  D  I 
ssb: core 0x0806, 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: 01000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00001000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 80255b50, node_mem_map 8029c000
  Normal zone: 32 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4064 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Enabling BCM4710A0 cache workarounds.
Primary instruction cache 8kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 4kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 13528k/16384k available (2069k kernel code, 2856k reserved, 318k data, 144k init, 0k highmem)
NR_IRQS:128
Calibrating delay loop... 82.68 BogoMIPS (lpj=165376)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
Switched to NOHz mode on CPU #0
ssb: PCIcore in host mode found
pci 0000:00:00.0: [14e4:4710] type 0 class 0x000600
PCI: Fixing up bridge 0000:00:00.0
PCI: Setting latency timer of device 0000:00:00.0 to 64
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.0.
number of CFI chips: 1
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Looking for dual image
TRX offset : 0
Creating 4 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000003f0000 : "linux"
0x00000010a000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=1B0000, len=240000 
0x0000001b0000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
b44: b44.c:v2.0
b44 ssb0:2: eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:58:a0
b44 ssb0:5: eth1: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:58:a1
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP westwood registered
NET: Registered protocol family 17
Please be patient, while OpenWrt loads ...
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 144k freed
BFS CPU scheduler v0.363 by Con Kolivas.
b44 ssb0:2: eth0: Link is up at 100 Mbps, full duplex
b44 ssb0:2: eth0: Flow control is off for TX and off for RX
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
b44 ssb0:2: eth0: powering down PHY
b44 ssb0:2: eth0: Link is up at 100 Mbps, full duplex
b44 ssb0:2: eth0: Flow control is off for TX and off for RX
b44 ssb0:5: eth1: Link is up at 100 Mbps, full duplex
b44 ssb0:5: eth1: Flow control is off for TX and off for RX
Compat-wireless backport release: compat-wireless-2011-01-06-3-g8db1608
Backport based on wireless-testing.git master-2011-01-21-2
cfg80211: Calling CRDA to update world regulatory domain
PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
PCI: Fixing up device 0000:00:01.0
ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
ieee80211 phy0: Failed to initialize wep: -2
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xc0640000, irq=6
cfg80211: World regulatory domain updated:
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)

Tuesday, September 15 2009

brcm47xx goes linux-2.6.31

Η πλατφόρμα στην οποία έκανε τα πρώτα του βήματα το openwrt ήταν αυτή της broadcom με τις συσκευές wrt της linksys, εξού και το όνομα: openwrt.

Όταν το openwrt μεγάλωσε και άρχισε να υποστηρίζει και άλλες πλατφόρμες, ήταν η εποχή που έγινε η μετάβαση από το whiterussian στο kamikaze, η brcm47xx πλατφόρμα έμεινε σχετικά πίσω σε θέματα υποστήριξης και ανάπτυξης. Συγκεκριμένα για πολύ καιρό η μόνη kamikaze έκδοση που έπαιζε σε αυτήν ήταν με έκδοση kernel 2.6.19. Πρέπει να πούμε ότι η συγκεκριμένη έκδοση έπαιζε πάρα πολύ καλά και σταθερά δίδοντας επιδώσεις που ξεπερνούσαν τα 20Mbit στο wifi κομμάτι.

Κάπου κοντά στην έκδοση linux-2.6.30, ενσωματώθηκε στον κυρίως πυρήνα ένα μεγάλο κομμάτι από mips/mipsel κώδικα με αποτέλεσμα οι συγκεκριμένες brcm47xx συσκευές να ξαναβρούν την χαμένη από καιρό υποστήριξη και ανάπτυξη από τον ιδιαίτερα πλούσιο αριθμό των linux kernel developer & maintainer.

Πριν από λίγα λεπτά είχα την χαρά να δω μια τέτοια συσκευή να δουλεύει καλά και σταθερά σε latest & greatest openwrt/linux-2.6.31:

Linux version 2.6.31 (alex@motard) (gcc version 4.3.4 (GCC) ) #1 Tue Sep 15 13:20:46 EEST 2009
CPU revision is: 00024000 (Broadcom BCM4710)
Serial init done.
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00001000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 80236070, node_mem_map 80276000
  Normal zone: 32 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4064 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Enabling BCM4710A0 cache workarounds.
Primary instruction cache 8kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 4kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 13720k/16384k available (1955k kernel code, 2664k reserved, 311k data, 124k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:128
Calibrating delay loop... 82.68 BogoMIPS (lpj=165376)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switched to NOHz mode on CPU #0
PCI: Setting latency timer of device 0000:00:00.0 to 64
pci 0000:00:00.0: reg 10 32bit mmio: [0x000000-0x001fff]
pci 0000:00:00.0: reg 14 32bit mmio: [0x000000-0x7ffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
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 26
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 0 ports, IRQ sharing disabled
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:5d:aa
eth1: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:5d:ab
flash init: 0x1fc00000 0x00400000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Creating 4 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000003f0000 : "linux"
0x000000100000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "Physically mapped flash"
0x0000003f0000-0x000000400000 : "nvram"
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP cubic registered
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem) readonly on device 31:2.
Freeing unused kernel memory: 124k freed
Please be patient, while OpenWrt loads ...
diag: Router model not detected.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
b44: eth0: powering down PHY
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.

 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------


BusyBox v1.13.4 (2009-09-15 13:09:50 EEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r17585) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------

ακόμη τα σχετικά patches δεν έχουν μπει στο κυρίως δένδρο του openwrt.