Re: Cannot disable transmission retry

2015-06-03 Thread Johannes Berg
+patch author

 - if (retry-disabled ||
 + if (retry-disabled || retry-value  1 || retry-value  255 ||
 (retry-flags  IW_RETRY_TYPE) != IW_RETRY_LIMIT)
 return -EINVAL;
 
 
 
 I'm wondering, is the 'retry-value  1' is necessary? I would write
 'retry-value  0' instead, to make possible to disable the retries.
 Should I send a patch?

I think this is likely some confusion over what retry means. Some
places in the code used to take it as # of transmission attempts,
others (imho more correctly) interpret it as # of retries.

I think it's probably fine to change to  0.

johannes

--
To unsubscribe from this list: send the line unsubscribe linux-wireless in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cannot disable transmission retry

2015-06-02 Thread Hodaszi, Robert
Hello,

On kernel 3.13, I was able to disable the transmission retries on the
wlan0 interface with 'iwconfig wlan0 retry 0'. Now I updated my kernel
to 3.16, and it returns with 'Invalid argument' error.

The cause is this commit:

cfg80211: add sanity check for retry limit in wext-compat
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f5aa0d21dd5ada040ff42b4d40357285e4ace441


--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device
*dev,
u8 oshort = wdev-wiphy-retry_short;
int err;

- if (retry-disabled ||
+ if (retry-disabled || retry-value  1 || retry-value  255 ||
(retry-flags  IW_RETRY_TYPE) != IW_RETRY_LIMIT)
return -EINVAL;



I'm wondering, is the 'retry-value  1' is necessary? I would write
'retry-value  0' instead, to make possible to disable the retries.
Should I send a patch?

Thanks!

Robert Hodaszi