Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2783142pxb; Sat, 6 Feb 2021 07:36:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjFd/QKP9ihNoBUl+Mv7OP2pxSul8K8TtTd9y9Q119Yihp+isiZNwAQrD3hD9HBgwk+ZgX X-Received: by 2002:a17:906:dff1:: with SMTP id lc17mr9007944ejc.198.1612625797272; Sat, 06 Feb 2021 07:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612625797; cv=none; d=google.com; s=arc-20160816; b=QUf173TehbaTWef2FbMvmcXmfsub+yjeYlqndQuOG/wLdi4nbrbc8uTAOIPuJ8hE0V R9EaXBEFjoKS5WgtI4p5u8ld206kqqfzTg2sX7m0QWu7CE/tD0YtctUYoY6aE1CfQ+FB /aw2neFTqYUbodo/vhb3BNv8/opSLR1A0NNkE8KwqiqX5bLQLPVhMPR088i6COuZqAYn /tLE2egx/h6UnU4Llgv9tskRU2TWmsTA0NrEhGbK+61REly5+kaeO7QQT2fQT1Cr9nRp qz8kxe6MFzEnh0RSNegKnfcR4mXVLeKfkhduRYQWTHB2lz1AlV9JJ5s0TIsiHeJ8kst9 RTeA== 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 :message-id:date:subject:cc:to:from; bh=QN1+5ONCOHeMLLE8O7oE6y9rCJZhP9mPalEj4LbUZZA=; b=XS7QoFsWfSVuW6XnWAWBdT1EL4ObfB+drH8bCR34eL3A0VmdXzlmof/3E+4VmW1I6s DC69q1homPmwD4LViijVewGWCUtJFDqamIQTgNwQrkksngyWc8q20LvEhrAAjf4lnv/0 aeW+8uQ6R1i2D9Nlip8clC/YvcOsE383rBgJ7MpXHRQBAz1IoV2YoeTQOXH6dSMFSPY5 +AjI8erVwASbi7EJsIJ4Ap2bub51jPJoSwRQLfkUtYSs0myo4hrAx0TW9o9jyOSUiKGO iF9OygHeE/g154nIc1Xt6Ek0JqyX9UfKTfvf/Bj5uNFUo8y/sBNWriK+AJMtfZtGRA96 0D8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si5244569edr.441.2021.02.06.07.35.51; Sat, 06 Feb 2021 07:36:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhBFPfR (ORCPT + 99 others); Sat, 6 Feb 2021 10:35:17 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:40985 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhBFPfQ (ORCPT ); Sat, 6 Feb 2021 10:35:16 -0500 Received: from isengard.fritz.box (unknown [87.147.51.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 154C358005E; Sat, 6 Feb 2021 16:34:34 +0100 (CET) From: Markus Theil To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH 1/3] rfkill: update rfkill.h Date: Sat, 6 Feb 2021 16:34:09 +0100 Message-Id: <20210206153411.19097-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Markus Theil --- rfkill.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rfkill.h b/rfkill.h index 058757f..03e8af8 100644 --- a/rfkill.h +++ b/rfkill.h @@ -59,6 +59,8 @@ enum rfkill_type { * @RFKILL_OP_DEL: a device was removed * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all) + * into a state, also updating the default state used for devices that + * are hot-plugged later. */ enum rfkill_operation { RFKILL_OP_ADD = 0, @@ -67,6 +69,16 @@ enum rfkill_operation { RFKILL_OP_CHANGE_ALL, }; +/** + * enum rfkill_hard_block_reasons - hard block reasons + * @RFKILL_HARD_BLOCK_SIGNAL: the hardware rfkill signal is active + * @RFKILL_HARD_BLOCK_NOT_OWNER: the NIC is not owned by the host + */ +enum rfkill_hard_block_reasons { + RFKILL_HARD_BLOCK_SIGNAL = 1 << 0, + RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1, +}; + /** * struct rfkill_event - events for userspace on /dev/rfkill * @idx: index of dev rfkill @@ -74,6 +86,8 @@ enum rfkill_operation { * @op: operation code * @hard: hard state (0/1) * @soft: soft state (0/1) + * @hard_block_reasons: valid if hard is set. One or several reasons from + * &enum rfkill_hard_block_reasons. * * Structure used for userspace communication on /dev/rfkill, * used for events from the kernel and control to the kernel. @@ -82,7 +96,9 @@ struct rfkill_event { __u32 idx; __u8 type; __u8 op; - __u8 soft, hard; + __u8 soft; + __u8 hard; + __u8 hard_block_reasons; } __attribute__((packed)); /* -- 2.30.0