qcacmn: Make lite mon enum generic
-Some of the lite monitor enums can be used outside of lite monitor feature, make such enums generic. -Some enums are redundant, remove such enums and make use of existing ones Change-Id: I5125384ac5c4c55a57998fb5be5ee1ecb3e61147 CRs-Fixed: 3190754
这个提交包含在:
@@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
#define CDP_LITE_MON_PEER_MAX 16
|
#define CDP_LITE_MON_PEER_MAX 16
|
||||||
|
|
||||||
|
#define CDP_MON_FRM_TYPE_MAX 3
|
||||||
|
#define CDP_MON_FRM_FILTER_MODE_MAX 4
|
||||||
|
|
||||||
#define CDP_LITE_MON_LEN_64B 0x40
|
#define CDP_LITE_MON_LEN_64B 0x40
|
||||||
#define CDP_LITE_MON_LEN_128B 0x80
|
#define CDP_LITE_MON_LEN_128B 0x80
|
||||||
#define CDP_LITE_MON_LEN_256B 0x100
|
#define CDP_LITE_MON_LEN_256B 0x100
|
||||||
@@ -40,20 +43,6 @@
|
|||||||
/* This should align with nac mac type enumerations in ieee80211_ioctl.h */
|
/* This should align with nac mac type enumerations in ieee80211_ioctl.h */
|
||||||
#define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2
|
#define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2
|
||||||
|
|
||||||
/* lite mon filter modes */
|
|
||||||
enum cdp_lite_mon_filter_mode {
|
|
||||||
/* mode filter pass */
|
|
||||||
CDP_LITE_MON_MODE_FP = 0,
|
|
||||||
/* mode monitor direct */
|
|
||||||
CDP_LITE_MON_MODE_MD = 1,
|
|
||||||
/* mode monitor other */
|
|
||||||
CDP_LITE_MON_MODE_MO = 2,
|
|
||||||
/* mode filter pass monitor other */
|
|
||||||
CDP_LITE_MON_MODE_FP_MO = 3,
|
|
||||||
/* max filter modes */
|
|
||||||
CDP_LITE_MON_MODE_MAX = 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* lite mon frame levels */
|
/* lite mon frame levels */
|
||||||
enum cdp_lite_mon_level {
|
enum cdp_lite_mon_level {
|
||||||
/* level invalid */
|
/* level invalid */
|
||||||
@@ -66,18 +55,6 @@ enum cdp_lite_mon_level {
|
|||||||
CDP_LITE_MON_LEVEL_PPDU = 3,
|
CDP_LITE_MON_LEVEL_PPDU = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* lite mon frame types */
|
|
||||||
enum cdp_lite_mon_frm_type {
|
|
||||||
/* frm type mgmt */
|
|
||||||
CDP_LITE_MON_FRM_TYPE_MGMT = 0,
|
|
||||||
/* frm type ctrl */
|
|
||||||
CDP_LITE_MON_FRM_TYPE_CTRL = 1,
|
|
||||||
/* frm type data */
|
|
||||||
CDP_LITE_MON_FRM_TYPE_DATA = 2,
|
|
||||||
/* max frame types */
|
|
||||||
CDP_LITE_MON_FRM_TYPE_MAX = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* lite mon peer action */
|
/* lite mon peer action */
|
||||||
enum cdp_lite_mon_peer_action {
|
enum cdp_lite_mon_peer_action {
|
||||||
/* peer add */
|
/* peer add */
|
||||||
@@ -472,10 +449,10 @@ struct cdp_lite_mon_filter_config {
|
|||||||
uint8_t disable;
|
uint8_t disable;
|
||||||
uint8_t level;
|
uint8_t level;
|
||||||
uint8_t metadata;
|
uint8_t metadata;
|
||||||
uint16_t mgmt_filter[CDP_LITE_MON_MODE_MAX];
|
uint16_t mgmt_filter[CDP_MON_FRM_FILTER_MODE_MAX];
|
||||||
uint16_t ctrl_filter[CDP_LITE_MON_MODE_MAX];
|
uint16_t ctrl_filter[CDP_MON_FRM_FILTER_MODE_MAX];
|
||||||
uint16_t data_filter[CDP_LITE_MON_MODE_MAX];
|
uint16_t data_filter[CDP_MON_FRM_FILTER_MODE_MAX];
|
||||||
uint16_t len[CDP_LITE_MON_FRM_TYPE_MAX];
|
uint16_t len[CDP_MON_FRM_TYPE_MAX];
|
||||||
uint8_t debug;
|
uint8_t debug;
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
};
|
};
|
||||||
|
@@ -35,6 +35,30 @@
|
|||||||
#define DP_MON_MSDU_LOGGING 0
|
#define DP_MON_MSDU_LOGGING 0
|
||||||
#define DP_MON_MPDU_LOGGING 1
|
#define DP_MON_MPDU_LOGGING 1
|
||||||
|
|
||||||
|
/* monitor frame filter modes */
|
||||||
|
enum dp_mon_frm_filter_mode {
|
||||||
|
/* mode filter pass */
|
||||||
|
DP_MON_FRM_FILTER_MODE_FP = 0,
|
||||||
|
/* mode monitor direct */
|
||||||
|
DP_MON_FRM_FILTER_MODE_MD = 1,
|
||||||
|
/* mode monitor other */
|
||||||
|
DP_MON_FRM_FILTER_MODE_MO = 2,
|
||||||
|
/* mode filter pass monitor other */
|
||||||
|
DP_MON_FRM_FILTER_MODE_FP_MO = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* mpdu filter categories */
|
||||||
|
enum dp_mpdu_filter_category {
|
||||||
|
/* category filter pass */
|
||||||
|
DP_MPDU_FILTER_CATEGORY_FP = 0,
|
||||||
|
/* category monitor direct */
|
||||||
|
DP_MPDU_FILTER_CATEGORY_MD = 1,
|
||||||
|
/* category monitor other */
|
||||||
|
DP_MPDU_FILTER_CATEGORY_MO = 2,
|
||||||
|
/* category filter pass monitor override */
|
||||||
|
DP_MPDU_FILTER_CATEGORY_FP_MO = 3,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct dp_mon_filter_be - Monitor TLV filter
|
* struct dp_mon_filter_be - Monitor TLV filter
|
||||||
* @rx_tlv_filter: Rx MON TLV filter
|
* @rx_tlv_filter: Rx MON TLV filter
|
||||||
|
@@ -2304,38 +2304,38 @@ dp_mon_filter_setup_rx_lite_mon(struct dp_mon_pdev_be *be_mon_pdev)
|
|||||||
if (config->rx_config.fp_enabled) {
|
if (config->rx_config.fp_enabled) {
|
||||||
rx_tlv_filter->tlv_filter.enable_fp = 1;
|
rx_tlv_filter->tlv_filter.enable_fp = 1;
|
||||||
rx_tlv_filter->tlv_filter.fp_mgmt_filter =
|
rx_tlv_filter->tlv_filter.fp_mgmt_filter =
|
||||||
config->rx_config.mgmt_filter[CDP_LITE_MON_MODE_FP];
|
config->rx_config.mgmt_filter[DP_MON_FRM_FILTER_MODE_FP];
|
||||||
rx_tlv_filter->tlv_filter.fp_ctrl_filter =
|
rx_tlv_filter->tlv_filter.fp_ctrl_filter =
|
||||||
config->rx_config.ctrl_filter[CDP_LITE_MON_MODE_FP];
|
config->rx_config.ctrl_filter[DP_MON_FRM_FILTER_MODE_FP];
|
||||||
rx_tlv_filter->tlv_filter.fp_data_filter =
|
rx_tlv_filter->tlv_filter.fp_data_filter =
|
||||||
config->rx_config.data_filter[CDP_LITE_MON_MODE_FP];
|
config->rx_config.data_filter[DP_MON_FRM_FILTER_MODE_FP];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configure md filters if enabled */
|
/* configure md filters if enabled */
|
||||||
if (config->rx_config.md_enabled) {
|
if (config->rx_config.md_enabled) {
|
||||||
rx_tlv_filter->tlv_filter.enable_md = 1;
|
rx_tlv_filter->tlv_filter.enable_md = 1;
|
||||||
rx_tlv_filter->tlv_filter.md_mgmt_filter =
|
rx_tlv_filter->tlv_filter.md_mgmt_filter =
|
||||||
config->rx_config.mgmt_filter[CDP_LITE_MON_MODE_MD];
|
config->rx_config.mgmt_filter[DP_MON_FRM_FILTER_MODE_MD];
|
||||||
rx_tlv_filter->tlv_filter.md_ctrl_filter =
|
rx_tlv_filter->tlv_filter.md_ctrl_filter =
|
||||||
config->rx_config.ctrl_filter[CDP_LITE_MON_MODE_MD];
|
config->rx_config.ctrl_filter[DP_MON_FRM_FILTER_MODE_MD];
|
||||||
rx_tlv_filter->tlv_filter.md_data_filter =
|
rx_tlv_filter->tlv_filter.md_data_filter =
|
||||||
config->rx_config.data_filter[CDP_LITE_MON_MODE_MD];
|
config->rx_config.data_filter[DP_MON_FRM_FILTER_MODE_MD];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configure mo filters if enabled */
|
/* configure mo filters if enabled */
|
||||||
if (config->rx_config.mo_enabled) {
|
if (config->rx_config.mo_enabled) {
|
||||||
rx_tlv_filter->tlv_filter.enable_mo = 1;
|
rx_tlv_filter->tlv_filter.enable_mo = 1;
|
||||||
rx_tlv_filter->tlv_filter.mo_mgmt_filter =
|
rx_tlv_filter->tlv_filter.mo_mgmt_filter =
|
||||||
config->rx_config.mgmt_filter[CDP_LITE_MON_MODE_MO];
|
config->rx_config.mgmt_filter[DP_MON_FRM_FILTER_MODE_MO];
|
||||||
rx_tlv_filter->tlv_filter.mo_ctrl_filter =
|
rx_tlv_filter->tlv_filter.mo_ctrl_filter =
|
||||||
config->rx_config.ctrl_filter[CDP_LITE_MON_MODE_MO];
|
config->rx_config.ctrl_filter[DP_MON_FRM_FILTER_MODE_MO];
|
||||||
rx_tlv_filter->tlv_filter.mo_data_filter =
|
rx_tlv_filter->tlv_filter.mo_data_filter =
|
||||||
config->rx_config.data_filter[CDP_LITE_MON_MODE_MO];
|
config->rx_config.data_filter[DP_MON_FRM_FILTER_MODE_MO];
|
||||||
}
|
}
|
||||||
|
|
||||||
mgmt_len = config->rx_config.len[CDP_LITE_MON_FRM_TYPE_MGMT];
|
mgmt_len = config->rx_config.len[WLAN_FC0_TYPE_MGMT];
|
||||||
ctrl_len = config->rx_config.len[CDP_LITE_MON_FRM_TYPE_CTRL];
|
ctrl_len = config->rx_config.len[WLAN_FC0_TYPE_CTRL];
|
||||||
data_len = config->rx_config.len[CDP_LITE_MON_FRM_TYPE_DATA];
|
data_len = config->rx_config.len[WLAN_FC0_TYPE_DATA];
|
||||||
/* if full len is configured for any of the types, subscribe
|
/* if full len is configured for any of the types, subscribe
|
||||||
* for full dma length else set it to min dma length(fw sets
|
* for full dma length else set it to min dma length(fw sets
|
||||||
* full length by default) to avoid unnecessary dma since we
|
* full length by default) to avoid unnecessary dma since we
|
||||||
|
在新工单中引用
屏蔽一个用户