From 5c7a78161d346012d8e4fe2a802d0752b23bb730 Mon Sep 17 00:00:00 2001 From: Hanumanth Reddy Pothula Date: Fri, 9 Mar 2018 12:55:32 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1e27e826145f..0c4e3ff4b5f9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/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)