Browse Source

qcacld-3.0: Remove hdd_device_mode_to_string()

qdf_opmode_str() has recently been added for converting a vdev operating
mode into a human readable string. Historically, HDD has used
hdd_device_mode_to_string() for this purpose. Replace
hdd_device_mode_to_string() with qdf_opmode_str() such that there is one
function for mapping vdev operating mode to human readable string.

Change-Id: I38880f915b617b5c02b2029762eacdf6ef8bac15
CRs-Fixed: 2336065
Dustin Brown 6 years ago
parent
commit
458027cef4

+ 0 - 2
core/hdd/inc/wlan_hdd_main.h

@@ -2084,8 +2084,6 @@ int hdd_validate_channel_and_bandwidth(struct hdd_adapter *adapter,
 				uint32_t chan_number,
 				enum phy_ch_width chan_bw);
 
-const char *hdd_device_mode_to_string(uint8_t device_mode);
-
 QDF_STATUS hdd_get_front_adapter(struct hdd_context *hdd_ctx,
 				 struct hdd_adapter **out_adapter);
 

+ 16 - 22
core/hdd/src/wlan_hdd_cfg80211.c

@@ -12774,8 +12774,7 @@ static void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter,
 	mac_handle_t mac_handle;
 
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 	setKey.keyId = key_index;       /* Store Key ID */
@@ -12962,8 +12961,8 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
 			 TRACE_CODE_HDD_CFG80211_CHANGE_BSS,
 			 adapter->session_id, params->ap_isolate));
 	hdd_debug("Device_mode %s(%d), ap_isolate = %d",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode, params->ap_isolate);
+		  qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode, params->ap_isolate);
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -13476,8 +13475,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 		return status;
 
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	if (CSR_MAX_NUM_KEY <= key_index) {
 		hdd_err("Invalid key index %d", key_index);
@@ -13799,8 +13797,7 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy,
 		return -EINVAL;
 
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	memset(&params, 0, sizeof(params));
 
@@ -13992,8 +13989,8 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
 			 adapter->session_id, key_index));
 
 	hdd_debug("Device_mode %s(%d) key_index = %d",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode, key_index);
+		  qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode, key_index);
 
 	if (CSR_MAX_NUM_KEY <= key_index) {
 		hdd_err("Invalid key index: %d", key_index);
@@ -16714,13 +16711,12 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
 			 TRACE_CODE_HDD_CFG80211_CONNECT,
 			 adapter->session_id, adapter->device_mode));
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	if (adapter->device_mode != QDF_STA_MODE &&
-		adapter->device_mode != QDF_P2P_CLIENT_MODE) {
+	    adapter->device_mode != QDF_P2P_CLIENT_MODE) {
 		hdd_err("Device_mode %s(%d) is not supported",
-			hdd_device_mode_to_string(adapter->device_mode),
+			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);
 		return -EINVAL;
 	}
@@ -17099,8 +17095,8 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
 			 adapter->session_id, reason));
 	hdd_print_netdev_txq_status(dev);
 	hdd_debug("Device_mode %s(%d) reason code(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode, reason);
+		  qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode, reason);
 
 	status = wlan_hdd_validate_context(hdd_ctx);
 
@@ -17345,8 +17341,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
 			 TRACE_CODE_HDD_CFG80211_JOIN_IBSS,
 			 adapter->session_id, adapter->device_mode));
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	status = wlan_hdd_validate_context(hdd_ctx);
 
@@ -17552,8 +17547,7 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
 		return status;
 
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	roam_profile = hdd_roam_profile(adapter);
 
@@ -18829,8 +18823,8 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
 		}
 	} else {
 		hdd_debug("Invalid device_mode %s(%d)",
-			hdd_device_mode_to_string(adapter->device_mode),
-			adapter->device_mode);
+			  qdf_opmode_str(adapter->device_mode),
+			  adapter->device_mode);
 		return -EINVAL;
 	}
 	hdd_exit();

+ 9 - 12
core/hdd/src/wlan_hdd_hostapd.c

@@ -3336,8 +3336,8 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
 			 adapter->session_id, channel_type));
 
 	hdd_debug("Device_mode %s(%d)  freq = %d",
-	       hdd_device_mode_to_string(adapter->device_mode),
-	       adapter->device_mode, chandef->chan->center_freq);
+		  qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode, chandef->chan->center_freq);
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	status = wlan_hdd_validate_context(hdd_ctx);
@@ -3390,10 +3390,9 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
 			hdd_err("Invalid Channel: %d", channel);
 			return -EINVAL;
 		}
-		hdd_debug("set channel to [%d] for device mode %s(%d)",
-		       channel,
-		       hdd_device_mode_to_string(adapter->device_mode),
-		       adapter->device_mode);
+		hdd_debug("set channel to [%d] for device mode %s(%d)", channel,
+			  qdf_opmode_str(adapter->device_mode),
+			  adapter->device_mode);
 	}
 
 	if ((adapter->device_mode == QDF_STA_MODE) ||
@@ -5341,8 +5340,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
 	 */
 	clear_bit(SOFTAP_INIT_DONE, &adapter->event_flags);
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
 	if (0 != ret)
@@ -5639,8 +5637,8 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
 		return status;
 
 	hdd_debug("adapter = %pK, Device mode %s(%d) sub20 %d",
-		adapter, hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode, cds_is_sub_20_mhz_enabled());
+		  adapter, qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode, cds_is_sub_20_mhz_enabled());
 
 	if (policy_mgr_is_hw_mode_change_in_progress(hdd_ctx->psoc)) {
 		status = policy_mgr_wait_for_connection_update(
@@ -5955,8 +5953,7 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
 			 TRACE_CODE_HDD_CFG80211_CHANGE_BEACON,
 			 adapter->session_id, adapter->device_mode));
 	hdd_debug("Device_mode %s(%d)",
-	       hdd_device_mode_to_string(adapter->device_mode),
-	       adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	status = wlan_hdd_validate_context(hdd_ctx);

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

@@ -2402,8 +2402,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev,
 	/* Linkspeed is allowed only for P2P mode */
 	if (adapter->device_mode != QDF_P2P_GO_MODE) {
 		hdd_err("Link Speed is not allowed in Device mode %s(%d)",
-			hdd_device_mode_to_string(
-				adapter->device_mode),
+			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);
 		return -ENOTSUPP;
 	}

+ 17 - 18
core/hdd/src/wlan_hdd_ioctl.c

@@ -703,7 +703,7 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
 
 	if (QDF_STA_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -916,7 +916,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
 
 	if (QDF_STA_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -2408,7 +2408,7 @@ static int wlan_hdd_get_link_status(struct hdd_adapter *adapter)
 	if ((QDF_STA_MODE != adapter->device_mode) &&
 	    (QDF_P2P_CLIENT_MODE != adapter->device_mode)) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return 0;
 	}
@@ -2823,8 +2823,8 @@ int wlan_hdd_set_mc_rate(struct hdd_adapter *adapter, int targetRate)
 	    (QDF_SAP_MODE != adapter->device_mode) &&
 	    (QDF_STA_MODE != adapter->device_mode)) {
 		hdd_err("Received SETMCRATE cmd in invalid mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
-			 adapter->device_mode);
+			qdf_opmode_str(adapter->device_mode),
+			adapter->device_mode);
 		hdd_err("SETMCRATE cmd is allowed only in STA, IBSS or SOFTAP mode");
 		return -EINVAL;
 	}
