net: wireless: bcm4329: Disable packet filtering
authorHoward Harte <hharte@broadcom.com>
Wed, 18 Aug 2010 19:49:38 +0000 (12:49 -0700)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:44 +0000 (17:49 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcm4329/Makefile
drivers/net/wireless/bcm4329/dhd_common.c
drivers/net/wireless/bcm4329/dhd_linux.c

index 15926e4a08d31baef32452a044e7881d77c0fe2a..af6ca5c27c0db95f5ed5e719b8a53526b6934d82 100644 (file)
@@ -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
 
index 8faffcb23fc2958f35987270d2616343b3522b4e..ebdff86691912951e04e62be10f6d967a339e4d8 100644 (file)
@@ -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)
index aa1e7aa2ce34297e11844afccf5e13e1124266a2..b08ecd15d7d749efa51574a07cc77246276c657b 100644 (file)
@@ -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)