librmnetctl: Make STATE_ID attribute LL only
Fill UPLINK_STATE_ID attribute for LL channel only when setting
UL aggregation parameters to avoid rmnet driver dependency.
Change-Id: I8631c31bfea92bbd7d119092b3b3c5969d0130e8
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
diff --git a/rmnetctl/src/librmnetctl.c b/rmnetctl/src/librmnetctl.c
index d5e55e3..a51c389 100644
--- a/rmnetctl/src/librmnetctl.c
+++ b/rmnetctl/src/librmnetctl.c
@@ -1301,9 +1301,12 @@
if (rc != RMNETCTL_SUCCESS)
return rc;
- rc = rta_put_u8(req, reqsize, RMNETCTL_IFLA_UPLINK_STATE_ID, state_id);
- if (rc != RMNETCTL_SUCCESS)
- return rc;
+ if (state_id != RMNETCTL_DEFAULT_UL_AGG_STATE) {
+ rc = rta_put_u8(req, reqsize, RMNETCTL_IFLA_UPLINK_STATE_ID,
+ state_id);
+ if (rc != RMNETCTL_SUCCESS)
+ return rc;
+ }
rta_nested_end(req, datainfo);
rta_nested_end(req, linkinfo);