@@ -2845,8 +2845,7 @@ int wlan_hdd_set_mc_rate(struct hdd_adapter *adapter, int targetRate)
 	qdf_copy_macaddr(&rateUpdate.bssid, &adapter->mac_addr);
 	hdd_debug("MC Target rate %d, mac = %pM, dev_mode %s(%d)",
 		  rateUpdate.mcastDataRate24GHz, rateUpdate.bssid.bytes,
-		  hdd_device_mode_to_string(adapter->device_mode),
-		  adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 	status = sme_send_rate_update_ind(hdd_ctx->mac_handle, &rateUpdate);
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("SETMCRATE failed");
@@ -4392,7 +4391,7 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
 
 	if (QDF_STA_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -4819,7 +4818,7 @@ static int drv_cmd_set_ibss_beacon_oui_data(struct hdd_adapter *adapter,
 
 	if (QDF_IBSS_MODE != adapter->device_mode) {
 		hdd_debug("Device_mode %s(%d) not IBSS",
-			  hdd_device_mode_to_string(adapter->device_mode),
+			  qdf_opmode_str(adapter->device_mode),
 			  adapter->device_mode);
 		return ret;
 	}
@@ -5065,8 +5064,8 @@ static int drv_cmd_set_rmc_enable(struct hdd_adapter *adapter,
 	if ((QDF_IBSS_MODE != adapter->device_mode) &&
 	    (QDF_SAP_MODE != adapter->device_mode)) {
 		hdd_err("Received SETRMCENABLE cmd in invalid mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
-			 adapter->device_mode);
+			qdf_opmode_str(adapter->device_mode),
+			adapter->device_mode);
 		hdd_err("SETRMCENABLE cmd is allowed only in IBSS/SOFTAP mode");
 		ret = -EINVAL;
 		goto exit;
@@ -5117,7 +5116,7 @@ static int drv_cmd_set_rmc_action_period(struct hdd_adapter *adapter,
 	if ((QDF_IBSS_MODE != adapter->device_mode) &&
 	    (QDF_SAP_MODE != adapter->device_mode)) {
 		hdd_err("Received SETRMC cmd in invalid mode %s(%d)",
-			hdd_device_mode_to_string(adapter->device_mode),
+			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);
 		hdd_err("SETRMC cmd is allowed only in IBSS/SOFTAP mode");
 		ret = -EINVAL;
@@ -5172,8 +5171,8 @@ static int drv_cmd_set_rmc_tx_rate(struct hdd_adapter *adapter,
 	if ((QDF_IBSS_MODE != adapter->device_mode) &&
 	    (QDF_SAP_MODE != adapter->device_mode)) {
 		hdd_err("Received SETRMCTXRATE cmd in invalid mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
-			 adapter->device_mode);
+			qdf_opmode_str(adapter->device_mode),
+			adapter->device_mode);
 		hdd_err("SETRMCTXRATE cmd is allowed only in IBSS/SOFTAP mode");
 		ret = -EINVAL;
 		goto exit;
@@ -5232,7 +5231,7 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter,
 
 	if (QDF_IBSS_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -5359,7 +5358,7 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter,
 
 	if (QDF_IBSS_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -5546,7 +5545,7 @@ static int drv_cmd_get_tsm_stats(struct hdd_adapter *adapter,
 	if ((QDF_STA_MODE != adapter->device_mode) &&
 	    (QDF_P2P_CLIENT_MODE != adapter->device_mode)) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}
@@ -5684,7 +5683,7 @@ static int drv_cmd_ccx_beacon_req(struct hdd_adapter *adapter,
 
 	if (QDF_STA_MODE != adapter->device_mode) {
 		hdd_warn("Unsupported in mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 		return -EINVAL;
 	}

+ 5 - 6
core/hdd/src/wlan_hdd_ipa.c

@@ -188,7 +188,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						hdd_ctx->config->
 						tx_hbw_flow_max_queue_depth);
 					hdd_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
-					       hdd_device_mode_to_string(
+					       qdf_opmode_str(
 							adapter->device_mode),
 					       adapter->device_mode,
 					       targetChannel,
@@ -214,9 +214,8 @@ void hdd_ipa_set_tx_flow_info(void)
 						hdd_ctx->config->
 						tx_hbw_flow_max_queue_depth);
 					hdd_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
-					       hdd_device_mode_to_string(
-						preAdapterContext->device_mode
-							  ),
+					       qdf_opmode_str(
+						preAdapterContext->device_mode),
 					       preAdapterContext->device_mode,
 					       targetChannel,
 					       preAdapterContext->
@@ -264,7 +263,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						hdd_ctx->config->
 						tx_hbw_flow_max_queue_depth);
 					hdd_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
-					    hdd_device_mode_to_string(
+					    qdf_opmode_str(
 						    adapter5->device_mode),
 					    adapter5->device_mode,
 					    channel5,
@@ -292,7 +291,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						hdd_ctx->config->
 						tx_lbw_flow_max_queue_depth);
 					hdd_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
-						hdd_device_mode_to_string(
+						qdf_opmode_str(
 						    adapter2_4->device_mode),
 						adapter2_4->device_mode,
 						channel24,

+ 5 - 32
core/hdd/src/wlan_hdd_main.c

@@ -410,32 +410,6 @@ uint8_t g_wlan_driver_version[] = QWLAN_VERSIONSTR TIMER_MANAGER_STR MEMORY_DEBU
 uint8_t g_wlan_driver_version[] = QWLAN_VERSIONSTR TIMER_MANAGER_STR MEMORY_DEBUG_STR PANIC_ON_BUG_STR;
 #endif
 
-/**
- * hdd_device_mode_to_string() - return string conversion of device mode
- * @device_mode: device mode
- *
- * This utility function helps log string conversion of device mode.
- *
- * Return: string conversion of device mode, if match found;
- *	   "Unknown" otherwise.
- */
-const char *hdd_device_mode_to_string(uint8_t device_mode)
-{
-	switch (device_mode) {
-	CASE_RETURN_STRING(QDF_STA_MODE);
-	CASE_RETURN_STRING(QDF_SAP_MODE);
-	CASE_RETURN_STRING(QDF_P2P_CLIENT_MODE);
-	CASE_RETURN_STRING(QDF_P2P_GO_MODE);
-	CASE_RETURN_STRING(QDF_FTM_MODE);
-	CASE_RETURN_STRING(QDF_IBSS_MODE);
-	CASE_RETURN_STRING(QDF_P2P_DEVICE_MODE);
-	CASE_RETURN_STRING(QDF_OCB_MODE);
-	CASE_RETURN_STRING(QDF_NDI_MODE);
-	default:
-		return "Unknown";
-	}
-}
-
 /**
  * hdd_get_valid_chan() - return current chan list from regulatory.
  * @hdd_ctx: HDD context
@@ -3101,8 +3075,7 @@ static int __hdd_stop(struct net_device *dev)
 	 * be called on that interface
 	 */
 	hdd_debug("Disabling queues, adapter device mode: %s(%d)",
-		  hdd_device_mode_to_string(adapter->device_mode),
-		  adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	wlan_hdd_netif_queue_control(adapter,
 				     WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER,
@@ -5360,7 +5333,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
 
 	hdd_for_each_adapter(hdd_ctx, adapter) {
 		hdd_info("[SSR] reset adapter with device mode %s(%d)",
-			 hdd_device_mode_to_string(adapter->device_mode),
+			 qdf_opmode_str(adapter->device_mode),
 			 adapter->device_mode);
 
 		if ((adapter->device_mode == QDF_STA_MODE) ||
@@ -6138,7 +6111,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
 			continue;
 
 		hdd_debug("[SSR] start adapter with device mode %s(%d)",
-			  hdd_device_mode_to_string(adapter->device_mode),
+			  qdf_opmode_str(adapter->device_mode),
 			  adapter->device_mode);
 
 		hdd_wmm_init(adapter);
@@ -14111,8 +14084,8 @@ bool hdd_is_connection_in_progress(uint8_t *session_id,
 
 	hdd_for_each_adapter(hdd_ctx, adapter) {
 		hdd_debug("Adapter with device mode %s(%d) exists",
-			hdd_device_mode_to_string(adapter->device_mode),
-			adapter->device_mode);
+			  qdf_opmode_str(adapter->device_mode),
+			  adapter->device_mode);
 		if (((QDF_STA_MODE == adapter->device_mode)
 			|| (QDF_P2P_CLIENT_MODE == adapter->device_mode)
 			|| (QDF_P2P_DEVICE_MODE == adapter->device_mode))

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

@@ -865,8 +865,7 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
 			 TRACE_CODE_HDD_DEL_VIRTUAL_INTF,
 			 adapter->session_id, adapter->device_mode));
 	hdd_debug("Device_mode %s(%d)",
-		   hdd_device_mode_to_string(adapter->device_mode),
-		   adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode), adapter->device_mode);
 
 	errno = wlan_hdd_validate_context(hdd_ctx);
 	if (errno)

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

@@ -1078,7 +1078,7 @@ hdd_suspend_wlan(void)
 
 		/* stop all TX queues before suspend */
 		hdd_debug("Disabling queues for dev mode %s",
-			  hdd_device_mode_to_string(adapter->device_mode));
+			  qdf_opmode_str(adapter->device_mode));
 		wlan_hdd_netif_queue_control(adapter,
 					     WLAN_STOP_ALL_NETIF_QUEUE,
 					     WLAN_CONTROL_PATH);
@@ -1140,7 +1140,7 @@ static int hdd_resume_wlan(void)
 
 		/* wake the tx queues */
 		hdd_debug("Enabling queues for dev mode %s",
-			  hdd_device_mode_to_string(adapter->device_mode));
+			  qdf_opmode_str(adapter->device_mode));
 		wlan_hdd_netif_queue_control(adapter,
 					WLAN_WAKE_ALL_NETIF_QUEUE,
 					WLAN_CONTROL_PATH);

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

@@ -795,8 +795,8 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band)
 			 */
 
 			hdd_debug("STA (Device mode %s(%d)) connected in band %u, Changing band to %u, Issuing Disconnect",
-					hdd_device_mode_to_string(adapter->device_mode),
-					adapter->device_mode, currBand, band);
+				  qdf_opmode_str(adapter->device_mode),
+				  adapter->device_mode, currBand, band);
 			INIT_COMPLETION(adapter->disconnect_comp_var);
 
 			status = sme_roam_disconnect(

+ 3 - 3
core/hdd/src/wlan_hdd_scan.c

@@ -502,8 +502,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	}
 
 	hdd_debug("Device_mode %s(%d)",
-		hdd_device_mode_to_string(adapter->device_mode),
-		adapter->device_mode);
+		  qdf_opmode_str(adapter->device_mode),
+		  adapter->device_mode);
 
 	/*
 	 * IBSS vdev does not need to scan to establish
@@ -516,7 +516,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	if (QDF_IBSS_MODE == adapter->device_mode ||
 	    QDF_NDI_MODE == adapter->device_mode) {
 		hdd_err("Scan not supported for %s",
-			hdd_device_mode_to_string(adapter->device_mode));
+			qdf_opmode_str(adapter->device_mode));
 		return -EINVAL;
 	}
 

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

@@ -5507,7 +5507,7 @@ int wlan_hdd_get_link_speed(struct hdd_adapter *adapter, uint32_t *link_speed)
 	/* Linkspeed is allowed only for P2P mode */
 	if (adapter->device_mode != QDF_P2P_CLIENT_MODE) {
 		hdd_err("Link Speed is not allowed in Device mode %s(%d)",
-			hdd_device_mode_to_string(adapter->device_mode),
+			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);
 		return -ENOTSUPP;
 	}

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

@@ -7203,8 +7203,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
 
 		if (adapter->device_mode != QDF_P2P_GO_MODE) {
 			hdd_err("Setting NoA is not allowed in Device mode %s(%d)",
-				hdd_device_mode_to_string(
-					adapter->device_mode),
+				qdf_opmode_str(adapter->device_mode),
 				adapter->device_mode);
 			return -EINVAL;
 		}