From 361c76b08d3dee0b6f36a2d1a6ea799f32501315 Mon Sep 17 00:00:00 2001 From: hwg Date: Wed, 3 Jun 2015 09:28:46 +0800 Subject: [PATCH] rfkill-wlan.c: solve mac addr all zero error, cause can't connect ap problem --- net/rfkill/rfkill-wlan.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/rfkill/rfkill-wlan.c b/net/rfkill/rfkill-wlan.c index bdcc8aa56c9c..cabc3336bdcc 100755 --- a/net/rfkill/rfkill-wlan.c +++ b/net/rfkill/rfkill-wlan.c @@ -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); -- 2.34.1