Browse Source

datarmnet: Changes for kalama

Changes needed to update datarmnet for target kalama

CRs-Fixed: 3085494
Change-Id: Ibfb837aab4f9db21a5708ea3e24e85afca2cd5d9
Signed-off-by: Conner Huff <[email protected]>
Conner Huff 3 năm trước cách đây
mục cha
commit
24780f8b89

+ 1 - 0
core/Android.mk

@@ -2,6 +2,7 @@ ifneq ($(TARGET_BOARD_PLATFORM),qssi)
 RMNET_CORE_DLKM_PLATFORMS_LIST := lahaina
 RMNET_CORE_DLKM_PLATFORMS_LIST += taro
 RMNET_CORE_DLKM_PLATFORMS_LIST += sa2150p
+RMNET_CORE_DLKM_PLATFORMS_LIST += kalama
 
 ifeq ($(call is-board-platform-in-list, $(RMNET_CORE_DLKM_PLATFORMS_LIST)),true)
 #Make file to create RMNET_CORE DLKM

+ 2 - 2
core/Kbuild

@@ -1,4 +1,4 @@
-ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO)))
+ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO) $(CONFIG_ARCH_KALAMA)))
 ccflags-y	+= -DRMNET_LA_PLATFORM
 endif
 
@@ -31,7 +31,7 @@ rmnet_core-y += \
 	rmnet_qmap.o \
 	rmnet_ll_qmap.o
 
-ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO)))
+ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO) $(CONFIG_ARCH_KALAMA)))
 obj-m += rmnet_ctl.o
 rmnet_ctl-y := \
 	rmnet_ctl_client.o \

+ 1 - 1
core/Makefile

@@ -28,7 +28,7 @@ rmnet_core-y += 	rmnet_config.o \
 			rmnet_qmap.o \
 			rmnet_ll_qmap.o
 
-ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO)))
+ifneq (, $(filter y, $(CONFIG_ARCH_LAHAINA) $(CONFIG_ARCH_WAIPIO) $(CONFIG_ARCH_KALAMA)))
 rmnet_ctl-y += 		rmnet_ctl_client.o \
 			rmnet_ctl_ipa.o \
 			rmnet_ctl_mhi.o

+ 2 - 2
core/rmnet_descriptor.c

