Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

I fear you'll find no binary driver out there which is portable across
kernel versions.

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

iEYEARECAAYFAk0litMACgkQdputYINPTPO98wCgmrBLmbBXKwV7bQXxLmPY55rx
LH0AniCLGdTFnZoKLgYM4e7E/X4zKXqS
=hcyf
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mac80211: For ath5k AHB take mac adress from board config.

2011-01-06 Thread Wojciech Dubowik

 mac80211: For ath5k AHB take mac addresses from board configuration
 and not from calibration data. Otherwise each radio instance will
 have same MAC.

Signed-off-by: Wojciech Dubowik wojciech.dubo...@neratec.com
---
 .../451-add-platform-eeprom-support-to-ath5k.patch |  181 +++-
 1 files changed, 136 insertions(+), 45 deletions(-)

diff --git 
a/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch 
b/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch
index ff96b78..c016920 100644
--- a/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch
+++ b/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch
@@ -1,51 +1,16 @@
 a/drivers/net/wireless/ath/ath5k/eeprom.c
-+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
-@@ -22,6 +22,8 @@
- \*/
- 
- #include linux/slab.h
-+#include linux/ath5k_platform.h
-+#include linux/pci.h
- 
- #include ath5k.h
- #include reg.h
-@@ -1726,7 +1728,7 @@ ath5k_eeprom_read_spur_chans(struct ath5
- }
- 
- /*
-- * Read the MAC address from eeprom
-+ * Read the MAC address from eeprom or platform_data
+Index: compat-wireless-2010-12-16/drivers/net/wireless/ath/ath5k/pci.c
+===
+--- compat-wireless-2010-12-16.orig/drivers/net/wireless/ath/ath5k/pci.c   
2010-12-17 22:22:02.0 +0100
 compat-wireless-2010-12-16/drivers/net/wireless/ath/ath5k/pci.c
2011-01-06 12:52:58.934762991 +0100
+@@ -15,6 +15,7 @@
   */
- int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
- {
-@@ -1734,6 +1736,16 @@ int ath5k_eeprom_read_mac(struct ath5k_h
-   u32 total, offset;
-   u16 data;
-   int octet, ret;
-+  struct ath5k_platform_data *pdata = NULL;
-+
-+  if (ah-ah_sc-pdev)
-+  pdata = ah-ah_sc-pdev-dev.platform_data;
-+
-+  if (pdata  pdata-macaddr)
-+  {
-+  memcpy(mac, pdata-macaddr, ETH_ALEN);
-+  return 0;
-+  }
  
-   ret = ath5k_hw_nvram_read(ah, 0x20, data);
-   if (ret)
 a/drivers/net/wireless/ath/ath5k/pci.c
-+++ b/drivers/net/wireless/ath/ath5k/pci.c
-@@ -17,6 +17,7 @@
  #include linux/nl80211.h
++#include linux/ath5k_platform.h
  #include linux/pci.h
  #include linux/pci-aspm.h
-+#include linux/ath5k_platform.h
  #include ../ath.h
- #include ath5k.h
- #include debug.h
-@@ -73,6 +74,19 @@ bool ath5k_pci_eeprom_read(struct ath_co
+@@ -73,6 +74,18 @@
  {
struct ath5k_hw *ah = (struct ath5k_hw *) common-ah;
u32 status, timeout;
@@ -56,12 +21,138 @@
 +
 +  if (pdata  pdata-eeprom_data  pdata-eeprom_data[0] == 
AR5K_EEPROM_MAGIC_VALUE)
 +  {
-+  if (offset = ATH5K_PLAT_EEP_MAX_WORDS)
-+  return -EIO;
-+
++  ATH5K_INFO(ah-ah_sc, using eeprom-content from 
platform_data\n);
++  if (offset = ATH5K_PLAT_EEP_MAX_WORDS) return -EIO;
 +  *data = pdata-eeprom_data[offset];
 +  return 0;
 +  }
  
/*
 * Initialize EEPROM access
+@@ -107,6 +120,49 @@
+   return 0;
+ }
+ 
++/*
++ * Read the MAC address from eeprom or platform_data
++ */
++int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
++{
++  u8 mac_d[ETH_ALEN] = {};
++  u32 total, offset;
++  u16 data;
++  int octet, ret;
++  struct ath5k_platform_data *pdata = NULL;
++
++  if (ah-ah_sc-pdev)
++  pdata = ah-ah_sc-pdev-dev.platform_data;
++
++  if (pdata  pdata-macaddr)
++  {
++  memcpy(mac, pdata-macaddr, ETH_ALEN);
++  return 0;
++  }
++
++  ret = ath5k_hw_nvram_read(ah, 0x20, data);
++  if (ret)
++  return ret;
++
++  for (offset = 0x1f, octet = 0, total = 0; offset = 0x1d; offset--) {
++  ret = ath5k_hw_nvram_read(ah, offset, data);
++  if (ret)
++  return ret;
++
++  total += data;
++  mac_d[octet + 1] = data  0xff;
++  mac_d[octet] = data  8;
++  octet += 2;
++  }
++
++  if (!total || total == 3 * 0x)
++  return -EINVAL;
++
++  memcpy(mac, mac_d, ETH_ALEN);
++
++  return 0;
++}
++
+ /* Common ath_bus_opts structure */
+ static const struct ath_bus_ops ath_pci_bus_ops = {
+   .ath_bus_type = ATH_PCI,
+Index: compat-wireless-2010-12-16/drivers/net/wireless/ath/ath5k/eeprom.c
+===
+--- compat-wireless-2010-12-16.orig/drivers/net/wireless/ath/ath5k/eeprom.c
2010-12-17 22:22:01.0 +0100
 compat-wireless-2010-12-16/drivers/net/wireless/ath/ath5k/eeprom.c 
2011-01-06 12:55:48.004762993 +0100
+@@ -1725,40 +1725,6 @@
+   return ret;
+ }
+ 
+-/*
+- * Read the MAC address from eeprom
+- */
+-int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
+-{
+-  u8 mac_d[ETH_ALEN] = {};
+-  u32 total, offset;
+-  u16 data;
+-  int 

[OpenWrt-Devel] NAND Flash questions and Dockstar

2011-01-06 Thread Mauricio Tavares
	I think I am experiencing the issues mentioned in 
http://www.dslreports.com/forum/r24833189-Other-Seagate-DockStar-U-Boot-NAND-flash-considerations. 
Namely, I installed the os in the flash memory; after a while it will 
degrade enough (probably due to writing/reading to it) that the dockstar 
will stop working and cannot successfully boot. Writing the root 
partition back to the nand solves the problem for a few more weeks.


Could it be files are not being read/written in a way to keep the the 
flash storage happy (with all its block management and so on)?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWRT installation as Xen domU with PCI passthrough

2011-01-06 Thread Jean Baptiste Favre (OpenWRT devel)
As announced, here's my howto installing Openwrt as Xen domU with PCI
passthrough, using kernel 2.6.37.

Any comment welcome,
Regards,
JB
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT installation as Xen domU with PCI passthrough

2011-01-06 Thread Jean Baptiste Favre (OpenWRT devel)
Oups, forgot the links:

French version:
http://publications.jbfavre.org/virtualisation/xen_openwrt_domu_pci_passthrough.fr

English version:
http://publications.jbfavre.org/virtualisation/xen_openwrt_domu_pci_passthrough.en

Le 06/01/2011 19:58, Jean Baptiste Favre (OpenWRT devel) a écrit :
 As announced, here's my howto installing Openwrt as Xen domU with PCI
 passthrough, using kernel 2.6.37.
 
 Any comment welcome,
 Regards,
 JB
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel
 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] NAND Flash questions and Dockstar

2011-01-06 Thread Marcus Osdoba

Am 06.01.2011 16:38, schrieb Mauricio Tavares:

I think I am experiencing the issues mentioned in
http://www.dslreports.com/forum/r24833189-Other-Seagate-DockStar-U-Boot-NAND-flash-considerations.
Namely, I installed the os in the flash memory; after a while it will
degrade enough (probably due to writing/reading to it) that the dockstar
will stop working and cannot successfully boot. Writing the root
partition back to the nand solves the problem for a few more weeks.


Hi, I always used the overlay strategy: A ReadOnly squashfs on the 32MiB 
mtd parititon and the overlay (jffs2) on the 219MiB mtd parititon.
You need to modify the mtdparts names (rootfs and rootfs_data) in the 
bootloader to let OpenWrt automatically create an overlay. The overlay 
patition must be empty before intialisation. Maybe the 219MiB gives you 
a bigger buffer before the suspicious lock condition is reached


Regards,
Marcus
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread ch...@martin.cc
On Thu, Jan 6, 2011 at 8:26 PM, Jo-Philipp Wich x...@subsignal.org wrote:

 I fear you'll find no binary driver out there which is portable across
 kernel versions.


I was under the impression that the new 2.6 kernel binary driver was
independent of the OS version
ie: it was a 2.6.x driver
TomatoUsb are using a 2.6.22 kernel
So I figured that I should be able to get it to work with either
Openwrt 8.09 or 10.03
please correct me again if I am wrong

I would happily use the B43 driver if was stable - but I still get DMA
errors about once a day.
Unfortunatly the old broadcom binary driver doesn't support mucticast
correctly in client mode bridge, hence my interest in the newer
broadcom binary drivers

Unfortunaly changin routers/chipsets is not an option - I am locked in
with what we have

Perhaps I need to build openwrt with a 2.6.22 kernel similar to
tomatousb - I am up for that if I have to

--
Chris Martin
m: 0419812371
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [patch] ticket #8241 necessary to compile 2.6.37 for Orion

2011-01-06 Thread Matthias Buecher / Germany
Hi developers,

can someone please commit the patch of ticket #8241 [1] to trunk.
The patch is needed to compile Orion with new kernel release 2.6.37.
Tried to contact Imre several times but got no reply.
The patch is very simple, easy to review and keeps backward compatibility.

Thanks in advance
Maddes

[1] https://dev.openwrt.org/attachment/ticket/8241/orion_dt2_2.6.37.2.patch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread Felix Fietkau

On 2011-01-06 4:06 PM, ch...@martin.cc wrote:

On Thu, Jan 6, 2011 at 8:26 PM, Jo-Philipp Wichx...@subsignal.org  wrote:


 I fear you'll find no binary driver out there which is portable across
 kernel versions.



I was under the impression that the new 2.6 kernel binary driver was
independent of the OS version
ie: it was a 2.6.x driver
TomatoUsb are using a 2.6.22 kernel
So I figured that I should be able to get it to work with either
Openwrt 8.09 or 10.03
please correct me again if I am wrong

I would happily use the B43 driver if was stable - but I still get DMA
errors about once a day.
Unfortunatly the old broadcom binary driver doesn't support mucticast
correctly in client mode bridge, hence my interest in the newer
broadcom binary drivers
I committed the 'relayd' package, which allows you to add transparent 
routing between multiple interfaces with ARP proxying and 
broadcast/multicast frame relay. That can be used to replace most client 
mode bridge style setups, and it works with any driver.



Unfortunaly changin routers/chipsets is not an option - I am locked in
with what we have

Perhaps I need to build openwrt with a 2.6.22 kernel similar to
tomatousb - I am up for that if I have to

I think that would require lots of hacks and would be mostly pointless.
The new broadcom-wl package in OpenWrt trunk is independent of the 
kernel version, but it doesn't work on all hardware yet.


- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread ch...@martin.cc
On Fri, Jan 7, 2011 at 12:05 PM, Felix Fietkau n...@openwrt.org wrote:
 The new broadcom-wl package in OpenWrt trunk is independent of the kernel
 version, but it doesn't work on all hardware yet.


I tested the new broadcom-wl (version 5.10.56.27.3) package in trunk ,
 and I found that it also didn't correctly pass multicast in wet
(client bridge) mode on a wrt54gs, and that it didn't work at all on
my target platform brcm5354 (LP PHY).

I did find that the driver in the tomatousb release (version
5.10.147.0) did both, pass multicast correctly and work on the
brcm5354. - It's a more recent version and I am pretty sure that it is
independent of the kernel version - So I am prepared to spend 2 months
on it if necessary

Does any one know who packages the broadcom-wl driver perhaps I can
assist in fixing support for the brcm5354 and the multicast issue?

Using relayd and the b43 driver is my fall back position, but it's
really unworkable as I have had no success in finding the cause of the
DMA errors I get with the b43 driver on the brcm5354 platform.   So as
much as gnaws at me,  my only viable solution is the Broadcom
proprietary driver.

frustration Damn you Broadcom - may a thousand sand flies nest in
your armpit /frustration

cheers
--
Chris Martin
m: 0419812371
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread Alexey Loukianov
07.01.2011 06:34, ch...@martin.cc wrote:
 
 Does any one know who packages the broadcom-wl driver perhaps I can
 assist in fixing support for the brcm5354 and the multicast issue?

Correct me if I'm wrong but it seems to me that I had read on the Phoronix that
the Broadcom's driver for WiFi chips had been open-sourced by the vendor and
that recently released vanilla linux kernel version 2.6.37 includes it.

Maybe we should wait a little until OpenWRT would switch onto using this kernel
version as a base for brcm5354 platform? And one may even wish to try to update
openwrt himself to use 2.6.37 kernel as a base for brcm5354 target.

-- 
Best regards,
Alexey Loukianov  mailto:mooro...@mail.ru
System Engineer,Mob.:+7(926)218-1320
*nix Specialist




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] madwifi: typo(s) in /lib/wifi/madwifi.sh

2011-01-06 Thread Jan Hetges
Hi
minrate and maxrate are acually not boolean, so, for example 
config minrate 11000 in /etc/config/wireless has no effect.

Signed-off by: Jan Hetges t...@ms20.net

--

Index: trunk/package/madwifi/files/lib/wifi/madwifi.sh
===
--- trunk/package/madwifi/files/lib/wifi/madwifi.sh (revision 24920)
+++ trunk/package/madwifi/files/lib/wifi/madwifi.sh (working copy)
@@ -267,10 +267,10 @@
config_get_bool comp $vif compression 0
iwpriv $ifname compression $comp /dev/null 21
 
-   config_get_bool minrate $vif minrate
+   config_get minrate $vif minrate
[ -n $minrate ]  iwpriv $ifname minrate $minrate
 
-   config_get_bool maxrate $vif maxrate
+   config_get maxrate $vif maxrate
[ -n $maxrate ]  iwpriv $ifname maxrate $maxrate
 
config_get_bool burst $vif bursting







































































signature.asc
Description: Digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] packaging a broadcom binary driver

2011-01-06 Thread ch...@martin.cc
On Fri, Jan 7, 2011 at 2:47 PM, Alexey Loukianov mooro...@mail.ru wrote:
 07.01.2011 06:34, ch...@martin.cc wrote:

 Does any one know who packages the broadcom-wl driver perhaps I can
 assist in fixing support for the brcm5354 and the multicast issue?

 Correct me if I'm wrong but it seems to me that I had read on the Phoronix 
 that
 the Broadcom's driver for WiFi chips had been open-sourced by the vendor and
 that recently released vanilla linux kernel version 2.6.37 includes it.

 Maybe we should wait a little until OpenWRT would switch onto using this 
 kernel
 version as a base for brcm5354 platform? And one may even wish to try to 
 update
 openwrt himself to use 2.6.37 kernel as a base for brcm5354 target.


I checked the bcm80211 driver from Broadcom, but they have not
released source to a universal driver, Just one that works with
current PC cards (ie N-Phy).  It doesn't support the bcm4318, which in
the radio in the bcm5354 SoC, So I don't think  that it will ever
solve my problem.  It has to be the b43 driver or the broadcom binary
driver

--
Chris Martin
m: 0419812371
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel