From patchwork Tue Sep 26 06:41:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 818477 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jLIUH0OM"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y1Wcm3y2Nz9t43 for ; Tue, 26 Sep 2017 16:43:36 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935241AbdIZGly (ORCPT ); Tue, 26 Sep 2017 02:41:54 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33155 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934198AbdIZGlw (ORCPT ); Tue, 26 Sep 2017 02:41:52 -0400 Received: by mail-qt0-f196.google.com with SMTP id b1so6478118qtc.0; Mon, 25 Sep 2017 23:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=NCYMz8oIJ5GgFDOJdc82sgJnhjAkQtUCvDmez4lg9bU=; b=jLIUH0OMcoZb4Y+8IDuZVhp9Pk2S08ieRggOt++ldXRbX43qqUwvspXCRKzAF0/34i uw07ty2//gfKxCQDiMucX+EHV2YAT0VLWV5/vCidGwP80NvaiXxBkE+U8VemVNyKZYB5 WdeVAs1CvKyn2wMBPw69fn1YGEze3DLdZqB/MZj9DiFbjtCR8isgjmnIphD0YlAQTvIo RucEgpF11Ss3i+kYHltnaFQSruDKnPAOaQy7hzbSAbkI86hYN7LgjMLgZazgJuP0OjVl iI58CAwh61ccXuCyuo/nNo4QSKk6rI4hRTQBOc++DmVyrg4nomZf/B85kMO/7IWTlNIa 1tgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=NCYMz8oIJ5GgFDOJdc82sgJnhjAkQtUCvDmez4lg9bU=; b=oqtyzX+DLEZb38dGRIgIHA/y4Bfk8ZWgHAHhIl1OMfws5tr5zUDWjDluvjW3JSCbyk WwWabMZvmo9kvOdiotK+NUjmePrWhXIUFCvY3qostLiAx/vorxxyqEbeTI6XCnXugFw9 fA9s40sN7agjY2N5zPXV1Z6yUy1FOkcYRqTc87M5/LrvKZrngiztMV67D1wDv5vxM3ca tIApIYEM0QNOjh9mcTvaziKF0vzoF5SCTUL0cSyFqKox+D4zcP02queJDO7QwVGP7xeC jgQ6eJeIb9kiLxQ5EFXx6/81dUcoP6SBh/eEG8kTBwchdhIP2FNMW6Ajdn5NEqqSTqv0 ifHA== X-Gm-Message-State: AHPjjUjLCsRRYJBK1J3fMBpSo9EedyIAJLZG9fCsALLFcRgEzfe6Bd0Q CF0CxyktP1DwjGZFnSWaA1jAX5Ap X-Google-Smtp-Source: AOwi7QDei62ew6HPGFiyjt7hrq/uKzizTTPRpesXA9uYpWjrto7Nyt9lO3YaGHdh07UXBg9QAfuecQ== X-Received: by 10.200.23.29 with SMTP id w29mr15099572qtj.151.1506408111272; Mon, 25 Sep 2017 23:41:51 -0700 (PDT) Received: from localhost ([2001:67c:1562:8007::aac:4468]) by smtp.gmail.com with ESMTPSA id u54sm6401047qtj.44.2017.09.25.23.41.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 23:41:49 -0700 (PDT) From: AceLan Kao To: QCA ath9k Development , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Date: Tue, 26 Sep 2017 14:41:35 +0800 Message-Id: <1506408099-18488-2-git-send-email-acelan.kao@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506408099-18488-1-git-send-email-acelan.kao@canonical.com> References: <1506408099-18488-1-git-send-email-acelan.kao@canonical.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI for WLAN device. So adding a quirk to list those machines and set use_msi automatically. Adding Dell Inspiron 24-3460 to the quirk. Signed-off-by: AceLan Kao --- drivers/net/wireless/ath/ath9k/init.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index b6b7a35..1667949 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "ath9k.h" @@ -96,6 +97,24 @@ static const struct ieee80211_tpt_blink ath9k_tpt_blink[] = { }; #endif +static int __init set_use_msi(const struct dmi_system_id *dmi) +{ + ath9k_use_msi = 1; + return 1; +} + +static const struct dmi_system_id ath9k_quirks[] __initconst = { + { + .callback = set_use_msi, + .ident = "Dell Inspiron 24-3460", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 24-3460"), + }, + }, + {} +}; + static void ath9k_deinit_softc(struct ath_softc *sc); static void ath9k_op_ps_wakeup(struct ath_common *common) @@ -1104,6 +1123,8 @@ static int __init ath9k_init(void) goto err_pci_exit; } + dmi_check_system(ath9k_quirks); + return 0; err_pci_exit: