summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2018-02-21 21:48:49 +0100
committercodeworkx <daniel.hillenbrand@codeworkx.de>2018-02-21 21:48:49 +0100
commitf6338ae435156561548c0b15ffb89ebdc64b0e9f (patch)
treeb63d069280e8026292add266237cdff8ef390e0b
parente44b04944eb9da6ad0b6655e0d7b8a8d72bbd26d (diff)
downloadandroid_frameworks_opt_net_wifi-f6338ae435156561548c0b15ffb89ebdc64b0e9f.tar.gz
android_frameworks_opt_net_wifi-f6338ae435156561548c0b15ffb89ebdc64b0e9f.tar.bz2
android_frameworks_opt_net_wifi-f6338ae435156561548c0b15ffb89ebdc64b0e9f.zip
wifi: don't check if WIFI_DRIVER_STATE_CTRL_PARAM is readable
Checking if it's writable is enough because we're only writing to it. Change-Id: Ib09ca2ee20b1555435b1d92d20465662ee7cf463
-rw-r--r--libwifi_hal/wifi_hal_common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libwifi_hal/wifi_hal_common.cpp b/libwifi_hal/wifi_hal_common.cpp
index 599434f82..4cc776eeb 100644
--- a/libwifi_hal/wifi_hal_common.cpp
+++ b/libwifi_hal/wifi_hal_common.cpp
@@ -98,7 +98,7 @@ int wifi_change_driver_state(const char *state) {
if (!state) return -1;
do {
- if (access(WIFI_DRIVER_STATE_CTRL_PARAM, R_OK|W_OK) == 0)
+ if (access(WIFI_DRIVER_STATE_CTRL_PARAM, W_OK) == 0)
break;
usleep(200000);
} while (--count > 0);