qcacmn: Add frame drop support for ADDBA Response

Add frame drop support for ADDBA Response

Change-Id: Id836f84a154ede034db91b669691afa2925262bc
CRs-Fixed: 2733849
This commit is contained in:
Jayachandran Sreekumaran
2020-07-16 16:33:21 +05:30
committed by snandini
parent 59fc94ae9f
commit 1d96b191cf
3 changed files with 17 additions and 8 deletions

View File

@@ -76,6 +76,7 @@ QDF_STATUS wlan_iot_sim_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
* @frm: action frame
* @cat: action frame category
* @act: action frame details
* @rx: TRUE if its getting called in the rx path
*
* Provides the simulation database index for the action frame.
*
@@ -83,7 +84,7 @@ QDF_STATUS wlan_iot_sim_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
* QDF_STATUS_E_FAILURE on failure
*/
QDF_STATUS iot_sim_get_index_for_action_frm(uint8_t *frm, uint8_t *cat,
uint8_t *act);
uint8_t *act, bool rx);
/**
* iot_sim_frame_update() - Management frame update

View File

@@ -97,7 +97,7 @@ iot_sim_parse_action_frame(uint16_t length, uint16_t offset, uint8_t *content,
/* Offset represet category type and action type */
status = iot_sim_get_index_for_action_frm(hex, category,
action);
action, false);
if (status == QDF_STATUS_E_FAULT) {
iot_sim_err("Get indices for action failed");
return status;
@@ -113,7 +113,7 @@ iot_sim_parse_action_frame(uint16_t length, uint16_t offset, uint8_t *content,
return QDF_STATUS_E_FAILURE;
}
status = iot_sim_get_index_for_action_frm(ptr, category,
action);
action, false);
}
return status;
}
@@ -370,12 +370,13 @@ err:
* @frm: buf containing 802.11 action/category codes
* @cat_type: buf to hold converted category code
* @act_type: buf to hold converted action code
* @rx: TRUE if its getting called in the rx path
*
* Return: QDF_STATUS_SUCCESS on success, failure otherwise
*/
QDF_STATUS
iot_sim_get_index_for_action_frm(uint8_t *frm, uint8_t *cat_type,
uint8_t *act_type)
uint8_t *act_type, bool rx)
{
uint8_t category, action;
@@ -388,8 +389,14 @@ iot_sim_get_index_for_action_frm(uint8_t *frm, uint8_t *cat_type,
case IEEE80211_ACTION_CAT_BA:
switch (action) {
case IEEE80211_ACTION_BA_ADDBA_REQUEST:
*cat_type = category;
*act_type = action;
if (rx) {
*cat_type = CAT_BA;
*act_type = action;
} else {
*cat_type = category;
*act_type = action;
}
break;
case IEEE80211_ACTION_BA_ADDBA_RESPONSE:
case IEEE80211_ACTION_BA_DELBA:
@@ -1145,7 +1152,7 @@ iot_sim_debug_drop_write(struct file *file,
* convert 802.11 category and action code to iot sim codes
*/
status = iot_sim_get_index_for_action_frm(tmp, &category,
&action);
&action, false);
if (QDF_IS_STATUS_ERROR(status))
goto free;

View File

@@ -281,7 +281,8 @@ QDF_STATUS iot_sim_frame_update(struct wlan_objmgr_pdev *pdev, qdf_nbuf_t nbuf,
frm = buf + IEEE80211_FRAME_BODY_OFFSET;
is_action_frm = true;
if (iot_sim_get_index_for_action_frm(frm, &cat, &cat_index)) {
if (iot_sim_get_index_for_action_frm(frm, &cat,
&cat_index, !tx)) {
iot_sim_err("get_index_for_action_frm failed");
return QDF_STATUS_SUCCESS;
}