Re: [OpenWrt-Devel] [PATCH] Add support for radiotap rate option

2010-08-11 Thread Roberto Riggio

On 08/11/2010 10:49 PM, Felix Fietkau wrote:

On 2010-08-11 9:46 PM, Roberto Riggio wrote:
   

This patch was actually orginally submitted by Felix Fietkau in the
linus-wireless mailing list.
 

Are you sure? I don't remember writing that ;)
   

Sorry the mistake is on my side. This is the original submission
to the linux-wireless ML:

http://thread.gmane.org/gmane.linux.kernel.wireless.general/47441

Anyway is the


- Felix
   

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


Re: [OpenWrt-Devel] [PATCH] Add support for radiotap rate option

2010-08-11 Thread Felix Fietkau
On 2010-08-11 9:46 PM, Roberto Riggio wrote:
> 
> This patch was actually orginally submitted by Felix Fietkau in the 
> linus-wireless mailing list.
Are you sure? I don't remember writing that ;)

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


[OpenWrt-Devel] nanostation m5 PoE passthrough

2010-08-11 Thread Antonio Anselmi
I want re-introduce and confirm the patch from Xavier Martinez which
allow to enable/disable the PoE passthrough in NanoStation-M5
(disabled per default).
I just compiled it on r22566, branch backfire, and it works like a
charm. You can disable or disable the feature by issuing:

echo 1 > /sys/class/leds/ubnt\:poe/brightness
echo 0 > /sys/class/leds/ubnt\:poe/brightness

--- a/arch/mips/ar71xx/mach-ubnt.c  2010-08-04 11:25:28.0 +0200
+++ b/arch/mips/ar71xx/mach-ubnt.c  2010-08-11 16:52:15.0 +0200
@@ -37,6 +37,7 @@
 #define UBNT_M_GPIO_LED_L3 11
 #define UBNT_M_GPIO_LED_L4 7
 #define UBNT_M_GPIO_BTN_RESET  12
+#define UBNT_M_GPIO_POE 8

 #define UBNT_BUTTONS_POLL_INTERVAL 20

@@ -97,6 +98,10 @@
.name   = "ubnt:green:link4",
.gpio   = UBNT_M_GPIO_LED_L4,
.active_low = 0,
+   }, {
+  .name= "ubnt:poe",
+  .gpio= UBNT_M_GPIO_POE,
+  .active_low= 0,  
}
 };

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


[OpenWrt-Devel] [PATCH] Add support for radiotap rate option

2010-08-11 Thread Roberto Riggio


This patch was actually orginally submitted by Felix Fietkau in the 
linus-wireless mailing list.


The patch allows userspace applications that use packet injection to specify
the frame transmission rate on a per-packet basis.

Signed-off-by: Roberto Riggio


--

Index: package/mac80211/patches/810-radiotap_rate.patch
===
--- package/mac80211/patches/810-radiotap_rate.patch(revision 0)
+++ package/mac80211/patches/810-radiotap_rate.patch(revision 0)
@@ -0,0 +1,73 @@
+diff -urN compat-wireless-2010-06-10.old/include/net/mac80211.h 
compat-wireless-2010-06-10.new/include/net/mac80211.h
+--- compat-wireless-2010-06-10.old/include/net/mac80211.h2010-06-10 
22:52:03.0 +0200
 compat-wireless-2010-06-10.new/include/net/mac80211.h2010-06-12 
10:18:02.623091853 +0200

+@@ -288,6 +288,7 @@
+  * @IEEE80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame
+  * @IEEE80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this
+  *frame and selects the maximum number of streams that it can use.
++ * @IEEE80211_TX_CTL_RC_BYPASS: Don't use rate control on the frame.
+  */
+ enum mac80211_tx_control_flags {
+ IEEE80211_TX_CTL_REQ_TX_STATUS= BIT(0),
+@@ -313,6 +314,7 @@
+ IEEE80211_TX_INTFL_NL80211_FRAME_TX= BIT(21),
+ IEEE80211_TX_CTL_LDPC= BIT(22),
+ IEEE80211_TX_CTL_STBC= BIT(23) | BIT(24),
++IEEE80211_TX_CTL_RC_BYPASS= BIT(25),
+ };
+
+ #define IEEE80211_TX_CTL_STBC_SHIFT23
+diff -urN compat-wireless-2010-06-10.old/net/mac80211/tx.c 
compat-wireless-2010-06-10.new/net/mac80211/tx.c
+--- compat-wireless-2010-06-10.old/net/mac80211/tx.c2010-06-10 
22:52:03.0 +0200
 compat-wireless-2010-06-10.new/net/mac80211/tx.c2010-06-12 
10:20:45.203094264 +0200

