qcacld-3.0: Move the channel width enum to cds

Currently channel width has different enum values in
different modules. Move the channel width enum definition
to CDS to maintain single channel width enum value in
the driver

Change-Id: I6a46d0c02546263080a15a3ec7c52486fc51e98e
CRs-Fixed: 983914
diff --git a/core/cds/inc/cds_reg_service.h b/core/cds/inc/cds_reg_service.h
index 5eef8b3..8e85886 100644
--- a/core/cds/inc/cds_reg_service.h
+++ b/core/cds/inc/cds_reg_service.h
@@ -248,24 +248,25 @@
 };
 
 /**
- * enum chan_width: channel width
- *
- * @CHAN_WIDTH_0MHZ: channel disabled or invalid
- * @CHAN_WIDTH_5MHZ: channel width 5 MHZ
- * @CHAN_WIDTH_10MHZ: channel width 10 MHZ
- * @CHAN_WIDTH_20MHZ: channel width 20 MHZ
- * @CHAN_WIDTH_40MHZ: channel width 40 MHZ
- * @CHAN_WIDTH_80MHZ: channel width 80MHZ
- * @CHAN_WIDTH_160MHZ: channel width 160 MHZ
+ * phy_ch_width - channel width
+ * @CH_WIDTH_20MHZ: channel width 20 MHz
+ * @CH_WIDTH_40MHZ: channel width 40 MHz
+ * @CH_WIDTH_80MHZ: channel width 80MHz
+ * @CH_WIDTH_160MHZ: channel width 160 MHz
+ * @CH_WIDTH_80P80MHZ: channel width 160MHz(80+80)
+ * @CH_WIDTH_5MHZ: channel width 5MHz
+ * @CH_WIDTH_10MHZ: channel width 10MHz
  */
-enum channel_width {
-	CHAN_WIDTH_0MHZ,
-	CHAN_WIDTH_5MHZ,
-	CHAN_WIDTH_10MHZ,
-	CHAN_WIDTH_20MHZ,
-	CHAN_WIDTH_40MHZ,
-	CHAN_WIDTH_80MHZ,
-	CHAN_WIDTH_160MHZ
+enum phy_ch_width {
+	CH_WIDTH_20MHZ = 0,
+	CH_WIDTH_40MHZ = 1,
+	CH_WIDTH_80MHZ = 2,
+	CH_WIDTH_160MHZ = 3,
+	CH_WIDTH_80P80MHZ = 4,
+	CH_WIDTH_5MHZ = 5,
+	CH_WIDTH_10MHZ = 6,
+	CH_WIDTH_INVALID = 7,
+	CH_WIDTH_MAX
 };
 
 extern const struct chan_map chan_mapping[NUM_CHANNELS];
@@ -287,8 +288,9 @@
 
 bool cds_is_dsrc_channel(uint16_t);
 enum channel_state cds_get_bonded_channel_state(uint32_t chan_num,
-						enum channel_width chan_width);
-enum channel_width cds_get_max_channel_bw(uint32_t chan_num);
+					   enum phy_ch_width chan_width);
+
+enum phy_ch_width cds_get_max_channel_bw(uint32_t chan_num);
 
 QDF_STATUS cds_set_reg_domain(void *client_ctxt, v_REGDOMAIN_t reg_domain);
 QDF_STATUS cds_put_default_country(uint8_t *def_country);
diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h
index 68a0bb1..594eea8 100644
--- a/core/cds/inc/cds_regdomain.h
+++ b/core/cds/inc/cds_regdomain.h
@@ -481,23 +481,6 @@
 };
 
 /**
- * enum ch_width - channel width
- * @CH_WIDTH_20MHZ: channel width 20 MHz
- * @CH_WIDTH_40MHZ: channel width 40 MHz
- * @CH_WIDTH_80MHZ: channel width 80MHz
- * @CH_WIDTH_160MHZ: channel width 160 MHz
- * @CH_WIDTH_80P80MHZ: channel width 160MHz(80+80)
- */
-enum ch_width {
-	CH_WIDTH_20MHZ = 0,
-	CH_WIDTH_40MHZ = 1,
-	CH_WIDTH_80MHZ = 2,
-	CH_WIDTH_160MHZ = 3,
-	CH_WIDTH_80P80MHZ = 4,
-	CH_WIDTH_MAX
-};
-
-/**
  * enum offset_t: channel offset
  * @BW20: 20 mhz channel
  * @BW40_LOW_PRIMARY: lower channel in 40 mhz
@@ -549,7 +532,7 @@
  * @center_freq_seg1: center freq for segment 1
  */
 struct ch_params_s {
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t sec_ch_offset;
 	uint8_t center_freq_seg0;
 	uint8_t center_freq_seg1;
diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c
index 5f77ce5..d43acc0 100644
--- a/core/cds/src/cds_reg_service.c
+++ b/core/cds/src/cds_reg_service.c
@@ -209,7 +209,7 @@
  * Return: channel state
  */
 enum channel_state cds_get_bonded_channel_state(uint32_t chan_num,
-					   enum channel_width ch_width)
+					   enum phy_ch_width ch_width)
 {
 	enum channel_enum chan_enum;
 	bool bw_enabled = false;
@@ -219,21 +219,21 @@
 		return CHANNEL_STATE_INVALID;
 
 	if (reg_channels[chan_enum].state) {
-		if (CHAN_WIDTH_5MHZ == ch_width)
+		if (CH_WIDTH_5MHZ == ch_width)
 			bw_enabled = 1;
-		else if (CHAN_WIDTH_10MHZ == ch_width)
+		else if (CH_WIDTH_10MHZ == ch_width)
 			bw_enabled = !(reg_channels[chan_enum].flags &
 				       IEEE80211_CHAN_NO_10MHZ);
-		else if (CHAN_WIDTH_20MHZ == ch_width)
+		else if (CH_WIDTH_20MHZ == ch_width)
 			bw_enabled = !(reg_channels[chan_enum].flags &
 				       IEEE80211_CHAN_NO_20MHZ);
-		else if (CHAN_WIDTH_40MHZ == ch_width)
+		else if (CH_WIDTH_40MHZ == ch_width)
 			bw_enabled = !(reg_channels[chan_enum].flags &
 				       IEEE80211_CHAN_NO_HT40);
-		else if (CHAN_WIDTH_80MHZ == ch_width)
+		else if (CH_WIDTH_80MHZ == ch_width)
 			bw_enabled = !(reg_channels[chan_enum].flags &
 				       IEEE80211_CHAN_NO_80MHZ);
-		else if (CHAN_WIDTH_160MHZ == ch_width)
+		else if (CH_WIDTH_160MHZ == ch_width)
 			bw_enabled = !(reg_channels[chan_enum].flags &
 				       IEEE80211_CHAN_NO_160MHZ);
 	}
@@ -250,10 +250,10 @@
  *
  * Return: channel_width
  */
-enum channel_width cds_get_max_channel_bw(uint32_t chan_num)
+enum phy_ch_width cds_get_max_channel_bw(uint32_t chan_num)
 {
 	enum channel_enum chan_enum;
-	enum channel_width chan_bw = CHAN_WIDTH_0MHZ;
+	enum phy_ch_width chan_bw = CH_WIDTH_INVALID;
 
 	chan_enum = cds_get_channel_enum(chan_num);
 
@@ -262,25 +262,23 @@
 
 		if (!(reg_channels[chan_enum].flags &
 		      IEEE80211_CHAN_NO_160MHZ))
-			chan_bw = CHAN_WIDTH_160MHZ;
+			chan_bw = CH_WIDTH_160MHZ;
 		else if (!(reg_channels[chan_enum].flags &
 			   IEEE80211_CHAN_NO_80MHZ))
-			chan_bw = CHAN_WIDTH_80MHZ;
+			chan_bw = CH_WIDTH_80MHZ;
 		else if (!(reg_channels[chan_enum].flags &
 			   IEEE80211_CHAN_NO_HT40))
-			chan_bw = CHAN_WIDTH_40MHZ;
+			chan_bw = CH_WIDTH_40MHZ;
 		else if (!(reg_channels[chan_enum].flags &
 			   IEEE80211_CHAN_NO_20MHZ))
-			chan_bw = CHAN_WIDTH_20MHZ;
+			chan_bw = CH_WIDTH_20MHZ;
 		else if (!(reg_channels[chan_enum].flags &
 			   IEEE80211_CHAN_NO_10MHZ))
-			chan_bw = CHAN_WIDTH_10MHZ;
+			chan_bw = CH_WIDTH_10MHZ;
 		else
-			chan_bw = CHAN_WIDTH_5MHZ;
+			chan_bw = CH_WIDTH_5MHZ;
 	}
-
 	return chan_bw;
-
 }
 
 /**
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 1568654..6c847f3 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1394,7 +1394,7 @@
    -------------------------------------------------------------------------*/
 int hdd_validate_channel_and_bandwidth(hdd_adapter_t *adapter,
 				uint32_t chan_number,
-				enum ch_width chan_bw);
+				enum phy_ch_width chan_bw);
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *sta_pAdapter);
 #endif
@@ -1606,7 +1606,7 @@
 void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind);
 hdd_adapter_t *hdd_get_adapter_by_sme_session_id(hdd_context_t *hdd_ctx,
 						uint32_t sme_session_id);
-enum ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width);
+enum phy_ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width);
 uint8_t wlan_hdd_find_opclass(tHalHandle hal, uint8_t channel,
 			uint8_t bw_offset);
 void hdd_update_config(hdd_context_t *hdd_ctx);
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index d6002c5..1ce82c2 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -11274,7 +11274,7 @@
 	uint8_t channel;
 	uint16_t freq;
 	int ret;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 
 	hddLog(LOG1, FL("Set Freq %d"),
 		  csa_params->chandef.chan->center_freq);
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 17ce14e..3e5e640 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -2005,7 +2005,7 @@
  * Return: 0 for success, non zero for failure
  */
 int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
-				 enum ch_width target_bw)
+				 enum phy_ch_width target_bw)
 {
 	QDF_STATUS status;
 	int ret = 0;
diff --git a/core/hdd/src/wlan_hdd_hostapd.h b/core/hdd/src/wlan_hdd_hostapd.h
index 795a9d7..223b1c1 100644
--- a/core/hdd/src/wlan_hdd_hostapd.h
+++ b/core/hdd/src/wlan_hdd_hostapd.h
@@ -60,8 +60,8 @@
 hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4]);
 
 int hdd_softap_set_channel_change(struct net_device *dev,
-				  int target_channel,
-				  enum ch_width target_bw);
+					int target_channel,
+					enum phy_ch_width target_bw);
 
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 void hdd_sap_restart_with_channel_switch(hdd_adapter_t *adapter,
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 9010481..d031427 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -7432,7 +7432,7 @@
 	int status;
 	uint32_t chan_number = 0, chan_bw = 0;
 	uint8_t *value = command;
-	enum ch_width width;
+	enum phy_ch_width width;
 
 	if ((adapter->device_mode != QDF_P2P_GO_MODE) &&
 		(adapter->device_mode != QDF_SAP_MODE)) {
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 243a6fc..ae1e9d0 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -246,7 +246,7 @@
  */
 int hdd_validate_channel_and_bandwidth(hdd_adapter_t *adapter,
 		uint32_t chan_number,
-		enum ch_width chan_bw)
+		enum phy_ch_width chan_bw)
 {
 	uint8_t chan[WNI_CFG_VALID_CHANNEL_LIST_LEN];
 	uint32_t len = WNI_CFG_VALID_CHANNEL_LIST_LEN, i;
@@ -433,7 +433,7 @@
  * Return: Converted channel width. In case of non matching NL channel width,
  * CH_WIDTH_MAX will be returned.
  */
-enum ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width)
+enum phy_ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width)
 {
 	switch (ch_width) {
 	case NL80211_CHAN_WIDTH_20_NOHT:
@@ -449,11 +449,13 @@
 	case NL80211_CHAN_WIDTH_160:
 		return CH_WIDTH_160MHZ;
 	case NL80211_CHAN_WIDTH_5:
+		return CH_WIDTH_5MHZ;
 	case NL80211_CHAN_WIDTH_10:
+		return CH_WIDTH_10MHZ;
 	default:
 		hdd_err("Invalid channel width %d, setting to default",
 				ch_width);
-		return CH_WIDTH_MAX;
+		return CH_WIDTH_INVALID;
 	}
 }
 
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 2737f9e..2bae37a 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -3866,7 +3866,7 @@
 	uint16_t messageLen;
 	uint8_t targetChannel;
 	uint8_t sec_ch_offset;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t center_freq_seg_0;
 	uint8_t center_freq_seg_1;
 	uint8_t bssid[QDF_MAC_ADDR_SIZE];
diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h
index 16e5051..e1efe10 100644
--- a/core/mac/src/pe/include/lim_global.h
+++ b/core/mac/src/pe/include/lim_global.h
@@ -502,7 +502,7 @@
 	uint8_t ch_center_freq_seg0;
 	uint8_t ch_center_freq_seg1;
 	uint8_t sec_ch_offset;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	int8_t switchCount;
 	uint32_t switchTimeoutValue;
 	uint8_t switchMode;
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 6371849..8ff3010 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -313,7 +313,7 @@
 	tLimOperatingModeInfo gLimOperatingMode;
 	uint8_t vhtCapabilityPresentInBeacon;
 	uint8_t ch_center_freq_seg0;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t ch_center_freq_seg1;
 	uint8_t txBFIniFeatureEnabled;
 	uint8_t txbf_csn_value;
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 6d5b78a..e1d3899 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -2978,7 +2978,7 @@
  */
 void lim_set_channel(tpAniSirGlobal mac_ctx, uint8_t channel,
 		     uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1,
-		     enum ch_width ch_width, int8_t max_tx_power,
+		     enum phy_ch_width ch_width, int8_t max_tx_power,
 		     uint8_t pe_session_id)
 {
 	tpPESession pe_session;
diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c
index c990d54..02088d3 100644
--- a/core/mac/src/pe/lim/lim_send_messages.c
+++ b/core/mac/src/pe/lim/lim_send_messages.c
@@ -206,7 +206,7 @@
 					  uint8_t chnlNumber,
 					  uint8_t ch_center_freq_seg0,
 					  uint8_t ch_center_freq_seg1,
-					  enum ch_width ch_width,
+					  enum phy_ch_width ch_width,
 					  int8_t maxTxPower,
 					  uint8_t peSessionId,
 					  uint8_t is_restart)
diff --git a/core/mac/src/pe/lim/lim_send_messages.h b/core/mac/src/pe/lim/lim_send_messages.h
index 9ac8fad..187c1ae 100644
--- a/core/mac/src/pe/lim/lim_send_messages.h
+++ b/core/mac/src/pe/lim/lim_send_messages.h
@@ -67,7 +67,7 @@
 					  uint8_t chnlNumber,
 					  uint8_t ch_center_freq_seg0,
 					  uint8_t ch_center_freq_seg1,
