diff options
| author | Paul Zhang <paulz@codeaurora.org> | 2016-12-28 18:32:25 +0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-12-29 13:23:38 -0800 |
| commit | 2c3ad3072d1322f5dd04db2b5aab870bc32e26a9 (patch) | |
| tree | 6088f2a58ddaa12c1fce8cf5fdfcaf080f690649 | |
| parent | 496eaaf4be4719bd9b1d8bab2bb0b793aa90a1b5 (diff) | |
qcacld-3.0: Drop Action frame in FW config by host
Propagation from qcacld-2.0 to qcacld-3.0.
Several Action frame categories are not processed in host and they
are not forwarded to supplicant either, but they are dropped in host.
These unprocessed action frames are forwarded to host by FW and
wake up host unnecessarily which leads to battery drain. With this fix,
host conveys FW the disallowed action frames list at HDD startup
so that the remaining frames can be dropped in FW itself thereafter
when under WoW mode.
Change-Id: I40b49d42df94085784c8f1d8321de0ee61473ae0
CRs-Fixed: 999114
| -rw-r--r-- | core/mac/inc/sir_api.h | 53 | ||||
| -rw-r--r-- | core/mac/inc/sir_mac_prot_def.h | 1 | ||||
| -rw-r--r-- | core/wma/inc/wma_api.h | 3 | ||||
| -rw-r--r-- | core/wma/src/wma_dev_if.c | 3 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 47 |
5 files changed, 107 insertions, 0 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 425a2b5ff2ce..4fdc3452b89c 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2961,6 +2961,59 @@ typedef struct { } tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd; #endif /* FEATURE_WLAN_SCAN_PNO */ +/* + * ALLOWED_ACTION_FRAMES_BITMAP + * + * Bitmask is based on the below. The frames with 0's + * set to their corresponding bit can be dropped in FW. + * + * -----------------------------+-----+-------+ + * Type | Bit | Allow | + * -----------------------------+-----+-------+ + * SIR_MAC_ACTION_SPECTRUM_MGMT 0 1 + * SIR_MAC_ACTION_QOS_MGMT 1 1 + * SIR_MAC_ACTION_DLP 2 0 + * SIR_MAC_ACTION_BLKACK 3 0 + * SIR_MAC_ACTION_PUBLIC_USAGE 4 1 + * SIR_MAC_ACTION_RRM 5 1 + * SIR_MAC_ACTION_FAST_BSS_TRNST 6 0 + * SIR_MAC_ACTION_HT 7 0 + * SIR_MAC_ACTION_SA_QUERY 8 1 + * SIR_MAC_ACTION_PROT_DUAL_PUB 9 1 + * SIR_MAC_ACTION_WNM 10 1 + * SIR_MAC_ACTION_UNPROT_WNM 11 0 + * SIR_MAC_ACTION_TDLS 12 0 + * SIR_MAC_ACITON_MESH 13 0 + * SIR_MAC_ACTION_MHF 14 0 + * SIR_MAC_SELF_PROTECTED 15 0 + * SIR_MAC_ACTION_WME 17 1 + * SIR_MAC_ACTION_FST 18 1 + * SIR_MAC_ACTION_VHT 21 1 + * ----------------------------+------+-------+ + */ +#define ALLOWED_ACTION_FRAMES_BITMAP0 \ + ((1 << SIR_MAC_ACTION_SPECTRUM_MGMT) | \ + (1 << SIR_MAC_ACTION_QOS_MGMT) | \ + (1 << SIR_MAC_ACTION_PUBLIC_USAGE) | \ + (1 << SIR_MAC_ACTION_RRM) | \ + (1 << SIR_MAC_ACTION_SA_QUERY) | \ + (1 << SIR_MAC_ACTION_PROT_DUAL_PUB) | \ + (1 << SIR_MAC_ACTION_WNM) | \ + (1 << SIR_MAC_ACTION_WME) | \ + (1 << SIR_MAC_ACTION_FST) | \ + (1 << SIR_MAC_ACTION_VHT)) + +#define ALLOWED_ACTION_FRAMES_BITMAP1 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP2 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP3 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP4 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP5 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP6 0x0 +#define ALLOWED_ACTION_FRAMES_BITMAP7 0x0 + +#define ALLOWED_ACTION_FRAME_MAP_WORDS (SIR_MAC_ACTION_MAX / 32) + + #ifdef WLAN_FEATURE_ROAM_OFFLOAD typedef struct { uint8_t acvo_uapsd:1; diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h index 2d5bc2b8d57b..81bffdc04d19 100644 --- a/core/mac/inc/sir_mac_prot_def.h +++ b/core/mac/inc/sir_mac_prot_def.h @@ -144,6 +144,7 @@ #define SIR_MAC_ACTION_WME 17 #define SIR_MAC_ACTION_FST 18 #define SIR_MAC_ACTION_VHT 21 +#define SIR_MAC_ACTION_MAX 256 #define SIR_MAC_ACTION_TX 1 #define SIR_MAC_ACTION_RX 2 diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index d2fb3fa13cd2..ae234638ca63 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -172,6 +172,9 @@ void wma_enable_disable_wakeup_event(WMA_HANDLE handle, void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id, uint8_t vdev_type, uint8_t sub_type); void wma_register_wow_default_patterns(WMA_HANDLE handle, uint8_t vdev_id); +QDF_STATUS wma_register_action_frame_patterns(WMA_HANDLE handle, + uint8_t vdev_id); + int8_t wma_get_hw_mode_idx_from_dbs_hw_list(enum hw_mode_ss_config mac0_ss, enum hw_mode_bandwidth mac0_bw, enum hw_mode_ss_config mac1_ss, diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 38d6ac431cf0..790c1ec61e8e 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1797,6 +1797,9 @@ ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle, wma_register_wow_wakeup_events(wma_handle, self_sta_req->session_id, self_sta_req->type, self_sta_req->sub_type); + + wma_register_action_frame_patterns(wma_handle, + self_sta_req->session_id); wma_register_wow_default_patterns(wma_handle, self_sta_req->session_id); end: diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 37c9791044dc..98dd4fbfef53 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -3686,6 +3686,53 @@ static QDF_STATUS wma_configure_ssdp(tp_wma_handle wma, uint8_t vdev_id) } /** + * wma_register_action_frame_patterns() - register action frame map to fw + * @handle: Pointer to wma handle + * @vdev_id: VDEV ID + * + * This is called to push action frames wow patterns from local + * cache to firmware. + * + * Return: QDF_STATUS + */ +QDF_STATUS wma_register_action_frame_patterns(WMA_HANDLE handle, + uint8_t vdev_id) +{ + tp_wma_handle wma = handle; + struct action_wakeup_set_param cmd = {0}; + int32_t err; + int i = 0; + + cmd.vdev_id = vdev_id; + cmd.operation = WOW_ACTION_WAKEUP_OPERATION_SET; + + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP0; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP1; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP2; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP3; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP4; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP5; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP6; + cmd.action_category_map[i++] = ALLOWED_ACTION_FRAMES_BITMAP7; + + for (i = 0; i < WMI_SUPPORTED_ACTION_CATEGORY_ELE_LIST; i++) { + if (i < ALLOWED_ACTION_FRAME_MAP_WORDS) + WMA_LOGD("%s: %d action Wakeup pattern 0x%x in fw", + __func__, i, cmd.action_category_map[i]); + else + cmd.action_category_map[i] = 0; + } + + err = wmi_unified_action_frame_patterns_cmd(wma->wmi_handle, &cmd); + if (err) { + WMA_LOGE("Failed to config wow action frame map, ret %d", err); + return QDF_STATUS_E_FAILURE; + } + + return QDF_STATUS_SUCCESS; +} + +/** * wma_wow_sta() - set WOW patterns in sta mode * @wma: wma handle * @vdev_id: vdev id |
