|
@@ -680,6 +680,12 @@ static int __hdd_hostapd_set_mac_address(struct net_device *dev, void *addr)
|
|
|
|
|
|
qdf_mem_copy(&mac_addr, psta_mac_addr->sa_data, sizeof(mac_addr));
|
|
|
|
|
|
+ if (hdd_get_adapter_by_macaddr(hdd_ctx, mac_addr.bytes)) {
|
|
|
+ hdd_err("adapter exist with same mac address " MAC_ADDRESS_STR,
|
|
|
+ MAC_ADDR_ARRAY(mac_addr.bytes));
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
if (qdf_is_macaddr_zero(&mac_addr)) {
|
|
|
hdd_err("MAC is all zero");
|
|
|
return -EINVAL;
|