summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-08-13 07:34:13 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-08-13 07:34:13 +0000
commitd6445207dabc4517bd5deed741aef68a84f3906d (patch)
tree3866d8bd8a59b3190e7d7e90b798dbfda40bd57c
parentc5106e45627573b472a388be3c38209ec4555be3 (diff)
parent0d4fd15471ad52739d2ea8fc94d356c1844c4c5b (diff)
downloadandroid_hardware_qcom_wlan-d6445207dabc4517bd5deed741aef68a84f3906d.tar.gz
android_hardware_qcom_wlan-d6445207dabc4517bd5deed741aef68a84f3906d.tar.bz2
android_hardware_qcom_wlan-d6445207dabc4517bd5deed741aef68a84f3906d.zip
release-request-68cc9b2a-98ae-4fbf-8b56-3e535855f399-for-git_oc-mr1-release-4269864 snap-temp-L25700000092502312
Change-Id: I9e1e7243280891a4cb40b8db4951722919d4835c
-rw-r--r--cld80211-lib/cld80211_lib.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/cld80211-lib/cld80211_lib.c b/cld80211-lib/cld80211_lib.c
index 491fb3e..5c8255b 100644
--- a/cld80211-lib/cld80211_lib.c
+++ b/cld80211-lib/cld80211_lib.c
@@ -225,7 +225,7 @@ static int family_handler(struct nl_msg *msg, void *arg)
}
-static int get_multicast_id(struct cld80211_ctx *ctx, const char *group)
+static int get_multicast_id(struct cld80211_ctx *ctx, const char *group, bool sync_driver)
{
struct family_data res = { group, -ENOENT };
struct nl_msg *nlmsg = nlmsg_alloc();
@@ -238,9 +238,11 @@ static int get_multicast_id(struct cld80211_ctx *ctx, const char *group)
CTRL_CMD_GETFAMILY, 0);
nla_put_string(nlmsg, CTRL_ATTR_FAMILY_NAME, "cld80211");
- cld80211_send_recv_msg(ctx, nlmsg, family_handler, &res);
- ALOGI("%s: nlctrl family id: %d group: %s mcast_id: %d", getprogname(),
- ctx->nlctrl_familyid, group, res.id);
+ if (sync_driver == true) {
+ cld80211_send_recv_msg(ctx, nlmsg, family_handler, &res);
+ ALOGI("%s: nlctrl family id: %d group: %s mcast_id: %d", getprogname(),
+ ctx->nlctrl_familyid, group, res.id);
+ }
nlmsg_free(nlmsg);
return res.id;
}
@@ -252,7 +254,7 @@ int cld80211_add_mcast_group(struct cld80211_ctx *ctx, const char* mcgroup)
ALOGE("%s: ctx/mcgroup is NULL: %s", getprogname(), __func__);
return 0;
}
- int id = get_multicast_id(ctx, mcgroup);
+ int id = get_multicast_id(ctx, mcgroup, true);
if (id < 0) {
ALOGE("%s: Could not find group %s, errno: %d id: %d",
getprogname(), mcgroup, errno, id);
@@ -275,7 +277,7 @@ int cld80211_remove_mcast_group(struct cld80211_ctx *ctx, const char* mcgroup)
ALOGE("%s: ctx/mcgroup is NULL: %s", getprogname(), __func__);
return 0;
}
- int id = get_multicast_id(ctx, mcgroup);
+ int id = get_multicast_id(ctx, mcgroup, false);
if (id < 0) {
ALOGE("%s: Could not find group %s, errno: %d id: %d",
getprogname(), mcgroup, errno, id);