Merge branch 'android-msm-bonito-4.9' into android-msm-pixel-4.9
Conflicts:
qdf/linux/src/i_qdf_timer.h
qdf/linux/src/qdf_nbuf.c
wmi/src/wmi_unified.c
Bug: 119540871
Change-Id: I74833638d748df03b6751c698bf4c41095ed49f3
Signed-off-by: Robin Peng <robinpeng@google.com>
diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h
index e7f7578..53f2eb7 100644
--- a/qdf/inc/qdf_nbuf.h
+++ b/qdf/inc/qdf_nbuf.h
@@ -2437,17 +2437,6 @@
__qdf_nbuf_reset_ctxt(nbuf);
}
-static inline void
-qdf_nbuf_set_rx_info(__qdf_nbuf_t nbuf, void *info, uint32_t len)
-{
- __qdf_nbuf_set_rx_info(nbuf, info, len);
-}
-
-static inline void *qdf_nbuf_get_rx_info(__qdf_nbuf_t nbuf)
-{
- return __qdf_nbuf_get_rx_info(nbuf);
-}
-
static inline void qdf_nbuf_init(qdf_nbuf_t buf)
{
__qdf_nbuf_init(buf);
diff --git a/qdf/linux/src/i_qdf_nbuf.h b/qdf/linux/src/i_qdf_nbuf.h
index fe9602e..6b96fdd 100644
--- a/qdf/linux/src/i_qdf_nbuf.h
+++ b/qdf/linux/src/i_qdf_nbuf.h
@@ -1522,42 +1522,6 @@
skb_reset_tail_pointer(nbuf);
}
-/**
- * __qdf_nbuf_set_rx_info() - set rx info
- * @nbuf: sk buffer
- * @info: rx info
- * @len: length
- *
- * Return: none
- */
-static inline void
-__qdf_nbuf_set_rx_info(__qdf_nbuf_t nbuf, void *info, uint32_t len)
-{
- /* Customer may have skb->cb size increased, e.g. to 96 bytes,
- * then len's large enough to save the rs status info struct
- */
- uint8_t offset = sizeof(struct qdf_nbuf_cb);
- uint32_t max = sizeof(((struct sk_buff *)0)->cb)-offset;
-
- len = (len > max ? max : len);
-
- memcpy(((uint8_t *)(nbuf->cb) + offset), info, len);
-}
-
-/**
- * __qdf_nbuf_get_rx_info() - get rx info
- * @nbuf: sk buffer
- *
- * Return: rx_info
- */
-static inline void *
-__qdf_nbuf_get_rx_info(__qdf_nbuf_t nbuf)
-{
- uint8_t offset = sizeof(struct qdf_nbuf_cb);
-
- return (void *)((uint8_t *)(nbuf->cb) + offset);
-}
-
/*
* __qdf_nbuf_get_cb() - returns a pointer to skb->cb
* @nbuf: sk buff
diff --git a/qdf/linux/src/i_qdf_timer.h b/qdf/linux/src/i_qdf_timer.h
index 378b5b8..8f3a20b 100644
--- a/qdf/linux/src/i_qdf_timer.h
+++ b/qdf/linux/src/i_qdf_timer.h
@@ -70,7 +70,7 @@
if (type == QDF_TIMER_TYPE_SW) {
if (object_is_on_stack(timer))
setup_deferrable_timer_on_stack(timer, func,
- (unsigned long)arg);
+ (unsigned long)arg);
else
setup_deferrable_timer(timer, func,
(unsigned long)arg);
diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c
index 3f1edf3..025526f 100644
--- a/qdf/linux/src/qdf_nbuf.c
+++ b/qdf/linux/src/qdf_nbuf.c
@@ -296,13 +296,16 @@
size += (align - 1);
if (in_interrupt() || irqs_disabled() || in_atomic()) {
+ flags = GFP_ATOMIC;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
/*
* Observed that kcompactd burns out CPU to make order-3 page.
*__netdev_alloc_skb has 4k page fallback option just in case of
* failing high order page allocation so we don't need to be
* hard. Make kcompactd rest in piece.
*/
- flags = GFP_ATOMIC & ~__GFP_KSWAPD_RECLAIM;
+ flags = flags & ~__GFP_KSWAPD_RECLAIM;
+#endif
}
skb = __netdev_alloc_skb(NULL, size, flags);
diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c
index 61ffee0..a255129 100644
--- a/wmi/src/wmi_unified.c
+++ b/wmi/src/wmi_unified.c
@@ -1388,6 +1388,7 @@
return QDF_STATUS_E_NOMEM;
}
+ qdf_mem_zero(qdf_nbuf_data(buf), sizeof(WMI_CMD_HDR));
WMI_SET_FIELD(qdf_nbuf_data(buf), WMI_CMD_HDR, COMMANDID, cmd_id);
qdf_atomic_inc(&wmi_handle->pending_cmds);