From: Saurav Babu Date: Mon, 4 Dec 2017 11:42:27 +0000 (+0530) Subject: wifi-mesh: For softAP stations don't get mesh specific station info X-Git-Tag: submit/tizen/20171207.070141~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F162618%2F1;p=platform%2Fcore%2Fapi%2Fwifi-mesh.git wifi-mesh: For softAP stations don't get mesh specific station info This patch returns WIFI_MESH_ERROR_INVALID_OPERATION when trying to get stations informations specific to mesh for softAP station Change-Id: Ib8d74ecc38c8bd1ca6be455f3ca2b079255c515e Signed-off-by: Saurav Babu --- diff --git a/src/wifi-mesh-internal.c b/src/wifi-mesh-internal.c index 2ab9121..c6356af 100644 --- a/src/wifi-mesh-internal.c +++ b/src/wifi-mesh-internal.c @@ -436,6 +436,13 @@ EXPORT_API int wifi_mesh_get_sta_mesh_llid(wifi_mesh_station_info_h station, /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *mesh_llid = psta->mesh_llid; return rv; } @@ -455,6 +462,13 @@ EXPORT_API int wifi_mesh_get_sta_mesh_plid(wifi_mesh_station_info_h station, /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *mesh_plid = psta->mesh_plid; return rv; } @@ -474,6 +488,13 @@ EXPORT_API int wifi_mesh_get_sta_mesh_plink(wifi_mesh_station_info_h station, /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *mesh_plink = psta->mesh_plink; return rv; } @@ -493,6 +514,13 @@ EXPORT_API int wifi_mesh_get_sta_local_ps_mode(wifi_mesh_station_info_h station, /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *local_ps_mode = psta->local_ps_mode; return rv; } @@ -512,6 +540,13 @@ EXPORT_API int wifi_mesh_get_sta_peer_ps_mode(wifi_mesh_station_info_h station, /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *peer_ps_mode = psta->peer_ps_mode; return rv; } @@ -531,6 +566,13 @@ EXPORT_API int wifi_mesh_get_sta_non_peer_ps_mode( /* LCOV_EXCL_STOP */ } + if (psta->sta_type == MESH_STATION_TYPE_SOFTAP) { + /* LCOV_EXCL_START */ + LOGE("Invalid Station Type"); + return WIFI_MESH_ERROR_INVALID_OPERATION; + /* LCOV_EXCL_STOP */ + } + *non_peer_ps_mode = psta->non_peer_ps_mode; return rv; }