From 145d393444d7b1833c3038f11abb9a056f15e7cd Mon Sep 17 00:00:00 2001 From: Bharat Bhushan Chakravarty Date: Mon, 20 Mar 2017 12:52:16 -0700 Subject: [PATCH] qcacmn: SON convergence 1) Defined modularized public api for cdp module to track inactivity and over load detection. 2) Initialization calls are added to attach and detach SON specific api. 3) operating system specific calls are replaced with qdf calls. Change-Id: I130d1e99208d6454f5d9888774534cc6d619ad83 --- dp/inc/cdp_txrx_ctrl.h | 15 ++ dp/inc/cdp_txrx_host_stats.h | 2 +- dp/wifi3.0/dp_main.c | 21 +- dp/wifi3.0/dp_peer.c | 8 - dp/wifi3.0/dp_types.h | 22 +- .../dispatcher/src/dispatcher_init_deinit.c | 60 ++++- qdf/inc/qdf_types.h | 1 + target_if/core/src/target_if_main.c | 20 +- target_if/son/inc/target_if_son.h | 63 +++++ target_if/son/src/target_if_son.c | 236 ++++++++++++++++++ .../cmn_defs/inc/wlan_cmn_ieee80211.h | 4 +- umac/cmn_services/inc/wlan_cmn.h | 1 + .../obj_mgr/inc/wlan_objmgr_cmn.h | 4 + .../obj_mgr/inc/wlan_objmgr_vdev_obj.h | 4 + .../lmac_if/inc/wlan_lmac_if_def.h | 7 +- .../scan/dispatcher/src/wlan_scan_utils_api.c | 4 +- 16 files changed, 446 insertions(+), 26 deletions(-) create mode 100644 target_if/son/inc/target_if_son.h create mode 100644 target_if/son/src/target_if_son.c diff --git a/dp/inc/cdp_txrx_ctrl.h b/dp/inc/cdp_txrx_ctrl.h index 33ecc86d34..21ba430719 100644 --- a/dp/inc/cdp_txrx_ctrl.h +++ b/dp/inc/cdp_txrx_ctrl.h @@ -250,10 +250,14 @@ cdp_set_inact_params(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int16_t inact_normal, u_int16_t inact_overload) { + if (!soc || !pdev) + return false; + if (soc->ops->ctrl_ops->txrx_set_inact_params) return soc->ops->ctrl_ops->txrx_set_inact_params (pdev, inact_check_interval, inact_normal, inact_overload); + return false; } static inline bool @@ -261,6 +265,9 @@ cdp_start_inact_timer(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, bool enable) { + if (!soc || !pdev) + return false; + if (soc->ops->ctrl_ops->txrx_start_inact_timer) return soc->ops->ctrl_ops->txrx_start_inact_timer (pdev, enable); @@ -280,8 +287,12 @@ static inline void cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, bool overload) { + if (!soc || !pdev) + return; + if (soc->ops->ctrl_ops->txrx_set_overload) return soc->ops->ctrl_ops->txrx_set_overload(pdev, overload); + return; } @@ -294,8 +305,12 @@ cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, static inline bool cdp_peer_is_inact(ol_txrx_soc_handle soc, void *peer) { + if (!soc || !peer) + return false; + if (soc->ops->ctrl_ops->txrx_peer_is_inact) return soc->ops->ctrl_ops->txrx_peer_is_inact(peer); + return false; } diff --git a/dp/inc/cdp_txrx_host_stats.h b/dp/inc/cdp_txrx_host_stats.h index cccc9debea..43761285b4 100644 --- a/dp/inc/cdp_txrx_host_stats.h +++ b/dp/inc/cdp_txrx_host_stats.h @@ -224,7 +224,7 @@ cdp_reset_lro_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev) * @return - pointer to received stat payload */ -#if ATH_BAND_STEERING || ENHANCED_STATS +#if defined(QCA_SUPPORT_SON) || defined(ENHANCED_STATS) uint32_t *ol_txrx_get_en_stats_base(ol_txrx_pdev_handle txrx_pdev, uint32_t *msg_word, uint32_t msg_len, enum htt_cmn_t2h_en_stats_type *type, enum htt_cmn_t2h_en_stats_status *status); #endif diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index e55da923da..617a924216 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -1959,6 +1959,21 @@ dp_get_pdev_reo_dest(struct cdp_pdev *pdev_handle) return cdp_host_reo_dest_ring_unknown; } +#ifdef QCA_SUPPORT_SON +static void dp_son_peer_authorize(struct dp_peer *peer) +{ + struct dp_soc *soc; + soc = peer->vdev->pdev->soc; + peer->peer_bs_inact_flag = 0; + peer->peer_bs_inact = soc->pdev_bs_inact_reload; + return; +} +#else +static void dp_son_peer_authorize(struct dp_peer *peer) +{ + return; +} +#endif /* * dp_set_filter_neighbour_peers() - set filter neighbour peers for smart mesh * @pdev_handle: device object @@ -2057,13 +2072,9 @@ static void dp_peer_authorize(void *peer_handle, uint32_t authorize) if (peer != NULL) { soc = peer->vdev->pdev->soc; - qdf_spin_lock_bh(&soc->peer_ref_mutex); + dp_son_peer_authorize(peer); peer->authorize = authorize ? 1 : 0; -#ifdef notyet /* ATH_BAND_STEERING */ - peer->peer_bs_inact_flag = 0; - peer->peer_bs_inact = soc->pdev_bs_inact_reload; -#endif qdf_spin_unlock_bh(&soc->peer_ref_mutex); } } diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index fd2633c004..e823039f81 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -89,11 +89,6 @@ static int dp_peer_find_map_attach(struct dp_soc *soc) * that are not in use set to 0. */ qdf_mem_zero(soc->peer_id_to_obj_map, peer_map_size); -#ifdef notyet /* ATH_BAND_STEERING */ - OS_INIT_TIMER(soc->osdev, &(soc->bs_inact_timer), - dp_peer_find_inact_timeout_handler, (void *)soc, - QDF_TIMER_TYPE_WAKE_APPS); -#endif return 0; /* success */ } @@ -308,9 +303,6 @@ void dp_peer_find_hash_erase(struct dp_soc *soc) static void dp_peer_find_map_detach(struct dp_soc *soc) { -#ifdef notyet /* ATH_BAND_STEERING */ - OS_FREE_TIMER(&(soc->bs_inact_timer)); -#endif qdf_mem_free(soc->peer_id_to_obj_map); } diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 136cd1f6c5..4d6e37ca1a 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -572,14 +572,28 @@ struct dp_soc { #endif qdf_list_t reo_desc_freelist; qdf_spinlock_t reo_desc_freelist_lock; - /* Obj Mgr SoC */ struct wlan_objmgr_psoc *psoc; - qdf_nbuf_t invalid_peer_head_msdu; qdf_nbuf_t invalid_peer_tail_msdu; -}; +#ifdef QCA_SUPPORT_SON + /* The timer to check station's inactivity status */ + os_timer_t pdev_bs_inact_timer; + /* The current inactivity count reload value + based on overload condition */ + u_int16_t pdev_bs_inact_reload; + /* The inactivity timer value when not overloaded */ + u_int16_t pdev_bs_inact_normal; + + /* The inactivity timer value when overloaded */ + u_int16_t pdev_bs_inact_overload; + + /* The inactivity timer check interval */ + u_int16_t pdev_bs_inact_interval; + /* Inactivity timer */ +#endif /* QCA_SUPPORT_SON */ +}; #define MAX_RX_MAC_RINGS 2 /* Same as NAC_MAX_CLENT */ #define DP_NAC_MAX_CLIENT 24 @@ -593,7 +607,6 @@ enum dp_nac_param_cmd { /* IEEE80211_NAC_PARAM_LIST */ DP_NAC_PARAM_LIST, }; - #define DP_MAC_ADDR_LEN 6 union dp_align_mac_addr { uint8_t raw[DP_MAC_ADDR_LEN]; @@ -921,6 +934,7 @@ struct dp_peer { /* Band steering: Set when node is inactive */ uint8_t peer_bs_inact_flag:1; + u_int16_t peer_bs_inact; /* inactivity mark count */ /* NAWDS Flag and Bss Peer bit */ uint8_t nawds_enabled:1, diff --git a/init_deinit/dispatcher/src/dispatcher_init_deinit.c b/init_deinit/dispatcher/src/dispatcher_init_deinit.c index 1c645f10ed..cfd32cf6a3 100644 --- a/init_deinit/dispatcher/src/dispatcher_init_deinit.c +++ b/init_deinit/dispatcher/src/dispatcher_init_deinit.c @@ -33,6 +33,9 @@ #ifdef WLAN_ATF_ENABLE #include #endif +#ifdef QCA_SUPPORT_SON +#include +#endif #ifdef WIFI_POS_CONVERGED #include "wifi_pos_api.h" #endif /* WIFI_POS_CONVERGED */ @@ -44,7 +47,6 @@ #include #endif #include - #ifdef WLAN_CONV_CRYPTO_SUPPORTED #include "wlan_crypto_main.h" #endif @@ -194,6 +196,47 @@ static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc) } #endif +#if defined QCA_SUPPORT_SON && QCA_SUPPORT_SON >= 1 +static QDF_STATUS dispatcher_init_son(void) +{ + return wlan_son_init(); +} +static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc) +{ + return wlan_son_psoc_open(psoc); +} +static QDF_STATUS dispatcher_deinit_son(void) +{ + return wlan_son_deinit(); +} + +static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc) +{ + return wlan_son_psoc_close(psoc); +} +#else +static QDF_STATUS dispatcher_init_son(void) +{ + return QDF_STATUS_SUCCESS; +} + +static QDF_STATUS dispatcher_deinit_son(void) +{ + return QDF_STATUS_SUCCESS; +} + +static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc) +{ + return QDF_STATUS_SUCCESS; +} + +static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc) +{ + return QDF_STATUS_SUCCESS; +} + +#endif /* END of QCA_SUPPORT_SON */ + #ifdef WLAN_PMO_ENABLE static QDF_STATUS dispatcher_init_pmo(void) { @@ -587,6 +630,9 @@ QDF_STATUS dispatcher_init(void) if (QDF_STATUS_SUCCESS != dispatcher_offchan_txrx_init()) goto offchan_init_fail; + if (QDF_STATUS_SUCCESS != dispatcher_init_son()) + goto son_init_fail; + /* * scheduler INIT has to be the last as each component's * initialization has to happen first and then at the end @@ -598,6 +644,8 @@ QDF_STATUS dispatcher_init(void) return QDF_STATUS_SUCCESS; scheduler_init_fail: + dispatcher_deinit_son(); +son_init_fail: dispatcher_offchan_txrx_deinit(); offchan_init_fail: dispatcher_regulatory_deinit(); @@ -641,6 +689,8 @@ QDF_STATUS dispatcher_deinit(void) */ QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit()); + QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_son()); + QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_offchan_txrx_deinit()); QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_deinit()); @@ -698,8 +748,12 @@ QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc) if (QDF_STATUS_SUCCESS != dispatcher_regulatory_psoc_open(psoc)) goto regulatory_psoc_open_fail; - return QDF_STATUS_SUCCESS; + if (QDF_STATUS_SUCCESS != son_psoc_open(psoc)) + goto psoc_son_fail; + return QDF_STATUS_SUCCESS; +psoc_son_fail: + regulatory_psoc_close(psoc); regulatory_psoc_open_fail: dispatcher_policy_mgr_psoc_close(psoc); policy_mgr_psoc_open_fail: @@ -720,6 +774,8 @@ EXPORT_SYMBOL(dispatcher_psoc_open); QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc) { + QDF_BUG(QDF_STATUS_SUCCESS == son_psoc_close(psoc)); + QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_psoc_close(psoc)); QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_psoc_close(psoc)); diff --git a/qdf/inc/qdf_types.h b/qdf/inc/qdf_types.h index d7545b113e..76909284ad 100644 --- a/qdf/inc/qdf_types.h +++ b/qdf/inc/qdf_types.h @@ -390,6 +390,7 @@ typedef enum { QDF_MODULE_ID_REGULATORY, QDF_MODULE_ID_NAN, QDF_MODULE_ID_OFFCHAN_TXRX, + QDF_MODULE_ID_SON, QDF_MODULE_ID_ANY, QDF_MODULE_ID_MAX, } QDF_MODULE_ID; diff --git a/target_if/core/src/target_if_main.c b/target_if/core/src/target_if_main.c index 2b2493082f..caf479bf98 100644 --- a/target_if/core/src/target_if_main.c +++ b/target_if/core/src/target_if_main.c @@ -45,10 +45,12 @@ #ifdef WLAN_FEATURE_NAN_CONVERGENCE #include "target_if_nan.h" #endif /* WLAN_FEATURE_NAN_CONVERGENCE */ - #ifdef CONVERGED_TDLS_ENABLE #include "target_if_tdls.h" #endif +#ifdef QCA_SUPPORT_SON +#include +#endif static struct target_if_ctx *g_target_if_ctx; @@ -129,6 +131,20 @@ static void target_if_wifi_pos_tx_ops_register( { } #endif +#ifdef QCA_SUPPORT_SON +static void target_if_son_tx_ops_register( + struct wlan_lmac_if_tx_ops *tx_ops) +{ + target_if_son_register_tx_ops(tx_ops); + return; +} +#else +static void target_if_son_tx_ops_register( + struct wlan_lmac_if_tx_ops *tx_ops) +{ + return; +} +#endif #ifdef WLAN_FEATURE_NAN_CONVERGENCE static void target_if_nan_tx_ops_register( @@ -187,6 +203,8 @@ QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) /* call regulatory callback to register tx ops */ target_if_register_regulatory_tx_ops(tx_ops); + target_if_son_tx_ops_register(tx_ops); + target_if_tdls_tx_ops_register(tx_ops); /* Converged UMAC components to register their TX-ops here */ return QDF_STATUS_SUCCESS; diff --git a/target_if/son/inc/target_if_son.h b/target_if/son/inc/target_if_son.h new file mode 100644 index 0000000000..f63807da05 --- /dev/null +++ b/target_if/son/inc/target_if_son.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2017 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 + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +#include +#include +#include +#include +#include +#include + +void target_if_son_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); + +bool son_ol_is_peer_inact(struct wlan_objmgr_peer *); + +u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type); + +int8_t son_ol_sanitize_util_invtl(struct wlan_objmgr_pdev *pdev, + u_int32_t *sample_period, + u_int32_t *num_of_sample); + +bool son_ol_enable(struct wlan_objmgr_pdev *pdev, bool enable); + +/* Function pointer to set overload status */ + +void son_ol_set_overload(struct wlan_objmgr_pdev *pdev, bool overload); + +/* Function pointer to set band steering parameters */ + +bool son_ol_set_params(struct wlan_objmgr_pdev *pdev, + u_int32_t inactivity_check_period, + u_int32_t inactivity_threshold_normal, + u_int32_t inactivity_threshold_overload); + +QDF_STATUS son_ol_send_null(struct wlan_objmgr_pdev *pdev, + u_int8_t *macaddr, + struct wlan_objmgr_vdev *vdev); + +int son_ol_lmac_create(struct wlan_objmgr_pdev *pdev); + + +int son_ol_lmac_destroy(struct wlan_objmgr_pdev *pdev); + + +void son_ol_rx_rssi_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, int8_t rssi, u_int8_t subtype); + +void son_ol_rx_rate_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, u_int32_t rateKbps); diff --git a/target_if/son/src/target_if_son.c b/target_if/son/src/target_if_son.c new file mode 100644 index 0000000000..f35d25f550 --- /dev/null +++ b/target_if/son/src/target_if_son.c @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2017 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 + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#if QCA_SUPPORT_SON + +bool son_ol_is_peer_inact(struct wlan_objmgr_peer *peer) +{ + struct wlan_objmgr_pdev *pdev = NULL; + struct wlan_objmgr_vdev *vdev = NULL; + + wlan_peer_obj_lock(peer); + vdev = wlan_peer_get_vdev(peer); + wlan_peer_obj_unlock(peer); + + wlan_vdev_obj_lock(vdev); + pdev = wlan_vdev_get_pdev(vdev); + wlan_vdev_obj_unlock(vdev); + + return cdp_peer_is_inact(ol_if_pdev_get_soc_txhandle(pdev), + (void *)(ol_if_peer_get_txrx_handle(peer))); +} + +u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type) +{ + return ol_if_peer_get_rate(peer, type); +} + + +bool son_ol_enable(struct wlan_objmgr_pdev *pdev, bool enable) +{ + + return cdp_start_inact_timer(ol_if_pdev_get_soc_txhandle(pdev), + (void *)(ol_if_pdev_get_soc_pdev_handle(pdev)), + enable); +} + +/* Function pointer to set overload status */ +void son_ol_set_overload(struct wlan_objmgr_pdev *pdev, bool overload) +{ + return cdp_set_overload(ol_if_pdev_get_soc_txhandle(pdev), + (void *)(ol_if_pdev_get_soc_pdev_handle(pdev)), + overload); +} +/* Function pointer to set band steering parameters */ +bool son_ol_set_params(struct wlan_objmgr_pdev *pdev, + u_int32_t inactivity_check_period, + u_int32_t inactivity_threshold_normal, + u_int32_t inactivity_threshold_overload) +{ + + return cdp_set_inact_params(ol_if_pdev_get_soc_txhandle(pdev), + (void *)ol_if_pdev_get_soc_pdev_handle(pdev), + inactivity_check_period, + inactivity_threshold_normal, + inactivity_threshold_overload); +} + +int8_t son_ol_sanitize_util_invtl(struct wlan_objmgr_pdev *pdev, + u_int32_t *sample_period, + u_int32_t *num_of_sample) +{ + return EOK; +} + +QDF_STATUS son_ol_send_null(struct wlan_objmgr_pdev *pdev, + u_int8_t *macaddr, + struct wlan_objmgr_vdev *vdev) +{ + struct stats_request_params param = {0}; + struct wlan_objmgr_psoc *psoc = NULL; + + wlan_pdev_obj_lock(pdev); + psoc = wlan_pdev_get_psoc(pdev); + wlan_pdev_obj_unlock(pdev); + + if( !psoc) + return QDF_STATUS_E_FAILURE; + + param.vdev_id = wlan_vdev_get_id(vdev); + param.stats_id = WMI_HOST_REQUEST_INST_STAT; + + return wmi_unified_stats_request_send(psoc->tgt_if_handle, + macaddr, ¶m); +} + +int son_ol_lmac_create(struct wlan_objmgr_pdev *pdev) +{ + return EOK; +} + +int son_ol_lmac_destroy(struct wlan_objmgr_pdev *pdev) +{ + return EOK; + +} + +void son_ol_rx_rssi_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, int8_t rssi, u_int8_t subtype) +{ + return; + +} + +void son_ol_rx_rate_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, u_int32_t rateKbps) +{ + return; +} + +void target_if_son_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) +{ + /* wlan son related function handler */ + tx_ops->son_tx_ops.son_enable = son_ol_enable; + tx_ops->son_tx_ops.set_overload = son_ol_set_overload; + tx_ops->son_tx_ops.set_params = son_ol_set_params; + tx_ops->son_tx_ops.lmac_create = son_ol_lmac_create; + tx_ops->son_tx_ops.lmac_destroy = son_ol_lmac_destroy; + tx_ops->son_tx_ops.son_send_null = son_ol_send_null; + tx_ops->son_tx_ops.son_rssi_update = son_ol_rx_rssi_update; + tx_ops->son_tx_ops.son_rate_update = son_ol_rx_rate_update; + tx_ops->son_tx_ops.son_sanity_util_intvl = son_ol_sanitize_util_invtl; + tx_ops->son_tx_ops.get_peer_rate = son_ol_get_peer_rate; + tx_ops->son_tx_ops.son_node_isinact = son_ol_is_peer_inact; + return; +} +#else +void target_if_son_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) +{ + return; +} +int8_t son_ol_sanitize_util_intvl(struct wlan_objmgr_pdev *pdev, + u_int32_t *sample_period, + u_int32_t *num_of_sample) +{ + return -EINVAL; + +} + +u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type) +{ + return 0; +} + + +bool son_ol_enable(struct wlan_objmgr_pdev *pdev, bool enable) +{ + return -EINVAL; + +} + + +/* Function pointer to set overload status */ + +void son_ol_set_overload(struct wlan_objmgr_pdev *pdev, bool overload) +{ + return; +} + + +/* Function pointer to set band steering parameters */ + +bool son_ol_set_params(struct wlan_objmgr_pdev *dev, + u_int32_t inactivity_check_period, + u_int32_t inactivity_threshold_normal, + u_int32_t inactivity_threshold_overload) +{ + return -EINVAL; +} + + + +QDF_STATUS son_ol_send_null(struct wlan_objmgr_pdev *pdev, + u_int8_t *macaddr, + struct wlan_objmgr_vdev *vdev) +{ + return EOK; +} +int8_t son_ol_sanitize_util_invtl(struct wlan_objmgr_pdev *pdev, + u_int32_t *sample_period, + u_int32_t *num_of_sample) +{ + return EOK; +} + +int son_ol_lmac_create(struct wlan_objmgr_pdev *pdev) +{ + return EOK; +} + + +int son_ol_lmac_destroy(struct wlan_objmgr_pdev *pdev) +{ + return EOK; + +} + + +void son_ol_rx_rssi_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, int8_t rssi, u_int8_t subtype) +{ + return; + +} + +void son_ol_rx_rate_update(struct wlan_objmgr_pdev *pdev, u_int8_t *macaddres, + u_int8_t status, u_int32_t rateKbps) +{ + return; +} + +bool son_ol_is_peer_inact(struct wlan_objmgr_peer *peer) +{ + return false; +} +#endif diff --git a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h index 0a9d833d9a..76c9b5c79d 100644 --- a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +++ b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h @@ -947,7 +947,7 @@ is_p2p_oui(const uint8_t *frm) } /** - * is_qca_whc_oui() - If vendor IE is QCA WHC type + * is_qca_son_oui() - If vendor IE is QCA WHC type * @frm: vendor IE pointer * @whc_subtype: subtype * @@ -956,7 +956,7 @@ is_p2p_oui(const uint8_t *frm) * Return: true if its QCA WHC IE */ static inline bool -is_qca_whc_oui(uint8_t *frm, uint8_t whc_subtype) +is_qca_son_oui(uint8_t *frm, uint8_t whc_subtype) { return (frm[1] > 4) && (LE_READ_4(frm + 2) == ((QCA_OUI_WHC_TYPE << 24) | QCA_OUI)) && diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h index 9f771b60bf..eb8e166bb8 100644 --- a/umac/cmn_services/inc/wlan_cmn.h +++ b/umac/cmn_services/inc/wlan_cmn.h @@ -133,6 +133,7 @@ enum wlan_umac_comp_id { WLAN_UMAC_COMP_NAN, WLAN_UMAC_COMP_DFS, WLAN_UMAC_COMP_OFFCHAN_TXRX, + WLAN_UMAC_COMP_SON, WLAN_UMAC_COMP_ID_MAX, }; diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h index dbf3170270..af2739ddc8 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h @@ -207,6 +207,7 @@ typedef enum { WLAN_REGULATORY_NB_ID = 22, WLAN_OFFCHAN_TXRX_ID = 23, WLAN_POLICY_MGR_ID = 24, + WLAN_SON_ID = 25, WLAN_REF_ID_MAX, } wlan_objmgr_ref_dbgid; @@ -241,6 +242,9 @@ static inline char *string_from_dbgid(wlan_objmgr_ref_dbgid id) "WLAN_ATF_ID", "WLAN_CRYPTO_ID", "WLAN_NAN_ID", + "WLAN_REGULATORY_SB_ID", + "WLAN_REGULATORY_NB_ID", + "WLAN_SON_ID", "WLAN_REF_ID_MAX" }; return (char *)strings[id]; diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h index 2ca5eb3b73..a732c5706f 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h @@ -134,6 +134,10 @@ #define WLAN_VDEV_FEXT_NO_MULCHAN 0x00200000 /*non-beaconing AP VAP*/ #define WLAN_VDEV_FEXT_NON_BEACON 0x00400000 +/* SPL repeater enabled for SON*/ +#define WLAN_VDEV_FEXT_SON_SPL_RPT 0x00800000 +/* SON IE update in MGMT frame */ +#define WLAN_VDEV_FEXT_SON_INFO_UPDATE 0x01000000 /* VDEV OP flags */ /* if the vap destroyed by user */ diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index baa07d1291..415e1fd041 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -31,12 +31,14 @@ #ifdef WLAN_ATF_ENABLE #include "wlan_atf_utils_defs.h" #endif +#ifdef QCA_SUPPORT_SON +#include +#endif #include #ifdef WLAN_CONV_CRYPTO_SUPPORTED #include "wlan_crypto_global_def.h" #endif - /* Number of dev type: Direct attach and Offload */ #define MAX_DEV_TYPE 2 @@ -546,6 +548,9 @@ struct wlan_lmac_if_tx_ops { #ifdef CONVERGED_P2P_ENABLE struct wlan_lmac_if_p2p_tx_ops p2p; #endif +#ifdef QCA_SUPPORT_SON + struct wlan_lmac_if_son_tx_ops son_tx_ops; +#endif #ifdef WLAN_ATF_ENABLE struct wlan_lmac_if_atf_tx_ops atf_tx_ops; diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c index 23396af407..2a1dd038f6 100644 --- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c @@ -383,8 +383,8 @@ util_scan_parse_vendor_ie(struct scan_cache_entry *scan_params, scan_params->ie_list.sfa = (uint8_t *)ie; } else if (is_p2p_oui((uint8_t *)ie)) { scan_params->ie_list.p2p = (uint8_t *)ie; - } else if (is_qca_whc_oui((uint8_t *)ie, - QCA_OUI_WHC_AP_INFO_SUBTYPE)) { + } else if (is_qca_son_oui((uint8_t *)ie, + QCA_OUI_WHC_AP_INFO_SUBTYPE)) { scan_params->ie_list.sonadv = (uint8_t *)ie; } else if (is_ht_cap((uint8_t *)ie)) { /* we only care if there isn't already an HT IE (ANA) */