-					  enum ch_width ch_width,
+					  enum phy_ch_width ch_width,
 					  int8_t maxTxPower,
 					  uint8_t peSessionId,
 					  uint8_t is_restart);
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 590d8eb..c6565a5 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -2398,7 +2398,7 @@
 	tpSwitchChannelParams pSmeSwithChnlParams;
 	uint8_t channelId;
 	bool is_ch_dfs = false;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t ch_center_freq_seg1;
 
 	pSmeSwithChnlParams = (tSwitchChannelParams *)
diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h
index 616147c..2bbb79d 100644
--- a/core/mac/src/pe/lim/lim_types.h
+++ b/core/mac/src/pe/lim/lim_types.h
@@ -552,7 +552,7 @@
 /* / Function that Switches the Channel and sets the CB Mode */
 void lim_set_channel(tpAniSirGlobal pMac, uint8_t channel,
 		uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1,
-		enum ch_width ch_width, int8_t maxTxPower,
+		enum phy_ch_width ch_width, int8_t maxTxPower,
 		uint8_t peSessionId);
 
 
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 23af25a..1f34968 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -2725,7 +2725,7 @@
 					uint8_t newChannel,
 					uint8_t ch_center_freq_seg0,
 					uint8_t ch_center_freq_seg1,
-					enum ch_width ch_width)
+					enum phy_ch_width ch_width)
 {
 	uint8_t subband = 0;
 
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index b7b8715..fb39f47 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -219,7 +219,7 @@
 					uint8_t newChannel,
 					uint8_t ch_center_freq_seg0,
 					uint8_t ch_center_freq_seg1,
-					enum ch_width ch_width);
+					enum phy_ch_width ch_width);
 void limUpdateStaRunTimeHTSwtichChnlParams(tpAniSirGlobal pMac,
 		tDot11fIEHTInfo *pRcvdHTInfo,
 		uint8_t bssIdx);
diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h
index 3a390fa..51751d6 100644
--- a/core/sap/inc/sap_api.h
+++ b/core/sap/inc/sap_api.h
@@ -621,8 +621,8 @@
 	 * New channel width and new channel bonding mode
 	 * will only be updated via channel fallback mechanism
 	 */
