Skip to content
Snippets Groups Projects
Commit 11017948 authored by Anjan Chanda's avatar Anjan Chanda
Browse files

update event attribute datatypes from string -> uint32

parent 0987bdf8
Branches devel mld-interface
No related tags found
No related merge requests found
Pipeline #159529 passed
...@@ -523,9 +523,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv, ...@@ -523,9 +523,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv,
} else if (!strcmp(event, "cac-start")) { } else if (!strcmp(event, "cac-start")) {
static const struct blobmsg_policy data_attr[] = { static const struct blobmsg_policy data_attr[] = {
[0] = { .name = "channel", .type = BLOBMSG_TYPE_STRING }, [0] = { .name = "channel", .type = BLOBMSG_TYPE_INT32 },
[1] = { .name = "bandwidth", .type = BLOBMSG_TYPE_STRING }, [1] = { .name = "bandwidth", .type = BLOBMSG_TYPE_INT32 },
[2] = { .name = "cac_time", .type = BLOBMSG_TYPE_STRING }, [2] = { .name = "cac_time", .type = BLOBMSG_TYPE_INT32 },
}; };
struct blob_attr *data[ARRAY_SIZE(data_attr)]; struct blob_attr *data[ARRAY_SIZE(data_attr)];
uint32_t channel = 0; uint32_t channel = 0;
...@@ -540,18 +540,18 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv, ...@@ -540,18 +540,18 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv,
return; return;
} }
channel = atoi(blobmsg_data(data[0])); channel = blobmsg_get_u32(data[0]);
bandwidth = atoi(blobmsg_data(data[1])); bandwidth = blobmsg_get_u32(data[1]);
cac_time = atoi(blobmsg_data(data[2])); cac_time = blobmsg_get_u32(data[2]);
csmngr_process_event_radio_cac_start(priv, r, channel, csmngr_process_event_radio_cac_start(priv, r, channel,
bandwidth, cac_time); bandwidth, cac_time);
} else if (!strcmp(event, "cac-end")) { } else if (!strcmp(event, "cac-end")) {
static const struct blobmsg_policy data_attr[] = { static const struct blobmsg_policy data_attr[] = {
[0] = { .name = "channel", .type = BLOBMSG_TYPE_STRING }, [0] = { .name = "channel", .type = BLOBMSG_TYPE_INT32 },
[1] = { .name = "bandwidth", .type = BLOBMSG_TYPE_STRING }, [1] = { .name = "bandwidth", .type = BLOBMSG_TYPE_INT32 },
[2] = { .name = "success", .type = BLOBMSG_TYPE_STRING }, [2] = { .name = "success", .type = BLOBMSG_TYPE_INT32 },
}; };
struct blob_attr *data[ARRAY_SIZE(data_attr)]; struct blob_attr *data[ARRAY_SIZE(data_attr)];
uint32_t channel = 0; uint32_t channel = 0;
...@@ -566,9 +566,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv, ...@@ -566,9 +566,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv,
return; return;
} }
channel = atoi(blobmsg_data(data[0])); channel = blobmsg_get_u32(data[0]);
bandwidth = atoi(blobmsg_data(data[1])); bandwidth = blobmsg_get_u32(data[1]);
status = atoi(blobmsg_data(data[2])); status = blobmsg_get_u32(data[2]);
csmngr_process_event_radio_cac_end(priv, r, channel, bandwidth, csmngr_process_event_radio_cac_end(priv, r, channel, bandwidth,
status); status);
...@@ -577,9 +577,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv, ...@@ -577,9 +577,9 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv,
!strcmp(event, "nop-end") || !strcmp(event, "nop-end") ||
!strcmp(event, "pre-cac-end")) { !strcmp(event, "pre-cac-end")) {
static const struct blobmsg_policy data_attr[] = { static const struct blobmsg_policy data_attr[] = {
[0] = { .name = "freq", .type = BLOBMSG_TYPE_STRING }, [0] = { .name = "freq", .type = BLOBMSG_TYPE_INT32 },
[1] = { .name = "channel", .type = BLOBMSG_TYPE_STRING }, [1] = { .name = "channel", .type = BLOBMSG_TYPE_INT32 },
[2] = { .name = "bandwidth", .type = BLOBMSG_TYPE_STRING }, [2] = { .name = "bandwidth", .type = BLOBMSG_TYPE_INT32 },
}; };
struct blob_attr *data[ARRAY_SIZE(data_attr)]; struct blob_attr *data[ARRAY_SIZE(data_attr)];
//uint32_t freq = 0; //uint32_t freq = 0;
...@@ -595,8 +595,8 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv, ...@@ -595,8 +595,8 @@ static void csmngr_wifi_radio_event_handler(struct csmngr_private *priv,
} }
//freq = atoi(blobmsg_data(data[0])); //freq = atoi(blobmsg_data(data[0]));
channel = atoi(blobmsg_data(data[1])); channel = blobmsg_get_u32(data[1]);
bandwidth = atoi(blobmsg_data(data[2])); bandwidth = blobmsg_get_u32(data[2]);
csmngr_process_event_radio_radar(priv, r, channel, bandwidth); csmngr_process_event_radio_radar(priv, r, channel, bandwidth);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment