diff options
author | Andrew Dodd <atd7@cornell.edu> | 2012-09-23 15:18:41 +0200 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-23 15:26:08 +0200 |
commit | dc24673cf731adae6445672bcb5bb36a7561e78d (patch) | |
tree | 3bbedf24cc465ed10f0935e4979455ec530588c5 /drivers/net/wireless | |
parent | f99e726d4ee856dd178734c8fe3ee2ea49fb9fa6 (diff) | |
download | kernel_samsung_smdk4412-dc24673cf731adae6445672bcb5bb36a7561e78d.zip kernel_samsung_smdk4412-dc24673cf731adae6445672bcb5bb36a7561e78d.tar.gz kernel_samsung_smdk4412-dc24673cf731adae6445672bcb5bb36a7561e78d.tar.bz2 |
bcmdhd: change packet filter settings to block multicast
Change-Id: I40c56bcae53c6901969047d5b517c10dcd5d5f4b
Diffstat (limited to 'drivers/net/wireless')
-rwxr-xr-x | drivers/net/wireless/bcmdhd/dhd_linux.c | 57 |
1 files changed, 3 insertions, 54 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 39e4fe2..02b8794 100755 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -3867,38 +3867,21 @@ dhd_preinit_ioctls(dhd_pub_t *dhd) #ifdef PKT_FILTER_SUPPORT /* Setup default defintions for pktfilter , enable in suspend */ - dhd->pktfilter_count = 5; + dhd->pktfilter_count = 1; /* Setup filter to allow only unicast */ dhd->pktfilter[0] = "100 0 0 0 0x01 0x00"; - dhd->pktfilter[1] = NULL; - dhd->pktfilter[2] = NULL; - dhd->pktfilter[3] = NULL; - /* Add filter to pass multicastDNS packet and NOT filter out as Broadcast */ - dhd->pktfilter[4] = "104 0 0 0 0xFFFFFFFFFFFF 0x01005E0000FB"; #ifdef CUSTOMER_HW4 -#ifdef GAN_LITE_NAT_KEEPALIVE_FILTER - dhd->pktfilter_count = 4; - /* Setup filter to block broadcast and NAT Keepalive packets */ - dhd->pktfilter[0] = "100 0 0 0 0xffffff 0xffffff"; /* discard all broadcast packets */ - dhd->pktfilter[1] = "102 0 0 36 0xffffffff 0x11940009"; /* discard NAT Keepalive packets */ - dhd->pktfilter[2] = "104 0 0 38 0xffffffff 0x11940009"; /* discard NAT Keepalive packets */ - dhd->pktfilter[3] = NULL; -#else - /* Setup filter to allow only unicast */ #if defined(BLOCK_IPV6_PACKET) dhd->pktfilter[0] = "100 0 0 0 " HEX_PREF_STR UNI_FILTER_STR ZERO_ADDR_STR ETHER_TYPE_STR IPV6_FILTER_STR " " HEX_PREF_STR ZERO_ADDR_STR ZERO_ADDR_STR ETHER_TYPE_STR ZERO_TYPE_STR; -#else - dhd->pktfilter[0] = "100 0 0 0 0x01 0x00"; #endif /* BLOCK_IPV6_PACKET */ #if defined(PASS_IPV4_SUSPEND) - dhd->pktfilter_count = 5; - dhd->pktfilter[4] = "104 0 0 0 0xFFFFFF 0x01005E"; + dhd->pktfilter_count = 2; + dhd->pktfilter[1] = "104 0 0 0 0xFFFFFF 0x01005E"; #endif -#endif /* GAN_LITE_NAT_KEEPALIVE_FILTER */ #endif /* CUSTOMER_HW4 */ #if defined(SOFTAP) @@ -5103,41 +5086,7 @@ int net_os_set_dtim_skip(struct net_device *dev, int val) #ifdef PKT_FILTER_SUPPORT int net_os_rxfilter_add_remove(struct net_device *dev, int add_remove, int num) { -#ifndef GAN_LITE_NAT_KEEPALIVE_FILTER - dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev); - char *filterp = NULL; - int ret = 0; - - if (!dhd || (num == DHD_UNICAST_FILTER_NUM) || - (num == DHD_MDNS_FILTER_NUM)) - return ret; - if (num >= dhd->pub.pktfilter_count) - return -EINVAL; - if (add_remove) { - switch (num) { - case DHD_BROADCAST_FILTER_NUM: - filterp = "101 0 0 0 0xFFFFFFFFFFFF 0xFFFFFFFFFFFF"; - break; - case DHD_MULTICAST4_FILTER_NUM: - filterp = "102 0 0 0 0xFFFFFF 0x01005E"; - break; - case DHD_MULTICAST6_FILTER_NUM: -#if defined(BLOCK_IPV6_PACKET) -/* customer want to use NO IPV6 packets only */ - return ret; -#endif - filterp = "103 0 0 0 0xFFFF 0x3333"; - break; - default: - return -EINVAL; - } - } - dhd->pub.pktfilter[num] = filterp; - dhd_pktfilter_offload_set(&dhd->pub, dhd->pub.pktfilter[num]); - return ret; -#else return 0; -#endif /* GAN_LITE_NAT_KEEPALIVE_FILTER */ } int net_os_enable_packet_filter(struct net_device *dev, int val) |