浏览代码

qcacmn: Changes to store stats in 64bit data type

Changed the data type to store stats to 64bit
from 32bit to support larger number for stats
counter

Change-Id: I25eca626623503663b6aa8436217413609e2a807
CRs-Fixed: 2024225
Acked-by: Chaithanya Garrepalli <[email protected]>
c_cgodav 8 年之前
父节点
当前提交
f151c38600
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 4 4
      dp/inc/cdp_txrx_stats_struct.h
  2. 5 1
      qdf/linux/src/i_osdep.h

+ 4 - 4
dp/inc/cdp_txrx_stats_struct.h

@@ -52,13 +52,13 @@
 
 #ifndef BIG_ENDIAN_HOST
 typedef struct {
-	u_int32_t pkts;
-	u_int32_t bytes;
+	uint64_t pkts;
+	uint64_t bytes;
 } ol_txrx_stats_elem;
 #else
 struct ol_txrx_elem_t {
-	u_int32_t pkts;
-	u_int32_t bytes;
+	uint64_t pkts;
+	uint64_t bytes;
 };
 typedef struct ol_txrx_elem_t ol_txrx_stats_elem;
 #endif

+ 5 - 1
qdf/linux/src/i_osdep.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -178,7 +178,11 @@ struct _NIC_DEV {
 	void *bdev;
 	struct net_device *netdev;
 	qdf_bh_t intr_tq;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
+	struct rtnl_link_stats64 devstats;
+#else
 	struct net_device_stats devstats;
+#endif
 	QDF_BUS_CONTEXT bc;
 #ifdef ATH_PERF_PWR_OFFLOAD
 	struct device *device;