ソースを参照

qcacld-3.0: Move wmm dscp init to hdd_wmm_adapter_init

Currently wmm dscp will be called when open adapter,
as wmm dscp will send wmi cmd to fw, it is not right
place as adapter not yet started.

Move wmm dscp init to hdd_wmm_adapter_init, which
adapter vdev has been created.

Change-Id: I41b5e79d0b28ead9c449612ca2d2ed7529b3495f
CRs-Fixed: 2725883
Jingxiang Ge 4 年 前
コミット
da272dd932

+ 2 - 2
core/hdd/inc/wlan_hdd_wmm.h

@@ -217,7 +217,7 @@ int hdd_wmmps_helper(struct hdd_adapter *adapter, uint8_t *ptr);
 QDF_STATUS hdd_send_dscp_up_map_to_fw(struct hdd_adapter *adapter);
 
 /**
- * hdd_wmm_init() - initialize the WMM DSCP configuation
+ * hdd_wmm_dscp_initial_state() - initialize the WMM DSCP configuration
  * @adapter : [in]  pointer to Adapter context
  *
  * This function will initialize the WMM DSCP configuation of an
@@ -226,7 +226,7 @@ QDF_STATUS hdd_send_dscp_up_map_to_fw(struct hdd_adapter *adapter);
  *
  * Return: QDF_STATUS enumeration
  */
-QDF_STATUS hdd_wmm_init(struct hdd_adapter *adapter);
+QDF_STATUS hdd_wmm_dscp_initial_state(struct hdd_adapter *adapter);
 
 /**
  * hdd_wmm_adapter_init() - initialize the WMM configuration of an adapter

+ 2 - 2
core/hdd/src/wlan_hdd_assoc.c

@@ -1861,7 +1861,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
 	}
 
 	hdd_clear_roam_profile_ie(adapter);
-	hdd_wmm_init(adapter);
+	hdd_wmm_dscp_initial_state(adapter);
 	wlan_deregister_txrx_packetdump(OL_TXRX_PDEV_ID);
 
 	/* indicate 'disconnect' status to wpa_supplicant... */
@@ -3513,7 +3513,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 			hdd_conn_set_connection_state(adapter,
 					eConnectionState_NotConnected);
 		}
-		hdd_wmm_init(adapter);
+		hdd_wmm_dscp_initial_state(adapter);
 
 		hdd_debug("Disabling queues");
 		wlan_hdd_netif_queue_control(adapter,

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

@@ -5731,7 +5731,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	mutex_unlock(&hdd_ctx->sap_lock);
 
 	/* Initialize WMM configuation */
-	hdd_wmm_init(adapter);
+	hdd_wmm_dscp_initial_state(adapter);
 	if (hostapd_state->bss_state == BSS_START) {
 		policy_mgr_incr_active_session(hdd_ctx->psoc,
 					adapter->device_mode,

+ 1 - 2
core/hdd/src/wlan_hdd_main.c

@@ -4880,7 +4880,6 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
 
 	/* set dev's parent to underlying device */
 	SET_NETDEV_DEV(dev, hdd_ctx->parent_dev);
-	hdd_wmm_init(adapter);
 	spin_lock_init(&adapter->pause_map_lock);
 	adapter->start_time = qdf_system_ticks();
 	adapter->last_time = adapter->start_time;
@@ -7816,7 +7815,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
 			  qdf_opmode_str(adapter->device_mode),
 			  adapter->device_mode);
 
-		hdd_wmm_init(adapter);
+		hdd_wmm_dscp_initial_state(adapter);
 
 		switch (adapter->device_mode) {
 		case QDF_STA_MODE:

+ 5 - 3
core/hdd/src/wlan_hdd_wmm.c

@@ -1611,7 +1611,7 @@ static inline QDF_STATUS hdd_custom_dscp_up_map(
 #endif /* WLAN_CUSTOM_DSCP_UP_MAP */
 
 /**
- * hdd_wmm_init() - initialize the WMM DSCP configuation
+ * hdd_wmm_dscp_initial_state() - initialize the WMM DSCP configuration
  * @adapter : [in]  pointer to Adapter context
  *
  * This function will initialize the WMM DSCP configuation of an
@@ -1620,7 +1620,7 @@ static inline QDF_STATUS hdd_custom_dscp_up_map(
  *
  * Return: QDF_STATUS enumeration
  */
-QDF_STATUS hdd_wmm_init(struct hdd_adapter *adapter)
+QDF_STATUS hdd_wmm_dscp_initial_state(struct hdd_adapter *adapter)
 {
 	enum sme_qos_wmmuptype *dscp_to_up_map = adapter->dscp_to_up_map;
 	struct wlan_objmgr_psoc *psoc = adapter->hdd_ctx->psoc;
@@ -1658,6 +1658,8 @@ QDF_STATUS hdd_wmm_adapter_init(struct hdd_adapter *adapter)
 
 	hdd_enter();
 
+	hdd_wmm_dscp_initial_state(adapter);
+
 	adapter->hdd_wmm_status.qap = false;
 	INIT_LIST_HEAD(&adapter->hdd_wmm_status.context_list);
 	mutex_init(&adapter->hdd_wmm_status.mutex);
@@ -2311,7 +2313,7 @@ QDF_STATUS hdd_wmm_assoc(struct hdd_adapter *adapter,
 					       adapter->vdev_id);
 
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		hdd_wmm_init(adapter);
+		hdd_wmm_dscp_initial_state(adapter);
 
 	hdd_exit();