Explorar el Código

qcacld-3.0: Fix cfg80211 change interface failure

In cfg80211_change_iface if we don't get previous mode vdev
references then error is returned. In a case where there is
no vdev existing before this will cause sap failure.

Fix is if previous vdev reference is not available skip vdev
access and continue further operations.

Change-Id: I3209f1e1a86050baf389f20029a97a5bdb50d71d
CRs-Fixed: 2352385
Karthik Kantamneni hace 6 años
padre
commit
309ed808f5
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      core/hdd/src/wlan_hdd_cfg80211.c

+ 5 - 5
core/hdd/src/wlan_hdd_cfg80211.c

@@ -13226,11 +13226,11 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
 		struct wlan_objmgr_vdev *vdev;
 
 		vdev = hdd_objmgr_get_vdev(adapter);
-		if (!vdev)
-			return -EINVAL;
-		hdd_debug("Disable tdls; new interface is coming up");
-		hdd_notify_teardown_tdls_links(vdev);
-		hdd_objmgr_put_vdev(adapter);
+		if (vdev) {
+			hdd_debug("Disable tdls; new interface is coming up");
+			hdd_notify_teardown_tdls_links(vdev);
+			hdd_objmgr_put_vdev(adapter);
+		}
 	}
 
 	if (hdd_is_client_mode(adapter->device_mode)) {