summaryrefslogtreecommitdiff
path: root/net-wireless/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/bluez')
-rw-r--r--net-wireless/bluez/Manifest1
-rw-r--r--net-wireless/bluez/files/0001-adapter-Reset-pending-settings-when-receiving-MGMT-e.patch170
2 files changed, 0 insertions, 171 deletions
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
index eb974de2aa03..6f793941eb1e 100644
--- a/net-wireless/bluez/Manifest
+++ b/net-wireless/bluez/Manifest
@@ -1,5 +1,4 @@
AUX 0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch 1912 BLAKE2B c7226ccbf1b794b5f3d6504dcb6950bc7e7bd69995243d0e4cf30dfb161f95e15c18c96724f82916e8c83cac6ff255ed957b60c9ee9ad53e108c69eb509074d5 SHA512 65a970fa82ded9f6e97ef2f0d856010f96468cbd375447e1c47d6073be5a364f747b7b5ea93a0bc3b7dba0470dc8dccd9b5d1f6567f18b38042e424d3e06171b
-AUX 0001-adapter-Reset-pending-settings-when-receiving-MGMT-e.patch 5381 BLAKE2B 1dadd05cdda880f3770848e445361ec6c7d03d093d518024db776375904fcb3af31ef1f1562cbaf415d94ffff54c43551b1a5643e622f9261a2dea7402b08bed SHA512 040fde8e734c5acbf24142018942fe2bfc52e9b68235be7417c8ce82824b394df32547c3640128ac2f2787b432fc04a4a6a48184a557c3313a97eb6f75730497
AUX 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch 1252 BLAKE2B ce6d00ea244d91e76b696e60ddb9096aa48572b68474f321f05b0e3e9525932e6fdaeacc3b141dc4b118d5fa305b7a0510e9c57c935e489a9c159dcd826ad870 SHA512 774f1d9cd49dd3fc0e9f02ad93876c59d78f88f149591f384cf5d2e3541d237ce390552c8bc2cb4d4ad7e5dcc295df49220565f0b0e686a2f8b3404f68323d32
AUX bluetooth-conf.d 21 BLAKE2B 7c94e499438f441fc18f0b50178e707982ac91871a74b2e7a35c9930d32441a89f742993e993e3003f9bcb5e3ee9adde2ab1cbe33b27245b1b1e91e7c3dc1a0b SHA512 45befd3fb42ea3462fa6e1ee9f3ee9591e197d4925a4c9df6733bacfe44cf44f54ed3aad6fd7a6a2953da54b93460a1cf0ea1cadf0d7e47f811e4c3182af74d5
AUX bluetooth-init.d-r5 313 BLAKE2B 6bad1b9a75de5927ab22a229d6ce18247b32a79b994078338eff33df7f74a7dc4a5266212f6d0150101600e3a864a9b64ce6a576208218750bfbe88bc5911baa SHA512 95aff192be6207047fc01b42754bcd34d5cd7f82c16486fdd81bb1d14be040e4f3e9bafd8dc2f4e8b87bf1eb50f6634f526feaf2b38c0c6807f40784d84dac96
diff --git a/net-wireless/bluez/files/0001-adapter-Reset-pending-settings-when-receiving-MGMT-e.patch b/net-wireless/bluez/files/0001-adapter-Reset-pending-settings-when-receiving-MGMT-e.patch
deleted file mode 100644
index b9b432fadff0..000000000000
--- a/net-wireless/bluez/files/0001-adapter-Reset-pending-settings-when-receiving-MGMT-e.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From ede7b915980fbc80eff80aa189c35ca016956c61 Mon Sep 17 00:00:00 2001
-From: Archie Pusaka <apusaka@chromium.org>
-Date: Tue, 23 Aug 2022 12:15:56 +0800
-Subject: [PATCH] adapter: Reset pending settings when receiving MGMT error
-
-We set the pending settings flag when sending MGMT_SETTING_*
-commands to the MGMT layer and clear them when receiving a
-successful reply, but we don't clear them when receiving an error
-reply. This might cause a setting to be stuck in pending state.
-
-Therefore, also clear the pending flag when receiving error.
-Furthermore, this patch also postpones setting the pending flag
-until we queue the MGMT command in order to avoid setting it too
-soon but we return early.
-
-This was caught during power off test, where MGMT_OP_SET_POWERED
-returns Authentication Failed because disconnection takes too long.
-Future attempts to switch power will then be ignored.
-
-< HCI Command: Disconnect (0x01|0x0006) plen 3 #17916 [hci0] 12.502908
- Handle: 512
- Reason: Remote Device Terminated due to Power Off (0x15)
-> HCI Event: Command Status (0x0f) plen 4 #17917 [hci0] 12.503185
- Disconnect (0x01|0x0006) ncmd 1
- Status: Success (0x00)
-@ MGMT Event: Command Status (0x0002) plen 3 {0x0001} [hci0] 14.519491
- Set Powered (0x0005)
- Status: Authentication Failed (0x05)
-= bluetoothd: Failed to set mode: Authentication Failed (0x05) 14.520042
-= bluetoothd: adapter /org/bluez/hci0 set power to 0 14.813533
-> HCI Event: Disconnect Complete (0x05) plen 4 #17918 [hci0] 16.509043
- Status: Success (0x00)
- Handle: 512
- Reason: Connection Timeout (0x08)
-
-Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
----
- src/adapter.c | 39 +++++++++++++++++++++++++++++++--------
- 1 file changed, 31 insertions(+), 8 deletions(-)
-
-diff --git a/src/adapter.c b/src/adapter.c
-index ec26aab1a..b453e86a0 100644
---- a/src/adapter.c
-+++ b/src/adapter.c
-@@ -640,14 +640,21 @@ static void new_settings_callback(uint16_t index, uint16_t length,
- settings_changed(adapter, settings);
- }
-
-+struct set_mode_data {
-+ struct btd_adapter *adapter;
-+ uint32_t setting;
-+};
-+
- static void set_mode_complete(uint8_t status, uint16_t length,
- const void *param, void *user_data)
- {
-- struct btd_adapter *adapter = user_data;
-+ struct set_mode_data *data = user_data;
-+ struct btd_adapter *adapter = data->adapter;
-
- if (status != MGMT_STATUS_SUCCESS) {
- btd_error(adapter->dev_id, "Failed to set mode: %s (0x%02x)",
- mgmt_errstr(status), status);
-+ adapter->pending_settings &= ~data->setting;
- return;
- }
-
-@@ -677,6 +684,7 @@ static bool set_mode(struct btd_adapter *adapter, uint16_t opcode,
- {
- struct mgmt_mode cp;
- uint32_t setting = 0;
-+ struct set_mode_data *data;
-
- memset(&cp, 0, sizeof(cp));
- cp.val = mode;
-@@ -699,15 +707,20 @@ static bool set_mode(struct btd_adapter *adapter, uint16_t opcode,
- break;
- }
-
-- adapter->pending_settings |= setting;
--
- DBG("sending set mode command for index %u", adapter->dev_id);
-
-+ data = g_new0(struct set_mode_data, 1);
-+ data->adapter = adapter;
-+ data->setting = setting;
-+
- if (mgmt_send(adapter->mgmt, opcode,
- adapter->dev_id, sizeof(cp), &cp,
-- set_mode_complete, adapter, NULL) > 0)
-+ set_mode_complete, data, g_free) > 0) {
-+ adapter->pending_settings |= setting;
- return true;
-+ }
-
-+ g_free(data);
- btd_error(adapter->dev_id, "Failed to set mode for index %u",
- adapter->dev_id);
-
-@@ -718,6 +731,7 @@ static bool set_discoverable(struct btd_adapter *adapter, uint8_t mode,
- uint16_t timeout)
- {
- struct mgmt_cp_set_discoverable cp;
-+ struct set_mode_data *data;
-
- memset(&cp, 0, sizeof(cp));
- cp.val = mode;
-@@ -734,11 +748,16 @@ static bool set_discoverable(struct btd_adapter *adapter, uint8_t mode,
- mode);
- }
-
-+ data = g_new0(struct set_mode_data, 1);
-+ data->adapter = adapter;
-+ data->setting = 0;
-+
- if (mgmt_send(adapter->mgmt, MGMT_OP_SET_DISCOVERABLE,
- adapter->dev_id, sizeof(cp), &cp,
-- set_mode_complete, adapter, NULL) > 0)
-+ set_mode_complete, data, g_free) > 0)
- return true;
-
-+ g_free(data);
- btd_error(adapter->dev_id, "Failed to set mode for index %u",
- adapter->dev_id);
-
-@@ -2877,6 +2896,7 @@ static gboolean property_get_mode(struct btd_adapter *adapter,
-
- struct property_set_data {
- struct btd_adapter *adapter;
-+ uint32_t setting;
- GDBusPendingPropertySet id;
- };
-
-@@ -2901,6 +2921,8 @@ static void property_set_mode_complete(uint8_t status, uint16_t length,
-
- g_dbus_pending_property_error(data->id, dbus_err,
- mgmt_errstr(status));
-+
-+ adapter->pending_settings &= ~data->setting;
- return;
- }
-
-@@ -2969,8 +2991,6 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
-
- mode = (enable == TRUE) ? 0x01 : 0x00;
-
-- adapter->pending_settings |= setting;
--
- switch (setting) {
- case MGMT_SETTING_POWERED:
- opcode = MGMT_OP_SET_POWERED;
-@@ -3024,11 +3044,14 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
- goto failed;
-
- data->adapter = adapter;
-+ data->setting = setting;
- data->id = id;
-
- if (mgmt_send(adapter->mgmt, opcode, adapter->dev_id, len, param,
-- property_set_mode_complete, data, g_free) > 0)
-+ property_set_mode_complete, data, g_free) > 0) {
-+ adapter->pending_settings |= setting;
- return;
-+ }
-
- g_free(data);
-
---
-2.37.2
-