net: wireless: bcm4329: Fix disable pno call
authorGreg Goldman <ggoldman@broadcom.com>
Sat, 19 Feb 2011 01:12:19 +0000 (17:12 -0800)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:09:55 +0000 (09:09 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcm4329/Makefile
drivers/net/wireless/bcm4329/dhd_common.c

index dd0452d129eed4ec81df8a63f8e8faba31712cf4..5a662be7fc532d7efaaa3eadb0122a973ae09e35 100644 (file)
@@ -7,7 +7,7 @@ DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2         \
        -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP       \
        -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT        \
        -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN -DHW_OOB      \
-       -DKEEP_ALIVE -DPNO_SUPPORT                                                          \
+       -DKEEP_ALIVE -DPNO_SUPPORT                                            \
        -Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include
 
 DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \
index 9a345fb430760a62a9558fd784fb149438616d76..8fcb95fde827dcbfeeaa97cd640c26ad02e94ce1 100644 (file)
@@ -1911,12 +1911,12 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled)
        if ((pfn_enabled) && \
                ((ret = dhdcdc_set_ioctl(dhd, 0, WLC_GET_BSSID, \
                                 (char *)&bssid, ETHER_ADDR_LEN)) == BCME_NOTASSOCIATED)) {
-                       DHD_TRACE(("%s pno enable called in disassoc mode\n", __FUNCTION__));
+               DHD_TRACE(("%s pno enable called in disassoc mode\n", __FUNCTION__));
        }
-       else {
-                       DHD_ERROR(("%s pno enable called in assoc mode ret=%d\n", \
-                                                                               __FUNCTION__, ret));
-                       return ret;
+       else if (pfn_enabled) {
+               DHD_ERROR(("%s pno enable called in assoc mode ret=%d\n", \
+                       __FUNCTION__, ret));
+               return ret;
        }
 
        /* Enable/disable PNO */