Quellcode durchsuchen

qcacld-3.0: Don't process set mac net dev operation on interface up

Presently driver is processing set_mac net dev operation while
device is running, though the same is not supported, leading lower
layers and firmware to hold old mac address and kernel net device
object to hold new address.

Process set_mac net dev operation only on interface is down so that
during interface up new mac address will be programmed in lower layers
and firmware.

Change-Id: I037afa31657a6f1eb1129feae6777d8bcfa1b7a9
CRs-Fixed: 2171548
Hanumanth Reddy Pothula vor 7 Jahren
Ursprung
Commit
5c7a78161d
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      core/hdd/src/wlan_hdd_main.c

+ 5 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3307,6 +3307,11 @@ static int __hdd_set_mac_address(struct net_device *dev, void *addr)
 
 	hdd_enter_dev(dev);
 
+	if (netif_running(dev)) {
+		hdd_err("On iface up, set mac address change isn't supported");
+		return -EBUSY;
+	}
+
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
 	if (0 != ret)