-	enum ch_width orig_chanWidth;
-	enum ch_width new_chanWidth;
+	enum phy_ch_width orig_chanWidth;
+	enum phy_ch_width new_chanWidth;
 	struct ch_params_s new_ch_params;
 
 	/*
@@ -828,8 +828,9 @@
 QDF_STATUS wlansap_deauth_sta(void *p_cds_gctx,
 			struct tagCsrDelStaParams *pDelStaParams);
 QDF_STATUS wlansap_set_channel_change_with_csa(void *p_cds_gctx,
-			uint32_t targetChannel, enum ch_width target_bw);
-QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx, tCsrRoamSetKey *pSetKeyInfo);
+			uint32_t targetChannel, enum phy_ch_width target_bw);
+QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx,
+	tCsrRoamSetKey *pSetKeyInfo);
 QDF_STATUS wlansap_get_assoc_stations(void *p_cds_gctx,
 	 QDF_MODULE_ID module, tpSap_AssocMacAddr pAssocStas);
 QDF_STATUS wlansap_remove_wps_session_overlap(void *p_cds_gctx,
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 8d4e690..77428fc 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -890,7 +890,7 @@
  */
 bool
 sap_find_target_channel_in_channel_matrix(ptSapContext sapContext,
-					  enum ch_width ch_width,
+					  enum phy_ch_width ch_width,
 					  uint8_t NOL_channel,
 					  tSapTxLeakInfo **pTarget_chnl_mtrx)
 {
@@ -955,7 +955,7 @@
 
 QDF_STATUS
 sap_mark_channels_leaking_into_nol(ptSapContext sap_ctx,
-		enum ch_width ch_width,
+		enum phy_ch_width ch_width,
 		tSapDfsNolInfo *nol,
 		uint8_t temp_ch_lst_sz,
 		uint8_t *temp_ch_lst)
@@ -1069,7 +1069,7 @@
  * Return: number of channels found
  */
 static uint8_t sap_populate_available_channels(chan_bonding_bitmap *bitmap,
-		enum ch_width ch_width,
+		enum phy_ch_width ch_width,
 		uint8_t *avail_chnl)
 {
 	uint8_t i = 0;
@@ -1248,7 +1248,7 @@
 	uint8_t channelID;
 	tHalHandle hHal = CDS_GET_HAL_CB(sapContext->p_cds_gctx);
 	tpAniSirGlobal pMac;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t   *tmp_ch_lst = NULL;
 	uint8_t   dfs_region;
 
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index 983ce42..a08c12c 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -1470,7 +1470,7 @@
  */
 QDF_STATUS
 wlansap_set_channel_change_with_csa(void *p_cds_gctx, uint32_t targetChannel,
-				    enum ch_width target_bw)
+					enum phy_ch_width target_bw)
 {
 
 	ptSapContext sapContext = NULL;
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index 8dc2d48..137d719 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -1483,7 +1483,7 @@
 	uint32_t beacon_intval;
 	uint32_t dtim_period;
 	int32_t max_txpow;
-	enum ch_width chan_width;
+	enum phy_ch_width chan_width;
 	bool is_dfs;
 	uint8_t vdev_id;
 	uint8_t chan;
diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h
index a380eec..831a905 100644
--- a/core/wma/inc/wma_if.h
+++ b/core/wma/inc/wma_if.h
@@ -499,7 +499,7 @@
 	uint8_t halPersona;
 	uint8_t bSpectrumMgtEnabled;
 	uint8_t vhtCapable;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t ch_center_freq_seg0;
 	uint8_t ch_center_freq_seg1;
 	uint8_t reassocReq;     /* Set only during roaming reassociation */
@@ -910,7 +910,7 @@
 	uint16_t smpsMode;
 	uint8_t isDfsChannel;
 	uint8_t vhtCapable;
-	enum ch_width ch_width;
+	enum phy_ch_width ch_width;
 	uint8_t ch_center_freq_seg0;
 	uint8_t ch_center_freq_seg1;
 	uint8_t dot11_mode;
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 4893b0d..b033c82 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -899,7 +899,7 @@
 QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
 				tAniDHCPInd *ta_dhcp_ind);
 
-WLAN_PHY_MODE wma_chan_to_mode(u8 chan, enum ch_width chan_width,
+WLAN_PHY_MODE wma_chan_to_mode(u8 chan, enum phy_ch_width chan_width,
 				      u8 vht_capable, u8 dot11_mode);
 
 QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index a50cf7e..1bc6879 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -677,7 +677,7 @@
  *
  * Return: return phy mode
  */
-WLAN_PHY_MODE wma_chan_to_mode(u8 chan, enum ch_width chan_width,
+WLAN_PHY_MODE wma_chan_to_mode(u8 chan, enum phy_ch_width chan_width,
 				      u8 vht_capable, u8 dot11_mode)
 {
 	WLAN_PHY_MODE phymode = MODE_UNKNOWN;
diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h
index 765dbcd..6092d35 100644
--- a/target/inc/wmi_unified.h
+++ b/target/inc/wmi_unified.h
@@ -4235,17 +4235,6 @@
 	WMI_MESH_STATS = 6,
 } wmi_link_iface_type;
 
-/* channel operating width */
-typedef enum {
-	WMI_CHAN_WIDTH_20 = 0,
-	WMI_CHAN_WIDTH_40 = 1,
-	WMI_CHAN_WIDTH_80 = 2,
-	WMI_CHAN_WIDTH_160 = 3,
-	WMI_CHAN_WIDTH_80P80 = 4,
-	WMI_CHAN_WIDTH_5 = 5,
-	WMI_CHAN_WIDTH_10 = 6,
-} wmi_channel_width;
-
 /*Clear stats*/
 typedef struct {
 	A_UINT32 tlv_header;