mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
net: wireless: bcm4329: Disable packet filtering
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
committed by
Colin Cross
parent
4048669447
commit
ec623f1655
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user