Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3340524pxb; Sun, 31 Jan 2021 12:30:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9exUEHyQgRQB1/snmt83lDSXGOyS8UT2wQ2xG/s4h3hRoa1h2hHrw+f22VZH5LGWGWsAy X-Received: by 2002:a05:6402:46:: with SMTP id f6mr15484113edu.163.1612125035848; Sun, 31 Jan 2021 12:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612125035; cv=none; d=google.com; s=arc-20160816; b=vC6glV2M8/SZ4f+ARo2fwmuUVum/eDtD0t78zoMnn5lR8hjORT+7C4ACymLN9ppC/H VSYBMjCP7Fzn6SY/gB4vZjfmB/2/otl98UCsP4VkvrcqOU9X/yDsSGTIh/479aHcSZK5 LDVr3ReWlEBR7pxLoPxCiNv755f6e4U5a0nvYHpCoVRgepT5jgVfGKqlSu4wdc+O4q7k UCGOOhWk9AfgjsHyVRoxXv4mNVzlpuB0AZEKe9DZPO4hq7nWZvIcTunngRzNqvJCENsr pxpo4XvIlDt5FYTiRnj2eCgMM1Ip1N4GPfQZoAF03cIYU66iocEgBfoGziViiThQd/w9 l5JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=VZGEWBeMumZTx1a7b0gMey+A8MxfaLW1u2VZBiKNpL8=; b=pR7ncwU9HWzmSEuDmbPlQmYQbeZKimxZAKzJxeS/jrmk8XJgWdDopYDfmrYi1SLDTH 1BOayWBK1fFXYvY7/QePyWGc3xHDrP+zqC2kA+e73++j9j6IbCnqhqXRzgwI/6GAI+Vr fD443Ix58SIoll5ktmBAmg3Mk47ksxyk+HLcRURw0MvACEF54IHXNrk63rUv9EiKPOZn KuQiiAoLgFZ2ob6C9RnQH5Z3QqyfhXR+gGHprKQte/NMcIpphuBfKmHckujPGarNowo4 djTxiBTe7NONTnnVxxmiME11hkm8TZ7VQLq9aERlZlV1K7Ysjosy/46RKtqf0bMfFwYm cTwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si9764046edv.235.2021.01.31.12.30.12; Sun, 31 Jan 2021 12:30:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbhAaUYo (ORCPT + 99 others); Sun, 31 Jan 2021 15:24:44 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:43164 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231982AbhAaUKr (ORCPT ); Sun, 31 Jan 2021 15:10:47 -0500 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l6HMZ-0041H2-Mf; Sun, 31 Jan 2021 20:22:20 +0200 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Sun, 31 Jan 2021 20:22:07 +0200 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210131182212.929755-1-luca@coelho.fi> References: <20210131182212.929755-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH 07/12] iwlwifi: mvm: implement approved list for the PPAG feature Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Luca Coelho We should only allow PPAG to be enabled by OEMs that are in the approved list. In order to do this, we need to compare the system vendor string retrieved from SMBIOS to a list maintained in the driver. If the vendor string is not in the list, we don't allow PPAG to be used. For now the list is empty, but entries will be added to it individually, in subsequent patches. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 9f8751ceb45b..e29f2d310fb6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -6,6 +6,7 @@ */ #include #include +#include #include "iwl-trans.h" #include "iwl-op-mode.h" @@ -1043,6 +1044,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm) return ret; } +static const struct dmi_system_id dmi_ppag_approved_list[] = { +}; + static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) { int ret; @@ -1054,6 +1058,15 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) ret); return 0; } + + if (!dmi_check_system(dmi_ppag_approved_list)) { + IWL_DEBUG_RADIO(mvm, + "System vendor '%s' is not in the approved list, disabling PPAG.\n", + dmi_get_system_info(DMI_SYS_VENDOR)); + mvm->fwrt.ppag_table.v1.enabled = cpu_to_le32(0); + return 0; + } + return iwl_mvm_ppag_send_cmd(mvm); } -- 2.29.2