From 71a51992fc0201a803fb74d45a672dcac9a537bd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 30 Dec 2012 01:44:11 -0800 Subject: [PATCH] core: Fix class of device value from static configuration --- src/adapter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 2c11efb68..4fc719fc0 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2717,7 +2717,11 @@ static void load_config(struct btd_adapter *adapter) } /* Set class */ - adapter->dev_class = main_opts.class; + adapter->major_class = (main_opts.class & 0x001f00) >> 8; + adapter->minor_class = (main_opts.class & 0x0000fc) >> 2; + + DBG("class: major %u minor %u", + adapter->major_class, adapter->minor_class); /* Get pairable mode */ adapter->pairable = g_key_file_get_boolean(key_file, "General", -- 2.47.3