Browse Source

qcacld-3.0: Flush the BLM reject ap list on WIFI-OFF from UI

Flush the reject ap list from the BLM when the user does
a explicit wifi off from the UI to ensure the user is able
to connect next time the wifi is turned on.

Change-Id: Ia8cdd6aa7e3357fc0def100cb13c6e25c1e0a62e
CRs-Fixed: 2470087
gaurank kathpalia 6 years ago
parent
commit
8a0940b233

+ 5 - 5
blacklist_mgr/dispatcher/inc/wlan_blm_ucfg_api.h

@@ -117,16 +117,16 @@ ucfg_blm_add_bssid_to_reject_list(struct wlan_objmgr_pdev *pdev,
 				  struct reject_ap_info *ap_info);
 
 /**
- * ucfg_blm_flush_reject_ap_list() - Flush the reject ap entries stored in BLM.
+ * ucfg_blm_wifi_off() - Inform the blacklist manager about wifi off
  * @blm_ctx: blacklist manager pdev priv object
  *
- * This API will clear the BSSID info in the reject AP list maintained by the
- * blacklist manager, and will destroy the list as well.
+ * This API will inform the blacklist manager that the user has turned wifi off
+ * from the UI, and the blacklist manager can take action based upon this.
  *
  * Return: None
  */
 void
-ucfg_blm_flush_reject_ap_list(struct wlan_objmgr_pdev *pdev);
+ucfg_blm_wifi_off(struct wlan_objmgr_pdev *pdev);
 
 #else
 static inline
@@ -177,7 +177,7 @@ ucfg_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev,
 }
 
 static inline
-void ucfg_blm_flush_reject_ap_list(struct wlan_objmgr_pdev *pdev)
+void ucfg_blm_wifi_off(struct wlan_objmgr_pdev *pdev)
 {
 }
 

+ 6 - 1
blacklist_mgr/dispatcher/src/wlan_blm_ucfg_api.c

@@ -141,10 +141,15 @@ ucfg_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev,
 }
 
 void
-ucfg_blm_flush_reject_ap_list(struct wlan_objmgr_pdev *pdev)
+ucfg_blm_wifi_off(struct wlan_objmgr_pdev *pdev)
 {
 	struct blm_pdev_priv_obj *blm_ctx;
 
+	if (!pdev) {
+		blm_err("pdev is NULL");
+		return;
+	}
+
 	blm_ctx = blm_get_pdev_obj(pdev);
 	if (!blm_ctx) {
 		blm_err("blm_ctx is NULL");