linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0.
@ 2008-04-23 20:10 Roel Kluin
  2008-04-24  6:16 ` Jussi Kivilinna
  2008-04-24  8:57 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Roel Kluin @ 2008-04-23 20:10 UTC (permalink / raw)
  To: jussi.kivilinna, linux-wireless; +Cc: lkml

priv->param_workaround_interval is unsigned, modparam_workaround_interval not.
the former is never < 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 977751f..d0b1fb1 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2402,7 +2402,6 @@ static int bcm4320_early_init(struct usbnet *dev)
 	priv->param_power_output = modparam_power_output;
 	priv->param_roamtrigger  = modparam_roamtrigger;
 	priv->param_roamdelta    = modparam_roamdelta;
-	priv->param_workaround_interval = modparam_workaround_interval;
 
 	priv->param_country[0] = toupper(priv->param_country[0]);
 	priv->param_country[1] = toupper(priv->param_country[1]);
@@ -2425,8 +2424,10 @@ static int bcm4320_early_init(struct usbnet *dev)
 	else if (priv->param_roamdelta > 2)
 		priv->param_roamdelta = 2;
 
-	if (priv->param_workaround_interval < 0)
+	if (modparam_workaround_interval < 0)
 		priv->param_workaround_interval = 500;
+	else
+		priv->param_workaround_interval = modparam_workaround_interval;
 
 	rndis_set_config_parameter_str(dev, "Country", priv->param_country);
 	rndis_set_config_parameter_str(dev, "FrameBursting",

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0.
  2008-04-23 20:10 [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0 Roel Kluin
@ 2008-04-24  6:16 ` Jussi Kivilinna
  2008-04-24  8:57 ` Johannes Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Jussi Kivilinna @ 2008-04-24  6:16 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linux-wireless, lkml

Quoting Roel Kluin <12o3l@tiscali.nl>:

> priv->param_workaround_interval is unsigned,   
> modparam_workaround_interval not.
> the former is never < 0.
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Thanks.

Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>

> ---
> diff --git a/drivers/net/wireless/rndis_wlan.c   
> b/drivers/net/wireless/rndis_wlan.c
> index 977751f..d0b1fb1 100644
> --- a/drivers/net/wireless/rndis_wlan.c
> +++ b/drivers/net/wireless/rndis_wlan.c
> @@ -2402,7 +2402,6 @@ static int bcm4320_early_init(struct usbnet *dev)
>  	priv->param_power_output = modparam_power_output;
>  	priv->param_roamtrigger  = modparam_roamtrigger;
>  	priv->param_roamdelta    = modparam_roamdelta;
> -	priv->param_workaround_interval = modparam_workaround_interval;
>
>  	priv->param_country[0] = toupper(priv->param_country[0]);
>  	priv->param_country[1] = toupper(priv->param_country[1]);
> @@ -2425,8 +2424,10 @@ static int bcm4320_early_init(struct usbnet *dev)
>  	else if (priv->param_roamdelta > 2)
>  		priv->param_roamdelta = 2;
>
> -	if (priv->param_workaround_interval < 0)
> +	if (modparam_workaround_interval < 0)
>  		priv->param_workaround_interval = 500;
> +	else
> +		priv->param_workaround_interval = modparam_workaround_interval;
>
>  	rndis_set_config_parameter_str(dev, "Country", priv->param_country);
>  	rndis_set_config_parameter_str(dev, "FrameBursting",
>
>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0.
  2008-04-23 20:10 [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0 Roel Kluin
  2008-04-24  6:16 ` Jussi Kivilinna
@ 2008-04-24  8:57 ` Johannes Berg
  2008-04-24  9:26   ` Jussi Kivilinna
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2008-04-24  8:57 UTC (permalink / raw)
  To: Roel Kluin; +Cc: jussi.kivilinna, linux-wireless, lkml

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

On Wed, 2008-04-23 at 22:10 +0200, Roel Kluin wrote:
> priv->param_workaround_interval is unsigned,
> modparam_workaround_interval not.
> the former is never < 0.

> -	priv->param_workaround_interval = modparam_workaround_interval;
>  
> -	if (priv->param_workaround_interval < 0)
> +	if (modparam_workaround_interval < 0)
>  		priv->param_workaround_interval = 500;
> +	else
> +		priv->param_workaround_interval = modparam_workaround_interval;

Eh, why not make the modparam unsigned and default to 500?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0.
  2008-04-24  8:57 ` Johannes Berg
@ 2008-04-24  9:26   ` Jussi Kivilinna
  2008-04-24 12:16     ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Jussi Kivilinna @ 2008-04-24  9:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Roel Kluin, linux-wireless, lkml

Quoting Johannes Berg <johannes@sipsolutions.net>:

>
> Eh, why not make the modparam unsigned and default to 500?
>
> johannes
>

Now that I stop and think about it, that would be better option. The  
modparam already has default value of 500.

Reason why workaround modparam is signed, is that value -1 did have  
some functionality in some early version. That then changed and  
priv->param_workaround_interval changed to unsigned and forgot about  
modparam.

  - Jussi Kivilinna



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0.
  2008-04-24  9:26   ` Jussi Kivilinna
@ 2008-04-24 12:16     ` John W. Linville
  0 siblings, 0 replies; 5+ messages in thread
From: John W. Linville @ 2008-04-24 12:16 UTC (permalink / raw)
  To: Jussi Kivilinna; +Cc: Johannes Berg, Roel Kluin, linux-wireless, lkml

On Thu, Apr 24, 2008 at 12:26:28PM +0300, Jussi Kivilinna wrote:
> Quoting Johannes Berg <johannes@sipsolutions.net>:
>
>>
>> Eh, why not make the modparam unsigned and default to 500?
>>
>> johannes
>>
>
> Now that I stop and think about it, that would be better option. The 
> modparam already has default value of 500.
>
> Reason why workaround modparam is signed, is that value -1 did have some 
> functionality in some early version. That then changed and 
> priv->param_workaround_interval changed to unsigned and forgot about 
> modparam.

I merged the patch, so if you want that behavior we need a new patch.

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-24 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 20:10 [PATCH] wireless: rndis_wlan: modparam_workaround_interval is never below 0 Roel Kluin
2008-04-24  6:16 ` Jussi Kivilinna
2008-04-24  8:57 ` Johannes Berg
2008-04-24  9:26   ` Jussi Kivilinna
2008-04-24 12:16     ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).