From patchwork Sun May 3 19:31:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 6321841 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 98C7A9F374 for ; Sun, 3 May 2015 19:32:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C89C32039D for ; Sun, 3 May 2015 19:32:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DACF32039C for ; Sun, 3 May 2015 19:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613AbbECTcK (ORCPT ); Sun, 3 May 2015 15:32:10 -0400 Received: from mga03.intel.com ([134.134.136.65]:63552 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbbECTcH (ORCPT ); Sun, 3 May 2015 15:32:07 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 03 May 2015 12:32:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,361,1427785200"; d="scan'208";a="565602153" Received: from kspivak-mobl2.ger.corp.intel.com (HELO egrumbacBox.ger.corp.intel.com) ([10.254.145.166]) by orsmga003.jf.intel.com with ESMTP; 03 May 2015 12:32:04 -0700 From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Luciano Coelho , Emmanuel Grumbach Subject: [PATCH 05/42] iwlwifi: mvm: don't increase max_out_time when low priority scan is requested Date: Sun, 3 May 2015 22:31:16 +0300 Message-Id: <1430681513-7838-5-git-send-email-emmanuel.grumbach@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430681438.3240.3.camel@intel.com> References: <1430681438.3240.3.camel@intel.com> 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=unavailable 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 From: Luciano Coelho In some cases, max_out_time value is smaller than 200 and having the NL80211_SCAN_FLAG_LOW_PRIORITY flag was actually causing the max_out_time to be increased. To avoid that, set max_out_time to 200 only if it's greater than 200. Signed-off-by: Luciano Coelho Reviewed-by: Alexander Bondar Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 9f72505..8a0b244 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -257,7 +257,8 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, } } - if (flags & NL80211_SCAN_FLAG_LOW_PRIORITY) + if ((flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && + (params->max_out_time > 200)) params->max_out_time = 200; not_bound: