wlan: Use BSSID for active scan if provided by supplicant

qcacld-2.0 to prima propagation

Presently, supplicant does not send bssid parameter as part of scan
command to driver. Since that support is added, use the bssid received
from scan command for active scan ie add the bssid as part of scan
offload command to firmware so as to send probe request with bssid
set with the one received as part of the scan command.

Git-commit:2b7b78afad5ee3b9881c5cb76c817b56c3d4f9c8
Change-Id: I97886b1dbd63fbca21fa410252df572f819df207
CRs-Fixed: 1032845
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 37d288c..569cdc8 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -12849,6 +12849,27 @@
     return VOS_FALSE;
 }
 
+/**
+ * csr_scan_request_assign_bssid() - Set the BSSID received from Supplicant
+ *                                   to the Scan request
+ * @scanRequest: Pointer to the csr scan request
+ * @request: Pointer to the scan request from supplicant
+ *
+ * Return: None
+ */
+#ifdef CFG80211_SCAN_BSSID
+static inline void csr_scan_request_assign_bssid(tCsrScanRequest *scanRequest,
+					struct cfg80211_scan_request *request)
+{
+	vos_mem_copy(scanRequest->bssid, request->bssid, VOS_MAC_ADDR_SIZE);
+}
+#else
+static inline void csr_scan_request_assign_bssid(tCsrScanRequest *scanRequest,
+					struct cfg80211_scan_request *request)
+{
+}
+#endif
+
 /*
  * FUNCTION: __wlan_hdd_cfg80211_scan
  * this scan respond to scan trigger and update cfg80211 scan database
@@ -13046,6 +13067,8 @@
     scanRequest.minChnTime = cfg_param->nActiveMinChnTime;
     scanRequest.maxChnTime = cfg_param->nActiveMaxChnTime;
 
+    csr_scan_request_assign_bssid(&scanRequest, request);
+
     /* set BSSType to default type */
     scanRequest.BSSType = eCSR_BSS_TYPE_ANY;