qcacmn: MSCS Procedures - Get the MSCS parameters
This change will acquire MSCS parameters from the MSCS request sent by the STA and provide it to the data path which will later use it for building flow database. Change-Id: I972154792c682527f8df04de693077188726e8da CRs-Fixed: 2669386
This commit is contained in:

کامیت شده توسط
snandini

والد
759a833fdc
کامیت
fe082ae00d
@@ -6044,6 +6044,75 @@ fail0:
|
||||
}
|
||||
#endif /* ATH_SUPPORT_NAC_RSSI || ATH_SUPPORT_NAC */
|
||||
|
||||
/*
|
||||
* dp_record_mscs_params - MSCS parameters sent by the STA in
|
||||
* the MSCS Request to the AP. The AP makes a note of these
|
||||
* parameters while comparing the MSDUs sent by the STA, to
|
||||
* send the downlink traffic with correct User priority.
|
||||
* @soc - Datapath soc handle
|
||||
* @peer_mac - STA Mac address
|
||||
* @vdev_id - ID of the vdev handle
|
||||
* @mscs_params - Structure having MSCS parameters obtained
|
||||
* from handshake
|
||||
* @active - Flag to set MSCS active/inactive
|
||||
* return type - QDF_STATUS - Success/Invalid
|
||||
*/
|
||||
static QDF_STATUS
|
||||
dp_record_mscs_params(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
|
||||
uint8_t vdev_id, struct cdp_mscs_params *mscs_params,
|
||||
bool active)
|
||||
{
|
||||
struct dp_peer *peer;
|
||||
QDF_STATUS status = QDF_STATUS_E_INVAL;
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||
|
||||
peer = dp_peer_find_hash_find(soc, peer_mac, 0, vdev_id,
|
||||
DP_MOD_ID_CDP);
|
||||
|
||||
if (!peer) {
|
||||
dp_err("%s: Peer is NULL!\n", __func__);
|
||||
goto fail;
|
||||
}
|
||||
if (!active) {
|
||||
dp_info("MSCS Procedure is terminated");
|
||||
peer->mscs_active = active;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (mscs_params->classifier_type == IEEE80211_TCLAS_MASK_CLA_TYPE_4) {
|
||||
/* Populate entries inside IPV4 database first */
|
||||
peer->mscs_ipv4_parameter.user_priority_bitmap =
|
||||
mscs_params->user_pri_bitmap;
|
||||
peer->mscs_ipv4_parameter.user_priority_limit =
|
||||
mscs_params->user_pri_limit;
|
||||
peer->mscs_ipv4_parameter.classifier_mask =
|
||||
mscs_params->classifier_mask;
|
||||
|
||||
/* Populate entries inside IPV6 database */
|
||||
peer->mscs_ipv6_parameter.user_priority_bitmap =
|
||||
mscs_params->user_pri_bitmap;
|
||||
peer->mscs_ipv6_parameter.user_priority_limit =
|
||||
mscs_params->user_pri_limit;
|
||||
peer->mscs_ipv6_parameter.classifier_mask =
|
||||
mscs_params->classifier_mask;
|
||||
peer->mscs_active = 1;
|
||||
dp_info("\n\tMSCS Procedure request based parameters for %pM\n"
|
||||
"\tClassifier_type = %d\tUser priority bitmap = %x\n"
|
||||
"\tUser priority limit = %x\tClassifier mask = %x",
|
||||
peer_mac,
|
||||
mscs_params->classifier_type,
|
||||
peer->mscs_ipv4_parameter.user_priority_bitmap,
|
||||
peer->mscs_ipv4_parameter.user_priority_limit,
|
||||
peer->mscs_ipv4_parameter.classifier_mask);
|
||||
}
|
||||
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
fail:
|
||||
if (peer)
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_CDP);
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_get_sec_type() - Get the security type
|
||||
* @soc: soc handle
|
||||
@@ -10106,6 +10175,7 @@ static struct cdp_ctrl_ops dp_ops_ctrl = {
|
||||
.txrx_vdev_config_for_nac_rssi = dp_config_for_nac_rssi,
|
||||
.txrx_vdev_get_neighbour_rssi = dp_vdev_get_neighbour_rssi,
|
||||
#endif
|
||||
.txrx_record_mscs_params = dp_record_mscs_params,
|
||||
.set_key = dp_set_michael_key,
|
||||
.txrx_get_vdev_param = dp_get_vdev_param,
|
||||
.enable_peer_based_pktlog = dp_enable_peer_based_pktlog,
|
||||
|
@@ -2393,6 +2393,25 @@ struct dp_peer_ast_params {
|
||||
uint8_t flowQ;
|
||||
};
|
||||
|
||||
#define IEEE80211_MSCS_MAX_ELEM_SIZE 5
|
||||
#define IEEE80211_TCLAS_MASK_CLA_TYPE_4 4
|
||||
/*
|
||||
* struct dp_peer_mscs_node_stats - MSCS database obtained from
|
||||
* MSCS Request and Response in the control path. This data is used
|
||||
* by the AP to find out what priority to set based on the tuple
|
||||
* classification during packet processing.
|
||||
* @user_priority_bitmap - User priority bitmap obtained during
|
||||
* handshake
|
||||
* @user_priority_limit - User priority limit obtained during
|
||||
* handshake
|
||||
* @classifier_mask - params to be compared during processing
|
||||
*/
|
||||
struct dp_peer_mscs_parameter {
|
||||
uint8_t user_priority_bitmap;
|
||||
uint8_t user_priority_limit;
|
||||
uint8_t classifier_mask;
|
||||
};
|
||||
|
||||
/* Peer structure for data path state */
|
||||
struct dp_peer {
|
||||
/* VDEV to which this peer is associated */
|
||||
@@ -2509,6 +2528,8 @@ struct dp_peer {
|
||||
qdf_atomic_t mod_refs[DP_MOD_ID_MAX];
|
||||
|
||||
uint8_t peer_state;
|
||||
struct dp_peer_mscs_parameter mscs_ipv4_parameter, mscs_ipv6_parameter;
|
||||
bool mscs_active;
|
||||
};
|
||||
|
||||
/*
|
||||
|
مرجع در شماره جدید
Block a user