Forráskód Böngészése

qcacld-3.0: Clear the userspace blacklist info

Clear the userspace blacklist info when a new
command for set blacklist BSSID comes to the driver
even if the userspace sends zero BSSIDs.

Change-Id: Ic2e310359d8e83c0821a0c4c8fedd90e81998627
CRs-Fixed: 2464948
gaurank kathpalia 5 éve
szülő
commit
bf933ff252
1 módosított fájl, 24 hozzáadás és 3 törlés
  1. 24 3
      components/blacklist_mgr/core/src/wlan_blm_core.c

+ 24 - 3
components/blacklist_mgr/core/src/wlan_blm_core.c

@@ -823,14 +823,35 @@ blm_add_userspace_black_list(struct wlan_objmgr_pdev *pdev,
 	uint8_t i = 0;
 	struct reject_ap_info ap_info;
 	QDF_STATUS status;
+	struct blm_pdev_priv_obj *blm_ctx;
+	struct blm_psoc_priv_obj *blm_psoc_obj;
+	struct blm_config *cfg;
 
-	if (!bssid_black_list || !num_of_bssid) {
-		blm_debug("Userspace blacklist/num of blacklist NULL");
-		return QDF_STATUS_SUCCESS;
+	blm_ctx = blm_get_pdev_obj(pdev);
+	blm_psoc_obj = blm_get_psoc_obj(wlan_pdev_get_psoc(pdev));
+
+	if (!blm_ctx || !blm_psoc_obj) {
+		blm_err("blm_ctx or blm_psoc_obj is NULL");
+		return QDF_STATUS_E_INVAL;
 	}
 
 	/* Clear all the info of APs already existing in BLM first */
 	blm_clear_userspace_blacklist_info(pdev);
+	cfg = &blm_psoc_obj->blm_cfg;
+
+	status = qdf_mutex_acquire(&blm_ctx->reject_ap_list_lock);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		blm_err("failed to acquire reject_ap_list_lock");
+		return status;
+	}
+
+	blm_send_reject_ap_list_to_fw(pdev, &blm_ctx->reject_ap_list, cfg);
+	qdf_mutex_release(&blm_ctx->reject_ap_list_lock);
+
+	if (!bssid_black_list || !num_of_bssid) {
+		blm_debug("Userspace blacklist/num of blacklist NULL");
+		return QDF_STATUS_SUCCESS;
+	}
 
 	for (i = 0; i < num_of_bssid; i++) {
 		ap_info.bssid = bssid_black_list[i];