Selaa lähdekoodia

qcacmn: Send anycast addresses for NS offload

Propagation from qcacld-2.0 to qcacld-3.0

Current implementation has support for IPv6 addresses of type
unicast for NS offload to firmware.

As part of this change add anycast addresses for NS offload.

CRs-Fixed: 954880
Sravan Kumar Kairam 8 vuotta sitten
vanhempi
sitoutus
63b327d89c
2 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 2 0
      wmi/inc/wmi_unified_param.h
  2. 8 0
      wmi/src/wmi_unified_tlv.c

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -3033,6 +3033,7 @@ struct wmi_dual_mac_config {
  * @self_macaddr: self mac address
  * @srcIPv6AddrValid: src ipv6 address valid flag
  * @targetIPv6AddrValid: target ipv6 address valid flag
+ * @target_ipv6_addr_ac_type: target ipv6 address type
  * @slotIdx: slot index
  */
 struct ns_offload_req_params {
@@ -3042,6 +3043,7 @@ struct ns_offload_req_params {
 	struct qdf_mac_addr self_macaddr;
 	uint8_t srcIPv6AddrValid;
 	uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
+	uint8_t target_ipv6_addr_ac_type[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
 	uint8_t slotIdx;
 };
 #endif /* WLAN_NS_OFFLOAD */

+ 8 - 0
wmi/src/wmi_unified_tlv.c

@@ -9659,6 +9659,10 @@ QDF_STATUS send_enable_arp_ns_offload_cmd_tlv(wmi_unified_t wmi_handle,
 			A_MEMCPY(&ns_tuple->solicitation_ipaddr,
 				 &param->nsOffloadInfo.
 				 selfIPv6Addr[i], sizeof(WMI_IPV6_ADDR));
+			if (param->nsOffloadInfo.
+				target_ipv6_addr_ac_type[i])
+				ns_tuple->flags |=
+					WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST;
 			WMI_LOGD("NS solicitedIp: %pI6, targetIp: %pI6",
 				 &param->nsOffloadInfo.selfIPv6Addr[i],
 				 &param->nsOffloadInfo.
@@ -9729,6 +9733,10 @@ QDF_STATUS send_enable_arp_ns_offload_cmd_tlv(wmi_unified_t wmi_handle,
 				A_MEMCPY(&ns_tuple->solicitation_ipaddr,
 					&param->nsOffloadInfo.selfIPv6Addr[i],
 					sizeof(WMI_IPV6_ADDR));
+				if (param->nsOffloadInfo.
+						target_ipv6_addr_ac_type[i])
+					ns_tuple->flags |=
+						WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST;
 				WMI_LOGD("Index %d NS solicitedIp: %pI6, targetIp: %pI6", i,
 					&param->nsOffloadInfo.selfIPv6Addr[i],
 					&param->nsOffloadInfo.targetIPv6Addr[i]);