rfkill-wlan.c: solve mac addr all zero error, cause can't connect ap problem
authorhwg <hwg@rock-chips.com>
Wed, 3 Jun 2015 01:28:46 +0000 (09:28 +0800)
committerhwg <hwg@rock-chips.com>
Wed, 3 Jun 2015 01:28:46 +0000 (09:28 +0800)
net/rfkill/rfkill-wlan.c

index bdcc8aa56c9cf01457cbd8008b31621fb506e776..cabc3336bdccdb60ac6603bb1e7decca8225fdee 100755 (executable)
@@ -616,12 +616,13 @@ int rockchip_wifi_mac_addr(unsigned char *buf)
     rockchip_wifi_rand_mac_addr(buf);
 #endif
 
-    if (is_valid_ether_addr(wifi_custom_mac_addr) && !strncmp(wifi_chip_type_string, "rtl", 3)) {
-        wifi_custom_mac_addr[0] &= ~0x2; // for p2p
-    }/* else {
+    if (is_valid_ether_addr(wifi_custom_mac_addr)) {
+        if (!strncmp(wifi_chip_type_string, "rtl", 3))
+            wifi_custom_mac_addr[0] &= ~0x2; // for p2p
+    } else {
         LOG("This mac address is not valid, ignored...\n");
         return -1;
-    }*/
+    }
 
     memcpy(buf, wifi_custom_mac_addr, 6);