Jelajahi Sumber

qcacld-3.0: Add 320MHz support in policy_mgr

As part of 320MHz bandwidth support for 11BE, add 320MHz
bandwidth conversion used internally in policy manager.

Change-Id: I25cf3e171249ae6c45988d3d9cdd5225a2000178
CRs-Fixed: 2934783
Jia Ding 4 tahun lalu
induk
melakukan
ac3d677573

+ 2 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h

@@ -936,6 +936,7 @@ enum policy_mgr_conn_update_reason {
  * @HW_MODE_80_MHZ: 80 Mhz bandwidth
  * @HW_MODE_80_PLUS_80_MHZ: 80 Mhz plus 80 Mhz bandwidth
  * @HW_MODE_160_MHZ: 160 Mhz bandwidth
+ * @HW_MODE_320_MHZ: 320 Mhz bandwidth
  * @HW_MODE_MAX_BANDWIDTH: Max place holder
  *
  * These are generic IDs that identify the various roles
@@ -950,6 +951,7 @@ enum hw_mode_bandwidth {
 	HW_MODE_80_MHZ,
 	HW_MODE_80_PLUS_80_MHZ,
 	HW_MODE_160_MHZ,
+	HW_MODE_320_MHZ,
 	HW_MODE_MAX_BANDWIDTH
 };
 

+ 10 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -1743,6 +1743,11 @@ enum hw_mode_bandwidth policy_mgr_get_bw(enum phy_ch_width chan_width)
 	case CH_WIDTH_10MHZ:
 		bw = HW_MODE_10_MHZ;
 		break;
+#ifdef WLAN_FEATURE_11BE
+	case CH_WIDTH_320MHZ:
+		bw = HW_MODE_320_MHZ;
+		break;
+#endif
 	default:
 		policy_mgr_err("Unknown channel BW type %d", chan_width);
 		break;
@@ -1777,6 +1782,11 @@ enum phy_ch_width policy_mgr_get_ch_width(enum hw_mode_bandwidth bw)
 	case HW_MODE_10_MHZ:
 		ch_width = CH_WIDTH_10MHZ;
 		break;
+#ifdef WLAN_FEATURE_11BE
+	case HW_MODE_320_MHZ:
+		ch_width = CH_WIDTH_320MHZ;
+		break;
+#endif
 	default:
 		policy_mgr_err("Invalid phy_ch_width type %d", ch_width);
 		break;

+ 4 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -552,6 +552,10 @@ static enum hw_mode_bandwidth policy_mgr_map_wmi_channel_width_to_hw_mode_bw(
 		return HW_MODE_5_MHZ;
 	case WMI_CHAN_WIDTH_10:
 		return HW_MODE_10_MHZ;
+#ifdef WLAN_FEATURE_11BE
+	case WMI_CHAN_WIDTH_320:
+		return HW_MODE_320_MHZ;
+#endif
 	default:
 		return HW_MODE_BW_NONE;
 	}