@@ -638,7 +638,7 @@ static int rmnet_frag_deaggregate_one(struct sk_buff *skb,
 	pkt_len += sizeof(*maph);
 	if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) {
 		pkt_len += sizeof(struct rmnet_map_dl_csum_trailer);
-	} else if ((port->data_format & (RMNET_FLAGS_INGRESS_MAP_CKSUMV5 |
+	} else if ((port->data_format & (RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5 |
 					 RMNET_FLAGS_INGRESS_COALESCE)) &&
 		   !maph->cd_bit) {
 		u32 hsize = 0;
@@ -1787,7 +1787,7 @@ __rmnet_frag_ingress_handler(struct rmnet_frag_descriptor *frag_desc,
 	/* Handle QMAPv5 packet */
 	if (qmap->next_hdr &&
 	    (port->data_format & (RMNET_FLAGS_INGRESS_COALESCE |
-				  RMNET_FLAGS_INGRESS_MAP_CKSUMV5))) {
+				  RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5))) {
 		if (rmnet_frag_process_next_hdr_packet(frag_desc, port, &segs,
 						       len))
 			goto recycle;

+ 2 - 2
core/rmnet_genl.c

@@ -159,7 +159,7 @@ void rmnet_boost_for_pid(pid_t pid, int boost_enable,
 				continue;
 
 			/* PID Match found */
-			rm_err("CORE_BOOST: enable boost for pid %d for %d ms",
+			rm_err("CORE_BOOST: enable boost for pid %d for %llu ms",
 			       pid, boost_period);
 			node_p->sched_boost_enable = boost_enable;
 			node_p->sched_boost_period_ms = boost_period;
@@ -349,7 +349,7 @@ int rmnet_core_genl_pid_boost_req_hdlr(struct sk_buff *skb_2,
 	u16 boost_pid_cnt = RMNET_CORE_GENL_MAX_PIDS;
 	u16 i = 0;
 
-	rm_err("%s", "CORE_GNL: %s", __func__);
+	rm_err("CORE_GNL: %s", __func__);
 
 	if (!info) {
 		rm_err("%s", "CORE_GNL: error - info is null");

+ 4 - 4
core/rmnet_handlers.c

@@ -234,7 +234,7 @@ __rmnet_map_ingress_handler(struct sk_buff *skb,
 	/* Handle QMAPv5 packet */
 	if (qmap->next_hdr &&
 	    (port->data_format & (RMNET_FLAGS_INGRESS_COALESCE |
-				  RMNET_FLAGS_INGRESS_MAP_CKSUMV5))) {
+				  RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5))) {
 		if (rmnet_map_process_next_hdr_packet(skb, &list, len))
 			goto free_skb;
 	} else {
@@ -286,7 +286,7 @@ rmnet_map_ingress_handler(struct sk_buff *skb,
 	}
 
 	if (port->data_format & (RMNET_FLAGS_INGRESS_COALESCE |
-				 RMNET_FLAGS_INGRESS_MAP_CKSUMV5)) {
+				 RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5)) {
 		if (skb_is_nonlinear(skb)) {
 			rmnet_frag_ingress_handler(skb, port);
 			return;
@@ -349,10 +349,10 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
 	if (port->data_format & RMNET_FLAGS_EGRESS_MAP_CKSUMV4) {
 		additional_header_len = sizeof(struct rmnet_map_ul_csum_header);
 		csum_type = RMNET_FLAGS_EGRESS_MAP_CKSUMV4;
-	} else if ((port->data_format & RMNET_FLAGS_EGRESS_MAP_CKSUMV5) ||
+	} else if ((port->data_format & RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5) ||
 		   (port->data_format & RMNET_EGRESS_FORMAT_PRIORITY)) {
 		additional_header_len = sizeof(struct rmnet_map_v5_csum_header);
-		csum_type = RMNET_FLAGS_EGRESS_MAP_CKSUMV5;
+		csum_type = RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5;
 	}
 
 	required_headroom += additional_header_len;

+ 4 - 4
core/rmnet_map_data.c

@@ -306,7 +306,7 @@ struct rmnet_map_header *rmnet_map_add_map_header(struct sk_buff *skb,
 	memset(map_header, 0, sizeof(struct rmnet_map_header));
 
 	/* Set next_hdr bit for csum offload packets */
-	if (port->data_format & RMNET_FLAGS_EGRESS_MAP_CKSUMV5)
+	if (port->data_format & RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5)
 		map_header->next_hdr = 1;
 
 	if (pad == RMNET_MAP_NO_PAD_BYTES) {
@@ -354,7 +354,7 @@ struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb,
 
 	if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4)
 		packet_len += sizeof(struct rmnet_map_dl_csum_trailer);
-	else if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV5) {
+	else if (port->data_format & RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5) {
 		if (!maph->cd_bit) {
 			packet_len += sizeof(struct rmnet_map_v5_csum_header);
 
@@ -519,7 +519,7 @@ void rmnet_map_v5_checksum_uplink_packet(struct sk_buff *skb,
 		rmnet_map_v5_check_priority(skb, orig_dev, ul_header);
 
 	/* Allow priority w/o csum offload */
-	if (!(port->data_format & RMNET_FLAGS_EGRESS_MAP_CKSUMV5))
+	if (!(port->data_format & RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5))
 		return;
 
 	if (skb->ip_summed == CHECKSUM_PARTIAL) {
@@ -569,7 +569,7 @@ void rmnet_map_checksum_uplink_packet(struct sk_buff *skb,
 	case RMNET_FLAGS_EGRESS_MAP_CKSUMV4:
 		rmnet_map_v4_checksum_uplink_packet(skb, orig_dev);
 		break;
-	case RMNET_FLAGS_EGRESS_MAP_CKSUMV5:
+	case RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5:
 		rmnet_map_v5_checksum_uplink_packet(skb, port, orig_dev);
 		break;
 	default:

+ 2 - 2
core/rmnet_private.h

@@ -26,8 +26,8 @@
 #define RMNET_INGRESS_FORMAT_DL_MARKER_V2       BIT(29)
 
 #define RMNET_FLAGS_INGRESS_COALESCE            BIT(4)
-#define RMNET_FLAGS_INGRESS_MAP_CKSUMV5         BIT(5)
-#define RMNET_FLAGS_EGRESS_MAP_CKSUMV5          BIT(6)
+#define RMNET_PRIV_FLAGS_INGRESS_MAP_CKSUMV5    BIT(5)
+#define RMNET_PRIV_FLAGS_EGRESS_MAP_CKSUMV5     BIT(6)
 
 #define RMNET_INGRESS_FORMAT_DL_MARKER  (RMNET_INGRESS_FORMAT_DL_MARKER_V1 |\
 RMNET_INGRESS_FORMAT_DL_MARKER_V2)

+ 1 - 0
core/rmnet_vnd.c

@@ -23,6 +23,7 @@
 #include <linux/inet.h>
 #include <linux/icmp.h>
 #include <linux/icmpv6.h>
+#include <linux/ethtool.h>
 #include <net/pkt_sched.h>
 #include <net/ipv6.h>
 #include "rmnet_config.h"

+ 1 - 0
datarmnet_dlkm_vendor_board.mk

@@ -2,6 +2,7 @@
 DATA_DLKM_BOARD_PLATFORMS_LIST := lahaina
 DATA_DLKM_BOARD_PLATFORMS_LIST += taro
 DATA_DLKM_BOARD_PLATFORMS_LIST += sa2150p
+DATA_DLKM_BOARD_PLATFORMS_LIST += kalama
 
 ifneq ($(TARGET_BOARD_AUTO),true)
 ifeq ($(call is-board-platform-in-list,$(DATA_DLKM_BOARD_PLATFORMS_LIST)),true)