From patchwork Mon Feb 15 15:27:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 382960 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp1172069jao; Mon, 15 Feb 2021 07:39:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7QvtxX4J6OiZU2RJ9r9PhxpTXzYgZiGrTEOeZdpP+61o8N/ra7s9dWnXxdp0sQlSHUwEg X-Received: by 2002:a17:907:210e:: with SMTP id qn14mr16821386ejb.237.1613403547294; Mon, 15 Feb 2021 07:39:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613403547; cv=none; d=google.com; s=arc-20160816; b=bPWc35B4u+aGRLAXC8gaNqSMuZ6wGetd5gsmjUzTxs4sITUoX/WlUDUKkD/OaCfWNn cDjb+ddou4YH0NiGoNHE69Y9En6iH83DLJkcBgSay2t7wkC/TgPkFXlxsyB1A1881G6O c9sjwgkO36lwlaJUzJ1Wva9vmcOY5FAO3hYtUztA10q3CRqvGDnXUQLPHnKEquNTlGQa h/zdQ+m+YlQgcoZSeuIj2+Zd6mmwvEm4sfIf3SURYQyZx+XqqLQBOwxvJpjZyCOY0dFT OZ8RLIftq4o3Ywk74BUSos6bA6mcAzSZyzFdJZ19oeEwnMDn63+hAzfDUVz10CGCogq7 QxJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JasSHiX7Y1hGAUaMoBANNoperR19Te/D+MxEyZwPm00=; b=DVJK7iPWpBitcRWVsCDutz6QT9uY4ZsKM7dsWH9Ukfkvfhff75nFta39Ap+WRaOAbs NQtBQIQd/hs4gVCFhew0PkrY5iObyLurUNh3m5d6J0zAZccZYwGUbXjBGtUCahSe/Gv2 bYUbPqvyUGTvpypzDK3oA5fyqmi8tA3Hl3eJgTnPID6LwdTVbEHNyK51/fJlZy7ShpkM +fFpbzvbM7mbeGz+LkNQpBS0fMyLDM3MAI72mA7ciKXpU+RFDwXYYYwaKmL61LfcYFPS iv0tgN2j9/GHTG3a2Iw21IPkOAXUqIfva2UayHB+Jq/AAFX5olnmTp3wo/66jn3La6u3 Kkrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u4HlKl10; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si12376627ejv.626.2021.02.15.07.39.07; Mon, 15 Feb 2021 07:39:07 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u4HlKl10; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbhBOPhy (ORCPT + 13 others); Mon, 15 Feb 2021 10:37:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:49636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbhBOPhF (ORCPT ); Mon, 15 Feb 2021 10:37:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 69E3864EE0; Mon, 15 Feb 2021 15:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403160; bh=i+j9M7r7dmHplaxzYAZpfgHpxO9jZ4VTKN8GzQOZ0No=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4HlKl10vNGAIQsHL2YrSrxhMGcAvTIk+o6+4vRQSmw1qsoaCm02vt2no8b+k4gaO fcaB+Rqt6mHOxiu8bjUWbW1j4SjNZzn26N4gSOzN2yMqEX0itG25ZUzb8fA94QuM6Y qrCwSw5eUNBxuFSJDw5IMyyRG+fechA3LEKCj9FA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Johannes Berg , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 051/104] ath9k: fix build error with LEDS_CLASS=m Date: Mon, 15 Feb 2021 16:27:04 +0100 Message-Id: <20210215152721.121960495@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit b64acb28da8394485f0762e657470c9fc33aca4d ] When CONFIG_ATH9K is built-in but LED support is in a loadable module, both ath9k drivers fails to link: x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_deinit_leds': gpio.c:(.text+0x36): undefined reference to `led_classdev_unregister' x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_init_leds': gpio.c:(.text+0x179): undefined reference to `led_classdev_register_ext' The problem is that the 'imply' keyword does not enforce any dependency but is only a weak hint to Kconfig to enable another symbol from a defconfig file. Change imply to a 'depends on LEDS_CLASS' that prevents the incorrect configuration but still allows building the driver without LED support. The 'select MAC80211_LEDS' is now ensures that the LED support is actually used if it is present, and the added Kconfig dependency on MAC80211_LEDS ensures that it cannot be enabled manually when it has no effect. Fixes: 197f466e93f5 ("ath9k_htc: Do not select MAC80211_LEDS by default") Signed-off-by: Arnd Bergmann Acked-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210125113654.2408057-1-arnd@kernel.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath9k/Kconfig | 8 ++------ net/mac80211/Kconfig | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index a84bb9b6573f8..e150d82eddb6c 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig @@ -21,11 +21,9 @@ config ATH9K_BTCOEX_SUPPORT config ATH9K tristate "Atheros 802.11n wireless cards support" depends on MAC80211 && HAS_DMA + select MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211 select ATH9K_HW select ATH9K_COMMON - imply NEW_LEDS - imply LEDS_CLASS - imply MAC80211_LEDS help This module adds support for wireless adapters based on Atheros IEEE 802.11n AR5008, AR9001 and AR9002 family @@ -176,11 +174,9 @@ config ATH9K_PCI_NO_EEPROM config ATH9K_HTC tristate "Atheros HTC based wireless cards support" depends on USB && MAC80211 + select MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211 select ATH9K_HW select ATH9K_COMMON - imply NEW_LEDS - imply LEDS_CLASS - imply MAC80211_LEDS help Support for Atheros HTC based cards. Chipsets supported: AR9271 diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index cd9a9bd242bab..51ec8256b7fa9 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig @@ -69,7 +69,7 @@ config MAC80211_MESH config MAC80211_LEDS bool "Enable LED triggers" depends on MAC80211 - depends on LEDS_CLASS + depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211 select LEDS_TRIGGERS help This option enables a few LED triggers for different