diff mbox

batman-adv: permit setting ogm interval to JITTER*2

Message ID 1276883644-3828-1-git-send-email-linus.luessing@web.de
State Accepted, archived
Commit aaf7fa590abc6a54788fbe08ff5435ad0906ccae
Headers show

Commit Message

Linus Lüssing June 18, 2010, 5:54 p.m. UTC
When trying to set the originator interval to 40ms, we are asked to set
it to a minimum value of 40ms. This patch permits setting an
originator interval of JITTER*20 (40ms by default) now.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
 bat_sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Simon Wunderlich June 18, 2010, 8:04 p.m. UTC | #1
Thanks Linus, applied in r1701.

On Fri, Jun 18, 2010 at 07:54:04PM +0200, Linus Lüssing wrote:
> When trying to set the originator interval to 40ms, we are asked to set
> it to a minimum value of 40ms. This patch permits setting an
> originator interval of JITTER*20 (40ms by default) now.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> ---
>  bat_sysfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/bat_sysfs.c b/bat_sysfs.c
> index 05703c1..68ce453 100644
> --- a/bat_sysfs.c
> +++ b/bat_sysfs.c
> @@ -259,7 +259,7 @@ static ssize_t store_orig_interval(struct kobject *kobj, struct attribute *attr,
>  		return -EINVAL;
>  	}
>  
> -	if (orig_interval_tmp <= JITTER * 2) {
> +	if (orig_interval_tmp < JITTER * 2) {
>  		printk(KERN_INFO "batman-adv:New originator interval too small: %li (min: %i)\n",
>  		       orig_interval_tmp, JITTER * 2);
>  		return -EINVAL;
> -- 
> 1.7.1
> 
>
Simon Wunderlich June 19, 2010, 11:05 p.m. UTC | #2
Guess i forgot to mention that your patch was applied in r1701. :)

Thank you,
	Simon

On Fri, Jun 18, 2010 at 07:54:04PM +0200, Linus Lüssing wrote:
> When trying to set the originator interval to 40ms, we are asked to set
> it to a minimum value of 40ms. This patch permits setting an
> originator interval of JITTER*20 (40ms by default) now.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> ---
>  bat_sysfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/bat_sysfs.c b/bat_sysfs.c
> index 05703c1..68ce453 100644
> --- a/bat_sysfs.c
> +++ b/bat_sysfs.c
> @@ -259,7 +259,7 @@ static ssize_t store_orig_interval(struct kobject *kobj, struct attribute *attr,
>  		return -EINVAL;
>  	}
>  
> -	if (orig_interval_tmp <= JITTER * 2) {
> +	if (orig_interval_tmp < JITTER * 2) {
>  		printk(KERN_INFO "batman-adv:New originator interval too small: %li (min: %i)\n",
>  		       orig_interval_tmp, JITTER * 2);
>  		return -EINVAL;
> -- 
> 1.7.1
> 
>
diff mbox

Patch

diff --git a/bat_sysfs.c b/bat_sysfs.c
index 05703c1..68ce453 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -259,7 +259,7 @@  static ssize_t store_orig_interval(struct kobject *kobj, struct attribute *attr,
 		return -EINVAL;
 	}
 
-	if (orig_interval_tmp <= JITTER * 2) {
+	if (orig_interval_tmp < JITTER * 2) {
 		printk(KERN_INFO "batman-adv:New originator interval too small: %li (min: %i)\n",
 		       orig_interval_tmp, JITTER * 2);
 		return -EINVAL;