qcacmn: Airtime Fairness convergence
ATF TxOps and RxOps interfaces added in psoc TxOps as well as RxOps. New API aaded to vdev object manager. ATF component ID added. Change-Id: Ib694d91b59167d3831d876412513c260379801ef
Этот коммит содержится в:

коммит произвёл
Sandeep Puligilla

родитель
77a53d25e2
Коммит
81c60e87a3
@@ -103,6 +103,7 @@
|
||||
* @WLAN_UMAC_COMP_CONFIG: Configuration
|
||||
* @WLAN_UMAC_COMP_WIFI_POS: WIFI Positioning
|
||||
* @WLAN_UMAC_COMP_TDLS: TDLS
|
||||
* @WLAN_UMAC_COMP_ATF: Airtime Fairness
|
||||
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
|
||||
*
|
||||
* This id is static.
|
||||
@@ -119,6 +120,7 @@ enum wlan_umac_comp_id {
|
||||
WLAN_UMAC_COMP_CONFIG = 7,
|
||||
WLAN_UMAC_COMP_WIFI_POS = 8,
|
||||
WLAN_UMAC_COMP_TDLS = 9,
|
||||
WLAN_UMAC_COMP_ATF = 10,
|
||||
WLAN_UMAC_COMP_ID_MAX,
|
||||
};
|
||||
|
||||
|
@@ -169,6 +169,7 @@ typedef void (*wlan_objmgr_peer_status_handler)(
|
||||
* @WLAN_P2P_ID: P2P operations
|
||||
* @WLAN_TDLS_SB_ID: TDLS Southbound operations
|
||||
* @WLAN_TDLS_NB_ID: TDLS Northbound operations
|
||||
* @WLAN_ATF_ID: Airtime Fairness operations
|
||||
* @WLAN_REF_ID_MAX: Max id used to generate ref count tracking array
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -190,6 +191,7 @@ typedef enum {
|
||||
WLAN_P2P_ID = 15,
|
||||
WLAN_TDLS_SB_ID = 16,
|
||||
WLAN_TDLS_NB_ID = 17,
|
||||
WLAN_ATF_ID = 19,
|
||||
WLAN_REF_ID_MAX,
|
||||
} wlan_objmgr_ref_dbgid;
|
||||
|
||||
|
@@ -674,6 +674,7 @@ struct wlan_objmgr_pdev *wlan_objmgr_get_pdev_by_id(
|
||||
|
||||
return pdev;
|
||||
}
|
||||
EXPORT_SYMBOL(wlan_objmgr_get_pdev_by_id);
|
||||
|
||||
struct wlan_objmgr_pdev *wlan_objmgr_get_pdev_by_id_no_state(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t id,
|
||||
|
@@ -24,11 +24,13 @@
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "wlan_mgmt_txrx_utils_api.h"
|
||||
#include "wlan_scan_public_structs.h"
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
#include "wlan_atf_utils_defs.h"
|
||||
#endif
|
||||
|
||||
/* Number of dev type: Direct attach and Offload */
|
||||
#define MAX_DEV_TYPE 2
|
||||
|
||||
|
||||
/**
|
||||
* struct wlan_lmac_if_mgmt_txrx_tx_ops - structure of tx function
|
||||
* pointers for mgmt txrx component
|
||||
@@ -235,6 +237,81 @@ struct wlan_lmac_if_p2p_tx_ops {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
|
||||
/**
|
||||
* struct wlan_lmac_if_atf_tx_ops - ATF specific tx function pointers
|
||||
* @atf_update_peer_txtoken: Update peer Tx token
|
||||
* @atf_set_enable_disable: Set atf enable/disable
|
||||
* @atf_tokens_used: Get used atf tokens
|
||||
* @atf_get_unused_txtoken: Get unused atf tokens
|
||||
* @atf_peer_resume: Resume peer
|
||||
* @atf_tokens_unassigned: Set unassigned atf tockens
|
||||
* @atf_capable_peer: Set atf state change
|
||||
* @atf_airtime_estimate: Get estimated airtime
|
||||
* @atf_debug_peerstate: Get peer state
|
||||
* @atf_enable_disable: Set atf peer stats enable/disable
|
||||
* @atf_ssid_sched_policy: Set ssid schedule policy
|
||||
* @atf_set: Set atf
|
||||
* @atf_set_grouping: Set atf grouping
|
||||
* @atf_send_peer_request: Send peer requests
|
||||
* @atf_set_bwf: Set bandwidth fairness
|
||||
* @atf_peer_buf_held: Get buffer held
|
||||
* @atf_get_peer_airtime: Get peer airtime
|
||||
* @atf_get_chbusyper: Get channel busy
|
||||
* @atf_open: ATF open
|
||||
* @atf_register_event_handler ATF register wmi event handlers
|
||||
* @atf_unregister_event_handler ATF unregister wmi event handlers
|
||||
*/
|
||||
struct wlan_lmac_if_atf_tx_ops {
|
||||
void (*atf_update_peer_txtoken)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
struct atf_stats *stats);
|
||||
void (*atf_set_enable_disable)(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t value);
|
||||
uint8_t (*atf_tokens_used)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer);
|
||||
void (*atf_get_unused_txtoken)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
int *unused_token);
|
||||
void (*atf_peer_resume)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer);
|
||||
void (*atf_tokens_unassigned)(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t tokens_unassigned);
|
||||
void (*atf_capable_peer)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
uint8_t val, uint8_t atfstate_change);
|
||||
uint32_t (*atf_airtime_estimate)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
uint32_t tput,
|
||||
uint32_t *possible_tput);
|
||||
uint32_t (*atf_debug_peerstate)(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer);
|
||||
|
||||
int32_t (*atf_enable_disable)(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t value);
|
||||
int32_t (*atf_ssid_sched_policy)(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t value);
|
||||
int32_t (*atf_set)(struct wlan_objmgr_pdev *pdev,
|
||||
struct pdev_atf_req *atf_req,
|
||||
uint8_t atf_tput_based);
|
||||
int32_t (*atf_set_grouping)(struct wlan_objmgr_pdev *pdev,
|
||||
struct pdev_atf_ssid_group_req *atf_grp_req,
|
||||
uint8_t atf_tput_based);
|
||||
int32_t (*atf_send_peer_request)(struct wlan_objmgr_pdev *pdev,
|
||||
struct pdev_atf_peer_ext_request *atfr,
|
||||
uint8_t atf_tput_based);
|
||||
int32_t (*atf_set_bwf)(struct wlan_objmgr_pdev *pdev,
|
||||
struct pdev_bwf_req *bwf_req);
|
||||
uint32_t (*atf_peer_buf_held)(struct wlan_objmgr_peer *peer);
|
||||
uint32_t (*atf_get_peer_airtime)(struct wlan_objmgr_peer *peer);
|
||||
uint32_t (*atf_get_chbusyper)(struct wlan_objmgr_pdev *pdev);
|
||||
void (*atf_open)(struct wlan_objmgr_psoc *psoc);
|
||||
void (*atf_register_event_handler)(struct wlan_objmgr_psoc *psoc);
|
||||
void (*atf_unregister_event_handler)(struct wlan_objmgr_psoc *psoc);
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct wlan_lmac_if_tx_ops - south bound tx function pointers
|
||||
* @mgmt_txrx_tx_ops: mgmt txrx tx ops
|
||||
@@ -259,6 +336,9 @@ struct wlan_lmac_if_tx_ops {
|
||||
#ifdef WLAN_P2P_ENABLE
|
||||
struct wlan_lmac_if_p2p_tx_ops p2p;
|
||||
#endif
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
struct wlan_lmac_if_atf_tx_ops atf_tx_ops;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -331,6 +411,101 @@ struct wlan_lmac_if_p2p_rx_ops {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
|
||||
/**
|
||||
* struct wlan_lmac_if_atf_rx_ops - ATF south bound rx function pointers
|
||||
* @atf_get_atf_commit: Get ATF commit state
|
||||
* @atf_get_fmcap: Get firmware capability for ATF
|
||||
* @atf_get_obss_scale: Get OBSS scale
|
||||
* @atf_get_mode: Get mode of ATF
|
||||
* @atf_get_msdu_desc: Get msdu desc for ATF
|
||||
* @atf_get_max_vdevs: Get maximum vdevs for a Radio
|
||||
* @atf_get_peers: Get number of peers for a radio
|
||||
* @atf_get_tput_based: Get throughput based enabled/disabled
|
||||
* @atf_get_logging: Get logging enabled/disabled
|
||||
* @atf_get_txbuf_share: Get TxBuff share state
|
||||
* @atf_get_txbuf_max: Get TxBuff MAX number
|
||||
* @atf_get_txbuf_min: Get TxBuff MIN number
|
||||
* @atf_get_ssidgroup: Get ssid group state
|
||||
* @atf_get_tx_block_count: Get tx block count
|
||||
* @atf_get_peer_blk_txtraffic: Get peer tx traffic block state
|
||||
* @atf_get_vdev_blk_txtraffic: Get vdev tx traffic block state
|
||||
* @atf_get_sched: Get ATF scheduled policy
|
||||
* @atf_get_tx_tokens: Get Tx tokens
|
||||
* @atf_get_shadow_tx_tokens: Get shadow tx tokens
|
||||
* @atf_get_tx_tokens_common: Get common tx tokens
|
||||
* @atf_get_shadow_alloted_tx_tokens: Get shadow alloted tx tokens
|
||||
* @atf_get_peer_stats: Get atf peer stats
|
||||
* @atf_get_token_allocated: Get atf token allocated
|
||||
* @atf_get_token_utilized: Get atf token utilized
|
||||
* @atf_set_sched: Set ATF schedule policy
|
||||
* @atf_set_fmcap: Set firmware capability for ATF
|
||||
* @atf_set_obss_scale: Set ATF obss scale
|
||||
* @atf_set_mode: Set ATF mode
|
||||
* @atf_set_msdu_desc: Set msdu desc
|
||||
* @atf_set_max_vdevs: Set maximum vdevs number
|
||||
* @atf_set_peers: Set peers number
|
||||
* @atf_set_peer_stats: Set peer stats
|
||||
* @atf_set_vdev_blk_txtraffic: Set Block/unblock vdev tx traffic
|
||||
* @atf_set_peer_blk_txtraffic: Set Block/unblock peer tx traffic
|
||||
* @atf_set_tx_block_count: Set tx block count
|
||||
* @atf_set_token_allocated: Set atf token allocated
|
||||
* @atf_set_token_utilized: Set atf token utilized
|
||||
*/
|
||||
struct wlan_lmac_if_atf_rx_ops {
|
||||
uint32_t (*atf_get_atf_commit)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_fmcap)(struct wlan_objmgr_psoc *psoc);
|
||||
uint32_t (*atf_get_obss_scale)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_mode)(struct wlan_objmgr_psoc *psoc);
|
||||
uint32_t (*atf_get_msdu_desc)(struct wlan_objmgr_psoc *psoc);
|
||||
uint32_t (*atf_get_max_vdevs)(struct wlan_objmgr_psoc *psoc);
|
||||
uint32_t (*atf_get_peers)(struct wlan_objmgr_psoc *psoc);
|
||||
uint32_t (*atf_get_tput_based)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_logging)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_txbuf_share)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_txbuf_max)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_txbuf_min)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_ssidgroup)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_tx_block_count)(struct wlan_objmgr_vdev *vdev);
|
||||
uint8_t (*atf_get_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer);
|
||||
uint8_t (*atf_get_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev);
|
||||
uint32_t (*atf_get_sched)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_tx_tokens)(struct wlan_objmgr_peer *peer);
|
||||
uint32_t (*atf_get_shadow_tx_tokens)(struct wlan_objmgr_peer *peer);
|
||||
uint32_t (*atf_get_txtokens_common)(struct wlan_objmgr_pdev *pdev);
|
||||
uint32_t (*atf_get_shadow_alloted_tx_tokens)(
|
||||
struct wlan_objmgr_pdev *pdev);
|
||||
void (*atf_get_peer_stats)(struct wlan_objmgr_peer *peer,
|
||||
struct atf_stats *stats);
|
||||
uint16_t (*atf_get_token_allocated)(struct wlan_objmgr_peer *peer);
|
||||
uint16_t (*atf_get_token_utilized)(struct wlan_objmgr_peer *peer);
|
||||
|
||||
void (*atf_set_sched)(struct wlan_objmgr_pdev *pdev, uint32_t value);
|
||||
void (*atf_set_fmcap)(struct wlan_objmgr_psoc *psoc, uint32_t value);
|
||||
void (*atf_set_obss_scale)(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t value);
|
||||
void (*atf_set_mode)(struct wlan_objmgr_psoc *psoc, uint8_t value);
|
||||
void (*atf_set_msdu_desc)(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value);
|
||||
void (*atf_set_max_vdevs)(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value);
|
||||
void (*atf_set_peers)(struct wlan_objmgr_psoc *psoc, uint32_t value);
|
||||
void (*atf_set_peer_stats)(struct wlan_objmgr_peer *peer,
|
||||
struct atf_stats *stats);
|
||||
void (*atf_set_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t value);
|
||||
void (*atf_set_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer,
|
||||
uint8_t value);
|
||||
void (*atf_set_tx_block_count)(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t count);
|
||||
void (*atf_set_token_allocated)(struct wlan_objmgr_peer *peer,
|
||||
uint16_t value);
|
||||
void (*atf_set_token_utilized)(struct wlan_objmgr_peer *peer,
|
||||
uint16_t value);
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct wlan_lmac_if_rx_ops - south bound rx function pointers
|
||||
* @arg1
|
||||
@@ -353,6 +528,9 @@ struct wlan_lmac_if_rx_ops {
|
||||
#ifdef WLAN_P2P_ENABLE
|
||||
struct wlan_lmac_if_p2p_rx_ops p2p;
|
||||
#endif
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
struct wlan_lmac_if_atf_rx_ops atf_rx_ops;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Function pointer to call legacy tx_ops registration in OL/WMA.
|
||||
|
@@ -22,6 +22,9 @@
|
||||
#include "wlan_lmac_if_api.h"
|
||||
#include "wlan_mgmt_txrx_tgt_api.h"
|
||||
#include "wlan_scan_tgt_api.h"
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
#include "wlan_atf_tgt_api.h"
|
||||
#endif
|
||||
|
||||
/* Function pointer for OL/WMA specific UMAC tx_ops
|
||||
* registration.
|
||||
@@ -30,6 +33,63 @@ QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register)
|
||||
(struct wlan_lmac_if_tx_ops *tx_ops);
|
||||
EXPORT_SYMBOL(wlan_lmac_if_umac_tx_ops_register);
|
||||
|
||||
#ifdef WLAN_ATF_ENABLE
|
||||
/**
|
||||
* wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops.
|
||||
*/
|
||||
static void
|
||||
wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
{
|
||||
struct wlan_lmac_if_atf_rx_ops *atf_rx_ops = &rx_ops->atf_rx_ops;
|
||||
|
||||
/* ATF rx ops */
|
||||
atf_rx_ops->atf_get_atf_commit = tgt_atf_get_atf_commit;
|
||||
atf_rx_ops->atf_get_fmcap = tgt_atf_get_fmcap;
|
||||
atf_rx_ops->atf_get_obss_scale = tgt_atf_get_obss_scale;
|
||||
atf_rx_ops->atf_get_mode = tgt_atf_get_mode;
|
||||
atf_rx_ops->atf_get_msdu_desc = tgt_atf_get_msdu_desc;
|
||||
atf_rx_ops->atf_get_max_vdevs = tgt_atf_get_max_vdevs;
|
||||
atf_rx_ops->atf_get_peers = tgt_atf_get_peers;
|
||||
atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based;
|
||||
atf_rx_ops->atf_get_logging = tgt_atf_get_logging;
|
||||
atf_rx_ops->atf_get_txbuf_share = tgt_atf_get_txbuf_share;
|
||||
atf_rx_ops->atf_get_txbuf_max = tgt_atf_get_txbuf_max;
|
||||
atf_rx_ops->atf_get_txbuf_min = tgt_atf_get_txbuf_min;
|
||||
atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup;
|
||||
atf_rx_ops->atf_get_tx_block_count = tgt_atf_get_tx_block_count;
|
||||
atf_rx_ops->atf_get_peer_blk_txtraffic = tgt_atf_get_peer_blk_txtraffic;
|
||||
atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic;
|
||||
atf_rx_ops->atf_get_sched = tgt_atf_get_sched;
|
||||
atf_rx_ops->atf_get_tx_tokens = tgt_atf_get_tx_tokens;
|
||||
atf_rx_ops->atf_get_shadow_tx_tokens = tgt_atf_get_shadow_tx_tokens;
|
||||
atf_rx_ops->atf_get_shadow_alloted_tx_tokens =
|
||||
tgt_atf_get_shadow_alloted_tx_tokens;
|
||||
atf_rx_ops->atf_get_txtokens_common = tgt_atf_get_txtokens_common;
|
||||
atf_rx_ops->atf_get_peer_stats = tgt_atf_get_peer_stats;
|
||||
atf_rx_ops->atf_get_token_allocated = tgt_atf_get_token_allocated;
|
||||
atf_rx_ops->atf_get_token_utilized = tgt_atf_get_token_utilized;
|
||||
|
||||
atf_rx_ops->atf_set_sched = tgt_atf_set_sched;
|
||||
atf_rx_ops->atf_set_fmcap = tgt_atf_set_fmcap;
|
||||
atf_rx_ops->atf_set_obss_scale = tgt_atf_set_obss_scale;
|
||||
atf_rx_ops->atf_set_mode = tgt_atf_set_mode;
|
||||
atf_rx_ops->atf_set_msdu_desc = tgt_atf_set_msdu_desc;
|
||||
atf_rx_ops->atf_set_max_vdevs = tgt_atf_set_max_vdevs;
|
||||
atf_rx_ops->atf_set_peers = tgt_atf_set_peers;
|
||||
atf_rx_ops->atf_set_peer_stats = tgt_atf_set_peer_stats;
|
||||
atf_rx_ops->atf_set_vdev_blk_txtraffic = tgt_atf_set_vdev_blk_txtraffic;
|
||||
atf_rx_ops->atf_set_peer_blk_txtraffic = tgt_atf_set_peer_blk_txtraffic;
|
||||
atf_rx_ops->atf_set_tx_block_count = tgt_atf_set_tx_block_count;
|
||||
atf_rx_ops->atf_set_token_allocated = tgt_atf_set_token_allocated;
|
||||
atf_rx_ops->atf_set_token_utilized = tgt_atf_set_token_utilized;
|
||||
}
|
||||
#else
|
||||
static void
|
||||
wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
|
||||
* @rx_ops: Pointer to rx_ops structure to be populated
|
||||
@@ -67,6 +127,7 @@ wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
tgt_mgmt_txrx_get_vdev_id_from_desc_id;
|
||||
/* scan rx ops */
|
||||
rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
|
||||
wlan_lmac_if_atf_rx_ops_register(rx_ops);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Ссылка в новой задаче
Block a user