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
orang tua 59fc94ae9f
melakukan 1d96b191cf
3 mengubah file dengan 17 tambahan dan 8 penghapusan

Melihat File

@@ -76,6 +76,7 @@ QDF_STATUS wlan_iot_sim_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
* @frm: action frame * @frm: action frame
* @cat: action frame category * @cat: action frame category
* @act: action frame details * @act: action frame details
* @rx: TRUE if its getting called in the rx path
* *
* Provides the simulation database index for the action frame. * 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_E_FAILURE on failure
*/ */
QDF_STATUS iot_sim_get_index_for_action_frm(uint8_t *frm, uint8_t *cat, 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 * iot_sim_frame_update() - Management frame update

Melihat 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 */ /* Offset represet category type and action type */
status = iot_sim_get_index_for_action_frm(hex, category, status = iot_sim_get_index_for_action_frm(hex, category,
action); action, false);
if (status == QDF_STATUS_E_FAULT) { if (status == QDF_STATUS_E_FAULT) {
iot_sim_err("Get indices for action failed"); iot_sim_err("Get indices for action failed");
return status; 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; return QDF_STATUS_E_FAILURE;
} }
status = iot_sim_get_index_for_action_frm(ptr, category, status = iot_sim_get_index_for_action_frm(ptr, category,
action); action, false);
} }
return status; return status;
} }
@@ -370,12 +370,13 @@ err:
* @frm: buf containing 802.11 action/category codes * @frm: buf containing 802.11 action/category codes
* @cat_type: buf to hold converted category code * @cat_type: buf to hold converted category code
* @act_type: buf to hold converted action 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 * Return: QDF_STATUS_SUCCESS on success, failure otherwise
*/ */
QDF_STATUS QDF_STATUS
iot_sim_get_index_for_action_frm(uint8_t *frm, uint8_t *cat_type, 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; 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: case IEEE80211_ACTION_CAT_BA:
switch (action) { switch (action) {
case IEEE80211_ACTION_BA_ADDBA_REQUEST: case IEEE80211_ACTION_BA_ADDBA_REQUEST:
*cat_type = category; if (rx) {
*act_type = action; *cat_type = CAT_BA;
*act_type = action;
} else {
*cat_type = category;
*act_type = action;
}
break; break;
case IEEE80211_ACTION_BA_ADDBA_RESPONSE: case IEEE80211_ACTION_BA_ADDBA_RESPONSE:
case IEEE80211_ACTION_BA_DELBA: 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 * convert 802.11 category and action code to iot sim codes
*/ */
status = iot_sim_get_index_for_action_frm(tmp, &category, status = iot_sim_get_index_for_action_frm(tmp, &category,
&action); &action, false);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto free; goto free;

Melihat 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; frm = buf + IEEE80211_FRAME_BODY_OFFSET;
is_action_frm = true; 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"); iot_sim_err("get_index_for_action_frm failed");
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }