qcacmn: Implement QDF API to get queue mapping and total ram size
This change adds the following QDF APIs - qdf_nbuf_get_queue_mapping: To get the queue mapping set by linux kernel qdf_get_totalramsize: To get total ram size in Kb Change-Id: I86daffebba759c086d15951dfcc72ea626c74bb4 CRs-Fixed: 1055387
This commit is contained in:

committed by
qcabuildsw

parent
50a5518cd6
commit
5947138237
@@ -2041,6 +2041,12 @@ static inline void qdf_nbuf_set_priority(qdf_nbuf_t buf, uint32_t p)
|
|||||||
__qdf_nbuf_set_priority(buf, p);
|
__qdf_nbuf_set_priority(buf, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline uint16_t
|
||||||
|
qdf_nbuf_get_queue_mapping(qdf_nbuf_t buf)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_queue_mapping(buf);
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint8_t *
|
static inline uint8_t *
|
||||||
qdf_nbuf_get_priv_ptr(qdf_nbuf_t buf)
|
qdf_nbuf_get_priv_ptr(qdf_nbuf_t buf)
|
||||||
{
|
{
|
||||||
|
@@ -433,5 +433,10 @@ static inline int qdf_device_init_wakeup(qdf_device_t qdf_dev, bool enable)
|
|||||||
return __qdf_device_init_wakeup(qdf_dev, enable);
|
return __qdf_device_init_wakeup(qdf_dev, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
uint64_t qdf_get_totalramsize(void)
|
||||||
|
{
|
||||||
|
return __qdf_get_totalramsize();
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*_QDF_UTIL_H*/
|
#endif /*_QDF_UTIL_H*/
|
||||||
|
@@ -1670,4 +1670,16 @@ __qdf_nbuf_mark_wakeup_frame(__qdf_nbuf_t buf)
|
|||||||
buf->mark |= QDF_MARK_FIRST_WAKEUP_PACKET;
|
buf->mark |= QDF_MARK_FIRST_WAKEUP_PACKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_nbuf_get_queue_mapping() - get the queue mapping set by linux kernel
|
||||||
|
*
|
||||||
|
* @buf: sk buff
|
||||||
|
*
|
||||||
|
* Return: Queue mapping
|
||||||
|
*/
|
||||||
|
static inline uint16_t
|
||||||
|
__qdf_nbuf_get_queue_mapping(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return skb->queue_mapping;
|
||||||
|
}
|
||||||
#endif /*_I_QDF_NET_BUF_H */
|
#endif /*_I_QDF_NET_BUF_H */
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <linux/random.h>
|
#include <linux/random.h>
|
||||||
@@ -195,6 +196,8 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
|
|||||||
#define __qdf_min(_a, _b) ((_a) < (_b) ? _a : _b)
|
#define __qdf_min(_a, _b) ((_a) < (_b) ? _a : _b)
|
||||||
#define __qdf_max(_a, _b) ((_a) > (_b) ? _a : _b)
|
#define __qdf_max(_a, _b) ((_a) > (_b) ? _a : _b)
|
||||||
|
|
||||||
|
#define MEMINFO_KB(x) ((x) << (PAGE_SHIFT - 10)) /* In kilobytes */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Assert
|
* @brief Assert
|
||||||
*/
|
*/
|
||||||
@@ -276,4 +279,17 @@ static inline int __qdf_device_init_wakeup(__qdf_device_t qdf_dev, bool enable)
|
|||||||
return device_init_wakeup(qdf_dev->dev, enable);
|
return device_init_wakeup(qdf_dev->dev, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_get_totalramsize() - Get total ram size in Kb
|
||||||
|
*
|
||||||
|
* Return: Total ram size in Kb
|
||||||
|
*/
|
||||||
|
static inline uint64_t
|
||||||
|
__qdf_get_totalramsize(void)
|
||||||
|
{
|
||||||
|
struct sysinfo meminfo;
|
||||||
|
si_meminfo(&meminfo);
|
||||||
|
return MEMINFO_KB(meminfo.totalram);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*_I_QDF_UTIL_H*/
|
#endif /*_I_QDF_UTIL_H*/
|
||||||
|
Reference in New Issue
Block a user