OSDN Git Service

Remove dead code in wifi.c
authorChristopher Wiley <wiley@google.com>
Mon, 13 Jun 2016 21:56:05 +0000 (14:56 -0700)
committerChristopher Wiley <wiley@google.com>
Mon, 13 Jun 2016 22:15:35 +0000 (15:15 -0700)
There are no callsites of this code today.

Bug: 28619119
Change-Id: Icc61a86dc71f411fd3550d825236f4ac025f4541
Test: Compiles

include/hardware_legacy/wifi.h
wifi/wifi.c

index 93f0383..dce9d34 100644 (file)
@@ -108,30 +108,6 @@ int wifi_wait_for_event(char *buf, size_t len);
 int wifi_command(const char *command, char *reply, size_t *reply_len);
 
 /**
- * do_dhcp_request() issues a dhcp request and returns the acquired
- * information. 
- * 
- * All IPV4 addresses/mask are in network byte order.
- *
- * @param ipaddr return the assigned IPV4 address
- * @param gateway return the gateway being used
- * @param mask return the IPV4 mask
- * @param dns1 return the IPV4 address of a DNS server
- * @param dns2 return the IPV4 address of a DNS server
- * @param server return the IPV4 address of DHCP server
- * @param lease return the length of lease in seconds.
- *
- * @return 0 if successful, < 0 if error.
- */
-int do_dhcp_request(int *ipaddr, int *gateway, int *mask,
-                   int *dns1, int *dns2, int *server, int *lease);
-
-/**
- * Return the error string of the last do_dhcp_request().
- */
-const char *get_dhcp_error_string();
-
-/**
  * Return the path to requested firmware
  */
 #define WIFI_GET_FW_PATH_STA   0
index 880f6fc..894c045 100644 (file)
 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
 #include <sys/_system_properties.h>
 
-extern int do_dhcp();
-extern int ifc_init();
-extern void ifc_close();
-extern char *dhcp_lasterror();
-extern void get_dhcp_info();
 extern int init_module(void *, unsigned long, const char *);
 extern int delete_module(const char *, unsigned int);
 void wifi_close_sockets();
@@ -168,28 +163,6 @@ static int rmmod(const char *modname)
     return ret;
 }
 
-int do_dhcp_request(int *ipaddr, int *gateway, int *mask,
-                    int *dns1, int *dns2, int *server, int *lease) {
-    /* For test driver, always report success */
-    if (strcmp(primary_iface, WIFI_TEST_INTERFACE) == 0)
-        return 0;
-
-    if (ifc_init() < 0)
-        return -1;
-
-    if (do_dhcp(primary_iface) < 0) {
-        ifc_close();
-        return -1;
-    }
-    ifc_close();
-    get_dhcp_info(ipaddr, gateway, mask, dns1, dns2, server, lease);
-    return 0;
-}
-
-const char *get_dhcp_error_string() {
-    return dhcp_lasterror();
-}
-
 #ifdef WIFI_DRIVER_STATE_CTRL_PARAM
 int wifi_change_driver_state(const char *state)
 {