aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEcco Park <eccopark@broadcom.com>2013-11-15 09:45:30 +0900
committerAndreas Blaesius <skate4life@gmx.de>2016-04-30 11:03:31 +0200
commit5ac243d72460edeaba7bdffa176771f28e6b380b (patch)
tree906ff2238c03ab72960964427559192b2f61ae90
parent1bafa6bf57b36b3e753eacc17477305fdebfa9d7 (diff)
downloadkernel_samsung_espresso10-5ac243d72460edeaba7bdffa176771f28e6b380b.zip
kernel_samsung_espresso10-5ac243d72460edeaba7bdffa176771f28e6b380b.tar.gz
kernel_samsung_espresso10-5ac243d72460edeaba7bdffa176771f28e6b380b.tar.bz2
net: wireless: bcmdhd: Enable IPv6 RA filter feature
1) We will block IPv6 Router Advertisement multicast packet in suspend mode to save power on device. Bug: 11638281 Signed-off-by: Ecco Park <eccopark@broadcom.com>
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index bf2b561..f485207 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -750,6 +750,8 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
#ifndef ENABLE_FW_ROAM_SUSPEND
uint roamvar = 1;
#endif /* ENABLE_FW_ROAM_SUSPEND */
+ uint nd_ra_filter = 0;
+ int ret = 0;
if (!dhd)
return -ENODEV;
@@ -792,6 +794,14 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
iovbuf, sizeof(iovbuf));
dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
#endif /* ENABLE_FW_ROAM_SUSPEND */
+ if (FW_SUPPORTED(dhd, ndoe)) {
+ /* enable IPv6 RA filter in firmware during suspend */
+ nd_ra_filter = 1;
+ bcm_mkiovar("nd_ra_filter_enable", (char *)&nd_ra_filter, 4,
+ iovbuf, sizeof(iovbuf));
+ if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0)) < 0)
+ DHD_ERROR(("failed to set nd_ra_filter (%d)\n", ret));
+ }
} else {
#ifdef PKT_FILTER_SUPPORT
dhd->early_suspended = 0;
@@ -820,6 +830,15 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
sizeof(iovbuf));
dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
#endif /* ENABLE_FW_ROAM_SUSPEND */
+ if (FW_SUPPORTED(dhd, ndoe)) {
+ /* disable IPv6 RA filter in firmware during suspend */
+ nd_ra_filter = 0;
+ bcm_mkiovar("nd_ra_filter_enable", (char *)&nd_ra_filter, 4,
+ iovbuf, sizeof(iovbuf));
+ if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0)) < 0)
+ DHD_ERROR(("failed to set nd_ra_filter (%d)\n", ret));
+ }
+
}
}
dhd_suspend_unlock(dhd);