qcacmn: iot_sim add support for drop operation
Adding support for iot_sim drop operation. Drop operation will be handled in Rx direction. Change-Id: If2e1c9663a69fcd16715cdd1d28639a388ea1c0c CRs-Fixed: 2686309
This commit is contained in:

committed by
nshrivas

orang tua
cb709cad18
melakukan
c5cdd1eaaf
@@ -191,7 +191,9 @@ QDF_STATUS iot_sim_mgmt_tx_update(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
if (rx_ops->iot_sim_rx_ops.iot_sim_cmd_handler) {
|
||||
status = rx_ops->iot_sim_rx_ops.iot_sim_cmd_handler(vdev, buf);
|
||||
status = rx_ops->iot_sim_rx_ops.iot_sim_cmd_handler(vdev,
|
||||
buf,
|
||||
true);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
mgmt_txrx_err("iot_sim_cmd_handler returned failure");
|
||||
}
|
||||
|
@@ -908,6 +908,63 @@ mgmt_txrx_get_frm_type(uint8_t mgmt_subtype, uint8_t *mpdu_data_ptr)
|
||||
return frm_type;
|
||||
}
|
||||
|
||||
#ifdef WLAN_IOT_SIM_SUPPORT
|
||||
static QDF_STATUS simulation_frame_update(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *rx_param)
|
||||
{
|
||||
uint8_t *addr = NULL;
|
||||
struct wlan_objmgr_vdev *vdev = NULL;
|
||||
uint8_t pdevid = 0;
|
||||
wlan_objmgr_ref_dbgid dbgid;
|
||||
struct wlan_lmac_if_rx_ops *rx_ops = NULL;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct ieee80211_frame *wh;
|
||||
u_int8_t *data;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
|
||||
if (rx_ops && rx_ops->iot_sim_rx_ops.iot_sim_cmd_handler) {
|
||||
data = (uint8_t *)qdf_nbuf_data(buf);
|
||||
wh = (struct ieee80211_frame *)data;
|
||||
addr = (uint8_t *)wh->i_addr3;
|
||||
pdevid = rx_param->pdev_id;
|
||||
dbgid = WLAN_IOT_SIM_ID;
|
||||
if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *)addr)) {
|
||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, pdevid,
|
||||
dbgid);
|
||||
if (pdev) {
|
||||
vdev = wlan_objmgr_pdev_get_first_vdev(pdev,
|
||||
dbgid);
|
||||
wlan_objmgr_pdev_release_ref(pdev, dbgid);
|
||||
}
|
||||
} else
|
||||
vdev = wlan_objmgr_get_vdev_by_macaddr_from_psoc(psoc,
|
||||
pdevid,
|
||||
addr,
|
||||
dbgid);
|
||||
if (vdev) {
|
||||
status = rx_ops->iot_sim_rx_ops.
|
||||
iot_sim_cmd_handler(vdev, buf, false);
|
||||
if (status == QDF_STATUS_E_NULL_VALUE) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, dbgid);
|
||||
mgmt_txrx_debug("iot_sim:Pkt processed at RX");
|
||||
return status;
|
||||
}
|
||||
wlan_objmgr_vdev_release_ref(vdev, dbgid);
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS simulation_frame_update(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *rx_param)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_mgmt_txrx_rx_handler_list_copy() - copies rx handler list
|
||||
* @rx_handler: pointer to rx handler list
|
||||
@@ -1084,6 +1141,9 @@ QDF_STATUS tgt_mgmt_txrx_rx_frame_handler(
|
||||
WLAN_SEQ_SEQ_SHIFT), mgmt_rx_params->rssi,
|
||||
mgmt_rx_params->tsf_delta);
|
||||
|
||||
if (simulation_frame_update(psoc, buf, mgmt_rx_params))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
mgmt_txrx_psoc_ctx = (struct mgmt_txrx_priv_psoc_context *)
|
||||
wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||
WLAN_UMAC_COMP_MGMT_TXRX);
|
||||
|
@@ -267,6 +267,7 @@ typedef void (*wlan_objmgr_peer_status_handler)(
|
||||
* @FTM_TIME_SYNC_ID: ftm time sync operations
|
||||
* @WLAN_PKT_CAPTURE_ID Packet capture operations
|
||||
* @WLAN_DCS_ID: DCS operations
|
||||
* @WLAN_IOT_SIM_ID: IOT Simulation feature
|
||||
* @WLAN_REF_ID_MAX: Max id used to generate ref count tracking array
|
||||
*/
|
||||
/* New value added to the enum must also be reflected in function
|
||||
@@ -349,6 +350,7 @@ typedef enum {
|
||||
FTM_TIME_SYNC_ID = 73,
|
||||
WLAN_PKT_CAPTURE_ID = 74,
|
||||
WLAN_DCS_ID = 75,
|
||||
WLAN_IOT_SIM_ID = 76,
|
||||
WLAN_REF_ID_MAX,
|
||||
} wlan_objmgr_ref_dbgid;
|
||||
|
||||
@@ -437,7 +439,8 @@ static inline const char *string_from_dbgid(wlan_objmgr_ref_dbgid id)
|
||||
"WLAN_PSOC_TARGET_IF_ID",
|
||||
"FTM_TIME_SYNC_ID",
|
||||
"WLAN_PKT_CAPTURE_ID",
|
||||
"WLAN_DCS_ID"};
|
||||
"WLAN_DCS_ID",
|
||||
"WLAN_IOT_SIM_ID"};
|
||||
|
||||
if (id >= WLAN_REF_ID_MAX)
|
||||
return "Unknown";
|
||||
|
@@ -1424,7 +1424,7 @@ struct wlan_lmac_if_sptrl_rx_ops {
|
||||
**/
|
||||
struct wlan_lmac_if_iot_sim_rx_ops {
|
||||
QDF_STATUS (*iot_sim_cmd_handler)(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_nbuf_t n_buf);
|
||||
qdf_nbuf_t n_buf, bool tx);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user