Cleanup: Delete dead code.
Sreeram Ramachandran [Sun, 20 Jul 2014 05:41:15 +0000 (22:41 -0700)]
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc

bcmdhd/bcmdhd_net_iface/Android.mk [deleted file]
bcmdhd/bcmdhd_net_iface/bcmdhd_net_iface.c [deleted file]

diff --git a/bcmdhd/bcmdhd_net_iface/Android.mk b/bcmdhd/bcmdhd_net_iface/Android.mk
deleted file mode 100644 (file)
index c5dc34d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2012 Google, inc.
-#
-# $Id: Android.mk,v 2.6 2009-05-07 18:25:15 hharte Exp $
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-#
-# lib_net_iface_cmd
-#
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := bcmdhd_net_iface.c
-LOCAL_MODULE := libnetcmdiface
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_CFLAGS := -mabi=aapcs-linux
-endif
-LOCAL_MODULE_TAGS := optional
-LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
-include $(BUILD_SHARED_LIBRARY)
diff --git a/bcmdhd/bcmdhd_net_iface/bcmdhd_net_iface.c b/bcmdhd/bcmdhd_net_iface/bcmdhd_net_iface.c
deleted file mode 100644 (file)
index b724fdb..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <net/if.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <cutils/log.h>
-#include <netutils/ifc.h>
-#include <private/android_filesystem_config.h>
-
-#define INTERFACE_MAX_BUFFER_SIZE 4096
-
-typedef struct android_wifi_priv_cmd {
-       char *buf;
-       int used_len;
-       int total_len;
-} android_wifi_priv_cmd;
-
-static struct net_if_snd_cmd_state {
-       int sock;
-       char cmd[INTERFACE_MAX_BUFFER_SIZE];
-       char ibuf[INTERFACE_MAX_BUFFER_SIZE];
-} state;
-
-int net_iface_send_command_init(void) {
-       state.sock = socket(AF_INET, SOCK_DGRAM, 0);
-       if (state.sock < 0) {
-               return -ENOTCONN;
-       } else {
-               return 0;
-       }
-}
-
-/*
- * Arguments:
- *       argv[2] - wlan interface
- *       argv[3] - command
- *       argv[4] - argument
- */
-int net_iface_send_command(int argc, char *argv[], char **rbuf) {
-       int ret, i;
-       size_t bc = 0;
-       struct ifreq ifr;
-       android_wifi_priv_cmd priv_cmd;
-
-       if (argc < 3) {
-               return -EINVAL;
-       }
-       for (i = 3; i < argc; i++) {
-               bc += snprintf(&state.cmd[bc], sizeof(state.cmd) - bc, "%s ", argv[i]);
-               if (bc >= sizeof(state.cmd)) {
-                       return -ENOBUFS;
-               }
-       }
-       state.cmd[bc] = '\0';
-
-       memset(&ifr, 0, sizeof(ifr));
-       strncpy(ifr.ifr_name, argv[2], IFNAMSIZ);
-       strncpy(state.ibuf, state.cmd, INTERFACE_MAX_BUFFER_SIZE);
-
-       priv_cmd.buf = state.ibuf;
-       priv_cmd.used_len = INTERFACE_MAX_BUFFER_SIZE;
-       priv_cmd.total_len = INTERFACE_MAX_BUFFER_SIZE;
-
-       ifr.ifr_data = &priv_cmd;
-
-       if ((ret = ioctl(state.sock, SIOCDEVPRIVATE + 1, &ifr)) < 0) {
-               return ret;
-       }
-
-       if (rbuf)
-               *rbuf = state.ibuf;
-       else
-               ret = -EFAULT;
-
-       return ret;
-}