]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: update AP id service message
authorAlex Elder <elder@linaro.org>
Wed, 22 Oct 2014 10:36:18 +0000 (05:36 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 22 Oct 2014 10:46:21 +0000 (18:46 +0800)
Rename and renumber the values for the AP ID service message
and related symbols to match the recently-updated spec.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/ap.c
drivers/staging/greybus/svc_msg.h

index 8156df08d9bd99e27f8da2de43511cc8a455d60e..24a15e9c60090d90b6d9cef1097bf93085fadefc 100644 (file)
@@ -136,6 +136,9 @@ static void svc_management(struct svc_function_unipro_management *management,
        }
 
        switch (management->management_packet_type) {
+       case SVC_MANAGEMENT_AP_ID:
+               hd->device_id = management->ap_id.device_id;
+               break;
        case SVC_MANAGEMENT_LINK_UP:
                module = gb_module_find(hd, management->link_up.module_id);
                if (!module) {
@@ -152,9 +155,6 @@ static void svc_management(struct svc_function_unipro_management *management,
                                ret, management->link_up.module_id,
                                management->link_up.interface_id);
                break;
-       case SVC_MANAGEMENT_AP_DEVICE_ID:
-               hd->device_id = management->ap_device_id.device_id;
-               break;
        default:
                dev_err(hd->parent, "Unhandled UniPro management message\n");
        }
index d76b6217beb02216924c7090a2a0a961543e9146..5b545129e63dd9013378efba31b15ea69e2a0039 100644 (file)
@@ -56,22 +56,23 @@ struct svc_function_unipro_link_up {
        __u8    device_id;
 };
 
-struct svc_function_ap_device_id {
+struct svc_function_ap_id {
+       __u8    module_id;
        __u8    device_id;
 };
 
 enum svc_function_management_event {
-       SVC_MANAGEMENT_SET_ROUTE        = 0x00,
+       SVC_MANAGEMENT_AP_ID            = 0x00,
        SVC_MANAGEMENT_LINK_UP          = 0x01,
-       SVC_MANAGEMENT_AP_DEVICE_ID     = 0x02,
+       SVC_MANAGEMENT_SET_ROUTE        = 0x02,
 };
 
 struct svc_function_unipro_management {
        __u8    management_packet_type; /* enum svc_function_management_event */
        union {
-               struct svc_function_unipro_set_route    set_route;
+               struct svc_function_ap_id               ap_id;
                struct svc_function_unipro_link_up      link_up;
-               struct svc_function_ap_device_id        ap_device_id;
+               struct svc_function_unipro_set_route    set_route;
        };
 };