From patchwork Thu Mar 31 12:20:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 5421 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4KTj7v32bHz3wcX for ; Thu, 31 Mar 2022 12:20:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4KTj7s6Jynz3L8; Thu, 31 Mar 2022 12:20:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4KTj7s5F2sz2xZG; Thu, 31 Mar 2022 12:20:57 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4KTj7s1LS1z2xNV for ; Thu, 31 Mar 2022 12:20:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4KTj7q5WQRzdx for ; Thu, 31 Mar 2022 12:20:55 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1648729256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTsdBtfeV3MlLM160gNqltMp+YRHx9XnUl4JiVQn3sw=; b=XebxUuWh0+R7wqsZDL+Qp0VANHrbGTIjvnWY39Zvk81jXutxSJZMK0gj43Obj4nEH/A9ne EPFlB1DYChRl2ACw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1648729256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTsdBtfeV3MlLM160gNqltMp+YRHx9XnUl4JiVQn3sw=; b=oFIQ5uko2py+ycfNRN4XDN8wK58Splu/Txlp8GU6b3kRmS/9hGcpSnjlQZUcjDDXsg1RHV lOpOxGGUPPrTDAgwGm5M4hfkuxks/F70hEQYOgj/pl9vwfBIYRPpiLHj2yVb5XHxk8HaFe +7l3jRHi26WLbhivAWkVAbK3RIpvkj2GEi9whG+zxsWRg6Z+HNFomS2m91bamDbk3Zjp5F +WFY9xATfZTGA3ZIt2CjZAgCMQVUU+DzULZfzoiAFFEs69UvJ8v0bQztCuT5wt6iyMA1G/ cwotq21YxnYnL6BFxvb9woF0T3ZS+9Xn2s69nXJDfyMBdyB/pbJQB39RTe6yfw== Message-ID: <3d92bf41-43ad-41f1-4a5a-5c064cd18ee8@ipfire.org> Date: Thu, 31 Mar 2022 12:20:45 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] Drop rfkill X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" It has been obsoleted by util-linux. Signed-off-by: Peter Müller --- config/rootfiles/common/rfkill | 2 - lfs/rfkill | 81 ----- make.sh | 1 - src/patches/rfkill-5.0-use_uapi_rfkill.patch | 341 ------------------- 4 files changed, 425 deletions(-) delete mode 100644 config/rootfiles/common/rfkill delete mode 100644 lfs/rfkill delete mode 100644 src/patches/rfkill-5.0-use_uapi_rfkill.patch diff --git a/config/rootfiles/common/rfkill b/config/rootfiles/common/rfkill deleted file mode 100644 index 8887a02f6..000000000 --- a/config/rootfiles/common/rfkill +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin/rfkill -#usr/share/man/man8/rfkill.8.gz diff --git a/lfs/rfkill b/lfs/rfkill deleted file mode 100644 index bfd4e8516..000000000 --- a/lfs/rfkill +++ /dev/null @@ -1,81 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007-2019 IPFire Team # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 0.5 - -THISAPP = rfkill-$(VER) -DL_FILE = $(THISAPP).tar.xz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = ce834c00c049cd86a04ab115c92ef548 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) - - # Apply upstream patches. - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/rfkill-5.0-use_uapi_rfkill.patch - - cd $(DIR_APP) && make $(MAKETUNING) - cd $(DIR_APP) && make install - - @rm -rf $(DIR_APP) - @$(POSTBUILD) diff --git a/make.sh b/make.sh index 2a24f02e3..a34bceb43 100755 --- a/make.sh +++ b/make.sh @@ -1716,7 +1716,6 @@ buildipfire() { lfsmake2 firmware-update lfsmake2 tshark lfsmake2 speedtest-cli - lfsmake2 rfkill lfsmake2 amazon-ssm-agent lfsmake2 libloc lfsmake2 ncdu diff --git a/src/patches/rfkill-5.0-use_uapi_rfkill.patch b/src/patches/rfkill-5.0-use_uapi_rfkill.patch deleted file mode 100644 index 4c3d3e144..000000000 --- a/src/patches/rfkill-5.0-use_uapi_rfkill.patch +++ /dev/null @@ -1,341 +0,0 @@ -From fd06998396d631f028fd8f8d7bcb2b442c578292 Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Thu, 8 Jan 2015 09:02:42 +0100 -Subject: use uapi rfkill.h - ---- - rfkill.h | 295 ++------------------------------------------------------------- - 1 file changed, 6 insertions(+), 289 deletions(-) - -diff --git a/rfkill.h b/rfkill.h -index d253b4e..058757f 100644 ---- a/rfkill.h -+++ b/rfkill.h -@@ -1,6 +1,3 @@ --#ifndef __RFKILL_H --#define __RFKILL_H -- - /* - * Copyright (C) 2006 - 2007 Ivo van Doorn - * Copyright (C) 2007 Dmitry Torokhov -@@ -18,6 +15,9 @@ - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -+#ifndef _UAPI__RFKILL_H -+#define _UAPI__RFKILL_H -+ - - #include - -@@ -29,7 +29,7 @@ - /** - * enum rfkill_type - type of rfkill switch. - * -- * @RFKILL_TYPE_ALL: toggles all switches (userspace only) -+ * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type) - * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. - * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. - * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. -@@ -83,7 +83,7 @@ struct rfkill_event { - __u8 type; - __u8 op; - __u8 soft, hard; --} __packed; -+} __attribute__((packed)); - - /* - * We are planning to be backward and forward compatible with changes -@@ -105,288 +105,5 @@ struct rfkill_event { - #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT) - - /* and that's all userspace gets */ --#ifdef __KERNEL__ --/* don't allow anyone to use these in the kernel */ --enum rfkill_user_states { -- RFKILL_USER_STATE_SOFT_BLOCKED = RFKILL_STATE_SOFT_BLOCKED, -- RFKILL_USER_STATE_UNBLOCKED = RFKILL_STATE_UNBLOCKED, -- RFKILL_USER_STATE_HARD_BLOCKED = RFKILL_STATE_HARD_BLOCKED, --}; --#undef RFKILL_STATE_SOFT_BLOCKED --#undef RFKILL_STATE_UNBLOCKED --#undef RFKILL_STATE_HARD_BLOCKED -- --#include --#include --#include --#include --#include --#include -- --/* this is opaque */ --struct rfkill; -- --/** -- * struct rfkill_ops - rfkill driver methods -- * -- * @poll: poll the rfkill block state(s) -- only assign this method -- * when you need polling. When called, simply call one of the -- * rfkill_set{,_hw,_sw}_state family of functions. If the hw -- * is getting unblocked you need to take into account the return -- * value of those functions to make sure the software block is -- * properly used. -- * @query: query the rfkill block state(s) and call exactly one of the -- * rfkill_set{,_hw,_sw}_state family of functions. Assign this -- * method if input events can cause hardware state changes to make -- * the rfkill core query your driver before setting a requested -- * block. -- * @set_block: turn the transmitter on (blocked == false) or off -- * (blocked == true) -- ignore and return 0 when hard blocked. -- * This callback must be assigned. -- */ --struct rfkill_ops { -- void (*poll)(struct rfkill *rfkill, void *data); -- void (*query)(struct rfkill *rfkill, void *data); -- int (*set_block)(void *data, bool blocked); --}; -- --#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) --/** -- * rfkill_alloc - allocate rfkill structure -- * @name: name of the struct -- the string is not copied internally -- * @parent: device that has rf switch on it -- * @type: type of the switch (RFKILL_TYPE_*) -- * @ops: rfkill methods -- * @ops_data: data passed to each method -- * -- * This function should be called by the transmitter driver to allocate an -- * rfkill structure. Returns %NULL on failure. -- */ --struct rfkill * __must_check rfkill_alloc(const char *name, -- struct device *parent, -- const enum rfkill_type type, -- const struct rfkill_ops *ops, -- void *ops_data); -- --/** -- * rfkill_register - Register a rfkill structure. -- * @rfkill: rfkill structure to be registered -- * -- * This function should be called by the transmitter driver to register -- * the rfkill structure. Before calling this function the driver needs -- * to be ready to service method calls from rfkill. -- * -- * If rfkill_init_sw_state() is not called before registration, -- * set_block() will be called to initialize the software blocked state -- * to a default value. -- * -- * If the hardware blocked state is not set before registration, -- * it is assumed to be unblocked. -- */ --int __must_check rfkill_register(struct rfkill *rfkill); -- --/** -- * rfkill_pause_polling(struct rfkill *rfkill) -- * -- * Pause polling -- say transmitter is off for other reasons. -- * NOTE: not necessary for suspend/resume -- in that case the -- * core stops polling anyway -- */ --void rfkill_pause_polling(struct rfkill *rfkill); -- --/** -- * rfkill_resume_polling(struct rfkill *rfkill) -- * -- * Pause polling -- say transmitter is off for other reasons. -- * NOTE: not necessary for suspend/resume -- in that case the -- * core stops polling anyway -- */ --void rfkill_resume_polling(struct rfkill *rfkill); -- -- --/** -- * rfkill_unregister - Unregister a rfkill structure. -- * @rfkill: rfkill structure to be unregistered -- * -- * This function should be called by the network driver during device -- * teardown to destroy rfkill structure. Until it returns, the driver -- * needs to be able to service method calls. -- */ --void rfkill_unregister(struct rfkill *rfkill); -- --/** -- * rfkill_destroy - free rfkill structure -- * @rfkill: rfkill structure to be destroyed -- * -- * Destroys the rfkill structure. -- */ --void rfkill_destroy(struct rfkill *rfkill); -- --/** -- * rfkill_set_hw_state - Set the internal rfkill hardware block state -- * @rfkill: pointer to the rfkill class to modify. -- * @state: the current hardware block state to set -- * -- * rfkill drivers that get events when the hard-blocked state changes -- * use this function to notify the rfkill core (and through that also -- * userspace) of the current state. They should also use this after -- * resume if the state could have changed. -- * -- * You need not (but may) call this function if poll_state is assigned. -- * -- * This function can be called in any context, even from within rfkill -- * callbacks. -- * -- * The function returns the combined block state (true if transmitter -- * should be blocked) so that drivers need not keep track of the soft -- * block state -- which they might not be able to. -- */ --bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); -- --/** -- * rfkill_set_sw_state - Set the internal rfkill software block state -- * @rfkill: pointer to the rfkill class to modify. -- * @state: the current software block state to set -- * -- * rfkill drivers that get events when the soft-blocked state changes -- * (yes, some platforms directly act on input but allow changing again) -- * use this function to notify the rfkill core (and through that also -- * userspace) of the current state. -- * -- * Drivers should also call this function after resume if the state has -- * been changed by the user. This only makes sense for "persistent" -- * devices (see rfkill_init_sw_state()). -- * -- * This function can be called in any context, even from within rfkill -- * callbacks. -- * -- * The function returns the combined block state (true if transmitter -- * should be blocked). -- */ --bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); -- --/** -- * rfkill_init_sw_state - Initialize persistent software block state -- * @rfkill: pointer to the rfkill class to modify. -- * @state: the current software block state to set -- * -- * rfkill drivers that preserve their software block state over power off -- * use this function to notify the rfkill core (and through that also -- * userspace) of their initial state. It should only be used before -- * registration. -- * -- * In addition, it marks the device as "persistent", an attribute which -- * can be read by userspace. Persistent devices are expected to preserve -- * their own state when suspended. -- */ --void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked); -- --/** -- * rfkill_set_states - Set the internal rfkill block states -- * @rfkill: pointer to the rfkill class to modify. -- * @sw: the current software block state to set -- * @hw: the current hardware block state to set -- * -- * This function can be called in any context, even from within rfkill -- * callbacks. -- */ --void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw); -- --/** -- * rfkill_blocked - query rfkill block -- * -- * @rfkill: rfkill struct to query -- */ --bool rfkill_blocked(struct rfkill *rfkill); --#else /* !RFKILL */ --static inline struct rfkill * __must_check --rfkill_alloc(const char *name, -- struct device *parent, -- const enum rfkill_type type, -- const struct rfkill_ops *ops, -- void *ops_data) --{ -- return ERR_PTR(-ENODEV); --} -- --static inline int __must_check rfkill_register(struct rfkill *rfkill) --{ -- if (rfkill == ERR_PTR(-ENODEV)) -- return 0; -- return -EINVAL; --} -- --static inline void rfkill_pause_polling(struct rfkill *rfkill) --{ --} -- --static inline void rfkill_resume_polling(struct rfkill *rfkill) --{ --} -- --static inline void rfkill_unregister(struct rfkill *rfkill) --{ --} -- --static inline void rfkill_destroy(struct rfkill *rfkill) --{ --} -- --static inline bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked) --{ -- return blocked; --} -- --static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked) --{ -- return blocked; --} -- --static inline void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked) --{ --} -- --static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) --{ --} -- --static inline bool rfkill_blocked(struct rfkill *rfkill) --{ -- return false; --} --#endif /* RFKILL || RFKILL_MODULE */ -- -- --#ifdef CONFIG_RFKILL_LEDS --/** -- * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED. -- * This function might return a NULL pointer if registering of the -- * LED trigger failed. Use this as "default_trigger" for the LED. -- */ --const char *rfkill_get_led_trigger_name(struct rfkill *rfkill); -- --/** -- * rfkill_set_led_trigger_name -- set the LED trigger name -- * @rfkill: rfkill struct -- * @name: LED trigger name -- * -- * This function sets the LED trigger name of the radio LED -- * trigger that rfkill creates. It is optional, but if called -- * must be called before rfkill_register() to be effective. -- */ --void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name); --#else --static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) --{ -- return NULL; --} -- --static inline void --rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) --{ --} --#endif -- --#endif /* __KERNEL__ */ - --#endif /* RFKILL_H */ -+#endif /* _UAPI__RFKILL_H */ --- -cgit v1.2.1 -