From benchan at chromium.org Thu Jun 22 11:21:04 2017 From: benchan at chromium.org (Ben Chan) Date: Thu, 22 Jun 2017 04:21:04 -0700 Subject: [PATCH] build: only define WITH_UDEV if enabled Message-ID: <20170622112104.63633-1-benchan@chromium.org> --- configure.ac | 1 - src/libmbim-glib/mbim-device.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index a4f0d84..b05333e 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,6 @@ case $with_udev in fi ;; *) - AC_DEFINE(WITH_UDEV, 0, [Define if you want udev support]) with_udev=no ;; esac diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c index 3919a87..35f4f1e 100644 --- a/src/libmbim-glib/mbim-device.c +++ b/src/libmbim-glib/mbim-device.c @@ -39,7 +39,7 @@ #define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, guint16) #define RETRY_TIMEOUT_SECS 5 -#if WITH_UDEV +#if defined WITH_UDEV # include #endif @@ -778,7 +778,7 @@ struct usb_cdc_mbim_desc { guint8 bmNetworkCapabilities; } __attribute__ ((packed)); -#if WITH_UDEV +#if defined WITH_UDEV static gchar * get_descriptors_filepath (MbimDevice *self) -- 2.13.1.611.g7e3b11ae1-goog From aleksander at aleksander.es Fri Jun 23 08:07:07 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Fri, 23 Jun 2017 10:07:07 +0200 Subject: [PATCH] build: only define WITH_UDEV if enabled In-Reply-To: <20170622112104.63633-1-benchan@chromium.org> References: <20170622112104.63633-1-benchan@chromium.org> Message-ID: <3ea4583a-8e46-eae5-e088-996ef9e079c6@aleksander.es> On 22/06/17 13:21, Ben Chan wrote: > --- > configure.ac | 1 - > src/libmbim-glib/mbim-device.c | 4 ++-- > 2 files changed, 2 insertions(+), 3 deletions(-) > Pushed to git master, thanks. > diff --git a/configure.ac b/configure.ac > index a4f0d84..b05333e 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -141,7 +141,6 @@ case $with_udev in > fi > ;; > *) > - AC_DEFINE(WITH_UDEV, 0, [Define if you want udev support]) > with_udev=no > ;; > esac > diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c > index 3919a87..35f4f1e 100644 > --- a/src/libmbim-glib/mbim-device.c > +++ b/src/libmbim-glib/mbim-device.c > @@ -39,7 +39,7 @@ > #define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, guint16) > #define RETRY_TIMEOUT_SECS 5 > > -#if WITH_UDEV > +#if defined WITH_UDEV > # include > #endif > > @@ -778,7 +778,7 @@ struct usb_cdc_mbim_desc { > guint8 bmNetworkCapabilities; > } __attribute__ ((packed)); > > -#if WITH_UDEV > +#if defined WITH_UDEV > > static gchar * > get_descriptors_filepath (MbimDevice *self) > -- Aleksander https://aleksander.es From benchan at chromium.org Tue Jun 27 03:58:22 2017 From: benchan at chromium.org (Ben Chan) Date: Mon, 26 Jun 2017 20:58:22 -0700 Subject: [PATCH] glib: remove invocations of g_type_init() Message-ID: <20170627035822.106923-1-benchan@chromium.org> g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by libmbim is 2.36, calling g_type_init() isn't necessarily in the libmbim code. --- src/mbim-proxy/mbim-proxy.c | 4 ---- src/mbimcli/mbimcli.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/mbim-proxy/mbim-proxy.c b/src/mbim-proxy/mbim-proxy.c index 2e8eeb9..46f023e 100644 --- a/src/mbim-proxy/mbim-proxy.c +++ b/src/mbim-proxy/mbim-proxy.c @@ -196,10 +196,6 @@ int main (int argc, char **argv) setlocale (LC_ALL, ""); -#if !GLIB_CHECK_VERSION (2, 36, 0) - g_type_init (); -#endif - /* Setup option context, process it and destroy it */ context = g_option_context_new ("- Proxy for MBIM devices"); g_option_context_add_main_entries (context, main_entries, NULL); diff --git a/src/mbimcli/mbimcli.c b/src/mbimcli/mbimcli.c index a265895..76183fd 100644 --- a/src/mbimcli/mbimcli.c +++ b/src/mbimcli/mbimcli.c @@ -372,10 +372,6 @@ int main (int argc, char **argv) setlocale (LC_ALL, ""); -#if !GLIB_CHECK_VERSION (2, 36, 0) - g_type_init (); -#endif - /* Setup option context, process it and destroy it */ context = g_option_context_new ("- Control MBIM devices"); g_option_context_add_group (context, -- 2.13.1.611.g7e3b11ae1-goog From benchan at chromium.org Tue Jun 27 07:15:01 2017 From: benchan at chromium.org (Ben Chan) Date: Tue, 27 Jun 2017 00:15:01 -0700 Subject: [PATCH] libmbim-glib: add MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag Message-ID: <20170627071501.53123-1-benchan@chromium.org> According to MBIM spec Rev 1.0 Errata-1 Table 10-17, a value 0 of the ReadyInfo field in MBIM_SUBSCRIBER_READY_INFO refers to MBIMReadyInfoFlagsNone and indicates that the device is in normal mode. This patch adds MBIM_READY_INFO_FLAG_NONE (0) to the MbimReadyInfoFlag enum, such that `mbimcli --query-subscriber-ready-info` shows 'Ready info' as 'none' instead of 'unknown' when the ReadyInfo field is 0. --- src/libmbim-glib/mbim-enums.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h index fd3d994..43eef6a 100644 --- a/src/libmbim-glib/mbim-enums.h +++ b/src/libmbim-glib/mbim-enums.h @@ -196,9 +196,11 @@ typedef enum { /** * MbimReadyInfoFlag: + * @MBIM_READY_INFO_FLAG_NONE: Device in normal mode. * @MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID: Request to avoid displaying subscriber ID. */ typedef enum { + MBIM_READY_INFO_FLAG_NONE = 0, MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID = 1 << 0 } MbimReadyInfoFlag; -- 2.13.1.611.g7e3b11ae1-goog From aleksander at aleksander.es Tue Jun 27 08:13:19 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Tue, 27 Jun 2017 10:13:19 +0200 Subject: [PATCH] glib: remove invocations of g_type_init() In-Reply-To: <20170627035822.106923-1-benchan@chromium.org> References: <20170627035822.106923-1-benchan@chromium.org> Message-ID: On 27/06/17 05:58, Ben Chan wrote: > g_type_init() has been deprecated (and also marked with the attribute > 'deprecated') since glib 2.36 as the type system is automatically > initialized. Since the minimum version of glib required by libmbim is > 2.36, calling g_type_init() isn't necessarily in the libmbim code. > --- Pushed to git master, thanks > src/mbim-proxy/mbim-proxy.c | 4 ---- > src/mbimcli/mbimcli.c | 4 ---- > 2 files changed, 8 deletions(-) > > diff --git a/src/mbim-proxy/mbim-proxy.c b/src/mbim-proxy/mbim-proxy.c > index 2e8eeb9..46f023e 100644 > --- a/src/mbim-proxy/mbim-proxy.c > +++ b/src/mbim-proxy/mbim-proxy.c > @@ -196,10 +196,6 @@ int main (int argc, char **argv) > > setlocale (LC_ALL, ""); > > -#if !GLIB_CHECK_VERSION (2, 36, 0) > - g_type_init (); > -#endif > - > /* Setup option context, process it and destroy it */ > context = g_option_context_new ("- Proxy for MBIM devices"); > g_option_context_add_main_entries (context, main_entries, NULL); > diff --git a/src/mbimcli/mbimcli.c b/src/mbimcli/mbimcli.c > index a265895..76183fd 100644 > --- a/src/mbimcli/mbimcli.c > +++ b/src/mbimcli/mbimcli.c > @@ -372,10 +372,6 @@ int main (int argc, char **argv) > > setlocale (LC_ALL, ""); > > -#if !GLIB_CHECK_VERSION (2, 36, 0) > - g_type_init (); > -#endif > - > /* Setup option context, process it and destroy it */ > context = g_option_context_new ("- Control MBIM devices"); > g_option_context_add_group (context, > -- Aleksander https://aleksander.es From aleksander at aleksander.es Tue Jun 27 08:14:48 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Tue, 27 Jun 2017 10:14:48 +0200 Subject: [PATCH] libmbim-glib: add MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag In-Reply-To: <20170627071501.53123-1-benchan@chromium.org> References: <20170627071501.53123-1-benchan@chromium.org> Message-ID: <5f04863f-c1cf-1f9e-444c-482f0dc3f91a@aleksander.es> On 27/06/17 09:15, Ben Chan wrote: > According to MBIM spec Rev 1.0 Errata-1 Table 10-17, a value 0 of the > ReadyInfo field in MBIM_SUBSCRIBER_READY_INFO refers to > MBIMReadyInfoFlagsNone and indicates that the device is in normal mode. > > This patch adds MBIM_READY_INFO_FLAG_NONE (0) to the MbimReadyInfoFlag > enum, such that `mbimcli --query-subscriber-ready-info` shows 'Ready > info' as 'none' instead of 'unknown' when the ReadyInfo field is 0. > --- Pushed to git master, mbim-1-14 and mbim-1-12; thanks > src/libmbim-glib/mbim-enums.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h > index fd3d994..43eef6a 100644 > --- a/src/libmbim-glib/mbim-enums.h > +++ b/src/libmbim-glib/mbim-enums.h > @@ -196,9 +196,11 @@ typedef enum { > > /** > * MbimReadyInfoFlag: > + * @MBIM_READY_INFO_FLAG_NONE: Device in normal mode. > * @MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID: Request to avoid displaying subscriber ID. > */ > typedef enum { > + MBIM_READY_INFO_FLAG_NONE = 0, > MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID = 1 << 0 > } MbimReadyInfoFlag; > > -- Aleksander https://aleksander.es From dcbw at redhat.com Tue Jun 27 15:00:58 2017 From: dcbw at redhat.com (Dan Williams) Date: Tue, 27 Jun 2017 10:00:58 -0500 Subject: review: dcbw/atds Message-ID: <1498575658.3366.2.camel@redhat.com> Hey, Branch review requested on dcbw/atds which attempts to implement the AT&T Device Services service, based on the Wireshark MBIM dissector r/e. It gets us at least LAC/TAC (which we could use to implement basic location) and extended Signal info. Dan From benchan at chromium.org Wed Jun 28 06:37:43 2017 From: benchan at chromium.org (Ben Chan) Date: Tue, 27 Jun 2017 23:37:43 -0700 Subject: [PATCH] libmbim-glib: fix G_DEPRECATED_FOR annotations Message-ID: <20170628063743.54464-1-benchan@chromium.org> mbim-compat.h defines a few deprecated enumerators as an alias to their equivalence using macros and annotates those macros with G_DEPRECATED_FOR, which may be expanded to `__attribute__((deprecated))'. Neither gcc nor clang supports `__attribute__((deprecated))' on macros. Thus, a G_DEPRECATED_FOR annotation before a macro definition is actually associated with the next identifier found after the macro definition, which is incorrect. Alternatively, the G_DEPRECATED_FOR annotation can be used on the deprecated enumerators. But only gcc 6 or above supports enumerator attributes. To address the issue, this patch defines the deprecated enumerators as `static const int' values, which can then be annotated with G_DEPRECATED_FOR. --- src/libmbim-glib/mbim-compat.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h index 0edd527..88966db 100644 --- a/src/libmbim-glib/mbim-compat.h +++ b/src/libmbim-glib/mbim-compat.h @@ -28,6 +28,7 @@ #include #include "mbim-basic-connect.h" +#include "mbim-cid.h" G_BEGIN_DECLS @@ -42,7 +43,8 @@ G_BEGIN_DECLS * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. */ G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) -#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH +static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = + MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; /*****************************************************************************/ /* 'Service Subscriber List' rename to 'Service Subscribe List' */ @@ -55,7 +57,8 @@ G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. */ G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) -#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST +static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = + MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) MbimMessage *mbim_message_device_service_subscriber_list_set_new ( -- 2.13.2.725.g09c95d1e9-goog From aleksander at aleksander.es Wed Jun 28 07:53:56 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Wed, 28 Jun 2017 09:53:56 +0200 Subject: [PATCH] libmbim-glib: fix G_DEPRECATED_FOR annotations In-Reply-To: <20170628063743.54464-1-benchan@chromium.org> References: <20170628063743.54464-1-benchan@chromium.org> Message-ID: On Wed, Jun 28, 2017 at 8:37 AM, Ben Chan wrote: > mbim-compat.h defines a few deprecated enumerators as an alias to their > equivalence using macros and annotates those macros with > G_DEPRECATED_FOR, which may be expanded to > `__attribute__((deprecated))'. > > Neither gcc nor clang supports `__attribute__((deprecated))' on macros. > Thus, a G_DEPRECATED_FOR annotation before a macro definition is > actually associated with the next identifier found after the macro > definition, which is incorrect. > > Alternatively, the G_DEPRECATED_FOR annotation can be used on the > deprecated enumerators. But only gcc 6 or above supports enumerator > attributes. > > To address the issue, this patch defines the deprecated enumerators as > `static const int' values, which can then be annotated with > G_DEPRECATED_FOR. Thanks! pushed to git master, mbim-1-14 and mbim-1-12. > --- > src/libmbim-glib/mbim-compat.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h > index 0edd527..88966db 100644 > --- a/src/libmbim-glib/mbim-compat.h > +++ b/src/libmbim-glib/mbim-compat.h > @@ -28,6 +28,7 @@ > #include > > #include "mbim-basic-connect.h" > +#include "mbim-cid.h" > > G_BEGIN_DECLS > > @@ -42,7 +43,8 @@ G_BEGIN_DECLS > * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. > */ > G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) > -#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH > +static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > + MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; > > /*****************************************************************************/ > /* 'Service Subscriber List' rename to 'Service Subscribe List' */ > @@ -55,7 +57,8 @@ G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) > * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. > */ > G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) > -#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST > +static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = > + MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; > > G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) > MbimMessage *mbim_message_device_service_subscriber_list_set_new ( > -- > 2.13.2.725.g09c95d1e9-goog > -- Aleksander https://aleksander.es From aleksander at aleksander.es Wed Jun 28 08:08:03 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Wed, 28 Jun 2017 10:08:03 +0200 Subject: review: dcbw/atds In-Reply-To: <1498575658.3366.2.camel@redhat.com> References: <1498575658.3366.2.camel@redhat.com> Message-ID: On Tue, Jun 27, 2017 at 5:00 PM, Dan Williams wrote: > Branch review requested on dcbw/atds which attempts to implement the > AT&T Device Services service, based on the Wireshark MBIM dissector > r/e. > > It gets us at least LAC/TAC (which we could use to implement basic > location) and extended Signal info. Nice branch! Tested it here with a Sierra MBIM modem and seems to be working very well. It all looks good to me except for the typo in the commit message :) -- Aleksander https://aleksander.es From dcbw at redhat.com Wed Jun 28 14:18:41 2017 From: dcbw at redhat.com (Dan Williams) Date: Wed, 28 Jun 2017 09:18:41 -0500 Subject: review: dcbw/atds In-Reply-To: References: <1498575658.3366.2.camel@redhat.com> Message-ID: <1498659521.31309.0.camel@redhat.com> On Wed, 2017-06-28 at 10:08 +0200, Aleksander Morgado wrote: > On Tue, Jun 27, 2017 at 5:00 PM, Dan Williams > wrote: > > Branch review requested on dcbw/atds which attempts to implement > > the > > AT&T Device Services service, based on the Wireshark MBIM dissector > > r/e. > > > > It gets us at least LAC/TAC (which we could use to implement basic > > location) and extended Signal info. > > Nice branch! Tested it here with a Sierra MBIM modem and seems to be > working very well. > > It all looks good to me except for the typo in the commit message :) Merged to git master with a fixed up commit message. Dan From benchan at chromium.org Wed Jun 28 14:53:29 2017 From: benchan at chromium.org (Ben Chan) Date: Wed, 28 Jun 2017 07:53:29 -0700 Subject: [PATCH] libmbim-glib: make gtk-doc work again on deprecated enumerators Message-ID: <20170628145329.26513-1-benchan@chromium.org> Commit e5b6807d6 "libmbim-glib: fix G_DEPRECATED_FOR annotations" replaced macro defintions with `static const int' definitions for those deprecated enumerators. However, gtk-doc doesn't seem to document `static const int' defintions. This patch works around the issue by adding a macro defintion on top of a `static const int' defintion. --- src/libmbim-glib/mbim-compat.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h index 88966db..23361ee 100644 --- a/src/libmbim-glib/mbim-compat.h +++ b/src/libmbim-glib/mbim-compat.h @@ -43,8 +43,9 @@ G_BEGIN_DECLS * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. */ G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) -static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = +static const int DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH /*****************************************************************************/ /* 'Service Subscriber List' rename to 'Service Subscribe List' */ @@ -57,8 +58,9 @@ static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. */ G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) -static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = +static const int DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) MbimMessage *mbim_message_device_service_subscriber_list_set_new ( -- 2.13.2.725.g09c95d1e9-goog From aleksander at aleksander.es Wed Jun 28 15:23:08 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Wed, 28 Jun 2017 17:23:08 +0200 Subject: [PATCH] libmbim-glib: make gtk-doc work again on deprecated enumerators In-Reply-To: <20170628145329.26513-1-benchan@chromium.org> References: <20170628145329.26513-1-benchan@chromium.org> Message-ID: On Wed, Jun 28, 2017 at 4:53 PM, Ben Chan wrote: > Commit e5b6807d6 "libmbim-glib: fix G_DEPRECATED_FOR annotations" > replaced macro defintions with `static const int' definitions for those > deprecated enumerators. However, gtk-doc doesn't seem to document > `static const int' defintions. This patch works around the issue by > adding a macro defintion on top of a `static const int' defintion. Could we make it MBIM_DEPRECATED... ? i.e. to keep the MBIM_ prefix. > --- > src/libmbim-glib/mbim-compat.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h > index 88966db..23361ee 100644 > --- a/src/libmbim-glib/mbim-compat.h > +++ b/src/libmbim-glib/mbim-compat.h > @@ -43,8 +43,9 @@ G_BEGIN_DECLS > * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. > */ > G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) > -static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > +static const int DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; > +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH > > /*****************************************************************************/ > /* 'Service Subscriber List' rename to 'Service Subscribe List' */ > @@ -57,8 +58,9 @@ static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. > */ > G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) > -static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = > +static const int DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = > MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; > +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST > > G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) > MbimMessage *mbim_message_device_service_subscriber_list_set_new ( > -- > 2.13.2.725.g09c95d1e9-goog > -- Aleksander https://aleksander.es From benchan at chromium.org Wed Jun 28 15:28:21 2017 From: benchan at chromium.org (Ben Chan) Date: Wed, 28 Jun 2017 08:28:21 -0700 Subject: [PATCH v2] libmbim-glib: make gtk-doc work again on deprecated enumerators In-Reply-To: References: Message-ID: <20170628152821.80937-1-benchan@chromium.org> Commit e5b6807d6 "libmbim-glib: fix G_DEPRECATED_FOR annotations" replaced macro defintions with `static const int' definitions for those deprecated enumerators. However, gtk-doc doesn't seem to document `static const int' defintions. This patch works around the issue by adding a macro defintion on top of a `static const int' defintion. --- src/libmbim-glib/mbim-compat.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h index 88966db..23361ee 100644 --- a/src/libmbim-glib/mbim-compat.h +++ b/src/libmbim-glib/mbim-compat.h @@ -43,8 +43,9 @@ G_BEGIN_DECLS * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. */ G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) -static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = +static const int MBIM_DEPRECATED_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH MBIM_DEPRECATED_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH /*****************************************************************************/ /* 'Service Subscriber List' rename to 'Service Subscribe List' */ @@ -57,8 +58,9 @@ static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. */ G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) -static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = +static const int MBIM_DEPRECATED_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST MBIM_DEPRECATED_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) MbimMessage *mbim_message_device_service_subscriber_list_set_new ( -- 2.13.2.725.g09c95d1e9-goog From benchan at chromium.org Wed Jun 28 15:41:51 2017 From: benchan at chromium.org (Ben Chan) Date: Wed, 28 Jun 2017 08:41:51 -0700 Subject: review: dcbw/atds In-Reply-To: <1498659521.31309.0.camel@redhat.com> References: <1498575658.3366.2.camel@redhat.com> <1498659521.31309.0.camel@redhat.com> Message-ID: Dan, how about we name the commands like --atds-query-signal and --atds-query-location, to be consistent with other query commands? On Wed, Jun 28, 2017 at 7:18 AM, Dan Williams wrote: > On Wed, 2017-06-28 at 10:08 +0200, Aleksander Morgado wrote: >> On Tue, Jun 27, 2017 at 5:00 PM, Dan Williams >> wrote: >> > Branch review requested on dcbw/atds which attempts to implement >> > the >> > AT&T Device Services service, based on the Wireshark MBIM dissector >> > r/e. >> > >> > It gets us at least LAC/TAC (which we could use to implement basic >> > location) and extended Signal info. >> >> Nice branch! Tested it here with a Sierra MBIM modem and seems to be >> working very well. >> >> It all looks good to me except for the typo in the commit message :) > > Merged to git master with a fixed up commit message. > > Dan > _______________________________________________ > libmbim-devel mailing list > libmbim-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libmbim-devel From dcbw at redhat.com Wed Jun 28 15:58:01 2017 From: dcbw at redhat.com (Dan Williams) Date: Wed, 28 Jun 2017 10:58:01 -0500 Subject: review: dcbw/atds In-Reply-To: References: <1498575658.3366.2.camel@redhat.com> <1498659521.31309.0.camel@redhat.com> Message-ID: <1498665481.31309.1.camel@redhat.com> On Wed, 2017-06-28 at 08:41 -0700, Ben Chan wrote: > Dan, how about we name the commands like --atds-query-signal and > --atds-query-location, to be consistent with other query commands? Good idea, done and pushed to git master. Dan > On Wed, Jun 28, 2017 at 7:18 AM, Dan Williams > wrote: > > On Wed, 2017-06-28 at 10:08 +0200, Aleksander Morgado wrote: > > > On Tue, Jun 27, 2017 at 5:00 PM, Dan Williams > > > wrote: > > > > Branch review requested on dcbw/atds which attempts to > > > > implement > > > > the > > > > AT&T Device Services service, based on the Wireshark MBIM > > > > dissector > > > > r/e. > > > > > > > > It gets us at least LAC/TAC (which we could use to implement > > > > basic > > > > location) and extended Signal info. > > > > > > Nice branch! Tested it here with a Sierra MBIM modem and seems to > > > be > > > working very well. > > > > > > It all looks good to me except for the typo in the commit message > > > :) > > > > Merged to git master with a fixed up commit message. > > > > Dan > > _______________________________________________ > > libmbim-devel mailing list > > libmbim-devel at lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/libmbim-devel > > _______________________________________________ > libmbim-devel mailing list > libmbim-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libmbim-devel From aleksander at aleksander.es Wed Jun 28 16:05:30 2017 From: aleksander at aleksander.es (Aleksander Morgado) Date: Wed, 28 Jun 2017 18:05:30 +0200 Subject: [PATCH v2] libmbim-glib: make gtk-doc work again on deprecated enumerators In-Reply-To: <20170628152821.80937-1-benchan@chromium.org> References: <20170628152821.80937-1-benchan@chromium.org> Message-ID: On 28/06/17 17:28, Ben Chan wrote: > Commit e5b6807d6 "libmbim-glib: fix G_DEPRECATED_FOR annotations" > replaced macro defintions with `static const int' definitions for those > deprecated enumerators. However, gtk-doc doesn't seem to document > `static const int' defintions. This patch works around the issue by > adding a macro defintion on top of a `static const int' defintion. Pushed to git master and the stable branches, thanks. > --- > src/libmbim-glib/mbim-compat.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h > index 88966db..23361ee 100644 > --- a/src/libmbim-glib/mbim-compat.h > +++ b/src/libmbim-glib/mbim-compat.h > @@ -43,8 +43,9 @@ G_BEGIN_DECLS > * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead. > */ > G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH) > -static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > +static const int MBIM_DEPRECATED_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH; > +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH MBIM_DEPRECATED_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH > > /*****************************************************************************/ > /* 'Service Subscriber List' rename to 'Service Subscribe List' */ > @@ -57,8 +58,9 @@ static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH = > * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead. > */ > G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST) > -static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = > +static const int MBIM_DEPRECATED_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = > MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST; > +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST MBIM_DEPRECATED_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST > > G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new) > MbimMessage *mbim_message_device_service_subscriber_list_set_new ( > -- Aleksander https://aleksander.es