summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHoward Harte <hharte@broadcom.com>2010-08-18 12:49:38 -0700
committerColin Cross <ccross@android.com>2010-09-29 17:49:44 -0700
commitec623f1655fdc40032bfcad635f23bb4c32bb484 (patch)
tree1cd4ea12cc7c450446af72e0120bc12b4b3fbdfc /drivers
parent40486694475cf6f70984130d7c472ab2e3f555fd (diff)
net: wireless: bcm4329: Disable packet filtering
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/bcm4329/Makefile2
-rw-r--r--drivers/net/wireless/bcm4329/dhd_common.c4
-rw-r--r--drivers/net/wireless/bcm4329/dhd_linux.c8
3 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/bcm4329/Makefile b/drivers/net/wireless/bcm4329/Makefile
index 15926e4a08d3..af6ca5c27c0d 100644
--- a/drivers/net/wireless/bcm4329/Makefile
+++ b/drivers/net/wireless/bcm4329/Makefile
@@ -5,7 +5,7 @@ DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \
-DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS \
-Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 \
-DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP \
- -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT \
+ -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT \
-DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN \
-Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include
diff --git a/drivers/net/wireless/bcm4329/dhd_common.c b/drivers/net/wireless/bcm4329/dhd_common.c
index 8faffcb23fc2..ebdff8669191 100644
--- a/drivers/net/wireless/bcm4329/dhd_common.c
+++ b/drivers/net/wireless/bcm4329/dhd_common.c
@@ -972,6 +972,7 @@ void print_buf(void *pbuf, int len, int bytes_per_line)
#define strtoul(nptr, endptr, base) bcm_strtoul((nptr), (endptr), (base))
+#ifdef PKT_FILTER_SUPPORT
/* Convert user's input in hex pattern to byte-size mask */
static int
wl_pattern_atoh(char *src, char *dst)
@@ -1201,7 +1202,9 @@ fail:
if (buf)
MFREE(dhd->osh, buf, BUF_SIZE);
}
+#endif
+#ifdef ARP_OFFLOAD_SUPPORT
void
dhd_arp_offload_set(dhd_pub_t * dhd, int arp_mode)
{
@@ -1235,6 +1238,7 @@ dhd_arp_offload_enable(dhd_pub_t * dhd, int arp_enable)
DHD_TRACE(("%s: successfully enabed ARP offload to %d\n",
__FUNCTION__, arp_enable));
}
+#endif
int
dhd_preinit_ioctls(dhd_pub_t *dhd)
diff --git a/drivers/net/wireless/bcm4329/dhd_linux.c b/drivers/net/wireless/bcm4329/dhd_linux.c
index aa1e7aa2ce34..b08ecd15d7d7 100644
--- a/drivers/net/wireless/bcm4329/dhd_linux.c
+++ b/drivers/net/wireless/bcm4329/dhd_linux.c
@@ -218,8 +218,10 @@ print_tainted()
#endif /* defined(CONFIG_WIRELESS_EXT) */
extern int dhdcdc_set_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len);
+#ifdef PKT_FILTER_SUPPORT
extern void dhd_pktfilter_offload_set(dhd_pub_t * dhd, char *arg);
extern void dhd_pktfilter_offload_enable(dhd_pub_t * dhd, char *arg, int enable, int master_mode);
+#endif
#if defined(CONFIG_HAS_EARLYSUSPEND)
#include <linux/earlysuspend.h>
@@ -498,18 +500,20 @@ extern int unregister_pm_notifier(struct notifier_block *nb);
static void dhd_set_packet_filter(int value, dhd_pub_t *dhd)
{
- int i;
-
DHD_TRACE(("%s: %d\n", __func__, value));
+#ifdef PKT_FILTER_SUPPORT
/* 1 - Enable packet filter, only allow unicast packet to send up */
/* 0 - Disable packet filter */
if (dhd_pkt_filter_enable) {
+ int i;
+
for (i = 0; i < dhd->pktfilter_count; i++) {
dhd_pktfilter_offload_set(dhd, dhd->pktfilter[i]);
dhd_pktfilter_offload_enable(dhd, dhd->pktfilter[i],
value, dhd_master_mode);
}
}
+#endif
}
static int dhd_set_suspend(int value, dhd_pub_t *dhd)