[OpenWrt-Devel] Release of RegMon - a fast in-kernel phy/mac dmonitoring tool for QCA/Atheros WiFi cards

2015-08-03 Thread Thomas Hühn
Hi all,

Today I’ve released my WiFi register monitoring tool RegMon on GitHub: 
https://github.com/thuehn/RegMon

RegMon consists of Atheros driver patches to monitor arbitrary registers under 
ath9k, ath5k and madwifi from user space with high sampling rates (up to 
~20kHz). My common research use case is the fine-grained monitoring and 
analysis of all busy states (tx, rx, energy detection  idle), TSF and noise 
floor of the mac/phy layer from an Atheros WiFi card. But it can be used to 
sample any available register (like NAV, error registers, ect.).
There are also a bunch of scripts in the repo to set-up a wireless experiment, 
collect RegMon traces, parse, merge and plot them with R.

Feel free to use and change RegMon for your own purpose. As RegMon is still 
work in progress I am happy to receive and include your feedback and ideas.

Greetings from Berlin
Thomas

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


Re: [OpenWrt-Devel] [PATCHv2 5/7] mac80211/linux-firmware: include firmware for brcmfmac-sdio

2015-08-03 Thread Rafał Miłecki
On 3 August 2015 at 22:59, Hauke Mehrtens ha...@hauke-m.de wrote:
 On 07/30/2015 06:34 PM, Rafał Miłecki wrote:
 On 30 July 2015 at 10:52, Daniel Golle dan...@makrotopia.org wrote:
 @@ -2000,6 +2000,50 @@ endef

  define KernelPackage/brcmfmac/install
 $(INSTALL_DIR) $(1)/lib/firmware/brcm
 +ifneq ($(CONFIG_BRCMFMAC_SDIO),)
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b0-sdio.bin 
 \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b4-sdio.bin 
 \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b5-sdio.bin 
 \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43340-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4339-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43430-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43435-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4354-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +endef

 Looks much better, thanks.

 Two things:
 1) Do we want to include firmware for all brcmfmac supported devices?
 I guess some of them are e.g. smartphones and I'm not sure if anyone
 wants to run OpenWrt on them. Or should we split it into more options
 maybe?

 I think we should only add the firmware files we found on devices
 running OpenWrt, each firmware is 216 to 580 KBytes.

 You could do it similar to the iwlwifi firmware and only select the
 firmware files by default which are found in routers and if some special
 firmware could be needed from some target only select it by default for
 that target.

Sounds sane for me.

Daniel: can you rewrite your patch to include only really required
firmware files by default? And if you have some time, you can also add
an extra option for adding rest of firmwares.

-- 
Rafał
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

2015-08-03 Thread Mathieu Olivari
Hi Jow,
I just tried it out. I confirm the SDK works after the patch as well.
Thanks,
Mathieu

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Jo-Philipp Wich
Sent: Wednesday, July 22, 2015 12:29 AM
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during
kernel_menuconfig on a cleaned env

Hi,

this was originally done to fix quilt in the SDK. Did you test it there
after your change?

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread David Lang
just changes doesn't help a lot (and it's rather hard to see what's what with 
the wireless file)


but it doesn't look like the wireless interfaces are configured to be part of 
the LAN interface.


David Lang

On Tue, 4 Aug 2015, John kerry wrote:


Date: Tue, 4 Aug 2015 12:07:38 +0800
From: John kerry kerry9...@gmail.com
To: David Lang da...@lang.hm
Cc: N.Leiten nicklei...@gmail.com,
OpenWrt Development List openwrt-devel@lists.openwrt.org,
Alex Weedy weedy2...@gmail.com
Subject: Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

Hi,

below is the /etc/config/network and /etc/config/wireless changes.

*/etc/config/network:*
config interface 'loopback'
   option ifname 'lo'
   option proto 'static'
   option ipaddr '127.0.0.1'
   option netmask '255.0.0.0'

config interface 'lan'
   option ifname 'eth0.1 eth1'
   option type 'bridge'
   option proto 'static'
   option ipaddr '192.168.1.5'
   option netmask '255.255.255.0'

config interface 'wan'
   option ifname 'eth0.2'
   option proto 'dhcp'

config switch
   option name 'eth0'
   option reset '1'
   option enable_vlan '1'

config switch_vlan
   option device 'eth0'
   option vlan '1'
   option ports '0t 2 3 4 5'

config switch_vlan
   option device 'eth0'
   option vlan '2'
   option ports '0t 1'

config switch
   option name 'eth1'
   option reset '1'
   option enable_vlan '1'

config switch_vlan
   option device 'eth1'
   option vlan '1'
   option ports '0 1 2 3 4 5'



















*/etc/config/wireless:config wifi-device 'wifi0'option type
'qcawifi'option channel 'auto'option macaddr
'00:03:7f:42:06:61'option hwmode '11ng'option txpower
'19'option htmode 'HT20'config wifi-ifaceoption device
'wifi0'option network 'lan'option mode 'ap'option
encryption 'psk2'option ssid 'Test_ap_1'option key *
*'Test_ap_1'*

















*config wifi-device 'wifi1'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:62'option
hwmode '11na'option txpower '23'option htmode 'HT20'config
wifi-ifaceoption device 'wifi1'option network 'lan'
option mode 'ap'option ssid 'Test_ap_2'option encryption
'psk2'option key 'test_ap_2''*


*Thanks,*

On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:


can you connect via a wired port?

given that you've been changing /etc/config/network and
/etc/config/wireless, could you show us what you ended up with there?

David Lang


On Tue, 4 Aug 2015, John kerry wrote:

Hi,


I am using ar71xx OpenWrt. I have connected internet connection to WAN
port
and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
able to open GUI and even my mobile i connected to Wifi AP and able to
open
GUI in mobile. But I am not able to access internet on mobile which is
connected to wifi0 AP.

I have added below script under /etc/firewall.user file.
iptables ...flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
echo 1   /proc/sys/net/ipv4/ip_forward

#where br-lan = LAN
  eth0.2 = WAN

Could anyone help me to write the proper NAT rules so that able to access
the internet.

Thanks,

On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

Hello Guys,


It's working. Thanks a lot to all of you :)

On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

The way to do this is to first forget about the factory reset problem and

configure the AP to do what you want (including any encryption)

then you can take the resulting file and put it into the build system so
that it becomes the 'factory default' settings.

Since you are not understanding how to configure the files from the
documentation, configure them from the GUI and then look at the
resulting
files.

David Lang


On Mon, 3 Aug 2015, John kerry wrote:

Hi All,



I created separate files directory and added network and wireless files
and
its working everything but still i am not able to use encryption wpa2.
Below is the my script.
config wifi-device  wifi0
   option type qcawifi
   option channel  auto
   option macaddr  00:03:7f:42:06:61
   option hwmode   11ng
   # REMOVE THIS LINE TO ENABLE WIFI:
   option disabled 0

