[OpenWrt-Devel] [PATCH, kernel] add ap91_pci_init_simple function for initial pci card

2014-03-26 Thread Marshmallow
This patch is for openwrt_12.09 (AA) kernel 3.3.8
 It adds the function for the case that having calibration data in eeprom of 
wifi pci card.
 Compat-wireless provides the way AH_USE_EEPROM(see the macro below) to read 
the calibration data, 
 but the ap91_pci_init functionalities does has the correspond API. Thus 
ap91_pci_init() is not perfect.
  
 macro in hw.h of compat-wireless
/* ah_flags */
#define AH_USE_EEPROM   0x1
  
  
 After using the below patch, we can init the card(most of thoes are 5GHz pci 
card, such as AR958x) like thie way:
 ...
 ap91_pci_init(NULL, NULL);
 ...
  
  
 
Signed-off-by: banglang.huangbanglang.hu...@foxmail.com
---
diff --git a/arch/mips/ath79/dev-ap9x-pci.c b/arch/mips/ath79/dev-ap9x-pci.c
index c08e438..561e9b2 100644
--- a/arch/mips/ath79/dev-ap9x-pci.c
+++ b/arch/mips/ath79/dev-ap9x-pci.c
@@ -92,6 +92,12 @@ static int ap91_pci_plat_dev_init(struct pci_dev *dev)
  return 0;
 }
 
+static int ap91_pci_plat_dev_init_simple(struct pci_dev *dev)
+{
+ dev-dev.platform_data = NULL;
+
+ return 0;
+}
 __init void ap91_pci_init(u8 *cal_data, u8 *mac_addr)
 {
  if (cal_data)
@@ -103,7 +109,11 @@ __init void ap91_pci_init(u8 *cal_data, u8 *mac_addr)
   ap9x_wmac0_data.macaddr = ap9x_wmac0_mac;
  }
 
- ath79_pci_set_plat_dev_init(ap91_pci_plat_dev_init);
+ if((!cal_data)  (!mac_addr))
+  ath79_pci_set_plat_dev_init(ap91_pci_plat_dev_init_simple);
+ else
+  ath79_pci_set_plat_dev_init(ap91_pci_plat_dev_init);
+
  ath79_register_pci();
 
  pci_enable_ath9k_fixup(0, ap9x_wmac0_data.eeprom_data);___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH, packages] fix the issue on initiating multi ssid error (8 ssid for each band, totoal is 16)

2014-03-26 Thread Marshmallow
This patch can fix the issue that ethernet crash or turns into disable status 
when initiating multi ssid (8 for each band, total is 16)
 For more detail, please refer to https://dev.openwrt.org/ticket/15244
  
 My suggestion is to move the line /sbin/wifi down in the front of stop 
when restart/start the network (executing /etc/init.d/network restart)
  
  
 Signed-off-by: banglang.huangbanglang.hu...@foxmail.com
---
diff --git a/etc/init.d/network b/etc/init.d/network
index 429f33d..04b5171 100755
--- a/packages/netifd/files/etc/init.d/network
+++ b/packages/netifd/files/etc/init.d/network
@@ -7,6 +7,7 @@ SERVICE_DAEMONIZE=1
 SERVICE_WRITE_PID=1
 
 start() {
+ /sbin/wifi down
  stop
  [ -e /proc/sys/kernel/core_pattern ]  {
   ulimit -c unlimited
@@ -21,7 +22,6 @@ start() {
 
  sleep 5
 
- /sbin/wifi down
  /sbin/wifi up
 }___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] I still can't figure out how the config filesin /etc/config/* are parsed?

2014-03-13 Thread Marshmallow
You can go to the directory /etc/init.d/, such /etc/init.d/network
 cant see the file /etc/config/network
  
 above is a good entrance for your doubt
  

 

 -- Original --
  From:  Jiří Šlachta;slac...@cesnet.cz;
 Date:  Thu, Mar 13, 2014 04:18 PM
 To:  OpenWrt Development Listopenwrt-devel@lists.openwrt.org; 
 
 Subject:  Re: [OpenWrt-Devel] I still can't figure out how the config filesin 
/etc/config/* are parsed?

 

Hello Wandy,

the UCI guide on OpenWrt wiki describes how it does work.

http://wiki.openwrt.org/doc/uci

Kind regards,
Jiri Slachta

Dne 13. 3. 2014 9:11, Wandy Lau napsal(a):
 These files are parsed by shell scripts or some thing else? I really can't 
 figure it out.  Please give me some idea about this.
 
 -- 
 This is my life,but world of us~~
 
 
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
.___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel