diff --git a/components/ipa/core/inc/wlan_ipa_core.h b/components/ipa/core/inc/wlan_ipa_core.h index bdadd61f92db..de2ad4d49ca2 100644 --- a/components/ipa/core/inc/wlan_ipa_core.h +++ b/components/ipa/core/inc/wlan_ipa_core.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020 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 @@ -579,14 +579,20 @@ void wlan_ipa_set_dfs_cac_tx(struct wlan_ipa_priv *ipa_ctx, bool tx_block) /** * wlan_ipa_set_ap_ibss_fwd() - Set AP intra bss forward * @ipa_ctx: IPA context - * @intra_bss: enable or disable ap intra bss forward + * @session_id: vdev id + * @intra_bss: 1 to disable ap intra bss forward and 0 to enable ap intra bss + * forward * * Return: void */ static inline -void wlan_ipa_set_ap_ibss_fwd(struct wlan_ipa_priv *ipa_ctx, bool intra_bss) +void wlan_ipa_set_ap_ibss_fwd(struct wlan_ipa_priv *ipa_ctx, uint8_t session_id, + bool intra_bss) { - ipa_ctx->ap_intrabss_fwd = intra_bss; + if (session_id >= WLAN_IPA_MAX_SESSION) + return; + + ipa_ctx->disable_intrabss_fwd[session_id] = intra_bss; } /** diff --git a/components/ipa/core/inc/wlan_ipa_main.h b/components/ipa/core/inc/wlan_ipa_main.h index d7a7e1ab28a7..60c51e204b33 100644 --- a/components/ipa/core/inc/wlan_ipa_main.h +++ b/components/ipa/core/inc/wlan_ipa_main.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -277,11 +277,13 @@ void ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block); /** * ipa_set_ap_ibss_fwd() - Set AP intra bss forward * @pdev: pdev obj + * @session_id: vdev id * @intra_bss: enable or disable ap intra bss forward * * Return: void */ -void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss); +void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id, + bool intra_bss); /** * ipa_uc_force_pipe_shutdown() - Force IPA pipe shutdown diff --git a/components/ipa/core/inc/wlan_ipa_priv.h b/components/ipa/core/inc/wlan_ipa_priv.h index 6ed75ede8e07..ebfc6f9e3954 100644 --- a/components/ipa/core/inc/wlan_ipa_priv.h +++ b/components/ipa/core/inc/wlan_ipa_priv.h @@ -670,7 +670,7 @@ struct wlan_ipa_priv { bool vdev_offload_enabled[WLAN_IPA_MAX_SESSION]; bool mcc_mode; qdf_work_t mcc_work; - bool ap_intrabss_fwd; + bool disable_intrabss_fwd[WLAN_IPA_MAX_SESSION]; bool dfs_cac_block_tx; #ifdef FEATURE_METERING struct ipa_uc_sharing_stats ipa_sharing_stats; diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 4b1e12f6749b..0a73a14ddd21 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -1033,7 +1033,7 @@ static void __wlan_ipa_w2i_cb(void *priv, qdf_ipa_dp_evt_type_t evt, /* Disable to forward Intra-BSS Rx packets when * ap_isolate=1 in hostapd.conf */ - if (!ipa_ctx->ap_intrabss_fwd) { + if (!ipa_ctx->disable_intrabss_fwd[session_id]) { /* * When INTRA_BSS_FWD_OFFLOAD is enabled, FW will send * all Rx packets to IPA uC, which need to be forwarded @@ -1049,7 +1049,8 @@ static void __wlan_ipa_w2i_cb(void *priv, qdf_ipa_dp_evt_type_t evt, skb)) break; } else { - ipa_debug_rl("Intra-BSS forwarding is disabled"); + ipa_debug_rl("Intra-BSS fwd disabled for session_id %u", + session_id); } wlan_ipa_send_skb_to_network(skb, iface_context); @@ -3488,6 +3489,7 @@ QDF_STATUS wlan_ipa_uc_ol_init(struct wlan_ipa_priv *ipa_ctx, for (i = 0; i < WLAN_IPA_MAX_SESSION; i++) { ipa_ctx->vdev_to_iface[i] = WLAN_IPA_MAX_SESSION; ipa_ctx->vdev_offload_enabled[i] = false; + ipa_ctx->disable_intrabss_fwd[i] = false; } if (cdp_ipa_get_resource(ipa_ctx->dp_soc, ipa_ctx->dp_pdev_id)) { diff --git a/components/ipa/core/src/wlan_ipa_main.c b/components/ipa/core/src/wlan_ipa_main.c index e00c7fb5c4b3..f7f1d40696e7 100644 --- a/components/ipa/core/src/wlan_ipa_main.c +++ b/components/ipa/core/src/wlan_ipa_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -355,7 +355,8 @@ void ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block) return wlan_ipa_set_dfs_cac_tx(ipa_obj, tx_block); } -void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss) +void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id, + bool intra_bss) { struct wlan_ipa_priv *ipa_obj; @@ -370,7 +371,7 @@ void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss) return; } - return wlan_ipa_set_ap_ibss_fwd(ipa_obj, intra_bss); + return wlan_ipa_set_ap_ibss_fwd(ipa_obj, session_id, intra_bss); } void ipa_uc_force_pipe_shutdown(struct wlan_objmgr_pdev *pdev) diff --git a/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h b/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h index 9637e0efe448..87848203a0b1 100644 --- a/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h +++ b/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -184,11 +184,13 @@ void ucfg_ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block); /** * ucfg_ipa_set_ap_ibss_fwd() - Set AP intra bss forward * @pdev: pdev obj + * @session_id: vdev id * @intra_bss: enable or disable ap intra bss forward * * Return: void */ -void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss); +void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id, + bool intra_bss); /** * ucfg_ipa_uc_force_pipe_shutdown() - Force shutdown IPA pipe @@ -470,7 +472,8 @@ void ucfg_ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block) } static inline -void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss) +void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id, + bool intra_bss) { } diff --git a/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c b/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c index cee89bd8ee16..e419d53bb0df 100644 --- a/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c +++ b/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -112,9 +112,10 @@ void ucfg_ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block) return ipa_set_dfs_cac_tx(pdev, tx_block); } -void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, bool intra_bss) +void ucfg_ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id, + bool intra_bss) { - return ipa_set_ap_ibss_fwd(pdev, intra_bss); + return ipa_set_ap_ibss_fwd(pdev, session_id, intra_bss); } void ucfg_ipa_uc_force_pipe_shutdown(struct wlan_objmgr_pdev *pdev) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index abee82e1c960..f1671e602839 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -16041,6 +16041,7 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy, ret = -EINVAL; ucfg_ipa_set_ap_ibss_fwd(hdd_ctx->pdev, + adapter->vdev_id, adapter->session.ap. disable_intrabss_fwd); }