qcacld-3.0: Trigger MSCS action frame

Add logic to send MSCS action frame to AP based on
voice tx packet.

Change-Id: I272addfcb60e459043426950d00ba5957b594505
CRs-Fixed: 2791796
This commit is contained in:
Abhinav Kumar
2020-10-06 15:07:22 +05:30
zatwierdzone przez snandini
rodzic f797891003
commit c526619159
22 zmienionych plików z 619 dodań i 1 usunięć

Wyświetl plik

@@ -144,6 +144,94 @@ struct wlan_mlme_roam {
#endif
};
#ifdef WLAN_FEATURE_MSCS
/**
* struct tclas_mask - TCLAS Mask Elements for mscs request
* @classifier_type: specifies the type of classifier parameters
* in TCLAS element. Currently driver supports classifier type = 4 only.
* @classifier_mask: Mask for tclas elements. For example, if
* classifier type = 4, value of classifier mask is 0x5F.
* @info: information of classifier type
*/
struct tclas_mask {
uint8_t classifier_type;
uint8_t classifier_mask;
union {
struct {
uint8_t version;
union {
struct {
uint8_t source[4];
uint8_t dest[4];
uint16_t src_port;
uint16_t dest_port;
uint8_t dscp;
uint8_t proto;
uint8_t reserved;
} ip_v4_params;
struct {
uint8_t source[16];
uint8_t dest[16];
uint16_t src_port;
uint16_t dest_port;
uint8_t DSCP;
uint8_t next_header;
uint8_t flow_label[3];
} ip_v6_params;
} params;
} ip_params; /* classifier_type = 4 */
} info;
};
/**
* enum scs_request_type - scs request type to peer
* @SCS_REQ_ADD: To set mscs parameters
* @SCS_REQ_REMOVE: Remove mscs parameters
* @SCS_REQ_CHANGE: Update mscs parameters
*/
enum scs_request_type {
SCS_REQ_ADD = 0,
SCS_REQ_REMOVE = 1,
SCS_REQ_CHANGE = 2,
};
/**
* struct descriptor_element - mscs Descriptor element
* @request_type: mscs request type defined in enum scs_request_type
* @user_priority_control: To set user priority of tx packet
* @stream_timeout: minimum timeout value, in TUs, for maintaining
* variable user priority in the MSCS list.
* @tclas_mask: to specify how incoming MSDUs are classified into
* streams in MSCS
* @status_code: status of mscs request
*/
struct descriptor_element {
uint8_t request_type;
uint16_t user_priority_control;
uint64_t stream_timeout;
struct tclas_mask tclas_mask;
uint8_t status_code;
};
/**
* struct mscs_req_info - mscs request information
* @vdev_id: session id
* @bssid: peer bssid
* @dialog_token: Token number of mscs req action frame
* @dec: mscs Descriptor element defines information about
* the parameters used to classify streams
* @is_mscs_req_sent: To Save mscs req request if any (only
* one can be outstanding at any time)
*/
struct mscs_req_info {
uint8_t vdev_id;
struct qdf_mac_addr bssid;
uint8_t dialog_token;
struct descriptor_element dec;
bool is_mscs_req_sent;
};
#endif
/**
* struct mlme_legacy_priv - VDEV MLME legacy priv object
* @chan_switch_in_progress: flag to indicate that channel switch is in progress
@@ -170,6 +258,7 @@ struct wlan_mlme_roam {
* @fils_con_info: Pointer to fils connection info from csr roam profile
* @opr_rate_set: operational rates set
* @ext_opr_rate_set: extended operational rates set
* @mscs_req_info: Information related to mscs request
*/
struct mlme_legacy_priv {
bool chan_switch_in_progress;
@@ -197,6 +286,9 @@ struct mlme_legacy_priv {
#endif
struct mlme_cfg_str opr_rate_set;
struct mlme_cfg_str ext_opr_rate_set;
#ifdef WLAN_FEATURE_MSCS
struct mscs_req_info mscs_req_info;
#endif
};

Wyświetl plik

@@ -64,6 +64,37 @@ QDF_STATUS mlme_unregister_vdev_mgr_ops(struct vdev_mlme_obj *vdev_mlme);
QDF_STATUS mlme_set_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev,
bool val);
#ifdef WLAN_FEATURE_MSCS
/**
* mlme_set_is_mscs_req_sent() - set mscs frame req flag
* @vdev: vdev pointer
* @val: value to be set
*
* Return: QDF_STATUS
*/
QDF_STATUS mlme_set_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev, bool val);
/**
* mlme_get_is_mscs_req_sent() - get mscs frame req flag
* @vdev: vdev pointer
*
* Return: value of mscs flag
*/
bool mlme_get_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev);
#else
static inline
QDF_STATUS mlme_set_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev, bool val)
{
return QDF_STATUS_E_FAILURE;
}
static inline
bool mlme_get_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev)
{
return false;
}
#endif
/**
* mlme_is_chan_switch_in_progress() - get mlme priv restart in progress
* @vdev: vdev pointer

Wyświetl plik

@@ -588,6 +588,36 @@ QDF_STATUS mlme_set_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS;
}
#ifdef WLAN_FEATURE_MSCS
QDF_STATUS mlme_set_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev, bool val)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
return QDF_STATUS_E_FAILURE;
}
mlme_priv->mscs_req_info.is_mscs_req_sent = val;
return QDF_STATUS_SUCCESS;
}
bool mlme_get_is_mscs_req_sent(struct wlan_objmgr_vdev *vdev)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
return false;
}
return mlme_priv->mscs_req_info.is_mscs_req_sent;
}
#endif
bool mlme_is_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev)
{
struct mlme_legacy_priv *mlme_priv;