瀏覽代碼

qcacld-3.0: Hold mutex lock while registering wdev

From the kernel, it is expected to hold the mutex lock while registering
wdev. Currently it is not done hence kenel is asserting while
registering wdev.

To avoid kernel assert, register wdev after holding the mutex lock.

Change-Id: I497e428f6cea54a11b68ba68852fa1e98df475be
CRs-Fixed: 3103089
Bapiraju Alla 3 年之前
父節點
當前提交
9b19711595
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/hdd/src/wlan_hdd_mlo.c

+ 2 - 0
core/hdd/src/wlan_hdd_mlo.c

@@ -97,8 +97,10 @@ void hdd_register_wdev(struct hdd_adapter *sta_adapter,
 	/* Set the relation between adapters*/
 	link_adapter->wdev.iftype = NL80211_IFTYPE_MLO_LINK;
 
+	mutex_lock(&sta_adapter->wdev.mtx);
 	ret = cfg80211_register_mlo_link(&sta_adapter->wdev,
 					 &link_adapter->wdev);
+	mutex_unlock(&sta_adapter->wdev.mtx);
 	if (ret) {
 		hdd_err("Failed to register ml link wdev %d", ret);
 		return;