Browse Source

qcacld-3.0: Add support to advertise SAR_V2 DBS to userspace

Currently host only advertises SAR_V1 and SAR_V2 to userspace as
there is no mapping present for SAR_V2 DBS.

To address this issue add support to store and advertise SAR_V2 DBS.

Change-Id: Ic5d68361c4ce7275056117685100e8338466220c
CRs-Fixed: 3312593
Asutosh Mohapatra 2 years ago
parent
commit
ec4c798f68
2 changed files with 8 additions and 1 deletions
  1. 5 0
      core/hdd/src/wlan_hdd_sar_limits.c
  2. 3 1
      core/wma/src/wma_sar_public_structs.h

+ 5 - 0
core/hdd/src/wlan_hdd_sar_limits.c

@@ -322,6 +322,8 @@ static u32 hdd_to_nl_sar_version(enum sar_version hdd_sar_version)
 		return QCA_WLAN_VENDOR_SAR_VERSION_1;
 	case (SAR_VERSION_2):
 		return QCA_WLAN_VENDOR_SAR_VERSION_2;
+	case (SAR_VERSION_3):
+		return QCA_WLAN_VENDOR_SAR_VERSION_3;
 	default:
 		return QCA_WLAN_VENDOR_SAR_VERSION_INVALID;
 	}
@@ -345,6 +347,9 @@ static int hdd_sar_fill_capability_response(struct sk_buff *skb,
 
 	attr = QCA_WLAN_VENDOR_ATTR_SAR_CAPABILITY_VERSION;
 	value = hdd_to_nl_sar_version(hdd_ctx->sar_version);
+
+	hdd_debug("SAR Version = %u", value);
+
 	errno = nla_put_u32(skb, attr, value);
 
 	return errno;

+ 3 - 1
core/wma/src/wma_sar_public_structs.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -23,7 +24,8 @@ struct sar_limit_event;
 
 enum sar_version {
 	SAR_VERSION_1,
-	SAR_VERSION_2
+	SAR_VERSION_2,
+	SAR_VERSION_3
 };
 
 /**