qcacmn: add qdf APIs for intra-bss

qdf APIs to save intra-bss flag in the nbuf
and to extract it later

Change-Id: I79e793d6252adc8b6e024f8b3a95959f64d9df31
This commit is contained in:
Pavankumar Nandeshwar
2021-09-07 22:12:03 -07:00
committed by Madan Koyyalamudi
parent 866ade593a
commit d6a386028b
4 changed files with 60 additions and 3 deletions

View File

@@ -113,6 +113,7 @@ typedef union {
* @rx.dev.priv_cb_w.fctx: ctx to handle special pkts defined by ftype
* @rx.dev.priv_cb_w.msdu_len: length of RX packet
* @rx.dev.priv_cb_w.peer_id: peer_id for RX packet
* @rx.dev.priv_cb_w.flag_intra_bss: flag to indicate this is intra bss packet
* @rx.dev.priv_cb_w.protocol_tag: protocol tag set by app for rcvd packet type
* @rx.dev.priv_cb_w.flow_tag: flow tag set by application for 5 tuples rcvd
*
@@ -225,7 +226,9 @@ struct qdf_nbuf_cb {
struct {
void *ext_cb_ptr;
void *fctx;
uint16_t msdu_len;
uint16_t msdu_len : 14,
flag_intra_bss : 1,
reserved : 1;
uint16_t peer_id;
uint16_t protocol_tag;
uint16_t flow_tag;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -152,6 +152,28 @@ static inline uint8_t *__qdf_nbuf_pull_head(struct sk_buff *skb, size_t size)
return skb_pull(skb, size);
}
/**
* qdf_nbuf_is_intra_bss() - get intra bss bit
* @buf: Network buffer
*
* Return: integer value - 0/1
*/
static inline int qdf_nbuf_is_intra_bss(struct sk_buff *buf)
{
return 0;
}
/**
* qdf_nbuf_set_intra_bss() - set intra bss bit
* @buf: Network buffer
* @val: 0/1
*
* Return: void
*/
static inline void qdf_nbuf_set_intra_bss(struct sk_buff *buf, uint8_t val)
{
}
/**
* qdf_nbuf_init_replenish_timer - Initialize the alloc replenish timer
*

View File

@@ -54,6 +54,9 @@
#define QDF_NBUF_CB_RX_PKT_LEN(skb) \
(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_w.msdu_len)
#define QDF_NBUF_CB_RX_INTRA_BSS(skb) \
(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_w.flag_intra_bss)
#define __qdf_nbuf_set_rx_fctx_type(skb, ctx, type) \
do { \
QDF_NBUF_CB_RX_FCTX((skb)) = (ctx); \
@@ -63,6 +66,12 @@
#define __qdf_nbuf_get_rx_fctx(skb) \
QDF_NBUF_CB_RX_FCTX((skb))
#define __qdf_nbuf_set_intra_bss(skb, val) \
((QDF_NBUF_CB_RX_INTRA_BSS((skb))) = val)
#define __qdf_nbuf_is_intra_bss(skb) \
(QDF_NBUF_CB_RX_INTRA_BSS((skb)))
#define __qdf_nbuf_set_tx_fctx_type(skb, ctx, type) \
do { \
QDF_NBUF_CB_TX_FCTX((skb)) = (ctx); \