Просмотр исходного кода

qcacmn: Add support to send band capability to fw

Currently host does not update band capability to fw as
part of feature set info.
With this change update band capability as well as part of
feature set info.

Change-Id: I09982f2f1b7b831a62f6f4db97691aeb4a4fb894
CRs-Fixed: 3303427
Ashish Kumar Dhanotiya 2 лет назад
Родитель
Сommit
4432410b9c
2 измененных файлов с 32 добавлено и 1 удалено
  1. 2 0
      wmi/inc/wmi_unified_param.h
  2. 30 1
      wmi/src/wmi_unified_tlv.c

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -6023,6 +6023,7 @@ typedef enum {
  * @enable_rfc835: indicates rfc835 is enabled or disabled
  * @sap_5g_supported: Indicates SAP 5g is supported or not
  * @sap_6g_supported: Indicates SAP 6g is supported or not
+ * @band_capability: Band capability bit map
  * @sap_max_num_clients: Max clients supported by SAP
  * @set_country_code_hal_supported: Indicates country code hal supported or not
  * @get_valid_channel_supported: Indicates get vaid channel supported or not
@@ -6084,6 +6085,7 @@ struct target_feature_set {
 	bool enable_rfc835;
 	bool sap_5g_supported;
 	bool sap_6g_supported;
+	uint32_t band_capability;
 	uint8_t sap_max_num_clients;
 	bool set_country_code_hal_supported;
 	bool get_valid_channel_supported;

+ 30 - 1
wmi/src/wmi_unified_tlv.c

@@ -9180,7 +9180,7 @@ static WMI_BAND_CONCURRENCY convert_host_to_target_band_concurrency(
 	case WMI_HOST_BAND_CONCURRENCY_DBS_SBS:
 		return WMI_HOST_DBS_SBS;
 	default:
-		return 0;
+		return WMI_HOST_NONE;
 	}
 }
 
@@ -9204,6 +9204,24 @@ static WMI_NUM_ANTENNAS convert_host_to_target_num_antennas(
 	}
 }
 
+/**
+ * convert_host_to_target_band_capability() -Convert host band capability to
+ * target band capability
+ * @host_band_capability: Host band capability
+ *
+ * Return: Target band capability bitmap
+ */
+static uint8_t
+convert_host_to_target_band_capability(uint32_t host_band_capability)
+{
+	uint8_t band_capability;
+
+	band_capability = (host_band_capability & WMI_HOST_BAND_CAP_2GHZ) |
+			  (host_band_capability & WMI_HOST_BAND_CAP_5GHZ) |
+			  (host_band_capability & WMI_HOST_BAND_CAP_6GHZ);
+	return band_capability;
+}
+
 /**
  * copy_feature_set_info() -Copy feaure set info from host to target
  * @feature_set_bitmap: Target feature set pointer
@@ -9219,6 +9237,7 @@ static inline void copy_feature_set_info(uint32_t *feature_set_bitmap,
 	WMI_WIFI_STANDARD wifi_standard;
 	WMI_VENDOR1_REQ1_VERSION vendor1_req1_version;
 	WMI_VENDOR1_REQ2_VERSION vendor1_req2_version;
+	uint8_t band_capability;
 
 	num_antennas = convert_host_to_target_num_antennas(
 					feature_set->num_antennas);
@@ -9231,6 +9250,10 @@ static inline void copy_feature_set_info(uint32_t *feature_set_bitmap,
 	vendor1_req2_version = convert_host_to_target_vendor1_req2_version(
 					feature_set->vendor_req_2_version);
 
+	band_capability =
+		convert_host_to_target_band_capability(
+						feature_set->band_capability);
+
 	WMI_SET_WIFI_STANDARD(feature_set_bitmap, wifi_standard);
 	WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_set_bitmap, band_concurrency);
 	WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_set_bitmap,
@@ -9346,6 +9369,7 @@ static inline void copy_feature_set_info(uint32_t *feature_set_bitmap,
 	WMI_SET_FEATURE_SET_VERSION(feature_set_bitmap,
 				    feature_set->feature_set_version);
 	WMI_SET_NUM_ANTENNAS(feature_set_bitmap, num_antennas);
+	WMI_SET_HOST_BAND_CAP(feature_set_bitmap, band_capability);
 }
 
 /**
@@ -9390,6 +9414,11 @@ static QDF_STATUS feature_set_cmd_send_tlv(
 		       (WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 * sizeof(uint32_t)));
 	copy_feature_set_info(feature_set_bitmap, feature_set);
 
+	qdf_trace_hex_dump(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG,
+			   feature_set_bitmap,
+			   WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 *
+			   sizeof(uint32_t));
+
 	wmi_mtrace(WMI_PDEV_FEATURESET_CMDID, NO_SESSION, 0);
 
 	ret = wmi_unified_cmd_send(wmi_handle, buf, len,