History

Merge tag 'wireless-next-2022-03-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next

Kalle Valo says: ==================== wireless-next patches for v5.18 Third set of patches for v5.18. Smaller set this time, support for mt7921u and some work on MBSSID support. Also a workaround for rfkill userspace event. Major changes: mac80211 * MBSSID beacon handling in AP mode rfkill * make new event layout opt-in to workaround buggy user space rtlwifi * support On Networks N150 device id mt76 * mt7915: MBSSID and 6 GHz band support * new driver mt7921u ====================

David S. Miller committed 4 years ago

Commit dca51fe2 parents e913c09 54f586a69 files · +2307 −592Browse files

Showing the changes to include/uapi (1 of 69 files). Show all

Unified · Split

include/uapi/linux/rfkill.h+12−2
@@ -159,8 +159,16 @@ struct rfkill_event_ext { · 158 unmodified lines
159159 * old behaviour for all userspace, unless it explicitly opts in to the
160160 * rules outlined here by using the new &struct rfkill_event_ext.
161161 *
162− * Userspace using &struct rfkill_event_ext must adhere to the following
163− * rules
162+ * Additionally, some other userspace (bluez, g-s-d) was reading with a
163+ * large size but as streaming reads rather than message-based, or with
164+ * too strict checks for the returned size. So eventually, we completely
165+ * reverted this, and extended messages need to be opted in to by using
166+ * an ioctl:
167+ *
168+ * ioctl(fd, RFKILL_IOCTL_MAX_SIZE, sizeof(struct rfkill_event_ext));
169+ *
170+ * Userspace using &struct rfkill_event_ext and the ioctl must adhere to
171+ * the following rules:
164172 *
165173 * 1. accept short writes, optionally using them to detect that it's
166174 * running on an older kernel;
@@ -175,6 +183,8 @@ struct rfkill_event_ext { · 8 unmodified lines
175183 #define RFKILL_IOC_MAGIC 'R'
176184 #define RFKILL_IOC_NOINPUT 1
177185 #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
186+#define RFKILL_IOC_MAX_SIZE 2
187+#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_EXT_SIZE, __u32)
178188
179189 /* and that's all userspace gets */
180190