|
@@ -22,12 +22,15 @@
|
|
#include "wlan_lmac_if_api.h"
|
|
#include "wlan_lmac_if_api.h"
|
|
#include "wlan_mgmt_txrx_tgt_api.h"
|
|
#include "wlan_mgmt_txrx_tgt_api.h"
|
|
|
|
|
|
-/* Function pointer to call DA/OL specific tx_ops registration function */
|
|
|
|
-QDF_STATUS (*wlan_lmac_if_tx_ops_create_handler[MAX_DEV_TYPE])
|
|
|
|
|
|
+/* Function pointer for OL/WMA specific UMAC tx_ops
|
|
|
|
+ * registration.
|
|
|
|
+ */
|
|
|
|
+QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register)
|
|
(struct wlan_lmac_if_tx_ops *tx_ops);
|
|
(struct wlan_lmac_if_tx_ops *tx_ops);
|
|
|
|
+EXPORT_SYMBOL(wlan_lmac_if_umac_tx_ops_register);
|
|
|
|
|
|
/**
|
|
/**
|
|
- * wlan_lmac_if_register_rx_handlers() - UMAC rx handler register
|
|
|
|
|
|
+ * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
|
|
* @rx_ops: Pointer to rx_ops structure to be populated
|
|
* @rx_ops: Pointer to rx_ops structure to be populated
|
|
*
|
|
*
|
|
* Register umac RX callabacks which will be called by DA/OL/WMA/WMI
|
|
* Register umac RX callabacks which will be called by DA/OL/WMA/WMI
|
|
@@ -35,7 +38,7 @@ QDF_STATUS (*wlan_lmac_if_tx_ops_create_handler[MAX_DEV_TYPE])
|
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
|
*/
|
|
*/
|
|
QDF_STATUS
|
|
QDF_STATUS
|
|
-wlan_lmac_if_register_rx_handlers(struct wlan_lmac_if_rx_ops *rx_ops)
|
|
|
|
|
|
+wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
|
{
|
|
{
|
|
/* Component specific public api's to be called to register
|
|
/* Component specific public api's to be called to register
|
|
* respective callbacks
|
|
* respective callbacks
|
|
@@ -61,63 +64,12 @@ wlan_lmac_if_register_rx_handlers(struct wlan_lmac_if_rx_ops *rx_ops)
|
|
tgt_mgmt_txrx_get_peer_from_desc_id;
|
|
tgt_mgmt_txrx_get_peer_from_desc_id;
|
|
mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
|
|
mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
|
|
tgt_mgmt_txrx_get_vdev_id_from_desc_id;
|
|
tgt_mgmt_txrx_get_vdev_id_from_desc_id;
|
|
-
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
return QDF_STATUS_SUCCESS;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * wlan_lmac_if_open() - lmac_if open
|
|
|
|
- * @psoc: psoc context
|
|
|
|
- *
|
|
|
|
- * Opens up lmac_if southbound layer. This function calls OL,DA and UMAC
|
|
|
|
- * modules to register respective tx and rx callbacks.
|
|
|
|
- *
|
|
|
|
- * Return: QDF_STATUS
|
|
|
|
- */
|
|
|
|
-QDF_STATUS wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc)
|
|
|
|
-{
|
|
|
|
- WLAN_DEV_TYPE dev_type;
|
|
|
|
-
|
|
|
|
- dev_type = psoc->soc_nif.phy_type;
|
|
|
|
-
|
|
|
|
- if (dev_type == WLAN_DEV_DA) {
|
|
|
|
- wlan_lmac_if_tx_ops_create_handler[WLAN_DEV_DA]
|
|
|
|
- (&psoc->soc_cb.tx_ops);
|
|
|
|
- } else if (dev_type == WLAN_DEV_OL) {
|
|
|
|
- wlan_lmac_if_tx_ops_create_handler[WLAN_DEV_OL]
|
|
|
|
- (&psoc->soc_cb.tx_ops);
|
|
|
|
- } else {
|
|
|
|
- /* Control should ideally not reach here */
|
|
|
|
- qdf_print("Invalid device type");
|
|
|
|
- return QDF_STATUS_E_INVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /* Function call into umac to register rx-ops handlers */
|
|
|
|
- wlan_lmac_if_register_rx_handlers(&psoc->soc_cb.rx_ops);
|
|
|
|
-
|
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(wlan_lmac_if_open);
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * wlan_lmac_if_close() - Close lmac_if
|
|
|
|
- * @psoc: psoc context
|
|
|
|
- *
|
|
|
|
- * Deregister lmac_if TX and RX handlers
|
|
|
|
- *
|
|
|
|
- * Return: QDF_STATUS_SUCCESS - in case of success
|
|
|
|
- */
|
|
|
|
-QDF_STATUS wlan_lmac_if_close(struct wlan_objmgr_psoc *psoc)
|
|
|
|
-{
|
|
|
|
- qdf_mem_set(&psoc->soc_cb.tx_ops, 0, sizeof(psoc->soc_cb.tx_ops));
|
|
|
|
- qdf_mem_set(&psoc->soc_cb.rx_ops, 0, sizeof(psoc->soc_cb.rx_ops));
|
|
|
|
-
|
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(wlan_lmac_if_close);
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * wlan_lmac_if_assign_tx_registration_cb() -tx registration callback assignment
|
|
|
|
|
|
+ * wlan_lmac_if_set_umac_txops_registration_cb() - tx registration
|
|
|
|
+ * callback assignment
|
|
* @dev_type: Dev type can be either Direct attach or Offload
|
|
* @dev_type: Dev type can be either Direct attach or Offload
|
|
* @handler: handler to be called for LMAC tx ops registration
|
|
* @handler: handler to be called for LMAC tx ops registration
|
|
*
|
|
*
|
|
@@ -126,10 +78,11 @@ EXPORT_SYMBOL(wlan_lmac_if_close);
|
|
*
|
|
*
|
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
|
*/
|
|
*/
|
|
-QDF_STATUS wlan_lmac_if_assign_tx_registration_cb(WLAN_DEV_TYPE dev_type,
|
|
|
|
- QDF_STATUS (*handler)(struct wlan_lmac_if_tx_ops *))
|
|
|
|
|
|
+QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler)
|
|
|
|
+ (struct wlan_lmac_if_tx_ops *))
|
|
{
|
|
{
|
|
- wlan_lmac_if_tx_ops_create_handler[dev_type] = handler;
|
|
|
|
|
|
+ wlan_lmac_if_umac_tx_ops_register = handler;
|
|
return QDF_STATUS_SUCCESS;
|
|
return QDF_STATUS_SUCCESS;
|
|
}
|
|
}
|
|
-EXPORT_SYMBOL(wlan_lmac_if_assign_tx_registration_cb);
|
|
|
|
|
|
+EXPORT_SYMBOL(wlan_lmac_if_set_umac_txops_registration_cb);
|
|
|
|
+
|