diff --git a/components/pmo/core/src/wlan_pmo_static_config.c b/components/pmo/core/src/wlan_pmo_static_config.c index b0653f35f6..442c5fa2fd 100644 --- a/components/pmo/core/src/wlan_pmo_static_config.c +++ b/components/pmo/core/src/wlan_pmo_static_config.c @@ -344,6 +344,19 @@ void pmo_register_wow_default_patterns(struct wlan_objmgr_vdev *vdev) } +/** + * set_action_id_drop_pattern_for_spec_mgmt() - Set action id of action + * frames for spectrum mgmt frames to be droppped in fw. + * + * @action_id_per_category: Pointer to action id bitmaps. + */ +static void set_action_id_drop_pattern_for_spec_mgmt( + uint32_t *action_id_per_category) +{ + action_id_per_category[PMO_MAC_ACTION_SPECTRUM_MGMT] + = DROP_SPEC_MGMT_ACTION_FRAME_BITMAP; +} + void pmo_register_action_frame_patterns(struct wlan_objmgr_vdev *vdev) { @@ -363,6 +376,8 @@ void pmo_register_action_frame_patterns(struct wlan_objmgr_vdev *vdev) cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP6; cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP7; + set_action_id_drop_pattern_for_spec_mgmt(cmd.action_per_category); + for (i = 0; i < PMO_SUPPORTED_ACTION_CATE_ELE_LIST; i++) { if (i < ALLOWED_ACTION_FRAME_MAP_WORDS) pmo_debug("%s: %d action Wakeup pattern 0x%x in fw", @@ -371,6 +386,9 @@ void pmo_register_action_frame_patterns(struct wlan_objmgr_vdev *vdev) cmd.action_category_map[i] = 0; } + pmo_debug("Spectrum mgmt action id drop bitmap: 0x%x", + cmd.action_per_category[PMO_MAC_ACTION_SPECTRUM_MGMT]); + /* config action frame patterns */ status = pmo_tgt_send_action_frame_pattern_req(vdev, &cmd); if (status != QDF_STATUS_SUCCESS) diff --git a/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h index 46d7048b5d..fc9cb8fce8 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h @@ -60,6 +60,8 @@ #define PMO_MAC_ACTION_VHT 21 #define PMO_MAC_ACTION_MAX 256 +#define PMO_MAC_ACTION_MEASURE_REQUEST_ID 0 +#define PMO_MAC_ACTION_TPC_REQUEST_ID 2 /* * ALLOWED_ACTION_FRAMES_BITMAP * @@ -112,6 +114,30 @@ #define ALLOWED_ACTION_FRAME_MAP_WORDS (PMO_MAC_ACTION_MAX / 32) +#ifndef ANI_SUPPORT_11H +/* + * DROP_SPEC_MGMT_ACTION_FRAME_BITMAP + * + * Bitmask is based on the below. The frames with 1's + * set to their corresponding bit can be dropped in FW. + * + * ----------------------------------+-----+------+ + * Type | Bit | Drop | + * ----------------------------------+-----+------+ + * SIR_MAC_ACTION_MEASURE_REQUEST_ID 0 1 + * SIR_MAC_ACTION_TPC_REQUEST_ID 1 1 + * ----------------------------------+-----+------+ + */ +#define DROP_SPEC_MGMT_ACTION_FRAME_BITMAP \ + ((1 << PMO_MAC_ACTION_MEASURE_REQUEST_ID) |\ + (1 << PMO_MAC_ACTION_TPC_REQUEST_ID)) +#else +/* + * If 11H support is defined, dont drop the above action category of + * spectrum mgmt action frames as host driver is processing them. + */ +#define DROP_SPEC_MGMT_ACTION_FRAME_BITMAP 0 +#endif /* ANI_SUPPORT_11H */ #define PMO_SUPPORTED_ACTION_CATE 256 #define PMO_SUPPORTED_ACTION_CATE_ELE_LIST (PMO_SUPPORTED_ACTION_CATE/32) @@ -122,11 +148,13 @@ * @operation: 0 reset to fw default, 1 set the bits, * 2 add the setting bits, 3 delete the setting bits * @action_category_map: bit mapping. + * @action_per_category: bitmap per action category */ struct pmo_action_wakeup_set_params { uint32_t vdev_id; uint32_t operation; uint32_t action_category_map[PMO_SUPPORTED_ACTION_CATE_ELE_LIST]; + uint32_t action_per_category[PMO_SUPPORTED_ACTION_CATE]; }; /**