Sfoglia il codice sorgente

qcacld-3.0: Initialize all completion vars for SAP vdevs

Because a SAP vdev can be repurposed as a station adapter, there is a
case where a station vdev that was created as a SAP vdev will try to
access uninitialized completion variables. As these members are directly
attached to the adapter struct, always initialize them, regardless of
the vdev type at time of creation.

Change-Id: Ifc14ec677ffa76551e55fe982a58df21d430d6c6
CRs-Fixed: 2266419
Dustin Brown 6 anni fa
parent
commit
662f48b2a2
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      core/hdd/src/wlan_hdd_hostapd.c

+ 6 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -6264,11 +6264,16 @@ struct hdd_adapter *hdd_wlan_create_ap_dev(struct hdd_context *hdd_ctx,
 		return NULL;
 	}
 
-	init_completion(&adapter->tx_action_cnf_event);
+	init_completion(&adapter->disconnect_comp_var);
+	init_completion(&adapter->roaming_comp_var);
+	init_completion(&adapter->linkup_event_var);
 	init_completion(&adapter->cancel_rem_on_chan_var);
 	init_completion(&adapter->rem_on_chan_ready_event);
 	init_completion(&adapter->sta_authorized_event);
 	init_completion(&adapter->offchannel_tx_event);
+	init_completion(&adapter->tx_action_cnf_event);
+	init_completion(&adapter->ibss_peer_info_comp);
+	init_completion(&adapter->lfr_fw_status.disable_lfr_event);
 
 	SET_NETDEV_DEV(dev, hdd_ctx->parent_dev);
 	spin_lock_init(&adapter->pause_map_lock);