wlbt: Initial Scan will be performed after STA Mac Randomisation.
authorMohit Ghuley <mohit.ghuley@samsung.com>
Tue, 22 Oct 2019 13:37:17 +0000 (19:07 +0530)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:32:13 +0000 (17:32 +0800)
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 <mohit.ghuley@samsung.com>
Signed-off-by: sunyue5 <sunyue5@motorola.com>
Reviewed-on: https://gerrit.mot.com/1441543
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key

drivers/net/wireless/scsc/netif.c

index b196f2164ced2dcc989e901533d8798956c1bf35..4d2a8f9da7d3d1e889b7f23d6ef7bb660a8131fb 100755 (executable)
@@ -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;
 }