config wifi-iface
   option device   wifi0
   option network  lan
   option mode ap
   option ssid CD-1
   option encryption psk2
   option key  CD-1

M I doing anything wrong?

Thanks,

On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

to make the config be there after a factory reset, you need to 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi
This is my firewall file:

config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'lan'
option network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'wan'
option network 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'

config forwarding
option src 'lan'
option dest 'wan'

config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'

config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'

config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config include
option path '/etc/firewall.user'

config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'IPv4'
option reload '1'

On Tue, Aug 4, 2015 at 12:38 PM, Weedy weedy2...@gmail.com wrote:

 Is there something wrong with the default rules for your use case?

 Your WiFi interfaces are tagged LAN, things should just work.
 On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote:

 Hi,

 below is the /etc/config/network and /etc/config/wireless changes.

 */etc/config/network:*
 config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

 config interface 'lan'
 option ifname 'eth0.1 eth1'
 option type 'bridge'
 option proto 'static'
 option ipaddr '192.168.1.5'
 option netmask '255.255.255.0'

 config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

 config switch
 option name 'eth0'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth0'
 option vlan '1'
 option ports '0t 2 3 4 5'

 config switch_vlan
 option device 'eth0'
 option vlan '2'
 option ports '0t 1'

 config switch
 option name 'eth1'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth1'
 option vlan '1'
 option ports '0 1 2 3 4 5'



















 */etc/config/wireless:config wifi-device 'wifi0'option type
 'qcawifi'option channel 'auto'option macaddr
 '00:03:7f:42:06:61'option hwmode '11ng'option txpower
 '19'option htmode 'HT20'config wifi-ifaceoption device
 'wifi0'option network 'lan'option mode 'ap'option
 encryption 'psk2'option ssid 'Test_ap_1'option key *
 *'Test_ap_1'*

















 *config wifi-device 'wifi1'option type 'qcawifi'option
 channel 'auto'option macaddr '00:03:7f:42:06:62'option
 hwmode '11na'option txpower '23'option htmode 'HT20'config
 wifi-ifaceoption device 'wifi1'option network 'lan'
 option mode 'ap'option ssid 'Test_ap_2'option encryption
 'psk2'option key 'test_ap_2''*


 *Thanks,*

 On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:

 can 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

I am using ar71xx OpenWrt. I have connected internet connection to WAN port
and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
able to open GUI and even my mobile i connected to Wifi AP and able to open
GUI in mobile. But I am not able to access internet on mobile which is
connected to wifi0 AP.

I have added below script under /etc/firewall.user file.
iptables ...flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
echo 1   /proc/sys/net/ipv4/ip_forward

#where br-lan = LAN
   eth0.2 = WAN

Could anyone help me to write the proper NAT rules so that able to access
the internet.

Thanks,

On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

 Hello Guys,

 It's working. Thanks a lot to all of you :)

 On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,

 I created separate files directory and added network and wireless files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the
 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do
 factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com
 wrote:

 Hi Leiten,


 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com
 wrote:

 Hi,


 Don't answer to my e-mail only, you need to add openwrt-devel
 maillist
 to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:

 Hi Leiten,

 I have added new files under and written below :
 vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless


 Use index in prefix of filename to set order of execution, so it'll
 be
 like '99-wireless'.


 #!/bin/sh
 #
 # Copyright (c) 2013 The Linux Foundation. All rights reserved.
 # Copyright (C) 2011 OpenWrt.org
 #

 [ -e /etc/config/wireless ]  exit 0


 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so
 your
 script just exit at this point. Remove this line.


 touch /etc/config/wireless

 uci set wireless.@wifi-device[0].disabled=0;
 uci set system.@system[0].hostname=test_ap
 uci set wireless.@wifi-iface[0].mode=ap
 uci set wireless.@wifi-iface[0].ssid=CD-2.4D
 uci set wireless.@wifi-iface[0].encryption=none
 uci set wireless.@wifi-iface[0].wds=1
 uci set wireless.radio0.disabled=0

 uci commit wireless

 exit 0

 and compile the source code using make V=s but still not changed
 default
 settings.

 Please help me to make it works.

 Thanks,


 On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com
 wrote:

 You can also use uci-defaults mechanism for your purpose. Just put

 script in base-files/etc/uci-defaults and set your preferrable
 parameters with uci and don't forget to 'exit 0' at the end of
 script,
 in elsecase it'll be run every time at boot ruining changes.

 2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:

 Hi,

 I am working on Ar71xx openWRT Luci project. By default the Wi-Fi
 is
 disabled and SSID is OpenWrt. I need to change the default
 settings.
 Could anyone help me to change the default settings.


 Best Regards,
 John

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

below is the /etc/config/network and /etc/config/wireless changes.

*/etc/config/network:*
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config interface 'lan'
option ifname 'eth0.1 eth1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.5'
option netmask '255.255.255.0'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 2 3 4 5'

config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'

config switch
option name 'eth1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth1'
option vlan '1'
option ports '0 1 2 3 4 5'



















*/etc/config/wireless:config wifi-device 'wifi0'option type
'qcawifi'option channel 'auto'option macaddr
'00:03:7f:42:06:61'option hwmode '11ng'option txpower
'19'option htmode 'HT20'config wifi-ifaceoption device
'wifi0'option network 'lan'option mode 'ap'option
encryption 'psk2'option ssid 'Test_ap_1'option key *
*'Test_ap_1'*

















*config wifi-device 'wifi1'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:62'option
hwmode '11na'option txpower '23'option htmode 'HT20'config
wifi-ifaceoption device 'wifi1'option network 'lan'
option mode 'ap'option ssid 'Test_ap_2'option encryption
'psk2'option key 'test_ap_2''*


*Thanks,*

On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:

 can you connect via a wired port?

 given that you've been changing /etc/config/network and
 /etc/config/wireless, could you show us what you ended up with there?

 David Lang


 On Tue, 4 Aug 2015, John kerry wrote:

 Hi,

 I am using ar71xx OpenWrt. I have connected internet connection to WAN
 port
 and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
 able to open GUI and even my mobile i connected to Wifi AP and able to
 open
 GUI in mobile. But I am not able to access internet on mobile which is
 connected to wifi0 AP.

 I have added below script under /etc/firewall.user file.
 iptables ...flush
 iptables --table nat --flush
 iptables --delete-chain
 iptables --table nat --delete-chain
 iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
 iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
 iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
 echo 1   /proc/sys/net/ipv4/ip_forward

 #where br-lan = LAN
   eth0.2 = WAN

 Could anyone help me to write the proper NAT rules so that able to access
 the internet.

 Thanks,

 On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

 Hello Guys,

 It's working. Thanks a lot to all of you :)

 On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the
 resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,


 I created separate files directory and added network and wireless files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the

 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do
 factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com
 wrote:

 Hi Leiten,


 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

Its working, i am able to access internet but there is one problem,

