From patchwork Mon Nov 24 13:58:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5366661 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CD79C11AC for ; Mon, 24 Nov 2014 14:11:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F5D2203C4 for ; Mon, 24 Nov 2014 14:11:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E0BC202F8 for ; Mon, 24 Nov 2014 14:11:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XsuMX-0006Os-2l; Mon, 24 Nov 2014 14:11:33 +0000 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XsuMV-0006JC-11 for ath10k@lists.infradead.org; Mon, 24 Nov 2014 14:11:32 +0000 Received: by mail-wi0-f169.google.com with SMTP id r20so9123055wiv.0 for ; Mon, 24 Nov 2014 06:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CgZpyn2uEznMW3yR/Rmp/8m5gisOi8Yv6cJQCAerSIs=; b=oI42eNxcdE0Wdshm+86QqtOvmMBxO8nxK7bRrh9CvU51JMpgDjmC2MUbAwNTK7BULb zrdHFsIZdvY7hHnvkT42CrZXzMKrThr+vxkvDznbCI4zqZX9AKrq3MZB4+9qOrKHtRVP pFNpL7x9SA99a39VrD3c9YwE0LwiF24Sre6PA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CgZpyn2uEznMW3yR/Rmp/8m5gisOi8Yv6cJQCAerSIs=; b=gTLQYS90WYrWkmiXg9XsN67FaDOp/Rkn128XJMPuU/QrnRvHrgepaK7RuBVzbm1Opb GEjd+QOL1OvZC5MvzhbL7ap3lWJw3PRFnagDJ31XElRxH7J9XKoo+CkfTEexABnAzV8J mb0LfLdYeS+GpAO87Np2fzedagik877vAVOpieH1F+LDyMljsUgsnl3EIEn/Buv7V9jG 7jgEcftgqlzZ9lqm8bq/7RV5TR1ckMneBP5o9QuDkg2NsxSHnpmF4QFMAl0SCPndNcqX sJiO92sXyPdDeYoRwcasJFCFGtTkP9qp24JYTT3GbMymk4ETEhmBSMQyJnZKDPxZL9AS gkFQ== X-Gm-Message-State: ALoCoQnG+rIQ4XbR4dBg2F0sK9TMH7yCQ9TaBEB1vlpP9nL3waAI3LdxtbDTfkaffEeHK2xbxk4xxN4cSxsAVS7Do0wvx/O7zvSMPGQsXpxjUoSa6rNeiWdz8OqUsdFzWNpSFK8tNJ5cWFQdLYkZAeKR6bVK24shhjW2j/o41y9TlvE7Lvnnc+4= X-Received: by 10.180.73.143 with SMTP id l15mr21943758wiv.24.1416838269264; Mon, 24 Nov 2014 06:11:09 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id mu4sm12216866wib.2.2014.11.24.06.11.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 06:11:08 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH 2/3] ath10k: make hw roc more reliable Date: Mon, 24 Nov 2014 14:58:32 +0100 Message-Id: <1416837513-13386-2-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1416837513-13386-1-git-send-email-michal.kazior@tieto.com> References: <1416837513-13386-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141124_061131_232915_A2133366 X-CRM114-Status: UNSURE ( 8.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, 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 With P2P concurrency requested hw roc duration time can be very small. Some firmware revisions refuse scan requests with too small channel dwell time. This prevents messages like, e.g. with connected STA vif and performing P2P Find: ath10k_pci 0000:00:05.0: failed to switch to channel for roc scan ieee80211 phy3: failed to start next HW ROC (-110) Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ drivers/net/wireless/ath/ath10k/wmi.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 8deae4d..272a9d9 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3807,6 +3807,8 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, if (ret) goto exit; + duration = max(duration, WMI_SCAN_CHAN_MIN_TIME_MSEC); + memset(&arg, 0, sizeof(arg)); ath10k_wmi_start_scan_init(ar, &arg); arg.vdev_id = arvif->vdev_id; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index a38d788..1b7141a 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -1952,6 +1952,11 @@ struct wmi_ssid_list { #define WLAN_SCAN_PARAMS_MAX_BSSID 4 #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256 +/* Values lower than this may be refused by some firmware revisions with a scan + * completion with a timedout reason. + */ +#define WMI_SCAN_CHAN_MIN_TIME_MSEC 40 + /* Scan priority numbers must be sequential, starting with 0 */ enum wmi_scan_priority { WMI_SCAN_PRIORITY_VERY_LOW = 0,