Skip to contentSkip to conversation

rfkill: define rfill_soft_blocked() if \!RFKILL

PATCH New Ben Dooks 1 participant 1 message Feb 18, 2022 Rfkill

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 rfkill: define rfill_soft_blocked() if \!RFKILL

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
Fixes 7cf800f46e07e6b75a43036c4389d6ca717fd017 ("iwlwifi: mvm: don't feed the hardware RFKILL into iwlmei

")

---
 include/linux/rfkill.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/rfkill.h +5 -0
index c35f3962dc4f..373003ace639 100644
@@ -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;
Signature · 1 line
2.34.1