When i scan the wireless devices, its gives the list of devices are there
nearby, then i connect anyone device, it will connect but my board wifi0
SSID name will change to that router which i connected. I mean LAN side
SSID should not change after connecting to WAN SSID.



On Tue, Aug 4, 2015 at 12:42 PM, John kerry kerry9...@gmail.com wrote:

 Hi
 This is my firewall file:

 config defaults
 option syn_flood '1'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'lan'
 option network 'lan'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'wan'
 option network 'wan'
 option input 'REJECT'
 option output 'ACCEPT'
 option forward 'REJECT'
 option masq '1'
 option mtu_fix '1'

 config forwarding
 option src 'lan'
 option dest 'wan'

 config rule
 option name 'Allow-DHCP-Renew'
 option src 'wan'
 option proto 'udp'
 option dest_port '68'
 option target 'ACCEPT'
 option family 'ipv4'

 config rule
 option name 'Allow-Ping'
 option src 'wan'
 option proto 'icmp'
 option icmp_type 'echo-request'
 option family 'ipv4'
 option target 'ACCEPT'

 config rule
 option name 'Allow-DHCPv6'
 option src 'wan'
 option proto 'udp'
 option src_ip 'fe80::/10'
 option src_port '547'
 option dest_ip 'fe80::/10'
 option dest_port '546'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Input'
 option src 'wan'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 list icmp_type 'router-solicitation'
 list icmp_type 'neighbour-solicitation'
 list icmp_type 'router-advertisement'
 list icmp_type 'neighbour-advertisement'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Forward'
 option src 'wan'
 option dest '*'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config include
 option path '/etc/firewall.user'

 config include 'miniupnpd'
 option type 'script'
 option path '/usr/share/miniupnpd/firewall.include'
 option family 'IPv4'
 option reload '1'

 On Tue, Aug 4, 2015 at 12:38 PM, Weedy weedy2...@gmail.com wrote:

 Is there something wrong with the default rules for your use case?

 Your WiFi interfaces are tagged LAN, things should just work.
 On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote:

 Hi,

 below is the /etc/config/network and /etc/config/wireless changes.

 */etc/config/network:*
 config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

 config interface 'lan'
 option ifname 'eth0.1 eth1'
 option type 'bridge'
 option proto 'static'
 option ipaddr '192.168.1.5'
 option netmask '255.255.255.0'

 config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

 config switch
 option name 'eth0'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth0'
 option vlan '1'
 option ports '0t 2 3 4 5'

 config switch_vlan
 option device 'eth0'
 option vlan '2'
 option ports '0t 1'

 config switch
 option name 'eth1'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth1'
 option vlan '1'
 option ports '0 1 2 3 4 5'



















 */etc/config/wireless:config wifi-device 'wifi0'option type
 'qcawifi'option channel 'auto'option macaddr
 '00:03:7f:42:06:61'option hwmode '11ng'option txpower
 '19'option htmode 'HT20'config wifi-ifaceoption device
 'wifi0'option network 'lan'option mode 'ap'option
 encryption 'psk2'option ssid 'Test_ap_1'option key *
 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread David Lang

can you connect via a wired port?

given that you've been changing /etc/config/network and /etc/config/wireless, 
could you show us what you ended up with there?


David Lang

On Tue, 4 Aug 2015, John kerry wrote:


Hi,

I am using ar71xx OpenWrt. I have connected internet connection to WAN port
and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
able to open GUI and even my mobile i connected to Wifi AP and able to open
GUI in mobile. But I am not able to access internet on mobile which is
connected to wifi0 AP.

I have added below script under /etc/firewall.user file.
iptables ...flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
echo 1   /proc/sys/net/ipv4/ip_forward

#where br-lan = LAN
  eth0.2 = WAN

Could anyone help me to write the proper NAT rules so that able to access
the internet.

Thanks,

On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:


Hello Guys,

It's working. Thanks a lot to all of you :)

On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:


The way to do this is to first forget about the factory reset problem and
configure the AP to do what you want (including any encryption)

then you can take the resulting file and put it into the build system so
that it becomes the 'factory default' settings.

Since you are not understanding how to configure the files from the
documentation, configure them from the GUI and then look at the resulting
files.

David Lang


On Mon, 3 Aug 2015, John kerry wrote:

Hi All,


I created separate files directory and added network and wireless files
and
its working everything but still i am not able to use encryption wpa2.
Below is the my script.
config wifi-device  wifi0
   option type qcawifi
   option channel  auto
   option macaddr  00:03:7f:42:06:61
   option hwmode   11ng
   # REMOVE THIS LINE TO ENABLE WIFI:
   option disabled 0

config wifi-iface
   option device   wifi0
   option network  lan
   option mode ap
   option ssid CD-1
   option encryption psk2
   option key  CD-1

M I doing anything wrong?

Thanks,

On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

to make the config be there after a factory reset, you need to put the

changes into the image that you build.

you already did this for /etc/config/network, do the same thing for
/etc/config/wireless

David Lang


On Sun, 2 Aug 2015, John kerry wrote:

Hi Leiten,



I have one issue, after upgrading this firmware it will load wireless
configuration with this changes, actually it should load when i do
factory
reset.

Thanks,

On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com
wrote:

Hi Leiten,



Thank you so much, Its working :)

On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com
wrote:

Hi,



Don't answer to my e-mail only, you need to add openwrt-devel
maillist
to
CC or just answer to CC, in each case I'll receive message but also
everyone could see all discussion.

In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
wrote:

Hi Leiten,


I have added new files under and written below :
vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless



Use index in prefix of filename to set order of execution, so it'll
be
like '99-wireless'.


#!/bin/sh

#
# Copyright (c) 2013 The Linux Foundation. All rights reserved.
# Copyright (C) 2011 OpenWrt.org
#

[ -e /etc/config/wireless ]  exit 0



Here is the problem. When uci-defaults invoke scripts there's already
preconfiguration done and /etc/config/wireless already exists, so
your
script just exit at this point. Remove this line.


touch /etc/config/wireless


uci set wireless.@wifi-device[0].disabled=0;
uci set system.@system[0].hostname=test_ap
uci set wireless.@wifi-iface[0].mode=ap
uci set wireless.@wifi-iface[0].ssid=CD-2.4D
uci set wireless.@wifi-iface[0].encryption=none
uci set wireless.@wifi-iface[0].wds=1
uci set wireless.radio0.disabled=0

uci commit wireless

exit 0

and compile the source code using make V=s but still not changed
default
settings.

Please help me to make it works.

Thanks,


On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com
wrote:

You can also use uci-defaults mechanism for your purpose. Just put


script in base-files/etc/uci-defaults and set your preferrable
parameters with uci and don't forget to 'exit 0' at the end of
script,
in elsecase it'll be run every time at boot ruining changes.

2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:

Hi,


I am working on Ar71xx openWRT Luci project. By default the Wi-Fi
is
disabled and SSID is OpenWrt. I need to change the default
settings.
Could anyone help me to change the default settings.


Best Regards,
John


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread Weedy
Is there something wrong with the default rules for your use case?

Your WiFi interfaces are tagged LAN, things should just work.
On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote:

 Hi,

 below is the /etc/config/network and /etc/config/wireless changes.

 */etc/config/network:*
 config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

 config interface 'lan'
 option ifname 'eth0.1 eth1'
 option type 'bridge'
 option proto 'static'
 option ipaddr '192.168.1.5'
 option netmask '255.255.255.0'

 config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

 config switch
 option name 'eth0'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth0'
 option vlan '1'
 option ports '0t 2 3 4 5'

 config switch_vlan
 option device 'eth0'
 option vlan '2'
 option ports '0t 1'

 config switch
 option name 'eth1'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth1'
 option vlan '1'
 option ports '0 1 2 3 4 5'



















 */etc/config/wireless:config wifi-device 'wifi0'option type
 'qcawifi'option channel 'auto'option macaddr
 '00:03:7f:42:06:61'option hwmode '11ng'option txpower
 '19'option htmode 'HT20'config wifi-ifaceoption device
 'wifi0'option network 'lan'option mode 'ap'option
 encryption 'psk2'option ssid 'Test_ap_1'option key *
 *'Test_ap_1'*

















 *config wifi-device 'wifi1'option type 'qcawifi'option
 channel 'auto'option macaddr '00:03:7f:42:06:62'option
 hwmode '11na'option txpower '23'option htmode 'HT20'config
 wifi-ifaceoption device 'wifi1'option network 'lan'
 option mode 'ap'option ssid 'Test_ap_2'option encryption
 'psk2'option key 'test_ap_2''*


 *Thanks,*

 On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:

 can you connect via a wired port?

 given that you've been changing /etc/config/network and
 /etc/config/wireless, could you show us what you ended up with there?

 David Lang


 On Tue, 4 Aug 2015, John kerry wrote:

 Hi,

 I am using ar71xx OpenWrt. I have connected internet connection to WAN
 port
 and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
 able to open GUI and even my mobile i connected to Wifi AP and able to
 open
 GUI in mobile. But I am not able to access internet on mobile which is
 connected to wifi0 AP.

 I have added below script under /etc/firewall.user file.
 iptables ...flush
 iptables --table nat --flush
 iptables --delete-chain
 iptables --table nat --delete-chain
 iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
 iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
 iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
 echo 1   /proc/sys/net/ipv4/ip_forward

 #where br-lan = LAN
   eth0.2 = WAN

 Could anyone help me to write the proper NAT rules so that able to access
 the internet.

 Thanks,

 On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

 Hello Guys,

 It's working. Thanks a lot to all of you :)

 On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem
 and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system
 so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the
 resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,


 I created separate files directory and added network and wireless
 files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the

 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one 

Re: [OpenWrt-Devel] Raspberry Pi 2 buildbot (brcm2708/bcm2709)

2015-08-03 Thread Álvaro Fernández Rojas

Bump,

As I requested some months ago, is it possible to add a Raspberry Pi 2 
buildbot? (brcm2708/bcm2709)
I've sent another email to Travis like a month ago and got no answer, 
and from the first email it's been over 5 months...


Regards,
Álvaro.

El 29/04/2015 a las 22:22, Álvaro Fernández Rojas escribió:

Hello guys,

It's been over 3 months since Raspberry PI 2 (brcm2708/bcm2709) target was 
added.
I requested Travis a buildbot over a month ago but my email wasn't responded.
So, can we have a buildbot please :D?

Regards,
Álvaro.

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


Re: [OpenWrt-Devel] [PATCH v3 2/3] mcs814x: fix interrupts

2015-08-03 Thread Guenther Kelleter
Please ignore this patch.
I have another (better? bigger!) patch which switches to generic chip interrupt 
domains. Finally.

Günther

 -Original Message-
 From: Günther Kelleter [mailto:guenther.kelle...@devolo.de]
 Sent: Friday, July 31, 2015 5:03 PM
 To: openwrt-devel@lists.openwrt.org
 Cc: Guenther Kelleter
 Subject: [PATCH v3 2/3] mcs814x: fix interrupts
 
 create explicit 1:1 mapping before mcs814x_alloc_gc/irq_setup_generic_chip
 marks all interrupts used and prevents mapping by dts init.
 IRQ 0 is the timer interrupt and is not illegal!
 
 Was broken since kernel 3.14.
 
 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c |  6 +-
  target/linux/mcs814x/patches-3.18/015-timer-irq.patch   | 11 +++
  2 files changed, 16 insertions(+), 1 deletion(-)
  create mode 100644 target/linux/mcs814x/patches-3.18/015-timer-irq.patch
 
 diff --git a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
 b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
 index f84c412..fd4345f 100644
 --- a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
 +++ b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
 @@ -71,6 +71,7 @@ static const struct of_device_id mcs814x_intc_ids[] = {
  void __init mcs814x_of_irq_init(void)
  {
   struct device_node *np;
 + struct irq_domain *domain;
 
   np = of_find_matching_node(NULL, mcs814x_intc_ids);
   if (!np)
 @@ -80,7 +81,10 @@ void __init mcs814x_of_irq_init(void)
   if (!mcs814x_intc_base)
   panic(unable to map intc cpu registers\n);
 
 - irq_domain_add_simple(np, 32, 0, irq_generic_chip_ops, NULL);
 + domain = irq_domain_add_simple(np, 32, 0, irq_domain_simple_ops, NULL);
 + if (!domain)
 + panic(unable to add irq domain\n);
 + irq_create_strict_mappings(domain, 0, 0, 32);
 
   of_node_put(np);
 
 diff --git a/target/linux/mcs814x/patches-3.18/015-timer-irq.patch
 b/target/linux/mcs814x/patches-3.18/015-timer-irq.patch
 new file mode 100644
 index 000..9bbb094
 --- /dev/null
 +++ b/target/linux/mcs814x/patches-3.18/015-timer-irq.patch
 @@ -0,0 +1,11 @@
 +--- a/kernel/irq/irqdesc.c
  b/kernel/irq/irqdesc.c
 +@@ -381,7 +381,7 @@ int __handle_domain_irq(struct irq_domai
 +  * Some hardware gives randomly wrong interrupts.  Rather
 +  * than crashing, do something sensible.
 +  */
 +-if (unlikely(!irq || irq = nr_irqs)) {
 ++if (unlikely(irq = nr_irqs)) {
 + ack_bad_irq(irq);
 + ret = -EINVAL;
 + } else {
 --
 2.4.6.89.g851dcf4

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


[OpenWrt-Devel] [PATCH v4 1/3] mcs814x: fix debug UART

2015-08-03 Thread Günther Kelleter
Switch to new 8250 debug uart code because the old
mach-mcs814x/include/mach/debug-macro.S tries to include
asm/hardware/debug-8250.S which no longer exists since kernel 3.14

Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 target/linux/mcs814x/config-3.18   | 10 --
 .../linux/mcs814x/patches-3.18/014-debuguart.patch | 41 ++
 2 files changed, 48 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/mcs814x/patches-3.18/014-debuguart.patch

diff --git a/target/linux/mcs814x/config-3.18 b/target/linux/mcs814x/config-3.18
index 87a8382..e57f5ff 100644
--- a/target/linux/mcs814x/config-3.18
+++ b/target/linux/mcs814x/config-3.18
@@ -49,10 +49,15 @@ CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_INCLUDE=mach/debug-macro.S
+CONFIG_DEBUG_LL_INCLUDE=debug/8250.S
 CONFIG_DEBUG_LL_UART_NONE=y
-# CONFIG_DEBUG_UART_8250 is not set
+CONFIG_DEBUG_UART_8250=y
+# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
+CONFIG_DEBUG_UART_8250_SHIFT=2
+# CONFIG_DEBUG_UART_8250_WORD is not set
+CONFIG_DEBUG_UART_PHYS=0x400dc000
 # CONFIG_DEBUG_UART_PL01X is not set
+CONFIG_DEBUG_UART_VIRT=0xf00dc000
 # CONFIG_DEBUG_USER is not set
 CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
@@ -157,7 +162,6 @@ CONFIG_MTD_PHYSMAP=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
-CONFIG_NEED_MACH_MEMORY_H=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_KEY=y
 # CONFIG_NET_VENDOR_BROADCOM is not set
diff --git a/target/linux/mcs814x/patches-3.18/014-debuguart.patch 
b/target/linux/mcs814x/patches-3.18/014-debuguart.patch
new file mode 100644
index 000..5f1b67f
--- /dev/null
+++ b/target/linux/mcs814x/patches-3.18/014-debuguart.patch
@@ -0,0 +1,41 @@
+--- a/arch/arm/mach-mcs814x/include/mach/debug-macro.S
 /dev/null
+@@ -1,11 +0,0 @@
+-#include mach/mcs814x.h
+-
+-.macro  addruart, rp, rv, tmp
+-  ldr \rp, =MCS814X_PHYS_BASE
+-  ldr \rv, =MCS814X_VIRT_BASE
+-  orr \rp, \rp, #MCS814X_UART
+-  orr \rv, \rv, #MCS814X_UART
+-.endm
+-
+-#define UART_SHIFT2
+-#include asm/hardware/debug-8250.S
+--- a/arch/arm/Kconfig.debug
 b/arch/arm/Kconfig.debug
+@@ -1089,7 +1089,7 @@ config DEBUG_UART_8250
+   (FOOTBRIDGE  !DEBUG_DC21285_PORT) || \
+   ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
+   ARCH_IOP33X || ARCH_IXP4XX || \
+-  ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC
++  ARCH_LPC32XX || ARCH_MCS814X || ARCH_MV78XX0 || ARCH_ORION5X || 
ARCH_RPC
+ 
+ # Compatibility options for BCM63xx
+ config DEBUG_UART_BCM63XX
+@@ -1124,6 +1124,7 @@ config DEBUG_UART_PHYS
+   default 0x3e00 if DEBUG_BCM_KONA_UART
+   default 0x4000e400 if DEBUG_LL_UART_EFM32
+   default 0x4009 if ARCH_LPC32XX
++  default 0x400dc000 if ARCH_MCS814X
+   default 0x4010 if DEBUG_PXA_UART1
+   default 0x4200 if ARCH_GEMINI
+   default 0x5000 if DEBUG_S3C24XX_UART  (DEBUG_S3C_UART0 || \
+@@ -1178,6 +1179,7 @@ config DEBUG_UART_VIRT
+   default 0xe0010fe0 if ARCH_RPC
+   default 0xe100 if DEBUG_MSM_UART
+   default 0xfbe0 if ARCH_EBSA110
++  default 0xf00dc000 if ARCH_MCS814X
+   default 0xf01fb000 if DEBUG_NOMADIK_UART
+   default 0xf0201000 if DEBUG_BCM2835
+   default 0xf1000300 if DEBUG_BCM_5301X
-- 
2.4.6.89.g851dcf4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 0/3] fix mcs814x dLAN USB Extender

2015-08-03 Thread Günther Kelleter
Patches fix interrupt init, timer irq and debug UART for mcs814x.
dLAN USB Extender kernel got too big to fit in 1MB so I changed dts
partition layout and image builder to make use of automatic
partition splitting.

Please apply to trunk and CC/15.05!

changes since v3:
change commit messages
I'm sorry but I cannot find another solution to fix interrupt handling.
Interrupt handling switched to domain generic chip interrupts. Removed
generic kernel irq patch.


Günther Kelleter (3):
  mcs814x: fix debug UART
  mcs814x: fix interrupt handling
  mcs814x: use firmware partition splitter on dLAN USB Extender

 target/linux/mcs814x/config-3.18   | 14 ++--
 .../arch/arm/boot/dts/dlan-usb-extender.dts|  8 -
 .../mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c | 21 ++-
 .../files-3.18/arch/arm/mach-mcs814x/timer.c   | 28 +++
 target/linux/mcs814x/image/Makefile|  2 +-
 .../linux/mcs814x/patches-3.18/014-debuguart.patch | 41 ++
 6 files changed, 80 insertions(+), 34 deletions(-)
 create mode 100644 target/linux/mcs814x/patches-3.18/014-debuguart.patch

-- 
2.4.6.89.g851dcf4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 2/3] mcs814x: fix interrupt handling

2015-08-03 Thread Günther Kelleter
Switch to generich chip irqs/irq domains.
Interrupts were broken since kernel 3.14. dLAN USB extender is now
booting again.

Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 .../mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c | 21 +---
 .../files-3.18/arch/arm/mach-mcs814x/timer.c   | 28 +++---
 2 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c 
b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
index f84c412..d1cab68 100644
--- a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
+++ b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c
@@ -17,6 +17,7 @@
 #include mach/mcs814x.h
 
 static void __iomem *mcs814x_intc_base;
+static struct irq_domain *domain;
 
 static void __init mcs814x_alloc_gc(void __iomem *base, unsigned int irq_start,
unsigned int num)
@@ -24,11 +25,15 @@ static void __init mcs814x_alloc_gc(void __iomem *base, 
unsigned int irq_start,
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
 
-   gc = irq_alloc_generic_chip(mcs814x-intc, 1,
-   irq_start, base, handle_level_irq);
+   if (irq_alloc_domain_generic_chips(domain, num, 1, mcs814x-intc, 
handle_level_irq,
+IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST, 0))
+   panic(unable to allocate domain generic irq chip);
+
+   gc = irq_get_domain_generic_chip(domain, irq_start);
if (!gc)
-   panic(unable to allocate generic irq chip);
+   panic(unable to get generic irq chip);
 
+   gc-reg_base = base;
ct = gc-chip_types;
ct-chip.irq_ack = irq_gc_unmask_enable_reg;
ct-chip.irq_mask = irq_gc_mask_clr_bit;
@@ -36,9 +41,6 @@ static void __init mcs814x_alloc_gc(void __iomem *base, 
unsigned int irq_start,
ct-regs.mask = MCS814X_IRQ_MASK;
ct-regs.enable = MCS814X_IRQ_ICR;
 
-   irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
-   IRQ_NOREQUEST, 0);
-
/* Clear all interrupts */
writel_relaxed(0x, base + MCS814X_IRQ_ICR);
 }
@@ -58,7 +60,7 @@ asmlinkage void __exception_irq_entry 
mcs814x_handle_irq(struct pt_regs *regs)
/* clear the interrupt */
__raw_writel(status, mcs814x_intc_base + MCS814X_IRQ_STS0);
/* call the generic handler */
-   handle_IRQ(irq, regs);
+   handle_domain_irq(domain, irq, regs);
 
} while (1);
 }
@@ -80,7 +82,10 @@ void __init mcs814x_of_irq_init(void)
if (!mcs814x_intc_base)
panic(unable to map intc cpu registers\n);
 
-   irq_domain_add_simple(np, 32, 0, irq_generic_chip_ops, NULL);
+   domain = irq_domain_add_linear(np, 32, irq_generic_chip_ops, NULL);
+   if (!domain)
+   panic(unable to add irq domain\n);
+   irq_set_default_host(domain);
 
of_node_put(np);
 
diff --git a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/timer.c 
b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/timer.c
index ff9d44a..31d0ba6 100644
--- a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/timer.c
+++ b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/timer.c
@@ -15,6 +15,7 @@
 #include linux/io.h
 #include linux/of.h
 #include linux/of_address.h
+#include linux/of_irq.h
 
 #include asm/mach/time.h
 #include mach/mcs814x.h
@@ -71,21 +72,15 @@ static irqreturn_t mcs814x_timer_interrupt(int irq, void 
*dev_id)
return IRQ_HANDLED;
 }
 
-static struct irqaction mcs814x_timer_irq = {
-   .name   = mcs814x-timer,
-   .flags  = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-   .handler= mcs814x_timer_interrupt,
-};
-
 static struct of_device_id mcs814x_timer_ids[] = {
{ .compatible = moschip,mcs814x-timer },
{ /* sentinel */ },
 };
 
-static void __init mcs814x_of_timer_init(void)
+static int __init mcs814x_of_timer_init(void)
 {
struct device_node *np;
-   const unsigned int *intspec;
+   int irq;
 
np = of_find_matching_node(NULL, mcs814x_timer_ids);
if (!np)
@@ -95,16 +90,17 @@ static void __init mcs814x_of_timer_init(void)
if (!mcs814x_timer_base)
panic(unable to remap timer cpu registers);
 
-   intspec = of_get_property(np, interrupts, NULL);
-   if (!intspec)
-   panic(no interrupts property for timer);
+   irq = irq_of_parse_and_map(np, 0);
+   if (!irq)
+   panic(no interrupts property/mapping failed for timer);
 
-   mcs814x_timer_irq.irq = be32_to_cpup(intspec);
+   return irq;
 }
 
 void __init mcs814x_timer_init(void)
 {
struct clk *clk;
+   int irq;
 
arch_gettimeoffset = mcs814x_gettimeoffset;
 
@@ -114,7 +110,7 @@ void __init mcs814x_timer_init(void)
 
clock_rate = clk_get_rate(clk);
 
-   

[OpenWrt-Devel] [PATCH v4 3/3] mcs814x: use firmware partition splitter on dLAN USB Extender

2015-08-03 Thread Günther Kelleter
to avoid editing the dts every time the kernel size changes.
uImage is now bigger than 1MB. Pad uImage to 64k erase block size.

Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 target/linux/mcs814x/config-3.18  | 4 
 .../mcs814x/files-3.18/arch/arm/boot/dts/dlan-usb-extender.dts| 8 
 target/linux/mcs814x/image/Makefile   | 2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/target/linux/mcs814x/config-3.18 b/target/linux/mcs814x/config-3.18
index e57f5ff..427a7c9 100644
--- a/target/linux/mcs814x/config-3.18
+++ b/target/linux/mcs814x/config-3.18
@@ -159,6 +159,10 @@ CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MTD_IMPA7 is not set
 CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_ROOTFS_SPLIT is not set
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIRMWARE_NAME=linux
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
diff --git 
a/target/linux/mcs814x/files-3.18/arch/arm/boot/dts/dlan-usb-extender.dts 
b/target/linux/mcs814x/files-3.18/arch/arm/boot/dts/dlan-usb-extender.dts
index 0c85b94..59830e8 100644
--- a/target/linux/mcs814x/files-3.18/arch/arm/boot/dts/dlan-usb-extender.dts
+++ b/target/linux/mcs814x/files-3.18/arch/arm/boot/dts/dlan-usb-extender.dts
@@ -48,14 +48,6 @@
reg = 0x4 0x1;
};
partition@5 {
-   label = kernel;
-   reg = 0x5 0x10;
-   };
-   partition@15 {
-   label = rootfs;
-   reg = 0x15 0x3C;
-   };
-   partition@50001 {
label = linux;
reg = 0x5 0x4C;
};
diff --git a/target/linux/mcs814x/image/Makefile 
b/target/linux/mcs814x/image/Makefile
index 4c8af97..74f8ad4 100644
--- a/target/linux/mcs814x/image/Makefile
+++ b/target/linux/mcs814x/image/Makefile
@@ -30,7 +30,7 @@ define Image/Build/DTB
 endef
 
 define Image/Build/Profile/dLAN_USB_Extender
-   dd if=$(KDIR)/uImage-dlan-usb-extender bs=1M conv=sync 
of=$(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade-$(1).bin
+   dd if=$(KDIR)/uImage-dlan-usb-extender bs=64k conv=sync 
of=$(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade-$(1).bin
cat $(KDIR)/root.$(1)  
$(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade-$(1).bin
cp $(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade-$(1).bin $(BIN_DIR)/
 endef
-- 
2.4.6.89.g851dcf4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands (from Silicon Labs)

2015-08-03 Thread Felix Fietkau
On 2015-08-03 20:17, Ted Hess wrote:
 It would probably make sense to do it that way however, there are apps which 
 already use the ioctl interface on this device and this 
 code came directly from the the manufacturer's linux driver.
 
 I'm not sure how to add general GPIO support for a specific USB device? 
 Things to research...
Did the manufacturer submit this upstream already, or is somebody else
(maybe you) going to do so?

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


Re: [OpenWrt-Devel] [PATCH v2] lantiq: get more status information from xDSL

2015-08-03 Thread Andre Heider
Hi,

On Fri, Jul 31, 2015 at 11:01 AM, feckert eckert.flor...@googlemail.com wrote:
 +   echo dsl.latency_num_down=$sidu
 +   echo dsl.latency_num_up=$sidd

this hunk breaks the luci status/overview page, see `logread` for a
syntax error message. Both values need to be -quoted, they're
whitespace seperated strings (x ms).

  status() {
 +   echo 
 -

lucistat() calls status(), so these lines are now part of the
generated lua code ran by luci. Doesn't seem to break anything, but
seems unindented?

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


[OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands (from Silicon Labs)

2015-08-03 Thread Ted Hess
Silicon Labs driver has ioctl support on devices which have GPIO pins. The 
driver

in the kernel repo does not have this feature.

Ref: 
http://www.silabs.com/Support%20Documents/Software/Linux_CP210x_VCP_3.x.x_Release_Notes.txt


Signed-off-by: Ted Hess th...@kitschensync.net
---
.../patches-3.18/824-cp210x_add_gpio_ioctl.patch   | 194 +
.../patches-4.1/824-cp210x_add_gpio_ioctl.patch| 194 +
2 files changed, 388 insertions(+)
create mode 100644 
target/linux/generic/patches-3.18/824-cp210x_add_gpio_ioctl.patch
create mode 100644 
target/linux/generic/patches-4.1/824-cp210x_add_gpio_ioctl.patch


diff --git a/target/linux/generic/patches-3.18/824-cp210x_add_gpio_ioctl.patch 
b/target/linux/generic/patches-3.18/824-cp210x_add_gpio_ioctl.patch

new file mode 100644
index 000..695647a
--- /dev/null
+++ b/target/linux/generic/patches-3.18/824-cp210x_add_gpio_ioctl.patch
@@ -0,0 +1,194 @@
+--- a/drivers/usb/serial/cp210x.c
 b/drivers/usb/serial/cp210x.c
+@@ -24,13 +24,15 @@
+ #include linux/uaccess.h
+ #include linux/usb/serial.h
+
+-#define DRIVER_DESC Silicon Labs CP210x RS232 serial adaptor driver
++#define DRIVER_DESC Silicon Labs CP210x RS232 serial adaptor driver (with 
GPIO support)

+
+ /*
+  * Function Prototypes
+  */
+ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
+ static void cp210x_close(struct usb_serial_port *);
++static int cp210x_ioctl(struct tty_struct *tty,
++unsigned int cmd, unsigned long arg);
+ static void cp210x_get_termios(struct tty_struct *, struct usb_serial_port *);
+ static void cp210x_get_termios_port(struct usb_serial_port *port,
+ unsigned int *cflagp, unsigned int *baudp);
+@@ -185,6 +187,7 @@
+
+ struct cp210x_serial_private {
+ __u8bInterfaceNumber;
++__u8bPartNumber;
+ };
+
+ static struct usb_serial_driver cp210x_device = {
+@@ -198,6 +201,7 @@
+ .bulk_out_size= 256,
+ .open= cp210x_open,
+ .close= cp210x_close,
++.ioctl= cp210x_ioctl,
+ .break_ctl= cp210x_break_ctl,
+ .set_termios= cp210x_set_termios,
+ .tiocmget= cp210x_tiocmget,
+@@ -211,6 +215,17 @@
+ cp210x_device, NULL
+ };
+
++/* Part number definitions */
++#define CP2101_PARTNUM0x01
++#define CP2102_PARTNUM0x02
++#define CP2103_PARTNUM0x03
++#define CP2104_PARTNUM0x04
++#define CP2105_PARTNUM0x05
++
++/* IOCTLs */
++#define IOCTL_GPIOGET0x8000
++#define IOCTL_GPIOSET0x8001
++
+ /* Config request types */
+ #define REQTYPE_HOST_TO_INTERFACE0x41
+ #define REQTYPE_INTERFACE_TO_HOST0xc1
+@@ -244,11 +259,17 @@
+ #define CP210X_SET_CHARS0x19
+ #define CP210X_GET_BAUDRATE0x1D
+ #define CP210X_SET_BAUDRATE0x1E
++#define CP210X_VENDOR_SPECIFIC0xFF
+
+ /* CP210X_IFC_ENABLE */
+ #define UART_ENABLE0x0001
+ #define UART_DISABLE0x
+
++/* CP210X_VENDOR_SPECIFIC */
++#define CP210X_WRITE_LATCH0x37E1
++#define CP210X_READ_LATCH0x00C2
++#define CP210X_GET_PARTNUM0x370B
++
+ /* CP210X_(SET|GET)_BAUDDIV */
+ #define BAUD_RATE_GEN_FREQ0x384000
+
+@@ -469,6 +490,96 @@
+ cp210x_set_config_single(port, CP210X_IFC_ENABLE, UART_DISABLE);
+ }
+
++static int cp210x_ioctl(struct tty_struct *tty,
++unsigned int cmd, unsigned long arg)
++{
++struct usb_serial_port *port = tty-driver_data;
++struct usb_serial *serial = port-serial;
++struct cp210x_serial_private *port_priv = usb_get_serial_data(serial);
++int result = 0;
++unsigned int latch_setting = 0;
++
++switch (cmd) {
++
++case IOCTL_GPIOGET:
++if ((port_priv-bPartNumber == CP2103_PARTNUM) ||
++(port_priv-bPartNumber == CP2104_PARTNUM)) {
++result = usb_control_msg(port-serial-dev,
++usb_rcvctrlpipe(port-serial-dev, 0),
++CP210X_VENDOR_SPECIFIC,
++REQTYPE_DEVICE_TO_HOST,
++CP210X_READ_LATCH,
++port_priv-bInterfaceNumber,
++latch_setting, 1,
++USB_CTRL_GET_TIMEOUT);
++if (result != 1)
++return -EPROTO;
++*(unsigned long *)arg = (unsigned long)latch_setting;
++return 0;
++} else if (port_priv-bPartNumber == CP2105_PARTNUM) {
++result = usb_control_msg(port-serial-dev,
++usb_rcvctrlpipe(port-serial-dev, 0),
++CP210X_VENDOR_SPECIFIC,
++REQTYPE_INTERFACE_TO_HOST,
++CP210X_READ_LATCH,
++port_priv-bInterfaceNumber,
++latch_setting, 1,
++USB_CTRL_GET_TIMEOUT);
++if (result != 1)
++return -EPROTO;
++*(unsigned long *)arg = (unsigned long)latch_setting;
++return 0;
++} else {
++return 

Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands (from Silicon Labs)

2015-08-03 Thread Ted Hess
It would probably make sense to do it that way however, there are apps which already use the ioctl interface on this device and this 
code came directly from the the manufacturer's linux driver.


I'm not sure how to add general GPIO support for a specific USB device? Things 
to research...

(I think I may have to re-submit this without the gratuitous word-wrapping too)

/ted

-Original Message- 
From: Felix Fietkau

Sent: Monday, August 03, 2015 2:08 PM
To: Ted Hess ; OpenWrt developers
Subject: Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands 
(from Silicon Labs)

On 2015-08-03 19:55, Ted Hess wrote:

Silicon Labs driver has ioctl support on devices which have GPIO pins. The
driver
in the kernel repo does not have this feature.

Ref:
http://www.silabs.com/Support%20Documents/Software/Linux_CP210x_VCP_3.x.x_Release_Notes.txt

Signed-off-by: Ted Hess th...@kitschensync.net

Wouldn't it make more sense to expose this as a GPIO controller instead
of a driver specific ioctl interface?

- Felix 
___

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


Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info

2015-08-03 Thread Andre Heider
Hi all,

On Fri, Jul 24, 2015 at 12:03 AM, Alexander Couzens lyn...@fe80.eu wrote:
 I've seen the same. With annex b device, same firmware, the modem syncs to 
 adsl, with annex a not.

meanwhile, I got an annex b device, and with the same openwrt build,
dsl firmware and config (sysupgrade backup) it just works with my
adsl2+ line.

I'll look for hardware differences next week, but I get the feeling
I'm not going to find anything.

PS: by poking around I found
target/linux/lantiq/patches-3.18/0007-MIPS-lantiq-add-basic-tffs-driver.patch
which looks like it reads the annex version off a mtd part I don't
have. Any idea what that is about?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands (from Silicon Labs)

2015-08-03 Thread Felix Fietkau
On 2015-08-03 19:55, Ted Hess wrote:
 Silicon Labs driver has ioctl support on devices which have GPIO pins. The 
 driver
 in the kernel repo does not have this feature.
 
 Ref: 
 http://www.silabs.com/Support%20Documents/Software/Linux_CP210x_VCP_3.x.x_Release_Notes.txt
 
 Signed-off-by: Ted Hess th...@kitschensync.net
Wouldn't it make more sense to expose this as a GPIO controller instead
of a driver specific ioctl interface?

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


Re: [OpenWrt-Devel] [PATCH] Restore AP scan patch

2015-08-03 Thread openwrt-de...@couprie.net

Hi Dimitry,

Does this patch, fix the problem that when a router is a wifi access 
client and access point.
The local access point does not work when de wifi access client is not 
connected ?


Greeting from Amsterdam,

Perry

On 31-07-15 11:01, Dmitry Ivanov wrote:

Restore AP scan patch.

Signed-off-by: Dmitry Ivanovd...@ubnt.com
---
  package/kernel/mac80211/patches/210-ap_scan.patch | 11 +++
  1 file changed, 11 insertions(+)
  create mode 100644 package/kernel/mac80211/patches/210-ap_scan.patch

diff --git a/package/kernel/mac80211/patches/210-ap_scan.patch 
b/package/kernel/mac80211/patches/210-ap_scan.patch
new file mode 100644
index 000..29f05c4
--- /dev/null
+++ b/package/kernel/mac80211/patches/210-ap_scan.patch
@@ -0,0 +1,11 @@
+--- a/net/mac80211/cfg.c
 b/net/mac80211/cfg.c
+@@ -2008,7 +2008,7 @@ static int ieee80211_scan(struct wiphy *
+* the  frames sent while scanning on other channel will be
+* lost)
+*/
+-  if (sdata-u.ap.beacon 
++  if (0  sdata-u.ap.beacon 
+   (!(wiphy-features  NL80211_FEATURE_AP_SCAN) ||
+!(req-flags  NL80211_SCAN_FLAG_AP)))
+   return -EOPNOTSUPP;

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


Re: [OpenWrt-Devel] [PATCHv2 5/7] mac80211/linux-firmware: include firmware for brcmfmac-sdio

2015-08-03 Thread Hauke Mehrtens
On 07/30/2015 06:34 PM, Rafał Miłecki wrote:
 On 30 July 2015 at 10:52, Daniel Golle dan...@makrotopia.org wrote:
 @@ -2000,6 +2000,50 @@ endef

  define KernelPackage/brcmfmac/install
 $(INSTALL_DIR) $(1)/lib/firmware/brcm
 +ifneq ($(CONFIG_BRCMFMAC_SDIO),)
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b0-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b4-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b5-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43340-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4339-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43430-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43435-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4354-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +endef
 
 Looks much better, thanks.
 
 Two things:
 1) Do we want to include firmware for all brcmfmac supported devices?
 I guess some of them are e.g. smartphones and I'm not sure if anyone
 wants to run OpenWrt on them. Or should we split it into more options
 maybe?

I think we should only add the firmware files we found on devices
running OpenWrt, each firmware is 216 to 580 KBytes.

You could do it similar to the iwlwifi firmware and only select the
firmware files by default which are found in routers and if some special
firmware could be needed from some target only select it by default for
that target.

 2) If we want all firmware files then for SDIO devices we could try
 something clever like: $(PKG_BUILD_DIR)/brcm/brcmfmac*-sdio.bin maybe?
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info

2015-08-03 Thread Alexander Couzens
I've took a look on 2 devices.
They differ a lot, there might be different revisions.
I'll take some photos tomorrow.

 PS: by poking around I found
 target/linux/lantiq/patches-3.18/0007-MIPS-lantiq-add-basic-tffs-driver.patch
 which looks like it reads the annex version off a mtd part I don't
 have. Any idea what that is about?
good question... no idea


-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@jabber.ccc.de
mobile: +4915123277221


pgp6Z4oFAceW1.pgp
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands (from Silicon Labs)

2015-08-03 Thread Ted Hess

After a bit more research - This is what I know:

The upstream cp210x driver is not completely up-to-date with the driver silabs 
maintains on
their site. In their own words: ... unfortunately GPIO is not something that 
has been
committed to the Linux kernel yet for community maintenance. We leave the 
drivers on our
website, even though they are a bit behind the curve of the maintained kernels, 
to
demonstrate how to do this quickly using an ioctl() call.

I also noted that the patch I submitted is not up-to-date with their latest 
devices which are
supported in their driver - whoops.

I could try to submit this upstream even if it was snatched from their driver. 
Is this OK?

There is a small relay controller package (crelay) that I am going to submit to 
the packages
repo it this patch gets accepted. It uses the cp210x ioctl interface.

I will also submit this patch again here with the correct format and all the 
latest fixes from
the old Silicon Labs driver.

/ted

-Original Message- 
From: Felix Fietkau

Sent: Monday, August 03, 2015 2:33 PM
To: Ted Hess ; OpenWrt developers
Subject: Re: [OpenWrt-Devel] [PATCH] [kernel] cp201x: Add GPIO ioctl commands 
(from Silicon Labs)

On 2015-08-03 20:17, Ted Hess wrote:
It would probably make sense to do it that way however, there are apps which already use the ioctl interface on this device and 
this

code came directly from the the manufacturer's linux driver.

I'm not sure how to add general GPIO support for a specific USB device? Things 
to research...

Did the manufacturer submit this upstream already, or is somebody else
(maybe you) going to do so?

- Felix 
___

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