Loading Kbuild +33 −2 Original line number Diff line number Diff line Loading @@ -293,6 +293,10 @@ ifeq ($(CONFIG_WLAN_HANG_EVENT), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_hang_event.o endif ifeq ($(CONFIG_FEATURE_GPIO_CFG),y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_gpio.o endif ###### OSIF_SYNC ######## SYNC_DIR := os_if/sync SYNC_INC_DIR := $(SYNC_DIR)/inc Loading Loading @@ -720,7 +724,8 @@ OS_IF_DIR := $(WLAN_COMMON_ROOT)/os_if OS_IF_INC += -I$(WLAN_COMMON_INC)/os_if/linux \ -I$(WLAN_COMMON_INC)/os_if/linux/scan/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/spectral/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/crypto/inc -I$(WLAN_COMMON_INC)/os_if/linux/crypto/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/gpio/inc OS_IF_OBJ += $(OS_IF_DIR)/linux/wlan_osif_request_manager.o \ $(OS_IF_DIR)/linux/crypto/src/wlan_nl_to_crypto_params.o Loading Loading @@ -811,6 +816,24 @@ WLAN_CFR_OBJS := $(WLAN_CFR_CORE_DIR)/cfr_common.o \ $(WLAN_COMMON_ROOT)/target_if/cfr/src/target_if_cfr_6018.o \ $(WLAN_COMMON_ROOT)/target_if/cfr/src/target_if_cfr_6490.o endif ############# GPIO_CFG ############ UMAC_GPIO_DIR := gpio UMAC_GPIO_DISP_INC_DIR := $(UMAC_GPIO_DIR)/dispatcher/inc UMAC_GPIO_CORE_INC_DIR := $(UMAC_GPIO_DIR)/core/inc UMAC_GPIO_CORE_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GPIO_DIR)/core/src UMAC_GPIO_DISP_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GPIO_DIR)/dispatcher/src UMAC_TARGET_GPIO_INC := -I$(WLAN_COMMON_INC)/target_if/gpio UMAC_GPIO_INC := -I$(WLAN_COMMON_INC)/$(UMAC_GPIO_DISP_INC_DIR) \ -I$(WLAN_COMMON_INC)/$(UMAC_GPIO_CORE_INC_DIR) \ -I$(WLAN_COMMON_INC)/$(UMAC_TARGET_GPIO_INC) ifeq ($(CONFIG_FEATURE_GPIO_CFG),y) UMAC_GPIO_OBJS := $(UMAC_GPIO_DISP_DIR)/wlan_gpio_tgt_api.o \ $(UMAC_GPIO_DISP_DIR)/wlan_gpio_ucfg_api.o \ $(UMAC_GPIO_CORE_DIR)/wlan_gpio_api.o \ $(WLAN_COMMON_ROOT)/os_if/linux/gpio/src/wlan_cfg80211_gpio.o \ $(WLAN_COMMON_ROOT)/target_if/gpio/target_if_gpio.o endif ############# UMAC_GREEN_AP ############ UMAC_GREEN_AP_DIR := umac/green_ap UMAC_GREEN_AP_DISP_INC_DIR := $(UMAC_GREEN_AP_DIR)/dispatcher/inc Loading Loading @@ -1384,6 +1407,11 @@ ifeq ($(CONFIG_WLAN_HANG_EVENT), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_hang_event.o endif ifeq ($(CONFIG_FEATURE_GPIO_CFG), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_gpio_api.o WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_gpio_tlv.o endif ########### FWLOG ########### FWLOG_DIR := $(WLAN_COMMON_ROOT)/utils/fwlog Loading Loading @@ -2128,6 +2156,8 @@ INCS += $(UMAC_COMMON_INC) INCS += $(UMAC_SPECTRAL_INC) INCS += $(WLAN_CFR_INC) INCS += $(UMAC_TARGET_SPECTRAL_INC) INCS += $(UMAC_GPIO_INC) INCS += $(UMAC_TARGET_GPIO_INC) INCS += $(UMAC_DBR_INC) INCS += $(UMAC_CRYPTO_INC) Loading Loading @@ -2245,7 +2275,7 @@ OBJS += $(WCFG_OBJS) OBJS += $(UMAC_SPECTRAL_OBJS) OBJS += $(UMAC_DBR_OBJS) OBJS += $(WLAN_CFR_OBJS) OBJS += $(UMAC_GPIO_OBJS) ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP), y) OBJS += $(UMAC_GREEN_AP_OBJS) endif Loading Loading @@ -2325,6 +2355,7 @@ cppflags-$(CONFIG_WLAN_FEATURE_ELNA) += -DWLAN_FEATURE_ELNA cppflags-$(CONFIG_PLD_IPCI_ICNSS_FLAG) += -DCONFIG_PLD_IPCI_ICNSS cppflags-$(CONFIG_PLD_SDIO_CNSS_FLAG) += -DCONFIG_PLD_SDIO_CNSS cppflags-$(CONFIG_FEATURE_GPIO_CFG) += -DWLAN_FEATURE_GPIO_CFG ifeq ($(CONFIG_PLD_PCIE_CNSS_FLAG), y) ifeq ($(CONFIG_PCIE_FW_SIM), y) Loading components/p2p/core/src/wlan_p2p_off_chan_tx.c +204 −53 Original line number Diff line number Diff line Loading @@ -2035,6 +2035,28 @@ delete_action_frame_cookie(qdf_list_t *cookie_list, qdf_mem_free(action_cookie); } /** * delete_all_action_frame_cookie() - Delete all the cookies to given list * @cookie_list: List of cookies * * This function deletes all the cookies from from given list. * * Return: None */ static void delete_all_action_frame_cookie(qdf_list_t *cookie_list) { qdf_list_node_t *node = NULL; p2p_debug("Delete cookie list %pK, size %d", cookie_list, qdf_list_size(cookie_list)); while (!qdf_list_empty(cookie_list)) { qdf_list_remove_front(cookie_list, &node); qdf_mem_free(node); } } /** * append_action_frame_cookie() - Append action cookie to given list * @cookie_list: List of cookies Loading Loading @@ -2182,15 +2204,14 @@ p2p_add_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, QDF_STATUS p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration) uint64_t rnd_cookie) { uint32_t i; struct action_frame_cookie *action_cookie; struct p2p_vdev_priv_obj *p2p_vdev_obj; struct wlan_objmgr_vdev *vdev; p2p_debug("random_mac:vdev %d cookie %llu duration %d", vdev_id, rnd_cookie, duration); p2p_debug("random_mac:vdev %d cookie %llu", vdev_id, rnd_cookie); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { Loading @@ -2208,6 +2229,8 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { struct action_frame_random_mac *random_mac; qdf_freq_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; random_mac = &p2p_vdev_obj->random_mac[i]; if (!random_mac->in_use) Loading @@ -2223,16 +2246,25 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, action_cookie); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); if (qdf_mc_timer_get_current_state( &random_mac->clear_timer) == QDF_TIMER_STATE_RUNNING) QDF_TIMER_STATE_RUNNING) { p2p_debug("random_mac:stop timer on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(addr)); qdf_mc_timer_stop(&random_mac->clear_timer); qdf_mc_timer_start(&random_mac->clear_timer, duration); } p2p_clear_mac_filter( wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); p2p_debug("random_mac:noref on vdev %d addr "QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(random_mac->addr)); vdev_id, QDF_MAC_ADDR_REF(addr)); } break; } Loading @@ -2242,6 +2274,93 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, return QDF_STATUS_SUCCESS; } QDF_STATUS p2p_random_mac_handle_tx_done(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration) { uint32_t i; struct action_frame_cookie *action_cookie; struct p2p_vdev_priv_obj *p2p_vdev_obj; struct wlan_objmgr_vdev *vdev; p2p_debug("random_mac:vdev %d cookie %llu duration %d", vdev_id, rnd_cookie, duration); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { p2p_debug("vdev is null"); return QDF_STATUS_E_INVAL; } p2p_vdev_obj = wlan_objmgr_vdev_get_comp_private_obj( vdev, WLAN_UMAC_COMP_P2P); if (!p2p_vdev_obj) { wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); p2p_debug("p2p vdev object is NULL"); return QDF_STATUS_E_INVAL; } qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { struct action_frame_random_mac *random_mac; qdf_freq_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; random_mac = &p2p_vdev_obj->random_mac[i]; if (!random_mac->in_use) continue; action_cookie = find_action_frame_cookie( &random_mac->cookie_list, rnd_cookie); if (!action_cookie) continue; /* If duration is zero then remove the cookie and also remove * the filter from firmware. */ if (!duration) { delete_action_frame_cookie(&random_mac->cookie_list, action_cookie); p2p_debug("random mac:clear mac addr on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(random_mac->addr)); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); p2p_clear_mac_filter( wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); } } else { /* As duration is non zero start the timer for this * duration. while the timer is running if tx cancel * comes from supplicant then cookie will be removed * and random mac filter will be removed from firmware. * same thing will happen if timer expires without tx * cancel from supplicant */ qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); if (qdf_mc_timer_get_current_state( &random_mac->clear_timer) == QDF_TIMER_STATE_RUNNING) qdf_mc_timer_stop(&random_mac->clear_timer); qdf_mc_timer_start(&random_mac->clear_timer, duration); p2p_debug("random_mac:start timer on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(addr)); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); } } qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return QDF_STATUS_SUCCESS; } void p2p_del_all_rand_mac_vdev(struct wlan_objmgr_vdev *vdev) { int32_t i; Loading Loading @@ -2644,6 +2763,47 @@ p2p_set_rand_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, return ret; } /** * p2p_mac_clear_timeout() - clear random mac filter timeout * @context: timer context * * This function will clear the mac addr rx filter in target if no * reference to it. * * Return: void */ static void p2p_mac_clear_timeout(void *context) { struct action_frame_random_mac *random_mac = context; struct p2p_vdev_priv_obj *p2p_vdev_obj; uint32_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; uint32_t vdev_id; if (!random_mac || !random_mac->p2p_vdev_obj) { p2p_err("invalid context for mac_clear timeout"); return; } p2p_vdev_obj = random_mac->p2p_vdev_obj; if (!p2p_vdev_obj || !p2p_vdev_obj->vdev) return; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); delete_all_action_frame_cookie(&random_mac->cookie_list); random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); vdev_id = wlan_vdev_get_id(p2p_vdev_obj->vdev); p2p_debug("random_mac:clear timeout vdev %d " QDF_MAC_ADDR_FMT " freq %d", vdev_id, QDF_MAC_ADDR_REF(addr), freq); p2p_clear_mac_filter(wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); } /** * p2p_request_random_mac() - request random mac mgmt tx * @soc: soc Loading @@ -2665,17 +2825,50 @@ p2p_request_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint32_t duration) { QDF_STATUS status; uint32_t i; struct wlan_objmgr_vdev *vdev; struct p2p_vdev_priv_obj *p2p_vdev_obj; status = p2p_add_random_mac(soc, vdev_id, mac, freq, rnd_cookie); if (status == QDF_STATUS_E_EXISTS) return QDF_STATUS_SUCCESS; else if (status != QDF_STATUS_SUCCESS) return status; if (!p2p_set_rand_mac(soc, vdev_id, mac, freq, rnd_cookie)) status = p2p_del_random_mac(soc, vdev_id, rnd_cookie, duration); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { p2p_debug("vdev is null"); return QDF_STATUS_E_INVAL; } p2p_vdev_obj = wlan_objmgr_vdev_get_comp_private_obj( vdev, WLAN_UMAC_COMP_P2P); if (!p2p_vdev_obj) { p2p_debug("random_mac:p2p vdev object is NULL"); wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return QDF_STATUS_E_INVAL; } if (!p2p_set_rand_mac(soc, vdev_id, mac, freq, rnd_cookie)) { p2p_debug("random mac: failed to set rand mac address"); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { if (!qdf_mem_cmp(p2p_vdev_obj->random_mac[i].addr, mac, QDF_MAC_ADDR_SIZE)) { qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); p2p_mac_clear_timeout( &p2p_vdev_obj->random_mac[i]); status = QDF_STATUS_SUCCESS; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); break; } } qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); } wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return status; } Loading Loading @@ -2714,50 +2907,8 @@ p2p_rand_mac_tx_done(struct wlan_objmgr_psoc *soc, if (!tx_ctx || !tx_ctx->rand_mac_tx || !soc) return; p2p_del_random_mac(soc, tx_ctx->vdev_id, tx_ctx->id, tx_ctx->duration); } /** * p2p_mac_clear_timeout() - clear random mac filter timeout * @context: timer context * * This function will clear the mac addr rx filter in target if no * reference to it. * * Return: void */ static void p2p_mac_clear_timeout(void *context) { struct action_frame_random_mac *random_mac = context; struct p2p_vdev_priv_obj *p2p_vdev_obj; uint32_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; uint32_t vdev_id; bool clear = false; if (!random_mac || !random_mac->p2p_vdev_obj) { p2p_err("invalid context for mac_clear timeout"); return; } p2p_vdev_obj = random_mac->p2p_vdev_obj; if (!p2p_vdev_obj || !p2p_vdev_obj->vdev) return; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; clear = true; } freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); vdev_id = wlan_vdev_get_id(p2p_vdev_obj->vdev); p2p_debug("random_mac:clear timeout vdev %d "QDF_MAC_ADDR_FMT" freq %d clr %d", vdev_id, QDF_MAC_ADDR_REF(addr), freq, clear); if (clear) p2p_clear_mac_filter(wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); p2p_random_mac_handle_tx_done(soc, tx_ctx->vdev_id, tx_ctx->id, tx_ctx->duration); } void p2p_init_random_mac_vdev(struct p2p_vdev_priv_obj *p2p_vdev_obj) Loading components/p2p/core/src/wlan_p2p_off_chan_tx.h +20 −2 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ struct tx_action_context *p2p_find_tx_ctx_by_nbuf( * @soc: soc object * @vdev_id: vdev id * @rnd_cookie: random mac mgmt tx cookie * @duration: timeout value to flush the addr in target. * * This function will del the mac addr filter from vdev random mac addr list. * If there is no reference to mac addr, it will set a clear timer to flush it Loading @@ -352,6 +351,25 @@ struct tx_action_context *p2p_find_tx_ctx_by_nbuf( */ QDF_STATUS p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie); /** * p2p_random_mac_handle_tx_done() - del mac filter from given vdev rand mac * list when mgmt tx done * @soc: soc object * @vdev_id: vdev id * @rnd_cookie: random mac mgmt tx cookie * @duration: timeout value to flush the addr in target. * * This function will del the mac addr filter from vdev random mac addr list * and also remove the filter from firmware if duration is zero else start * the timer for that duration. * * Return: QDF_STATUS_SUCCESS - del successfully. * other : failed to del the mac address entry. */ QDF_STATUS p2p_random_mac_handle_tx_done(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration); /** Loading components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c +1 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ QDF_STATUS ucfg_p2p_mgmt_tx_cancel(struct wlan_objmgr_psoc *soc, p2p_debug("invalid id for cookie 0x%llx", cookie); return QDF_STATUS_E_INVAL; } p2p_del_random_mac(soc, wlan_vdev_get_id(vdev), cookie, 20); p2p_del_random_mac(soc, wlan_vdev_get_id(vdev), cookie); cancel_tx = qdf_mem_malloc(sizeof(*cancel_tx)); if (!cancel_tx) { Loading configs/default_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -1069,5 +1069,7 @@ endif CONFIG_WLAN_HANG_EVENT := y CONFIG_FEATURE_GPIO_CFG := y #Enable VDEV Response wakelock feature CONFIG_FEATURE_VDEV_RSP_WAKELOCK := y Loading
Kbuild +33 −2 Original line number Diff line number Diff line Loading @@ -293,6 +293,10 @@ ifeq ($(CONFIG_WLAN_HANG_EVENT), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_hang_event.o endif ifeq ($(CONFIG_FEATURE_GPIO_CFG),y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_gpio.o endif ###### OSIF_SYNC ######## SYNC_DIR := os_if/sync SYNC_INC_DIR := $(SYNC_DIR)/inc Loading Loading @@ -720,7 +724,8 @@ OS_IF_DIR := $(WLAN_COMMON_ROOT)/os_if OS_IF_INC += -I$(WLAN_COMMON_INC)/os_if/linux \ -I$(WLAN_COMMON_INC)/os_if/linux/scan/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/spectral/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/crypto/inc -I$(WLAN_COMMON_INC)/os_if/linux/crypto/inc \ -I$(WLAN_COMMON_INC)/os_if/linux/gpio/inc OS_IF_OBJ += $(OS_IF_DIR)/linux/wlan_osif_request_manager.o \ $(OS_IF_DIR)/linux/crypto/src/wlan_nl_to_crypto_params.o Loading Loading @@ -811,6 +816,24 @@ WLAN_CFR_OBJS := $(WLAN_CFR_CORE_DIR)/cfr_common.o \ $(WLAN_COMMON_ROOT)/target_if/cfr/src/target_if_cfr_6018.o \ $(WLAN_COMMON_ROOT)/target_if/cfr/src/target_if_cfr_6490.o endif ############# GPIO_CFG ############ UMAC_GPIO_DIR := gpio UMAC_GPIO_DISP_INC_DIR := $(UMAC_GPIO_DIR)/dispatcher/inc UMAC_GPIO_CORE_INC_DIR := $(UMAC_GPIO_DIR)/core/inc UMAC_GPIO_CORE_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GPIO_DIR)/core/src UMAC_GPIO_DISP_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GPIO_DIR)/dispatcher/src UMAC_TARGET_GPIO_INC := -I$(WLAN_COMMON_INC)/target_if/gpio UMAC_GPIO_INC := -I$(WLAN_COMMON_INC)/$(UMAC_GPIO_DISP_INC_DIR) \ -I$(WLAN_COMMON_INC)/$(UMAC_GPIO_CORE_INC_DIR) \ -I$(WLAN_COMMON_INC)/$(UMAC_TARGET_GPIO_INC) ifeq ($(CONFIG_FEATURE_GPIO_CFG),y) UMAC_GPIO_OBJS := $(UMAC_GPIO_DISP_DIR)/wlan_gpio_tgt_api.o \ $(UMAC_GPIO_DISP_DIR)/wlan_gpio_ucfg_api.o \ $(UMAC_GPIO_CORE_DIR)/wlan_gpio_api.o \ $(WLAN_COMMON_ROOT)/os_if/linux/gpio/src/wlan_cfg80211_gpio.o \ $(WLAN_COMMON_ROOT)/target_if/gpio/target_if_gpio.o endif ############# UMAC_GREEN_AP ############ UMAC_GREEN_AP_DIR := umac/green_ap UMAC_GREEN_AP_DISP_INC_DIR := $(UMAC_GREEN_AP_DIR)/dispatcher/inc Loading Loading @@ -1384,6 +1407,11 @@ ifeq ($(CONFIG_WLAN_HANG_EVENT), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_hang_event.o endif ifeq ($(CONFIG_FEATURE_GPIO_CFG), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_gpio_api.o WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_gpio_tlv.o endif ########### FWLOG ########### FWLOG_DIR := $(WLAN_COMMON_ROOT)/utils/fwlog Loading Loading @@ -2128,6 +2156,8 @@ INCS += $(UMAC_COMMON_INC) INCS += $(UMAC_SPECTRAL_INC) INCS += $(WLAN_CFR_INC) INCS += $(UMAC_TARGET_SPECTRAL_INC) INCS += $(UMAC_GPIO_INC) INCS += $(UMAC_TARGET_GPIO_INC) INCS += $(UMAC_DBR_INC) INCS += $(UMAC_CRYPTO_INC) Loading Loading @@ -2245,7 +2275,7 @@ OBJS += $(WCFG_OBJS) OBJS += $(UMAC_SPECTRAL_OBJS) OBJS += $(UMAC_DBR_OBJS) OBJS += $(WLAN_CFR_OBJS) OBJS += $(UMAC_GPIO_OBJS) ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP), y) OBJS += $(UMAC_GREEN_AP_OBJS) endif Loading Loading @@ -2325,6 +2355,7 @@ cppflags-$(CONFIG_WLAN_FEATURE_ELNA) += -DWLAN_FEATURE_ELNA cppflags-$(CONFIG_PLD_IPCI_ICNSS_FLAG) += -DCONFIG_PLD_IPCI_ICNSS cppflags-$(CONFIG_PLD_SDIO_CNSS_FLAG) += -DCONFIG_PLD_SDIO_CNSS cppflags-$(CONFIG_FEATURE_GPIO_CFG) += -DWLAN_FEATURE_GPIO_CFG ifeq ($(CONFIG_PLD_PCIE_CNSS_FLAG), y) ifeq ($(CONFIG_PCIE_FW_SIM), y) Loading
components/p2p/core/src/wlan_p2p_off_chan_tx.c +204 −53 Original line number Diff line number Diff line Loading @@ -2035,6 +2035,28 @@ delete_action_frame_cookie(qdf_list_t *cookie_list, qdf_mem_free(action_cookie); } /** * delete_all_action_frame_cookie() - Delete all the cookies to given list * @cookie_list: List of cookies * * This function deletes all the cookies from from given list. * * Return: None */ static void delete_all_action_frame_cookie(qdf_list_t *cookie_list) { qdf_list_node_t *node = NULL; p2p_debug("Delete cookie list %pK, size %d", cookie_list, qdf_list_size(cookie_list)); while (!qdf_list_empty(cookie_list)) { qdf_list_remove_front(cookie_list, &node); qdf_mem_free(node); } } /** * append_action_frame_cookie() - Append action cookie to given list * @cookie_list: List of cookies Loading Loading @@ -2182,15 +2204,14 @@ p2p_add_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, QDF_STATUS p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration) uint64_t rnd_cookie) { uint32_t i; struct action_frame_cookie *action_cookie; struct p2p_vdev_priv_obj *p2p_vdev_obj; struct wlan_objmgr_vdev *vdev; p2p_debug("random_mac:vdev %d cookie %llu duration %d", vdev_id, rnd_cookie, duration); p2p_debug("random_mac:vdev %d cookie %llu", vdev_id, rnd_cookie); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { Loading @@ -2208,6 +2229,8 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { struct action_frame_random_mac *random_mac; qdf_freq_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; random_mac = &p2p_vdev_obj->random_mac[i]; if (!random_mac->in_use) Loading @@ -2223,16 +2246,25 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, action_cookie); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); if (qdf_mc_timer_get_current_state( &random_mac->clear_timer) == QDF_TIMER_STATE_RUNNING) QDF_TIMER_STATE_RUNNING) { p2p_debug("random_mac:stop timer on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(addr)); qdf_mc_timer_stop(&random_mac->clear_timer); qdf_mc_timer_start(&random_mac->clear_timer, duration); } p2p_clear_mac_filter( wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); p2p_debug("random_mac:noref on vdev %d addr "QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(random_mac->addr)); vdev_id, QDF_MAC_ADDR_REF(addr)); } break; } Loading @@ -2242,6 +2274,93 @@ p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, return QDF_STATUS_SUCCESS; } QDF_STATUS p2p_random_mac_handle_tx_done(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration) { uint32_t i; struct action_frame_cookie *action_cookie; struct p2p_vdev_priv_obj *p2p_vdev_obj; struct wlan_objmgr_vdev *vdev; p2p_debug("random_mac:vdev %d cookie %llu duration %d", vdev_id, rnd_cookie, duration); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { p2p_debug("vdev is null"); return QDF_STATUS_E_INVAL; } p2p_vdev_obj = wlan_objmgr_vdev_get_comp_private_obj( vdev, WLAN_UMAC_COMP_P2P); if (!p2p_vdev_obj) { wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); p2p_debug("p2p vdev object is NULL"); return QDF_STATUS_E_INVAL; } qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { struct action_frame_random_mac *random_mac; qdf_freq_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; random_mac = &p2p_vdev_obj->random_mac[i]; if (!random_mac->in_use) continue; action_cookie = find_action_frame_cookie( &random_mac->cookie_list, rnd_cookie); if (!action_cookie) continue; /* If duration is zero then remove the cookie and also remove * the filter from firmware. */ if (!duration) { delete_action_frame_cookie(&random_mac->cookie_list, action_cookie); p2p_debug("random mac:clear mac addr on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(random_mac->addr)); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); p2p_clear_mac_filter( wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); } } else { /* As duration is non zero start the timer for this * duration. while the timer is running if tx cancel * comes from supplicant then cookie will be removed * and random mac filter will be removed from firmware. * same thing will happen if timer expires without tx * cancel from supplicant */ qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); if (qdf_mc_timer_get_current_state( &random_mac->clear_timer) == QDF_TIMER_STATE_RUNNING) qdf_mc_timer_stop(&random_mac->clear_timer); qdf_mc_timer_start(&random_mac->clear_timer, duration); p2p_debug("random_mac:start timer on vdev %d addr " QDF_MAC_ADDR_FMT, vdev_id, QDF_MAC_ADDR_REF(addr)); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); } } qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return QDF_STATUS_SUCCESS; } void p2p_del_all_rand_mac_vdev(struct wlan_objmgr_vdev *vdev) { int32_t i; Loading Loading @@ -2644,6 +2763,47 @@ p2p_set_rand_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, return ret; } /** * p2p_mac_clear_timeout() - clear random mac filter timeout * @context: timer context * * This function will clear the mac addr rx filter in target if no * reference to it. * * Return: void */ static void p2p_mac_clear_timeout(void *context) { struct action_frame_random_mac *random_mac = context; struct p2p_vdev_priv_obj *p2p_vdev_obj; uint32_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; uint32_t vdev_id; if (!random_mac || !random_mac->p2p_vdev_obj) { p2p_err("invalid context for mac_clear timeout"); return; } p2p_vdev_obj = random_mac->p2p_vdev_obj; if (!p2p_vdev_obj || !p2p_vdev_obj->vdev) return; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); delete_all_action_frame_cookie(&random_mac->cookie_list); random_mac->in_use = false; freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); vdev_id = wlan_vdev_get_id(p2p_vdev_obj->vdev); p2p_debug("random_mac:clear timeout vdev %d " QDF_MAC_ADDR_FMT " freq %d", vdev_id, QDF_MAC_ADDR_REF(addr), freq); p2p_clear_mac_filter(wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); } /** * p2p_request_random_mac() - request random mac mgmt tx * @soc: soc Loading @@ -2665,17 +2825,50 @@ p2p_request_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint32_t duration) { QDF_STATUS status; uint32_t i; struct wlan_objmgr_vdev *vdev; struct p2p_vdev_priv_obj *p2p_vdev_obj; status = p2p_add_random_mac(soc, vdev_id, mac, freq, rnd_cookie); if (status == QDF_STATUS_E_EXISTS) return QDF_STATUS_SUCCESS; else if (status != QDF_STATUS_SUCCESS) return status; if (!p2p_set_rand_mac(soc, vdev_id, mac, freq, rnd_cookie)) status = p2p_del_random_mac(soc, vdev_id, rnd_cookie, duration); vdev = wlan_objmgr_get_vdev_by_id_from_psoc(soc, vdev_id, WLAN_P2P_ID); if (!vdev) { p2p_debug("vdev is null"); return QDF_STATUS_E_INVAL; } p2p_vdev_obj = wlan_objmgr_vdev_get_comp_private_obj( vdev, WLAN_UMAC_COMP_P2P); if (!p2p_vdev_obj) { p2p_debug("random_mac:p2p vdev object is NULL"); wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return QDF_STATUS_E_INVAL; } if (!p2p_set_rand_mac(soc, vdev_id, mac, freq, rnd_cookie)) { p2p_debug("random mac: failed to set rand mac address"); qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); for (i = 0; i < MAX_RANDOM_MAC_ADDRS; i++) { if (!qdf_mem_cmp(p2p_vdev_obj->random_mac[i].addr, mac, QDF_MAC_ADDR_SIZE)) { qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); p2p_mac_clear_timeout( &p2p_vdev_obj->random_mac[i]); status = QDF_STATUS_SUCCESS; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); break; } } qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); } wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID); return status; } Loading Loading @@ -2714,50 +2907,8 @@ p2p_rand_mac_tx_done(struct wlan_objmgr_psoc *soc, if (!tx_ctx || !tx_ctx->rand_mac_tx || !soc) return; p2p_del_random_mac(soc, tx_ctx->vdev_id, tx_ctx->id, tx_ctx->duration); } /** * p2p_mac_clear_timeout() - clear random mac filter timeout * @context: timer context * * This function will clear the mac addr rx filter in target if no * reference to it. * * Return: void */ static void p2p_mac_clear_timeout(void *context) { struct action_frame_random_mac *random_mac = context; struct p2p_vdev_priv_obj *p2p_vdev_obj; uint32_t freq; uint8_t addr[QDF_MAC_ADDR_SIZE]; uint32_t vdev_id; bool clear = false; if (!random_mac || !random_mac->p2p_vdev_obj) { p2p_err("invalid context for mac_clear timeout"); return; } p2p_vdev_obj = random_mac->p2p_vdev_obj; if (!p2p_vdev_obj || !p2p_vdev_obj->vdev) return; qdf_spin_lock(&p2p_vdev_obj->random_mac_lock); if (qdf_list_empty(&random_mac->cookie_list)) { random_mac->in_use = false; clear = true; } freq = random_mac->freq; qdf_mem_copy(addr, random_mac->addr, QDF_MAC_ADDR_SIZE); qdf_spin_unlock(&p2p_vdev_obj->random_mac_lock); vdev_id = wlan_vdev_get_id(p2p_vdev_obj->vdev); p2p_debug("random_mac:clear timeout vdev %d "QDF_MAC_ADDR_FMT" freq %d clr %d", vdev_id, QDF_MAC_ADDR_REF(addr), freq, clear); if (clear) p2p_clear_mac_filter(wlan_vdev_get_psoc(p2p_vdev_obj->vdev), vdev_id, addr, freq); p2p_random_mac_handle_tx_done(soc, tx_ctx->vdev_id, tx_ctx->id, tx_ctx->duration); } void p2p_init_random_mac_vdev(struct p2p_vdev_priv_obj *p2p_vdev_obj) Loading
components/p2p/core/src/wlan_p2p_off_chan_tx.h +20 −2 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ struct tx_action_context *p2p_find_tx_ctx_by_nbuf( * @soc: soc object * @vdev_id: vdev id * @rnd_cookie: random mac mgmt tx cookie * @duration: timeout value to flush the addr in target. * * This function will del the mac addr filter from vdev random mac addr list. * If there is no reference to mac addr, it will set a clear timer to flush it Loading @@ -352,6 +351,25 @@ struct tx_action_context *p2p_find_tx_ctx_by_nbuf( */ QDF_STATUS p2p_del_random_mac(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie); /** * p2p_random_mac_handle_tx_done() - del mac filter from given vdev rand mac * list when mgmt tx done * @soc: soc object * @vdev_id: vdev id * @rnd_cookie: random mac mgmt tx cookie * @duration: timeout value to flush the addr in target. * * This function will del the mac addr filter from vdev random mac addr list * and also remove the filter from firmware if duration is zero else start * the timer for that duration. * * Return: QDF_STATUS_SUCCESS - del successfully. * other : failed to del the mac address entry. */ QDF_STATUS p2p_random_mac_handle_tx_done(struct wlan_objmgr_psoc *soc, uint32_t vdev_id, uint64_t rnd_cookie, uint32_t duration); /** Loading
components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c +1 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ QDF_STATUS ucfg_p2p_mgmt_tx_cancel(struct wlan_objmgr_psoc *soc, p2p_debug("invalid id for cookie 0x%llx", cookie); return QDF_STATUS_E_INVAL; } p2p_del_random_mac(soc, wlan_vdev_get_id(vdev), cookie, 20); p2p_del_random_mac(soc, wlan_vdev_get_id(vdev), cookie); cancel_tx = qdf_mem_malloc(sizeof(*cancel_tx)); if (!cancel_tx) { Loading
configs/default_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -1069,5 +1069,7 @@ endif CONFIG_WLAN_HANG_EVENT := y CONFIG_FEATURE_GPIO_CFG := y #Enable VDEV Response wakelock feature CONFIG_FEATURE_VDEV_RSP_WAKELOCK := y