From patchwork Fri Feb 18 09:38:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 544084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5899C433EF for ; Fri, 18 Feb 2022 10:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233887AbiBRKJH (ORCPT ); Fri, 18 Feb 2022 05:09:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbiBRKJH (ORCPT ); Fri, 18 Feb 2022 05:09:07 -0500 X-Greylist: delayed 1783 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 18 Feb 2022 02:08:50 PST Received: from imap2.colo.codethink.co.uk (imap2.colo.codethink.co.uk [78.40.148.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FF4933A05 for ; Fri, 18 Feb 2022 02:08:50 -0800 (PST) Received: from [167.98.27.226] (helo=rainbowdash) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1nKzjA-0005DK-49; Fri, 18 Feb 2022 09:39:00 +0000 Received: from ben by rainbowdash with local (Exim 4.95) (envelope-from ) id 1nKzj9-005E3m-R8; Fri, 18 Feb 2022 09:38:59 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk, Johannes Berg , linux-wireless@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Emmanuel Grumbach , Ben Dooks , Neill Whillans Subject: [PATCH] rfkill: define rfill_soft_blocked() if \!RFKILL Date: Fri, 18 Feb 2022 09:38:58 +0000 Message-Id: <20220218093858.1245677-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org If CONFIG_RFKILL is not set, the Intel WiFi driver will not build the iw_mvm driver part due to the missing rfill_soft_blocked() call. Adding a inline declaration of rfill_soft_blocked() if CONFIG_RFKILL=n fixes the following error: drivers/net/wireless/intel/iwlwifi/mvm/mvm.h: In function 'iwl_mvm_mei_set_sw_rfkill_state': drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:2215:38: error: implicit declaration of function 'rfkill_soft_blocked'; did you mean 'rfkill_blocked'? [-Werror=implicit-function-declaration] 2215 | mvm->hw_registered ? rfkill_soft_blocked(mvm->hw->wiphy->rfkill) : false; | ^~~~~~~~~~~~~~~~~~~ | rfkill_blocked Signed-off-by: Ben Dooks Reported-by: Neill Whillans Fixes: 7cf800f46e07e6b75a43036c4389d6ca717fd017 ("iwlwifi: mvm: don't feed the hardware RFKILL into iwlmei ") --- include/linux/rfkill.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index c35f3962dc4f..373003ace639 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h @@ -308,6 +308,11 @@ static inline bool rfkill_blocked(struct rfkill *rfkill) return false; } +static inline bool rfkill_soft_blocked(struct rfkill *rfkill) +{ + return false; +} + static inline enum rfkill_type rfkill_find_type(const char *name) { return RFKILL_TYPE_ALL;