From patchwork Mon Nov 24 14:34:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5367211 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9F2899F39D for ; Mon, 24 Nov 2014 14:37:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C201520395 for ; Mon, 24 Nov 2014 14:37:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7A74202C8 for ; Mon, 24 Nov 2014 14:37:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbaKXOgm (ORCPT ); Mon, 24 Nov 2014 09:36:42 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:55551 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932323AbaKXOgl (ORCPT ); Mon, 24 Nov 2014 09:36:41 -0500 Received: by mail-wg0-f48.google.com with SMTP id y19so12671022wgg.35 for ; Mon, 24 Nov 2014 06:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uCMNFkrjIbtWCHnPOjWyCvQUB2R3RSOW1r7L0pTKP0s=; b=GiM5P2DrnDCNQu+avgj46WFwoyeEMNOjTo52hsrixmsA91N6webYe0ZUGnXMq//dh9 Z85li75Hthn5wRX9FFEBD7bsypLWW5ZfL1Sl0wVVWfKFYsOkfeq/g9HknLQxzV4gINrt qAcQCQHAITI1dT6Mm36C20A7JwBl4udkiwylZXTeCAaAXGIx8MC+bB/cVmV0dF6nmh5C Jf6crUtbJUrcyVhPkiX/o5IwGJok02ruva0yeARAyc6aOAx8v5DKGS0mR4TkfgP/IVHM XhyzsXb7fepEw1yRNxL78lHmLqWA759vUXiOCUVxnw7VjOBzt4LldHqFUfTTmAMFsyQx murA== X-Received: by 10.194.57.43 with SMTP id f11mr25184498wjq.6.1416839800050; Mon, 24 Nov 2014 06:36:40 -0800 (PST) Received: from localhost.localdomain (46-116-150-134.bb.netvision.net.il. [46.116.150.134]) by mx.google.com with ESMTPSA id n3sm21274744wjz.21.2014.11.24.06.36.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 06:36:39 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Luciano Coelho , Emmanuel Grumbach Subject: [PATCH 64/75] iwlwifi: mvm: add support for net detect Date: Mon, 24 Nov 2014 16:34:40 +0200 Message-Id: <1416839691-28533-64-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 From: Luciano Coelho Add the net detect WoWLAN flag to indicate support and use the nd_config from the WoWLAN configuration to start net detect, if it is set. The WoWLAN configuration takes precedence over the debugfs configuration. Signed-off-by: Luciano Coelho Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/d3.c | 8 +++++--- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 0fc72fc..3c66028 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c @@ -1030,13 +1030,15 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, vif, mvmvif, ap_sta); if (ret) goto out; - } else if (mvm->nd_config) { + } else if (wowlan->nd_config || mvm->nd_config) { ret = iwl_mvm_switch_to_d3(mvm); if (ret) goto out; - ret = iwl_mvm_scan_offload_start(mvm, vif, mvm->nd_config, - &mvm->nd_ies); + ret = iwl_mvm_scan_offload_start( + mvm, vif, + wowlan->nd_config ?: mvm->nd_config, + &mvm->nd_ies); if (ret) goto out; } else { diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 6214133..d9d8d30 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -467,7 +467,8 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) mvm->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT | WIPHY_WOWLAN_EAP_IDENTITY_REQ | - WIPHY_WOWLAN_RFKILL_RELEASE; + WIPHY_WOWLAN_RFKILL_RELEASE | + WIPHY_WOWLAN_NET_DETECT; if (!iwlwifi_mod_params.sw_crypto) mvm->wowlan.flags |= WIPHY_WOWLAN_SUPPORTS_GTK_REKEY | WIPHY_WOWLAN_GTK_REKEY_FAILURE | @@ -476,6 +477,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) mvm->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS; mvm->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN; mvm->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN; + mvm->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES; mvm->wowlan.tcp = &iwl_mvm_wowlan_tcp_support; hw->wiphy->wowlan = &mvm->wowlan; }