+@@ -1068,6 +1068,40 @@
+ tx->flags |= IEEE80211_TX_FRAGMENTED;
+ break;
+
++case IEEE80211_RADIOTAP_RATE: {
++int i, idx = -1;
++int rate = *iterator.this_arg * 5;
++
++for (i = 0; i < sband->n_bitrates; i++)
++if (sband->bitrates[i].bitrate == rate) {
++idx = i;
++break;
++}
++
++/* Rate not available - rejecting */
++if (idx < 0)
++return false;
++
++info->flags |= IEEE80211_TX_CTL_RC_BYPASS;
++info->control.rates[0].idx = idx;
++info->control.rates[0].count = 1;
++for (i = 1; i < IEEE80211_TX_MAX_RATES; i++)
++info->control.rates[i].idx = -1;
++break;
++}
++
++case IEEE80211_RADIOTAP_DATA_RETRIES:
++/*
++ * Only allow setting the number of retries in
++ * conjunction with the rates, when the rate control
++ * is bypassed.
++ */
++if (info->flags & IEEE80211_TX_CTL_RC_BYPASS)
++info->control.rates[0].count =
++*iterator.this_arg;
++break;
++
++
+ /*
+  * Please update the file
+  * Documentation/networking/mac80211-injection.txt
+@@ -1374,7 +1373,8 @@
+ CALL_TXH(ieee80211_tx_h_check_assoc);
+ CALL_TXH(ieee80211_tx_h_ps_buf);
+ CALL_TXH(ieee80211_tx_h_select_key);
+-if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
++if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
++!(info->flags & IEEE80211_TX_CTL_RC_BYPASS))
+ CALL_TXH(ieee80211_tx_h_rate_ctrl);
+
+ if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Need a code review: ppp patches to support cross-compilation

2010-08-11 Thread Philip Prindeville

 Hi.

I'm working with the maintainers of ppp to get better cross-compilation support 
in.

I see that some of the changes I came up were already present in openwrt, such 
as package/ppp/patches/203-opt_flags.patch for instance.

Can someone please review the patches and comment on them?  If I get them in, 
I'd like them to be adequate to fulfill the requirements of openwrt.

ftp://ftp.redfish-solutions.com/pub/pppd-makefile.patch

Thanks,

-Philip

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


Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Roberto Riggio

The official website is

http://www.wing-project.org

The website contains several info about the routing protocol. An extended
description of the wing package for openwrt can be found here:

http://wing-project.org/openwrt:wing

I've developed most of the code for the routing protocol and for
the integration with openwrt, so i can probably answer to your
questions.

R.

On 08/11/2010 01:37 PM, L. Aaron Kaplan wrote:

is there any docu on WING?


On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

   

Hi,

this patch adds support for WING a new routing protocol for wireless
mesh networks. WING is an extension of the Roofnet routing protocol
developed by MIT. The new features are: support for multiple radio
interfaces, and link quality based routing using the WCETT metric.

The source code is hosted at github.

Upon install, this package will create a new entry in the network section:

config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

The only mandatory field is "proto". After running ifup mesh a new interface
will be created. This interface is called wing-$(ifname) and uses multi-hopping.

Here follows a short description for the other parameters:

profile, profile to be used for building the configuration for the click
router (at the moment only one profile is defined)

rc, rate control algorithm (static, madwifi, autoratefallback)

ls, outgoing link scheduling policy (fcfs, drr)

metric, routing metric (etx, ett, wcett)

period, tau, averaging period for network probes, smoothing window

Signed-off-by: Roberto Riggio

--

Index: net/wing/files/lib/network/wing.sh
===
--- net/wing/files/lib/network/wing.sh  (revision 0)
+++ net/wing/files/lib/network/wing.sh  (revision 0)
@@ -0,0 +1,145 @@
+
+scan_wing() {
+   config_set "$1" device "wing-$1"
+}
+
+coldplug_interface_wing() {
+setup_interface_wing "wing-$1" "$1"
+}
+
+stop_interface_wing() {
+   local config="$1"
+   local iface="wing-$config"
+   env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=wing 
/sbin/hotplug-call "iface"&
+   [ -f "/var/run/$iface.pid" ]&&   {
+   kill -9 $(cat /var/run/$iface.pid)
+   rm /var/run/$iface.pid
+   }
+}
+
+setup_interface_wing() {
+
+local iface="$1"
+local config="$2"
+
+   local hwmodes=""
+   local freqs=""
+   local ifnames=""
+   local hwaddrs=""
+
+   config_load wireless
+   config_foreach wing_list_interfaces wifi-iface
+   
+   # start click router
+   if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o "$hwaddrs" = 
"" ]; then
+   logger -t "$config" "No raw interfaces available. Exiting."
+   exit 1
+   fi
+
+   local profile rc ls prefix debug
+
+   config_get profile $config profile "bulk"
+   config_get rc $config rc "static"
+   config_get ls $config ls "fcfs"
+   config_get metric $config metric "wcett"
+   config_get prefix $config prefix "6"
+   config_get period $config period "1"
+   config_get tau $config tau "10"
+   config_get_bool debug $config debug "False"
+
+   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
+   local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F: '{printf 
"0x%s 0x%s 0x%s",$4,$5,$6}'))
+   local netmask=255.0.0.0
+
+   if ! wing_template_available "profile" "$profile" "bulk"; then
+   logger -t "$config" "Unable to configure router. Exiting."
+   exit 1
+   fi
+
+   if ! wing_template_available "rc" "$rc" "static"; then
+   logger -t "$config" "Unable to configure rate control. Exiting."
+   exit 1
+   fi
+
+   if ! wing_template_available "ls" "$ls" "radiotap"; then
+   logger -t "$config" "Unable to configure link scheduler. 
Exiting."
+   exit 1
+   fi
+
+   if [ "$profile" = "" -o "$rc" = "" ]; then
+   logger -t "$config" "Unable to generate template. Exiting."
+   exit 1
+   fi
+
+   [ "$debug" == 0 ]&&   dbg="" || dbg="-d"
+
+   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
+   -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg \
+   | sed -e "s/__XR_IFNAME__/$iface/g" \
+   | sed -e "s/__XR_IP__/$ipaddr/g" \
+   | sed -e "s/__XR_NM__/$netmask/g" \
+   | sed -e "s/__XR_PERIOD__/$period/g" \
+   | sed -e "s/__XR_TAU__/$tau/g">   /tmp/$iface.click
+
+   /usr/bin/click-align /tmp/$iface.click>   /tmp/$iface-aligned.click 
2>/var/log/$iface.log
+   [ ! -c /dev/net/tun ]&&   {
+   mkdir -p /dev/net/
+   mknod /dev/net

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Outback Dingo
which then links to

http://www.wing-project.org/

On Wed, Aug 11, 2010 at 7:37 AM, L. Aaron Kaplan  wrote:

> is there any docu on WING?
>
>
> On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:
>
> > Hi,
> >
> > this patch adds support for WING a new routing protocol for wireless
> > mesh networks. WING is an extension of the Roofnet routing protocol
> > developed by MIT. The new features are: support for multiple radio
> > interfaces, and link quality based routing using the WCETT metric.
> >
> > The source code is hosted at github.
> >
> > Upon install, this package will create a new entry in the network
> section:
> >
> > config 'interface' 'mesh'
> >option 'proto' 'wing'
> >option 'profile' 'bulk'
> >option 'rc' 'static'
> >option 'ls' 'fcfs'
> >option 'metric' 'wcett'
> >option 'prefix' '6'
> >option 'period' '36000'
> >option 'tau' '36'
> >option 'debug' 'true'
> >
> > The only mandatory field is "proto". After running ifup mesh a new
> interface
> > will be created. This interface is called wing-$(ifname) and uses
> multi-hopping.
> >
> > Here follows a short description for the other parameters:
> >
> > profile, profile to be used for building the configuration for the click
> > router (at the moment only one profile is defined)
> >
> > rc, rate control algorithm (static, madwifi, autoratefallback)
> >
> > ls, outgoing link scheduling policy (fcfs, drr)
> >
> > metric, routing metric (etx, ett, wcett)
> >
> > period, tau, averaging period for network probes, smoothing window
> >
> > Signed-off-by: Roberto Riggio 
> >
> > --
> >
> > Index: net/wing/files/lib/network/wing.sh
> > ===
> > --- net/wing/files/lib/network/wing.sh(revision 0)
> > +++ net/wing/files/lib/network/wing.sh(revision 0)
> > @@ -0,0 +1,145 @@
> > +
> > +scan_wing() {
> > + config_set "$1" device "wing-$1"
> > +}
> > +
> > +coldplug_interface_wing() {
> > +setup_interface_wing "wing-$1" "$1"
> > +}
> > +
> > +stop_interface_wing() {
> > + local config="$1"
> > + local iface="wing-$config"
> > + env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface"
> PROTO=wing /sbin/hotplug-call "iface"&
> > + [ -f "/var/run/$iface.pid" ]&&  {
> > + kill -9 $(cat /var/run/$iface.pid)
> > + rm /var/run/$iface.pid
> > + }
> > +}
> > +
> > +setup_interface_wing() {
> > +
> > +local iface="$1"
> > +local config="$2"
> > +
> > + local hwmodes=""
> > + local freqs=""
> > + local ifnames=""
> > + local hwaddrs=""
> > +
> > + config_load wireless
> > + config_foreach wing_list_interfaces wifi-iface
> > +
> > + # start click router
> > + if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o
> "$hwaddrs" = "" ]; then
> > + logger -t "$config" "No raw interfaces available. Exiting."
> > + exit 1
> > + fi
> > +
> > + local profile rc ls prefix debug
> > +
> > + config_get profile $config profile "bulk"
> > + config_get rc $config rc "static"
> > + config_get ls $config ls "fcfs"
> > + config_get metric $config metric "wcett"
> > + config_get prefix $config prefix "6"
> > + config_get period $config period "1"
> > + config_get tau $config tau "10"
> > + config_get_bool debug $config debug "False"
> > +
> > + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
> > + local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F:
> '{printf "0x%s 0x%s 0x%s",$4,$5,$6}'))
> > + local netmask=255.0.0.0
> > +
> > + if ! wing_template_available "profile" "$profile" "bulk"; then
> > + logger -t "$config" "Unable to configure router. Exiting."
> > + exit 1
> > + fi
> > +
> > + if ! wing_template_available "rc" "$rc" "static"; then
> > + logger -t "$config" "Unable to configure rate control.
> Exiting."
> > + exit 1
> > + fi
> > +
> > + if ! wing_template_available "ls" "$ls" "radiotap"; then
> > + logger -t "$config" "Unable to configure link scheduler.
> Exiting."
> > + exit 1
> > + fi
> > +
> > + if [ "$profile" = "" -o "$rc" = "" ]; then
> > + logger -t "$config" "Unable to generate template. Exiting."
> > + exit 1
> > + fi
> > +
> > + [ "$debug" == 0 ]&&  dbg="" || dbg="-d"
> > +
> > + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
> > + -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg
> \
> > + | sed -e "s/__XR_IFNAME__/$iface/g" \
> > + | sed -e "s/__XR_IP__/$ipaddr/g" \
> > + | sed -e "s/__XR_NM__/$netmask/g" \
> > + | sed -e "s/__XR_PERIOD__/$period/g" \
> > + | sed -e "s/__XR_TAU__/$tau/g">  /tmp/$iface.click
> > +
> > + /usr/bin/click-align /tmp/$iface.click>  /tmp/$iface-aligned.click
> 2>/var/log/$iface.log
> > +  

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Outback Dingo
I believe it is part of this project

https://www.ict-smartnet.eu/

On Wed, Aug 11, 2010 at 7:37 AM, L. Aaron Kaplan  wrote:

> is there any docu on WING?
>
>
> On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:
>
> > Hi,
> >
> > this patch adds support for WING a new routing protocol for wireless
> > mesh networks. WING is an extension of the Roofnet routing protocol
> > developed by MIT. The new features are: support for multiple radio
> > interfaces, and link quality based routing using the WCETT metric.
> >
> > The source code is hosted at github.
> >
> > Upon install, this package will create a new entry in the network
> section:
> >
> > config 'interface' 'mesh'
> >option 'proto' 'wing'
> >option 'profile' 'bulk'
> >option 'rc' 'static'
> >option 'ls' 'fcfs'
> >option 'metric' 'wcett'
> >option 'prefix' '6'
> >option 'period' '36000'
> >option 'tau' '36'
> >option 'debug' 'true'
> >
> > The only mandatory field is "proto". After running ifup mesh a new
> interface
> > will be created. This interface is called wing-$(ifname) and uses
> multi-hopping.
> >
> > Here follows a short description for the other parameters:
> >
> > profile, profile to be used for building the configuration for the click
> > router (at the moment only one profile is defined)
> >
> > rc, rate control algorithm (static, madwifi, autoratefallback)
> >
> > ls, outgoing link scheduling policy (fcfs, drr)
> >
> > metric, routing metric (etx, ett, wcett)
> >
> > period, tau, averaging period for network probes, smoothing window
> >
> > Signed-off-by: Roberto Riggio 
> >
> > --
> >
> > Index: net/wing/files/lib/network/wing.sh
> > ===
> > --- net/wing/files/lib/network/wing.sh(revision 0)
> > +++ net/wing/files/lib/network/wing.sh(revision 0)
> > @@ -0,0 +1,145 @@
> > +
> > +scan_wing() {
> > + config_set "$1" device "wing-$1"
> > +}
> > +
> > +coldplug_interface_wing() {
> > +setup_interface_wing "wing-$1" "$1"
> > +}
> > +
> > +stop_interface_wing() {
> > + local config="$1"
> > + local iface="wing-$config"
> > + env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface"
> PROTO=wing /sbin/hotplug-call "iface"&
> > + [ -f "/var/run/$iface.pid" ]&&  {
> > + kill -9 $(cat /var/run/$iface.pid)
> > + rm /var/run/$iface.pid
> > + }
> > +}
> > +
> > +setup_interface_wing() {
> > +
> > +local iface="$1"
> > +local config="$2"
> > +
> > + local hwmodes=""
> > + local freqs=""
> > + local ifnames=""
> > + local hwaddrs=""
> > +
> > + config_load wireless
> > + config_foreach wing_list_interfaces wifi-iface
> > +
> > + # start click router
> > + if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o
> "$hwaddrs" = "" ]; then
> > + logger -t "$config" "No raw interfaces available. Exiting."
> > + exit 1
> > + fi
> > +
> > + local profile rc ls prefix debug
> > +
> > + config_get profile $config profile "bulk"
> > + config_get rc $config rc "static"
> > + config_get ls $config ls "fcfs"
> > + config_get metric $config metric "wcett"
> > + config_get prefix $config prefix "6"
> > + config_get period $config period "1"
> > + config_get tau $config tau "10"
> > + config_get_bool debug $config debug "False"
> > +
> > + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
> > + local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F:
> '{printf "0x%s 0x%s 0x%s",$4,$5,$6}'))
> > + local netmask=255.0.0.0
> > +
> > + if ! wing_template_available "profile" "$profile" "bulk"; then
> > + logger -t "$config" "Unable to configure router. Exiting."
> > + exit 1
> > + fi
> > +
> > + if ! wing_template_available "rc" "$rc" "static"; then
> > + logger -t "$config" "Unable to configure rate control.
> Exiting."
> > + exit 1
> > + fi
> > +
> > + if ! wing_template_available "ls" "$ls" "radiotap"; then
> > + logger -t "$config" "Unable to configure link scheduler.
> Exiting."
> > + exit 1
> > + fi
> > +
> > + if [ "$profile" = "" -o "$rc" = "" ]; then
> > + logger -t "$config" "Unable to generate template. Exiting."
> > + exit 1
> > + fi
> > +
> > + [ "$debug" == 0 ]&&  dbg="" || dbg="-d"
> > +
> > + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
> > + -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg
> \
> > + | sed -e "s/__XR_IFNAME__/$iface/g" \
> > + | sed -e "s/__XR_IP__/$ipaddr/g" \
> > + | sed -e "s/__XR_NM__/$netmask/g" \
> > + | sed -e "s/__XR_PERIOD__/$period/g" \
> > + | sed -e "s/__XR_TAU__/$tau/g">  /tmp/$iface.click
> > +
> > + /usr/bin/click-align /tmp/$iface.click>  /tmp/$iface-aligned.click
> 2>/var/log/$

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread L. Aaron Kaplan
is there any docu on WING?


On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

> Hi,
> 
> this patch adds support for WING a new routing protocol for wireless
> mesh networks. WING is an extension of the Roofnet routing protocol
> developed by MIT. The new features are: support for multiple radio
> interfaces, and link quality based routing using the WCETT metric.
> 
> The source code is hosted at github.
> 
> Upon install, this package will create a new entry in the network section:
> 
> config 'interface' 'mesh'
>option 'proto' 'wing'
>option 'profile' 'bulk'
>option 'rc' 'static'
>option 'ls' 'fcfs'
>option 'metric' 'wcett'
>option 'prefix' '6'
>option 'period' '36000'
>option 'tau' '36'
>option 'debug' 'true'
> 
> The only mandatory field is "proto". After running ifup mesh a new interface
> will be created. This interface is called wing-$(ifname) and uses 
> multi-hopping.
> 
> Here follows a short description for the other parameters:
> 
> profile, profile to be used for building the configuration for the click
> router (at the moment only one profile is defined)
> 
> rc, rate control algorithm (static, madwifi, autoratefallback)
> 
> ls, outgoing link scheduling policy (fcfs, drr)
> 
> metric, routing metric (etx, ett, wcett)
> 
> period, tau, averaging period for network probes, smoothing window
> 
> Signed-off-by: Roberto Riggio 
> 
> --
> 
> Index: net/wing/files/lib/network/wing.sh
> ===
> --- net/wing/files/lib/network/wing.sh(revision 0)
> +++ net/wing/files/lib/network/wing.sh(revision 0)
> @@ -0,0 +1,145 @@
> +
> +scan_wing() {
> + config_set "$1" device "wing-$1"
> +}
> +
> +coldplug_interface_wing() {
> +setup_interface_wing "wing-$1" "$1"
> +}
> +
> +stop_interface_wing() {
> + local config="$1"
> + local iface="wing-$config"
> + env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=wing 
> /sbin/hotplug-call "iface"&
> + [ -f "/var/run/$iface.pid" ]&&  {
> + kill -9 $(cat /var/run/$iface.pid)
> + rm /var/run/$iface.pid
> + }
> +}
> +
> +setup_interface_wing() {
> +
> +local iface="$1"
> +local config="$2"
> +
> + local hwmodes=""
> + local freqs=""
> + local ifnames=""
> + local hwaddrs=""
> +
> + config_load wireless
> + config_foreach wing_list_interfaces wifi-iface
> + 
> + # start click router
> + if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o "$hwaddrs" 
> = "" ]; then
> + logger -t "$config" "No raw interfaces available. Exiting."
> + exit 1
> + fi
> +
> + local profile rc ls prefix debug
> +
> + config_get profile $config profile "bulk"
> + config_get rc $config rc "static"
> + config_get ls $config ls "fcfs"
> + config_get metric $config metric "wcett"
> + config_get prefix $config prefix "6"
> + config_get period $config period "1"
> + config_get tau $config tau "10"
> + config_get_bool debug $config debug "False"
> +
> + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
> + local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F: 
> '{printf "0x%s 0x%s 0x%s",$4,$5,$6}'))
> + local netmask=255.0.0.0
> +
> + if ! wing_template_available "profile" "$profile" "bulk"; then
> + logger -t "$config" "Unable to configure router. Exiting."
> + exit 1
> + fi
> +
> + if ! wing_template_available "rc" "$rc" "static"; then
> + logger -t "$config" "Unable to configure rate control. Exiting."
> + exit 1
> + fi
> +
> + if ! wing_template_available "ls" "$ls" "radiotap"; then
> + logger -t "$config" "Unable to configure link scheduler. 
> Exiting."
> + exit 1
> + fi
> +
> + if [ "$profile" = "" -o "$rc" = "" ]; then
> + logger -t "$config" "Unable to generate template. Exiting."
> + exit 1
> + fi
> +
> + [ "$debug" == 0 ]&&  dbg="" || dbg="-d"
> +
> + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
> + -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg \
> + | sed -e "s/__XR_IFNAME__/$iface/g" \
> + | sed -e "s/__XR_IP__/$ipaddr/g" \
> + | sed -e "s/__XR_NM__/$netmask/g" \
> + | sed -e "s/__XR_PERIOD__/$period/g" \
> + | sed -e "s/__XR_TAU__/$tau/g">  /tmp/$iface.click
> +
> + /usr/bin/click-align /tmp/$iface.click>  /tmp/$iface-aligned.click 
> 2>/var/log/$iface.log
> + [ ! -c /dev/net/tun ]&&  {
> + mkdir -p /dev/net/
> + mknod /dev/net/tun c 10 200
> + if [ ! -c /dev/net/tun ]; then
> + logger -t "$config" "Device not available 
> (/dev/net/tun). Exiting."
> + exit 1
> + fi
> + }
> +
> + # creating the tun interface below will 

Re: [OpenWrt-Devel] [PATCH-TEAM] New wireless mesh network routing protocol

2010-08-11 Thread Outback Dingo
Ill get this commited

On Wed, Aug 11, 2010 at 5:55 AM, Roberto Riggio <
roberto.rig...@create-net.org> wrote:

> Hi,
>
> this patch adds support for WING a new routing protocol for wireless
> mesh networks. WING is an extension of the Roofnet routing protocol
> developed by MIT. The new features are: support for multiple radio
> interfaces, and link quality based routing using the WCETT metric.
>
> The source code is hosted at github.
>
> Upon install, this package will create a new entry in the network section:
>
> config 'interface' 'mesh'
>option 'proto' 'wing'
>option 'profile' 'bulk'
>option 'rc' 'static'
>option 'ls' 'fcfs'
>option 'metric' 'wcett'
>option 'prefix' '6'
>option 'period' '36000'
>option 'tau' '36'
>option 'debug' 'true'
>
> The only mandatory field is "proto". After running ifup mesh a new
> interface
> will be created. This interface is called wing-$(ifname) and uses
> multi-hopping.
>
> Here follows a short description for the other parameters:
>
> profile, profile to be used for building the configuration for the click
> router (at the moment only one profile is defined)
>
> rc, rate control algorithm (static, madwifi, autoratefallback)
>
> ls, outgoing link scheduling policy (fcfs, drr)
>
> metric, routing metric (etx, ett, wcett)
>
> period, tau, averaging period for network probes, smoothing window
>
> Signed-off-by: Roberto Riggio 
>
> --
>
> Index: net/wing/files/lib/network/wing.sh
> ===
> --- net/wing/files/lib/network/wing.sh  (revision 0)
> +++ net/wing/files/lib/network/wing.sh  (revision 0)
> @@ -0,0 +1,145 @@
> +
> +scan_wing() {
> +   config_set "$1" device "wing-$1"
> +}
> +
> +coldplug_interface_wing() {
> +setup_interface_wing "wing-$1" "$1"
> +}
> +
> +stop_interface_wing() {
> +   local config="$1"
> +   local iface="wing-$config"
> +   env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface"
> PROTO=wing /sbin/hotplug-call "iface"&
> +   [ -f "/var/run/$iface.pid" ]&&  {
> +   kill -9 $(cat /var/run/$iface.pid)
> +   rm /var/run/$iface.pid
> +   }
> +}
> +
> +setup_interface_wing() {
> +
> +local iface="$1"
> +local config="$2"
> +
> +   local hwmodes=""
> +   local freqs=""
> +   local ifnames=""
> +   local hwaddrs=""
> +
> +   config_load wireless
> +   config_foreach wing_list_interfaces wifi-iface
> +
> +   # start click router
> +   if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o
> "$hwaddrs" = "" ]; then
> +   logger -t "$config" "No raw interfaces available. Exiting."
> +   exit 1
> +   fi
> +
> +   local profile rc ls prefix debug
> +
> +   config_get profile $config profile "bulk"
> +   config_get rc $config rc "static"
> +   config_get ls $config ls "fcfs"
> +   config_get metric $config metric "wcett"
> +   config_get prefix $config prefix "6"
> +   config_get period $config period "1"
> +   config_get tau $config tau "10"
> +   config_get_bool debug $config debug "False"
> +
> +   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
> +   local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F:
> '{printf "0x%s 0x%s 0x%s",$4,$5,$6}'))
> +   local netmask=255.0.0.0
> +
> +   if ! wing_template_available "profile" "$profile" "bulk"; then
> +   logger -t "$config" "Unable to configure router. Exiting."
> +   exit 1
> +   fi
> +
> +   if ! wing_template_available "rc" "$rc" "static"; then
> +   logger -t "$config" "Unable to configure rate control.
> Exiting."
> +   exit 1
> +   fi
> +
> +   if ! wing_template_available "ls" "$ls" "radiotap"; then
> +   logger -t "$config" "Unable to configure link scheduler.
> Exiting."
> +   exit 1
> +   fi
> +
> +   if [ "$profile" = "" -o "$rc" = "" ]; then
> +   logger -t "$config" "Unable to generate template. Exiting."
> +   exit 1
> +   fi
> +
> +   [ "$debug" == 0 ]&&  dbg="" || dbg="-d"
> +
> +   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
> +   -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg
> \
> +   | sed -e "s/__XR_IFNAME__/$iface/g" \
> +   | sed -e "s/__XR_IP__/$ipaddr/g" \
> +   | sed -e "s/__XR_NM__/$netmask/g" \
> +   | sed -e "s/__XR_PERIOD__/$period/g" \
> +   | sed -e "s/__XR_TAU__/$tau/g">  /tmp/$iface.click
> +
> +   /usr/bin/click-align /tmp/$iface.click>  /tmp/$iface-aligned.click
> 2>/var/log/$iface.log
> +   [ ! -c /dev/net/tun ]&&  {
> +   mkdir -p /dev/net/
> +   mknod /dev/net/tun c 10 200
> +   if [ ! -c /dev/net/tun ]; then
> +   logger -t "$config" "Device not available
> (/dev/net/tun). Ex

Re: [OpenWrt-Devel] [PATCH] dnsmasq bogus nxdomains

2010-08-11 Thread Nico
 Applied in r22592 with example in config.

Thanks,
--
-{Nico}


On 16/07/10 22:52, mickey wrote:
> Am 16.07.2010 22:24, schrieb edgar.sol...@web.de:
>> sweet, simple and effective.
> Thanks to the authors of dnsmasq for supporting this feature.
>
>> You should put the example configuration on
>> the wiki as well for others suffering the symptoms.
> Shall i just put the example configuration or include the patch, too?
>
> Btw, I am about to submit a patch to LuCI, too. It adds bogusnxdomain to
> the webif in order to ease the handling for the enduser.
>
>> thanks ede
> HTH,
> mickey
> ___
> 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


[OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Roberto Riggio

Hi,

this patch adds support for WING a new routing protocol for wireless
mesh networks. WING is an extension of the Roofnet routing protocol
developed by MIT. The new features are: support for multiple radio
interfaces, and link quality based routing using the WCETT metric.

The source code is hosted at github.

Upon install, this package will create a new entry in the network section:

config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

The only mandatory field is "proto". After running ifup mesh a new interface
will be created. This interface is called wing-$(ifname) and uses 
multi-hopping.


Here follows a short description for the other parameters:

profile, profile to be used for building the configuration for the click
router (at the moment only one profile is defined)

rc, rate control algorithm (static, madwifi, autoratefallback)

ls, outgoing link scheduling policy (fcfs, drr)

metric, routing metric (etx, ett, wcett)

period, tau, averaging period for network probes, smoothing window

Signed-off-by: Roberto Riggio 

--

Index: net/wing/files/lib/network/wing.sh
===
--- net/wing/files/lib/network/wing.sh  (revision 0)
+++ net/wing/files/lib/network/wing.sh  (revision 0)
@@ -0,0 +1,145 @@
+
+scan_wing() {
+   config_set "$1" device "wing-$1"
+}
+
+coldplug_interface_wing() {
+setup_interface_wing "wing-$1" "$1"
+}
+
+stop_interface_wing() {
+   local config="$1"
+   local iface="wing-$config"
+   env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=wing 
/sbin/hotplug-call "iface"&
+   [ -f "/var/run/$iface.pid" ]&&  {
+   kill -9 $(cat /var/run/$iface.pid)
+   rm /var/run/$iface.pid
+   }
+}
+
+setup_interface_wing() {
+
+local iface="$1"
+local config="$2"
+
+   local hwmodes=""
+   local freqs=""
+   local ifnames=""
+   local hwaddrs=""
+
+   config_load wireless
+   config_foreach wing_list_interfaces wifi-iface
+   
+   # start click router
+   if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o "$hwaddrs" = 
"" ]; then
+   logger -t "$config" "No raw interfaces available. Exiting."
+   exit 1
+   fi
+
+   local profile rc ls prefix debug
+
+   config_get profile $config profile "bulk"
+   config_get rc $config rc "static"
+   config_get ls $config ls "fcfs"
+   config_get metric $config metric "wcett"
+   config_get prefix $config prefix "6"
+   config_get period $config period "1"
+   config_get tau $config tau "10"
+   config_get_bool debug $config debug "False"
+
+   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
+   local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F: '{printf 
"0x%s 0x%s 0x%s",$4,$5,$6}'))
+   local netmask=255.0.0.0
+
+   if ! wing_template_available "profile" "$profile" "bulk"; then
+   logger -t "$config" "Unable to configure router. Exiting."
+   exit 1
+   fi
+
+   if ! wing_template_available "rc" "$rc" "static"; then
+   logger -t "$config" "Unable to configure rate control. Exiting."
+   exit 1
+   fi
+
+   if ! wing_template_available "ls" "$ls" "radiotap"; then
+   logger -t "$config" "Unable to configure link scheduler. 
Exiting."
+   exit 1
+   fi
+
+   if [ "$profile" = "" -o "$rc" = "" ]; then
+   logger -t "$config" "Unable to generate template. Exiting."
+   exit 1
+   fi
+
+   [ "$debug" == 0 ]&&  dbg="" || dbg="-d"
+
+   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
+   -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg \
+   | sed -e "s/__XR_IFNAME__/$iface/g" \
+   | sed -e "s/__XR_IP__/$ipaddr/g" \
+   | sed -e "s/__XR_NM__/$netmask/g" \
+   | sed -e "s/__XR_PERIOD__/$period/g" \
+   | sed -e "s/__XR_TAU__/$tau/g">  /tmp/$iface.click
+
+   /usr/bin/click-align /tmp/$iface.click>  /tmp/$iface-aligned.click 
2>/var/log/$iface.log
+   [ ! -c /dev/net/tun ]&&  {
+   mkdir -p /dev/net/
+   mknod /dev/net/tun c 10 200
+   if [ ! -c /dev/net/tun ]; then
+   logger -t "$config" "Device not available (/dev/net/tun). 
Exiting."
+   exit 1
+   fi
+   }
+
+   # creating the tun interface below will trigger a net subsystem event
+   # prevent it from touching iface by disabling .auto here
+   uci_set_state network "$config" auto 0
+
+   (/usr/bin/click /tmp/$iface-aligned.click>>  /var/log/$iface.log 2>&1&)&
+   sleep 2
+ 

Re: [OpenWrt-Devel] some questions about eth0

2010-08-11 Thread hacklu
   I used 2.6.25 linux
mpc8247 
powerpc platform 
I'm so sorry to describe it  implicitly.



--   
hacklu
2010-08-11








On Monday 09 August 2010 09:46:51 hacklu wrote:
>  my device' eth0 can't work fine everytime,
> sometimes,it doesn't work. but sometimes it works better.
> 
> 
> if I reboot my system,it may be good or not. It just a probability!
> so I only can reboot and reboot until it become good.
> 
> how strange it is!

It would help if you mention which driver it is, on which platform, running 
which kernel version.
--
Florian


--

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


End of openwrt-devel Digest, Vol 56, Issue 12
*

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