Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp849243pxb; Sat, 16 Jan 2021 09:07:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxfagcSJ/5Jptt9P+qbHLQCqoHcsFkosRUqoPWQPwUKBkvcK3F1fsxWzDRD21Pl7v1U9Tcq X-Received: by 2002:a05:6402:b79:: with SMTP id cb25mr13639421edb.346.1610816847922; Sat, 16 Jan 2021 09:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610816847; cv=none; d=google.com; s=arc-20160816; b=j43RRtpOu8VvsUsb19peEa0iPCVYoNPhMq8H2/wLXUA4dc3H+46gmbTjT4AwflzF1h od235vltgMlWYYT2IQnET4vJfKad1OUAw8PHU5AjLvGLFgJCASlmGg6cT3VY2m0v0nrH VAfVVVdl8bR9QVbeIy06WRCDh7E/wyGUQV2jgBrO7EHffopRX2xOPJPjmophzVdQL/Bb YbGmb5SgkRECujiRVXxC5qstQCBRjJABYxuTxzUIPMC5WBu2RqgTZ3XnsT9uMlLQcrlh NfxlIx3T3PwWvwzg62cE33uiJ36OmNi+i5X3QXvHvpkWgFaBeot9G2jIc7zATSIAyGUe ZFsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QN1+5ONCOHeMLLE8O7oE6y9rCJZhP9mPalEj4LbUZZA=; b=avLc5jdjqlCmH9hgd8g2Q75bAHoY+xKCYXflsmpaON4Slm7scQ3J/hQnj87Gxpf/uw I5HbuF1tGl4vDKFQ422uZrLurh2HYCAwLYJDdeNDizFJ7K3L7vANrlFEMDwtFDwLn2RZ 2UXUI9iiKxovRxghj5hjf4Ku9Wt/sBWk3OBniw8VF1YHmTXQH5vrxnnLb7XN3Ze/fid2 E18YEqlBjK2LwQ70mpcIfAFO5ZR4H01YbDEUMjQYo+8PS4oqjUj1HpV6T2qz9V7xGC3H QfB0JE16HGYoxA+UX5agb0JFCgCChRwEVvuN6pisSDeBFSbTJ96xrOZskuWW+twkvg7E uIiw== 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 g10si5227972ejp.536.2021.01.16.09.06.36; Sat, 16 Jan 2021 09:07:27 -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 S1726703AbhAPMxX (ORCPT + 99 others); Sat, 16 Jan 2021 07:53:23 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:36246 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726603AbhAPMxX (ORCPT ); Sat, 16 Jan 2021 07:53:23 -0500 Received: from legolas.fritz.box (unknown [84.174.243.181]) (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 27CBF58008D; Sat, 16 Jan 2021 13:52:04 +0100 (CET) From: Markus Theil To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH 2/4] rfkill: update rfkill.h Date: Sat, 16 Jan 2021 13:51:44 +0100 Message-Id: <20210116125146.31932-3-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116125146.31932-1-markus.theil@tu-ilmenau.de> References: <20210116125146.31932-1-markus.theil@tu-ilmenau.de> 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