From: Mohit Ghuley Date: Tue, 22 Oct 2019 13:37:17 +0000 (+0530) Subject: wlbt: Initial Scan will be performed after STA Mac Randomisation. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd725e7aacd3622f85803682036a4c3334c217d1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git wlbt: Initial Scan will be performed after STA Mac Randomisation. Initial Scan will be performed after STA Mac Randomisation, for facilitating faster reconnection to Saved Profiles. SCSC-Bug-Id: PRI-11557 Moto-CRs-Fixed: (CR) Change-Id: I8f308745ad4bdce0d04ad58f3042b5cb5a62812c Signed-off-by: Mohit Ghuley Signed-off-by: sunyue5 Reviewed-on: https://gerrit.mot.com/1441543 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Hua Tan Submit-Approved: Jira Key --- diff --git a/drivers/net/wireless/scsc/netif.c b/drivers/net/wireless/scsc/netif.c index b196f2164ced..4d2a8f9da7d3 100755 --- a/drivers/net/wireless/scsc/netif.c +++ b/drivers/net/wireless/scsc/netif.c @@ -1056,10 +1056,20 @@ exit: static int slsi_set_mac_address(struct net_device *dev, void *addr) { + struct netdev_vif *ndev_vif = netdev_priv(dev); + struct slsi_dev *sdev = ndev_vif->sdev; struct sockaddr *sa = (struct sockaddr *)addr; SLSI_NET_DBG1(dev, SLSI_NETDEV, "slsi_set_mac_address %pM\n", sa->sa_data); SLSI_ETHER_COPY(dev->dev_addr, sa->sa_data); + + // Setting of MAC Address is called, when the Mac Address is changed. + // And Mac Address is changed during the Mac Randomization Cases. + // During Connected Mac Randomization, enabling the initial scan for faster reconnection. + if (SLSI_IS_VIF_INDEX_WLAN(ndev_vif)) { + sdev->initial_scan = true; + SLSI_NET_DBG1(dev, SLSI_NETDEV, "slsi_set_mac_address : Value of initial_scan is %d\n", sdev->initial_scan); + } return 0; }