Skip to contentSkip to conversation

cfg80211: fix wext-compat for getting retry value

PATCH In review Ujjal Roy 2 participants 2 messages Jan 6, 2014 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Ujjal Roy

author
#0 lore raw

PATCH 1/1 cfg80211: fix wext-compat for getting retry value

While getting the retry limit, wext-compat returns the value without updating the flag for retry->flags is 0. Also in this case, it updates long retry flag when short and long retry value are unequal.

So, iwconfig never showing "Retry short limit" and showing "Retry long limit" when both values are unequal.

Updated the flags and corrected the condition properly.

---
 net/wireless/wext-compat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/wireless/wext-compat.c +2 -2
index e7c6e86..051d961 100644
@@ -412,9 +412,9 @@ int cfg80211_wext_giwretry(struct net_device *dev,
 		 * First return short value, iwconfig will ask long value
 		 * later if needed
 		 */
-		retry->flags |= IW_RETRY_LIMIT;
+		retry->flags |= IW_RETRY_LIMIT | IW_RETRY_SHORT;
 		retry->value = wdev->wiphy->retry_short;
-		if (wdev->wiphy->retry_long != wdev->wiphy->retry_short)
+		if (wdev->wiphy->retry_long == wdev->wiphy->retry_short)
 			retry->flags |= IW_RETRY_LONG;
 
 		return 0;
Signature · 1 line
1.8.1.4
maintainer
#1 lore raw
Quoted 9 lines · Ujjal Roy

While getting the retry limit, wext-compat returns the value without updating the flag for retry->flags is 0. Also in this case, it updates long retry flag when short and long retry value are unequal.

So, iwconfig never showing "Retry short limit" and showing "Retry long limit" when both values are unequal.

Updated the flags and corrected the condition properly.

Looks fine, applied. Who cares though? :)

johannes