From patchwork Tue Jun 2 16:29:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hodaszi, Robert" X-Patchwork-Id: 6529761 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2B927C0020 for ; Tue, 2 Jun 2015 16:36:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5575D20531 for ; Tue, 2 Jun 2015 16:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C6D32052D for ; Tue, 2 Jun 2015 16:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754284AbbFBQgm (ORCPT ); Tue, 2 Jun 2015 12:36:42 -0400 Received: from mail1.bemta8.messagelabs.com ([216.82.243.208]:5845 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753533AbbFBQgk (ORCPT ); Tue, 2 Jun 2015 12:36:40 -0400 X-Greylist: delayed 403 seconds by postgrey-1.27 at vger.kernel.org; Tue, 02 Jun 2015 12:36:40 EDT Received: from [216.82.241.132] by server-16.bemta-8.messagelabs.com id 5E/E0-23037-BF9DD655; Tue, 02 Jun 2015 16:29:47 +0000 X-Env-Sender: robert.hodaszi@digi.com X-Msg-Ref: server-8.tower-45.messagelabs.com!1433262586!38408252!3 X-Originating-IP: [66.77.174.16] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10717 invoked from network); 2 Jun 2015 16:29:47 -0000 Received: from unknown (HELO MCL-VMS-XCH01.digi.com) (66.77.174.16) by server-8.tower-45.messagelabs.com with SMTP; 2 Jun 2015 16:29:47 -0000 Received: from MTK-SMS-XCH03.digi.com (10.10.8.197) by MCL-VMS-XCH01.digi.com (10.5.8.49) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 2 Jun 2015 11:29:33 -0500 Received: from MTK-SMS-XCH02.digi.com ([fe80::4960:cfbf:ad5e:3cdb]) by MTK-SMS-XCH03.digi.com ([fe80::484d:c326:e7f1:a9fd%25]) with mapi id 14.03.0224.002; Tue, 2 Jun 2015 11:29:27 -0500 From: "Hodaszi, Robert" To: "linux-wireless@vger.kernel.org" Subject: Cannot disable transmission retry Thread-Topic: Cannot disable transmission retry Thread-Index: AQHQnVFO1YRsj/UdI0K+68p9kOcYXw== Date: Tue, 2 Jun 2015 16:29:27 +0000 Message-ID: <1433262583.7119.5.camel@A1-HR-PC> Accept-Language: en-US, hu-HU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [84.0.27.112] x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean Content-ID: <2E955EB6513A8847B3515DCFCBC7D88B@digi.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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;