Преглед на файлове

qcacld-3.0: Add load/unload status check before wlan_hdd_mgmt_tx

If wlan_hdd_mgmt_tx is called while unload in progress, it is possible
ROC scan can't be canceled, cds_ssr_protect already prevent
wlan_hdd_mgmt_tx running before unloading, we must also prevent it
running after it.

Change-Id: Ic8d981c9be2a2b33079c4e3c9a18a4d8bce48956
CRs-Fixed: 2202026
Will Huang преди 7 години
родител
ревизия
5561cb3c00
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      core/hdd/src/wlan_hdd_p2p.c

+ 8 - 0
core/hdd/src/wlan_hdd_p2p.c

@@ -226,9 +226,11 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 	QDF_STATUS status;
 	struct net_device *dev = wdev->netdev;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	uint8_t type;
 	uint8_t sub_type;
 	QDF_STATUS qdf_status;
+	int ret;
 
 	ENTER();
 
@@ -242,6 +244,12 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 		return -EINVAL;
 	}
 
+	ret = wlan_hdd_validate_context(hdd_ctx);
+	if (ret) {
+		hdd_err("wlan_hdd_validate_context return:%d", ret);
+		return ret;
+	}
+
 	type = WLAN_HDD_GET_TYPE_FRM_FC(buf[0]);
 	sub_type = WLAN_HDD_GET_SUBTYPE_FRM_FC(buf[0]);