net: wireless: bcmdhd: Fix getting Mac address from platform data
Dmitry Shmidt [Wed, 15 Jun 2011 22:20:55 +0000 (15:20 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/dhd_common.c

index 013d622..1bfca85 100644 (file)
@@ -1572,8 +1572,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
                        DHD_ERROR(("%s: can't set MAC address , error=%d\n", __FUNCTION__, ret));
                } else
                        memcpy(dhd->mac.octet, (void *)&ea_addr, ETHER_ADDR_LEN);
-       }
-#else
+       } else {
+#endif /* GET_CUSTOM_MAC_ENABLE */
        /* Get the default device MAC address directly from firmware */
        strcpy(iovbuf, "cur_etheraddr");
        if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_GET_VAR, iovbuf, sizeof(iovbuf), FALSE, 0)) < 0) {
@@ -1581,6 +1581,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
                return BCME_NOTUP;
        }
        memcpy(dhd->mac.octet, iovbuf, ETHER_ADDR_LEN);
+#ifdef GET_CUSTOM_MAC_ENABLE
+       }
 #endif /* GET_CUSTOM_MAC_ENABLE */
 
 #ifdef SET_RANDOM_MAC_SOFTAP