diff --git a/kernel-patches/6.1/base/base.patch b/kernel-patches/6.1/base/base.patch index 45c59989e9..1c0375ff92 100644 --- a/kernel-patches/6.1/base/base.patch +++ b/kernel-patches/6.1/base/base.patch @@ -29658,7 +29658,7 @@ diff -ruN a/fs/fuse/inode.c b/fs/fuse/inode.c WARN_ON(!list_empty(&fc->devices)); + idr_for_each(&fc->passthrough_req, free_fuse_passthrough, NULL); + idr_destroy(&fc->passthrough_req); - kfree_rcu(fc, rcu); + kfree(fc); } EXPORT_SYMBOL_GPL(fuse_free_conn); diff -ruN a/fs/fuse/Makefile b/fs/fuse/Makefile @@ -34171,9 +34171,9 @@ diff -ruN a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h #define FUSE_SECURITY_CTX (1ULL << 32) #define FUSE_HAS_INODE_DAX (1ULL << 33) +#define FUSE_PASSTHROUGH (1ULL << 34) + #define FUSE_HAS_EXPIRE_ONLY (1ULL << 35) /** - * CUSE INIT request/reply flags @@ -548,6 +549,9 @@ /* Reserved opcodes: helpful to detect structure endian-ness */ CUSE_INIT_BSWAP_RESERVED = 1048576, /* CUSE_INIT << 8 */ @@ -40007,10 +40007,10 @@ diff -ruN a/net/bluetooth/sco.c b/net/bluetooth/sco.c + sco_pi(sk)->wbs_pkt_len = hdev->wbs_pkt_len; + - return err; - } + release_sock(sk); -@@ -1103,7 +1106,7 @@ + unlock: +@@ -1109,7 +1109,7 @@ break; } diff --git a/kernel-patches/6.1/others/hid-buttons.old b/kernel-patches/6.1/others/hid-buttons.old deleted file mode 100644 index 08985a2c67..0000000000 --- a/kernel-patches/6.1/others/hid-buttons.old +++ /dev/null @@ -1,30 +0,0 @@ ---- a/drivers/platform/x86/intel/hid.c 2020-04-20 19:28:32.000000000 +0200 -+++ b/drivers/platform/x86/intel/hid.c 2020-05-04 18:01:26.427423389 +0200 -@@ -60,6 +60,27 @@ - - static const struct dmi_system_id button_array_table[] = { - { -+ .ident = "HP ProBook x360 11 G5 EE", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "HP"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook x360 11 G5 EE"), -+ }, -+ }, -+ { -+ .ident = "HUAWEI MateBook HZ-W09", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "MateBook HZ-W09"), -+ }, -+ }, -+ { -+ .ident = "HUAWEI MateBook HZ-W19", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "MateBook HZ-W19"), -+ }, -+ }, -+ { - .ident = "Wacom MobileStudio Pro 13", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Wacom Co.,Ltd"), diff --git a/kernel-patches/6.1/others/rumble-nintendo.patch b/kernel-patches/6.1/others/rumble-nintendo.patch deleted file mode 100644 index 6d84d18a67..0000000000 --- a/kernel-patches/6.1/others/rumble-nintendo.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c -index 5bfc0c450460..931a5996d0de 100644 ---- a/drivers/hid/hid-nintendo.c -+++ b/drivers/hid/hid-nintendo.c -@@ -433,7 +433,9 @@ struct joycon_ctlr { - u8 usb_ack_match; - u8 subcmd_ack_match; - bool received_input_report; -+ unsigned int last_input_report_msecs; - unsigned int last_subcmd_sent_msecs; -+ unsigned int consecutive_valid_report_deltas; - - /* factory calibration data */ - struct joycon_stick_cal left_stick_cal_x; -@@ -543,19 +545,54 @@ static void joycon_wait_for_input_report(struct joycon_ctlr *ctlr) - * Sending subcommands and/or rumble data at too high a rate can cause bluetooth - * controller disconnections. - */ -+#define JC_INPUT_REPORT_MIN_DELTA 8 -+#define JC_INPUT_REPORT_MAX_DELTA 17 -+#define JC_SUBCMD_TX_OFFSET_MS 4 -+#define JC_SUBCMD_VALID_DELTA_REQ 3 -+#define JC_SUBCMD_RATE_MAX_ATTEMPTS 500 -+#define JC_SUBCMD_RATE_LIMITER_USB_MS 20 -+#define JC_SUBCMD_RATE_LIMITER_BT_MS 60 -+#define JC_SUBCMD_RATE_LIMITER_MS(ctlr) ((ctlr)->hdev->bus == BUS_USB ? JC_SUBCMD_RATE_LIMITER_USB_MS : JC_SUBCMD_RATE_LIMITER_BT_MS) - static void joycon_enforce_subcmd_rate(struct joycon_ctlr *ctlr) - { -- static const unsigned int max_subcmd_rate_ms = 25; -- unsigned int current_ms = jiffies_to_msecs(jiffies); -- unsigned int delta_ms = current_ms - ctlr->last_subcmd_sent_msecs; -+ unsigned int current_ms; -+ unsigned long subcmd_delta; -+ int consecutive_valid_deltas = 0; -+ int attempts = 0; -+ unsigned long flags; -+ -+ if (unlikely(ctlr->ctlr_state != JOYCON_CTLR_STATE_READ)) -+ return; - -- while (delta_ms < max_subcmd_rate_ms && -- ctlr->ctlr_state == JOYCON_CTLR_STATE_READ) { -+ do { - joycon_wait_for_input_report(ctlr); - current_ms = jiffies_to_msecs(jiffies); -- delta_ms = current_ms - ctlr->last_subcmd_sent_msecs; -+ subcmd_delta = current_ms - ctlr->last_subcmd_sent_msecs; -+ -+ spin_lock_irqsave(&ctlr->lock, flags); -+ consecutive_valid_deltas = ctlr->consecutive_valid_report_deltas; -+ spin_unlock_irqrestore(&ctlr->lock, flags); -+ -+ attempts++; -+ } while ((consecutive_valid_deltas < JC_SUBCMD_VALID_DELTA_REQ || -+ subcmd_delta < JC_SUBCMD_RATE_LIMITER_MS(ctlr)) && -+ ctlr->ctlr_state == JOYCON_CTLR_STATE_READ && -+ attempts < JC_SUBCMD_RATE_MAX_ATTEMPTS); -+ -+ if (attempts >= JC_SUBCMD_RATE_MAX_ATTEMPTS) { -+ hid_warn(ctlr->hdev, "%s: exceeded max attempts", __func__); -+ return; - } -+ - ctlr->last_subcmd_sent_msecs = current_ms; -+ -+ /* -+ * Wait a short time after receiving an input report before -+ * transmitting. This should reduce odds of a TX coinciding with an RX. -+ * Minimizing concurrent BT traffic with the controller seems to lower -+ * the rate of disconnections. -+ */ -+ msleep(JC_SUBCMD_TX_OFFSET_MS); - } - - static int joycon_hid_send_sync(struct joycon_ctlr *ctlr, u8 *data, size_t len, -@@ -1223,8 +1260,9 @@ static void joycon_parse_report(struct joycon_ctlr *ctlr, - u8 tmp; - u32 btns; - unsigned long msecs = jiffies_to_msecs(jiffies); -+ unsigned long report_delta_ms = msecs - ctlr->last_input_report_msecs; - -- spin_lock_irqsave(&ctlr->lock, flags); -+ spin_lock_irqsave(&ctlr->lock, flags); - if (IS_ENABLED(CONFIG_NINTENDO_FF) && rep->vibrator_report && - ctlr->ctlr_state != JOYCON_CTLR_STATE_REMOVED && - (msecs - ctlr->rumble_msecs) >= JC_RUMBLE_PERIOD_MS && -@@ -1364,6 +1402,31 @@ static void joycon_parse_report(struct joycon_ctlr *ctlr, - - input_sync(dev); - -+ spin_lock_irqsave(&ctlr->lock, flags); -+ ctlr->last_input_report_msecs = msecs; -+ /* -+ * Was this input report a reasonable time delta compared to the prior -+ * report? We use this information to decide when a safe time is to send -+ * rumble packets or subcommand packets. -+ */ -+ if (report_delta_ms >= JC_INPUT_REPORT_MIN_DELTA && -+ report_delta_ms <= JC_INPUT_REPORT_MAX_DELTA) { -+ if (ctlr->consecutive_valid_report_deltas < JC_SUBCMD_VALID_DELTA_REQ) -+ ctlr->consecutive_valid_report_deltas++; -+ } else { -+ ctlr->consecutive_valid_report_deltas = 0; -+ } -+ /* -+ * Our consecutive valid report tracking is only relevant for -+ * bluetooth-connected controllers. For USB devices, we're beholden to -+ * USB's underlying polling rate anyway. Always set to the consecutive -+ * delta requirement. -+ */ -+ if (ctlr->hdev->bus == BUS_USB) -+ ctlr->consecutive_valid_report_deltas = JC_SUBCMD_VALID_DELTA_REQ; -+ -+ spin_unlock_irqrestore(&ctlr->lock, flags); -+ - /* - * Immediately after receiving a report is the most reliable time to - * send a subcommand to the controller. Wake any subcommand senders -@@ -1528,6 +1591,7 @@ static int joycon_set_rumble(struct joycon_ctlr *ctlr, u16 amp_r, u16 amp_l, - u16 freq_l_high; - unsigned long flags; - -+ int next_rq_head; - spin_lock_irqsave(&ctlr->lock, flags); - freq_r_low = ctlr->rumble_rl_freq; - freq_r_high = ctlr->rumble_rh_freq; -@@ -1547,8 +1611,21 @@ static int joycon_set_rumble(struct joycon_ctlr *ctlr, u16 amp_r, u16 amp_l, - joycon_encode_rumble(data, freq_l_low, freq_l_high, amp); - - spin_lock_irqsave(&ctlr->lock, flags); -- if (++ctlr->rumble_queue_head >= JC_RUMBLE_QUEUE_SIZE) -- ctlr->rumble_queue_head = 0; -+ -+ next_rq_head = ctlr->rumble_queue_head + 1; -+ if (next_rq_head >= JC_RUMBLE_QUEUE_SIZE) -+ next_rq_head = 0; -+ -+ /* Did we overrun the circular buffer? -+ * If so, be sure we keep the latest intended rumble state. -+ */ -+ if (next_rq_head == ctlr->rumble_queue_tail) { -+ hid_dbg(ctlr->hdev, "rumble queue is full"); -+ /* overwrite the prior value at the end of the circular buf */ -+ next_rq_head = ctlr->rumble_queue_head; -+ } -+ -+ ctlr->rumble_queue_head = next_rq_head; - memcpy(ctlr->rumble_data[ctlr->rumble_queue_head], data, - JC_RUMBLE_DATA_SIZE); - -@@ -2128,7 +2205,7 @@ static int nintendo_hid_probe(struct hid_device *hdev, - - ctlr->hdev = hdev; - ctlr->ctlr_state = JOYCON_CTLR_STATE_INIT; -- ctlr->rumble_queue_head = JC_RUMBLE_QUEUE_SIZE - 1; -+ ctlr->rumble_queue_head = 0; - ctlr->rumble_queue_tail = 0; - hid_set_drvdata(hdev, ctlr); - mutex_init(&ctlr->output_mutex); diff --git a/kernel-patches/6.1/others/rumble-xbox.patch b/kernel-patches/6.1/others/rumble-xbox.patch deleted file mode 100644 index 64f2b8aa10..0000000000 --- a/kernel-patches/6.1/others/rumble-xbox.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h -index 63545cd307e5..73efeb0bcd5b 100644 ---- a/drivers/hid/hid-ids.h -+++ b/drivers/hid/hid-ids.h -@@ -922,7 +922,11 @@ - #define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9 - #define USB_DEVICE_ID_MS_POWER_COVER 0x07da - #define USB_DEVICE_ID_MS_SURFACE3_COVER 0x07de --#define USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER 0x02fd -+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708 0x02fd -+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE 0x0b20 -+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914 0x0b13 -+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797 0x0b05 -+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE 0x0b22 - #define USB_DEVICE_ID_MS_PIXART_MOUSE 0x00cb - #define USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS 0x02e0 - #define USB_DEVICE_ID_MS_MOUSE_0783 0x0783 -diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c -index 071fd093a5f4..9345e2bfd56e 100644 ---- a/drivers/hid/hid-microsoft.c -+++ b/drivers/hid/hid-microsoft.c -@@ -446,7 +446,16 @@ static const struct hid_device_id ms_devices[] = { - .driver_data = MS_PRESENTER }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x091B), - .driver_data = MS_SURFACE_DIAL }, -- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER), -+ -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708), -+ .driver_data = MS_QUIRK_FF }, -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE), -+ .driver_data = MS_QUIRK_FF }, -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914), -+ .driver_data = MS_QUIRK_FF }, -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797), -+ .driver_data = MS_QUIRK_FF }, -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE), - .driver_data = MS_QUIRK_FF }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS), - .driver_data = MS_QUIRK_FF }, diff --git a/kernel-patches/6.1/others/stadia-ff.old b/kernel-patches/6.1/others/stadia-ff.old deleted file mode 100644 index a4a1def631..0000000000 --- a/kernel-patches/6.1/others/stadia-ff.old +++ /dev/null @@ -1,213 +0,0 @@ -From: Fabio Baltieri -To: Jiri Kosina , - Benjamin Tissoires -Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, - Fabio Baltieri -Subject: [PATCH] HID: hid-stadiaff: add support for Stadia force feedback -Date: Mon, 3 Apr 2023 10:33:24 +0000 [thread overview] -Message-ID: <20230403103324.1746758-1-fabiobaltieri@chromium.org> (raw) - -Add a hid-stadiaff module to support rumble based force feedback on the -Google Stadia controller. This works using the HID output endpoint -exposed on both the USB and BLE interface. - -Signed-off-by: Fabio Baltieri ---- - -Hi, this adds rumble support to the stadia controller using the input -interface. Up to now this has only been implemented at application level -using hidraw: - -https://source.chromium.org/chromium/chromium/src/+/main:device/gamepad/hid_haptic_gamepad.cc - -Tested with fftest, works both over USB and BLE. - - drivers/hid/Kconfig | 7 ++ - drivers/hid/Makefile | 1 + - drivers/hid/hid-ids.h | 1 + - drivers/hid/hid-stadiaff.c | 132 +++++++++++++++++++++++++++++++++++++ - 4 files changed, 141 insertions(+) - create mode 100644 drivers/hid/hid-stadiaff.c - -diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig -index 82f64fb31fda..934f73e9b800 100644 ---- a/drivers/hid/Kconfig -+++ b/drivers/hid/Kconfig -@@ -1031,6 +1031,13 @@ config HID_SPEEDLINK - help - Support for Speedlink Vicious and Divine Cezanne mouse. - -+config HID_STADIA_FF -+ tristate "Google Stadia force feedback" -+ select INPUT_FF_MEMLESS -+ help -+ Say Y here if you want to enable force feedback support for the Google -+ Stadia controller. -+ - config HID_STEAM - tristate "Steam Controller/Deck support" - select POWER_SUPPLY -diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile -index 5d37cacbde33..1d900fa55890 100644 ---- a/drivers/hid/Makefile -+++ b/drivers/hid/Makefile -@@ -120,6 +120,7 @@ obj-$(CONFIG_HID_SIGMAMICRO) += hid-sigmamicro.o - obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o - obj-$(CONFIG_HID_SONY) += hid-sony.o - obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o -+obj-$(CONFIG_HID_STADIA_FF) += hid-stadiaff.o - obj-$(CONFIG_HID_STEAM) += hid-steam.o - obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o - obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o -diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h -index 63545cd307e5..cffd4ac609a0 100644 ---- a/drivers/hid/hid-ids.h -+++ b/drivers/hid/hid-ids.h -@@ -525,6 +525,7 @@ - #define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044 - #define USB_DEVICE_ID_GOOGLE_DON 0x5050 - #define USB_DEVICE_ID_GOOGLE_EEL 0x5057 -+#define USB_DEVICE_ID_GOOGLE_STADIA 0x9400 - - #define USB_VENDOR_ID_GOTOP 0x08f2 - #define USB_DEVICE_ID_SUPER_Q2 0x007f -diff --git a/drivers/hid/hid-stadiaff.c b/drivers/hid/hid-stadiaff.c -new file mode 100644 -index 000000000000..f974b9e24d46 ---- /dev/null -+++ b/drivers/hid/hid-stadiaff.c -@@ -0,0 +1,132 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* -+ * Stadia controller rumble support. -+ * -+ * Copyright 2023 Google LLC -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include "hid-ids.h" -+ -+#define STADIA_FF_REPORT_ID 5 -+ -+struct stadiaff_device { -+ struct hid_device *hid; -+ struct hid_report *report; -+ struct work_struct work; -+}; -+ -+static void stadiaff_work(struct work_struct *work) -+{ -+ struct stadiaff_device *stadiaff = -+ container_of(work, struct stadiaff_device, work); -+ -+ hid_hw_request(stadiaff->hid, stadiaff->report, HID_REQ_SET_REPORT); -+} -+ -+static int stadiaff_play(struct input_dev *dev, void *data, -+ struct ff_effect *effect) -+{ -+ struct hid_device *hid = input_get_drvdata(dev); -+ struct stadiaff_device *stadiaff = hid_get_drvdata(hid); -+ struct hid_field *rumble_field = stadiaff->report->field[0]; -+ -+ rumble_field->value[0] = effect->u.rumble.strong_magnitude; -+ rumble_field->value[1] = effect->u.rumble.weak_magnitude; -+ -+ schedule_work(&stadiaff->work); -+ -+ return 0; -+} -+ -+static int stadiaff_init(struct hid_device *hid) -+{ -+ struct stadiaff_device *stadiaff; -+ struct hid_report *report; -+ struct hid_input *hidinput; -+ struct input_dev *dev; -+ int error; -+ -+ if (list_empty(&hid->inputs)) { -+ hid_err(hid, "no inputs found\n"); -+ return -ENODEV; -+ } -+ hidinput = list_entry(hid->inputs.next, struct hid_input, list); -+ dev = hidinput->input; -+ -+ report = hid_validate_values(hid, HID_OUTPUT_REPORT, -+ STADIA_FF_REPORT_ID, 0, 2); -+ if (!report) -+ return -ENODEV; -+ -+ stadiaff = devm_kzalloc(&hid->dev, sizeof(struct stadiaff_device), -+ GFP_KERNEL); -+ if (!stadiaff) -+ return -ENOMEM; -+ -+ hid_set_drvdata(hid, stadiaff); -+ -+ input_set_capability(dev, EV_FF, FF_RUMBLE); -+ -+ error = input_ff_create_memless(dev, NULL, stadiaff_play); -+ if (error) -+ return error; -+ -+ stadiaff->hid = hid; -+ stadiaff->report = report; -+ INIT_WORK(&stadiaff->work, stadiaff_work); -+ -+ hid_info(hid, "Force Feedback for Google Stadia controller\n"); -+ -+ return 0; -+} -+ -+static int stadia_probe(struct hid_device *hdev, const struct hid_device_id *id) -+{ -+ int ret; -+ -+ ret = hid_parse(hdev); -+ if (ret) { -+ hid_err(hdev, "parse failed\n"); -+ return ret; -+ } -+ -+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); -+ if (ret) { -+ hid_err(hdev, "hw start failed\n"); -+ return ret; -+ } -+ -+ stadiaff_init(hdev); -+ -+ return 0; -+} -+ -+static void stadia_remove(struct hid_device *hid) -+{ -+ struct stadiaff_device *stadiaff = hid_get_drvdata(hid); -+ -+ cancel_work_sync(&stadiaff->work); -+ hid_hw_stop(hid); -+} -+ -+static const struct hid_device_id stadia_devices[] = { -+ { HID_USB_DEVICE(USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STADIA) }, -+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STADIA) }, -+ { } -+}; -+MODULE_DEVICE_TABLE(hid, stadia_devices); -+ -+static struct hid_driver stadia_driver = { -+ .name = "stadia", -+ .id_table = stadia_devices, -+ .probe = stadia_probe, -+ .remove = stadia_remove, -+}; -+module_hid_driver(stadia_driver); -+ -+MODULE_LICENSE("GPL"); --- -2.40.0.348.gf938b09366-goog diff --git a/kernel-patches/6.6/base/base.patch b/kernel-patches/6.6/base/base.patch index 65750e5392..6b6b736bc4 100644 --- a/kernel-patches/6.6/base/base.patch +++ b/kernel-patches/6.6/base/base.patch @@ -11977,173 +11977,6 @@ diff -ruN a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath /* configure early allocation */ ealloc_targ_addr = host_interest_item_address(HI_ITEM(hi_early_alloc)); -diff -ruN a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c ---- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c 2023-11-08 11:56:25.000000000 +0100 -+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c 2024-01-24 07:43:39.000000000 +0100 -@@ -4321,6 +4321,93 @@ - return 0; - } - -+static const struct nla_policy -+mwifiex_vendor_attr_policy[NUM_MWIFIEX_VENDOR_CMD_ATTR] = { -+ [MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_24] = { .type = NLA_U8 }, -+ [MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_52] = { .type = NLA_U8 }, -+}; -+ -+static int mwifiex_parse_vendor_data(struct nlattr **tb, -+ const void *data, int data_len) -+{ -+ if (!data) -+ return -EINVAL; -+ -+ return nla_parse(tb, MAX_MWIFIEX_VENDOR_CMD_ATTR, data, data_len, -+ mwifiex_vendor_attr_policy, NULL); -+} -+ -+static int mwifiex_vendor_set_tx_power_limt(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ const void *data, int data_len) -+{ -+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev); -+ struct nlattr *tb[NUM_MWIFIEX_VENDOR_CMD_ATTR]; -+ int ret; -+ u8 lowpwr; -+ -+ ret = mwifiex_parse_vendor_data(tb, data, data_len); -+ if (ret) -+ return ret; -+ -+ if (tb[MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_24]) { -+ lowpwr = nla_get_u8(tb[MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_24]) ? -+ true : false; -+ if (lowpwr != priv->adapter->lowpwr_mode_2g4 && -+ priv->adapter->dt_node) { -+ ret = mwifiex_dnld_dt_cfgdata -+ (priv, priv->adapter->dt_node, lowpwr ? -+ "marvell,caldata_00_txpwrlimit_2g" : -+ "marvell,caldata_01_txpwrlimit_2g"); -+ if (ret) -+ return -1; -+ priv->adapter->lowpwr_mode_2g4 = lowpwr; -+ } -+ } -+ -+ if (tb[MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_52]) { -+ lowpwr = nla_get_u8(tb[MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_52]) ? -+ true : false; -+ if (lowpwr != priv->adapter->lowpwr_mode_5g2 && -+ priv->adapter->dt_node) { -+ ret = mwifiex_dnld_dt_cfgdata -+ (priv, priv->adapter->dt_node, lowpwr ? -+ "marvell,caldata_00_txpwrlimit_5g" : -+ "marvell,caldata_01_txpwrlimit_5g"); -+ if (ret) -+ return -1; -+ priv->adapter->lowpwr_mode_5g2 = lowpwr; -+ } -+ } -+ -+ return 0; -+} -+ -+static const struct wiphy_vendor_command mwifiex_vendor_commands[] = { -+ { -+ .info = { -+ .vendor_id = MWIFIEX_VENDOR_ID, -+ .subcmd = MWIFIEX_VENDOR_CMD_SET_TX_POWER_LIMIT, -+ }, -+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV, -+ .doit = mwifiex_vendor_set_tx_power_limt, -+ .policy = mwifiex_vendor_attr_policy, -+ .maxattr = MAX_MWIFIEX_VENDOR_CMD_ATTR, -+ }, -+}; -+ -+/* @brief register vendor commands and events -+ * -+ * @param wiphy A pointer to wiphy struct -+ * -+ * @return -+ */ -+static void mwifiex_register_cfg80211_vendor_command(struct wiphy *wiphy) -+{ -+ wiphy->vendor_commands = mwifiex_vendor_commands; -+ wiphy->n_vendor_commands = ARRAY_SIZE(mwifiex_vendor_commands); -+} -+ - /* - * This function registers the device with CFG802.11 subsystem. - * -@@ -4358,7 +4445,10 @@ - if (ISSUPP_ADHOC_ENABLED(adapter->fw_cap_info)) - wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); - -+ mwifiex_register_cfg80211_vendor_command(wiphy); -+ - wiphy->bands[NL80211_BAND_2GHZ] = &mwifiex_band_2ghz; -+ - if (adapter->config_bands & BAND_A) - wiphy->bands[NL80211_BAND_5GHZ] = &mwifiex_band_5ghz; - else -@@ -4470,16 +4560,15 @@ - mwifiex_dbg(adapter, WARN, - "Ignore world regulatory domain\n"); - } else { -- wiphy->regulatory_flags |= -- REGULATORY_DISABLE_BEACON_HINTS | -- REGULATORY_COUNTRY_IE_IGNORE; - country_code = - mwifiex_11d_code_2_region( - adapter->region_code); -- if (country_code && -- regulatory_hint(wiphy, country_code)) -- mwifiex_dbg(priv->adapter, ERROR, -- "regulatory_hint() failed\n"); -+ if (country_code) { -+ mwifiex_dbg(priv->adapter, MSG, -+ "ignoring EEPROM country code: %c%c\n", -+ country_code[0], -+ country_code[1]); -+ } - } - } - } -diff -ruN a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h ---- a/drivers/net/wireless/marvell/mwifiex/main.h 2023-11-08 11:56:25.000000000 +0100 -+++ b/drivers/net/wireless/marvell/mwifiex/main.h 2024-01-24 07:43:39.000000000 +0100 -@@ -160,6 +160,23 @@ - - #define MWIFIEX_MAC_LOCAL_ADMIN_BIT 41 - -+/* marvell vendor command and event ID */ -+#define MWIFIEX_VENDOR_ID 0x005043 -+ -+/* vendor sub command */ -+enum mwifiex_vendor_sub_command { -+ MWIFIEX_VENDOR_CMD_SET_TX_POWER_LIMIT = 0, -+ MWIFIEX_VENDOR_CMD_MAX, -+}; -+ -+enum mwifiex_vendor_cmd_attr { -+ MWIFIEX_VENDOR_CMD_ATTR_INVALID, -+ MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_24, -+ MWIFIEX_VENDOR_CMD_ATTR_TXP_LIMIT_52, -+ NUM_MWIFIEX_VENDOR_CMD_ATTR, -+ MAX_MWIFIEX_VENDOR_CMD_ATTR = NUM_MWIFIEX_VENDOR_CMD_ATTR - 1, -+}; -+ - /** - *enum mwifiex_debug_level - marvell wifi debug level - */ -@@ -850,6 +867,8 @@ - }; - - struct mwifiex_adapter { -+ u8 lowpwr_mode_2g4; -+ u8 lowpwr_mode_5g2; - u8 iface_type; - unsigned int debug_mask; - struct mwifiex_iface_comb iface_limit; diff -ruN a/drivers/net/wwan/Kconfig b/drivers/net/wwan/Kconfig --- a/drivers/net/wwan/Kconfig 2023-11-08 11:56:25.000000000 +0100 +++ b/drivers/net/wwan/Kconfig 2024-01-24 07:43:40.000000000 +0100 @@ -24794,7 +24627,7 @@ diff -ruN a/fs/fuse/inode.c b/fs/fuse/inode.c WARN_ON(!list_empty(&fc->devices)); + idr_for_each(&fc->passthrough_req, free_fuse_passthrough, NULL); + idr_destroy(&fc->passthrough_req); - kfree_rcu(fc, rcu); + kfree(fc); } EXPORT_SYMBOL_GPL(fuse_free_conn); diff -ruN a/fs/fuse/Makefile b/fs/fuse/Makefile diff --git a/prepare_kernels.sh b/prepare_kernels.sh index aba1c6e190..ef898f7253 100755 --- a/prepare_kernels.sh +++ b/prepare_kernels.sh @@ -106,6 +106,6 @@ done rm -rf ./kernels mkdir ./kernels -chromeos_version="R129" +chromeos_version="R130" download_and_patch_kernels