struct mbulk *m = NULL;
void *sig = NULL, *b_data = NULL;
size_t payload = 0;
- u8 pool_id = ctrl_packet ? MBULK_CLASS_FROM_HOST_CTL : MBULK_CLASS_FROM_HOST_DAT;
+ u8 pool_id = ctrl_packet ? MBULK_POOL_ID_CTRL : MBULK_POOL_ID_DATA;
u8 headroom = 0, tailroom = 0;
enum mbulk_class clas = ctrl_packet ? MBULK_CLASS_FROM_HOST_CTL : MBULK_CLASS_FROM_HOST_DAT;
struct slsi_skb_cb *cb = slsi_skb_cb_get(skb);
*/
colour = ((m->clas & 0xc0) << 2) | (m->pid & 0xfe);
/* Account ONLY for data RFB */
- if ((m->pid & 0x1) == MBULK_CLASS_FROM_HOST_DAT) {
+ if ((m->pid & 0x1) == MBULK_POOL_ID_DATA) {
#ifdef CONFIG_SCSC_WLAN_HIP4_PROFILING
SCSC_HIP4_SAMPLER_VIF_PEER(hip->hip_priv->minor, 0, (colour & 0x6) >> 1, (colour & 0xf8) >> 3);
/* to profile round-trip */
*/
colour = ((m->clas & 0xc0) << 2) | (m->pid & 0xfe);
/* Account ONLY for data RFB */
- if ((m->pid & 0x1) == MBULK_CLASS_FROM_HOST_DAT) {
+ if ((m->pid & 0x1) == MBULK_POOL_ID_DATA) {
#ifdef CONFIG_SCSC_WLAN_HIP4_PROFILING
SCSC_HIP4_SAMPLER_VIF_PEER(hip->hip_priv->minor, 0, (colour & 0x6) >> 1, (colour & 0xf8) >> 3);
/* to profile round-trip */
service = sdev->service;
- hip->hip_priv->host_pool_id_dat = MBULK_CLASS_FROM_HOST_DAT;
- hip->hip_priv->host_pool_id_ctl = MBULK_CLASS_FROM_HOST_CTL;
+ hip->hip_priv->host_pool_id_dat = MBULK_POOL_ID_DATA;
+ hip->hip_priv->host_pool_id_ctl = MBULK_POOL_ID_CTRL;
/* hip_ref contains the reference of the start of shared memory allocated for WLAN */
/* hip_ptr is the kernel address of hip_ref*/
#ifdef CONFIG_SCSC_WLAN_DEBUG
/* Configure mbulk allocator - Data QUEUES */
- ret = mbulk_pool_add(MBULK_CLASS_FROM_HOST_DAT, hip_ptr + HIP4_WLAN_TX_DAT_OFFSET,
+ ret = mbulk_pool_add(MBULK_POOL_ID_DATA, hip_ptr + HIP4_WLAN_TX_DAT_OFFSET,
hip_ptr + HIP4_WLAN_TX_DAT_OFFSET + HIP4_WLAN_TX_DAT_SIZE,
(HIP4_WLAN_TX_DAT_SIZE / HIP4_DAT_SLOTS) - sizeof(struct mbulk), 5,
hip->hip_priv->minor);
return ret;
/* Configure mbulk allocator - Control QUEUES */
- ret = mbulk_pool_add(MBULK_CLASS_FROM_HOST_CTL, hip_ptr + HIP4_WLAN_TX_CTL_OFFSET,
+ ret = mbulk_pool_add(MBULK_POOL_ID_CTRL, hip_ptr + HIP4_WLAN_TX_CTL_OFFSET,
hip_ptr + HIP4_WLAN_TX_CTL_OFFSET + HIP4_WLAN_TX_CTL_SIZE,
(HIP4_WLAN_TX_CTL_SIZE / HIP4_CTL_SLOTS) - sizeof(struct mbulk), 0,
hip->hip_priv->minor);
return ret;
#else
/* Configure mbulk allocator - Data QUEUES */
- ret = mbulk_pool_add(MBULK_CLASS_FROM_HOST_DAT, hip_ptr + HIP4_WLAN_TX_DAT_OFFSET,
+ ret = mbulk_pool_add(MBULK_POOL_ID_DATA, hip_ptr + HIP4_WLAN_TX_DAT_OFFSET,
hip_ptr + HIP4_WLAN_TX_DAT_OFFSET + HIP4_WLAN_TX_DAT_SIZE,
(HIP4_WLAN_TX_DAT_SIZE / HIP4_DAT_SLOTS) - sizeof(struct mbulk), 5);
if (ret)
return ret;
/* Configure mbulk allocator - Control QUEUES */
- ret = mbulk_pool_add(MBULK_CLASS_FROM_HOST_CTL, hip_ptr + HIP4_WLAN_TX_CTL_OFFSET,
+ ret = mbulk_pool_add(MBULK_POOL_ID_CTRL, hip_ptr + HIP4_WLAN_TX_CTL_OFFSET,
hip_ptr + HIP4_WLAN_TX_CTL_OFFSET + HIP4_WLAN_TX_CTL_SIZE,
(HIP4_WLAN_TX_CTL_SIZE / HIP4_CTL_SLOTS) - sizeof(struct mbulk), 0);
if (ret)
*/
int hip4_free_ctrl_slots_count(struct slsi_hip4 *hip)
{
- return mbulk_pool_get_free_count(MBULK_CLASS_FROM_HOST_CTL);
+ return mbulk_pool_get_free_count(MBULK_POOL_ID_CTRL);
}
/**
/******************************************************************************
*
- * Copyright (c) 2014 - 2017 Samsung Electronics Co., Ltd. All rights reserved
+ * Copyright (c) 2014 - 2019 Samsung Electronics Co., Ltd. All rights reserved
*
*****************************************************************************/
struct mbulk;
/**
- * mbulk pool ID
+ * mbulk host pool ID
*/
-#define MBULK_POOL_ID_MIN (0)
-#define MBULK_POOL_ID_MAX_FW (4) /* 0 ~ 3 used for firmware pools */
-#ifdef JAVA_VIRT_HOST
-#define MBULK_POOL_ID_MIN_HOST (MBULK_POOL_ID_MAX_FW)
-#define MBULK_POOL_ID_MAX_HOST (MBULK_POOL_ID_MIN_HOST + 2)
-#define MBULK_POOL_ID_MAX (MBULK_POOL_ID_MAX_HOST)
-#else
-#define MBULK_POOL_ID_MAX (MBULK_POOL_ID_MAX_FW)
-#endif
-
-/* Max number of mbulk to be freed by the Host */
-#define MBULK_MAX_HOST_TO_FREE 2
+#define MBULK_POOL_ID_DATA (0)
+#define MBULK_POOL_ID_CTRL (1)
+#define MBULK_POOL_ID_MAX (2)
/**
* mbulk buffer classification
* compiler assigns the smallest integral type (u8).
*/
enum mbulk_class {
- MBULK_CLASS_FROM_HOST_DAT = 0,
- MBULK_CLASS_FROM_HOST_CTL = 1,
- MBULK_CLASS_FROM_RADIO = 2,
- MBULK_CLASS_CONTRL = 3,
- MBULK_CLASS_DEBUG = 4,
- MBULK_CLASS_OTHERS = 5,
+ MBULK_CLASS_CONTROL = 0,
+ MBULK_CLASS_HOSTIO = 1,
+ MBULK_CLASS_DEBUG = 2,
+
+ MBULK_CLASS_FROM_HOST_DAT = 3,
+ MBULK_CLASS_FROM_HOST_CTL = 4,
+ MBULK_CLASS_FROM_RADIO = 5,
+ MBULK_CLASS_DPLP = 6,
+ MBULK_CLASS_OTHERS = 7,
+ MBULK_CLASS_FROM_RADIO_FORWARDED = 8,
MBULK_CLASS_MAX
} __packed;