From fd725e7aacd3622f85803682036a4c3334c217d1 Mon Sep 17 00:00:00 2001 From: Mohit Ghuley Date: Tue, 22 Oct 2019 19:07:17 +0530 Subject: [PATCH] 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 --- drivers/net/wireless/scsc/netif.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; } -- 2.20.1