mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacld-3.0: Data path changes to use converged APIs (Part 2)
Changes to register a per vdev rx callback function. Register a per-vdev receive callback function using the vdev registration API provided by the converged data path API. The changes include - removing the older method of registering the receive callback - modify the HDD callback to adhere to the rx callback function defined by the converged data path API - modify the invocation of the callback function in the data path Change-Id: I2aef905132af4b3d7db22c7ec315d114607c9383 CRs-Fixed: 994638
This commit is contained in:
parent
12a0839cd6
commit
182b027a73
9 changed files with 93 additions and 74 deletions
|
|
@ -136,8 +136,8 @@ qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev,
|
|||
qdf_nbuf_t skb);
|
||||
#endif
|
||||
|
||||
QDF_STATUS ol_txrx_register_peer(ol_rx_callback_fp rxcb,
|
||||
struct ol_txrx_desc_type *sta_desc);
|
||||
QDF_STATUS ol_txrx_register_peer
|
||||
(struct ol_txrx_desc_type *sta_desc);
|
||||
|
||||
QDF_STATUS ol_txrx_clear_peer(uint8_t sta_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -1146,6 +1146,7 @@ ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev,
|
|||
qdf_atomic_set(&vdev->os_q_paused, 0);
|
||||
vdev->tx_fl_lwm = 0;
|
||||
vdev->tx_fl_hwm = 0;
|
||||
vdev->rx = NULL;
|
||||
vdev->wait_on_peer_id = OL_TXRX_INVALID_LOCAL_PEER_ID;
|
||||
qdf_spinlock_create(&vdev->flow_control_lock);
|
||||
vdev->osif_flow_control_cb = NULL;
|
||||
|
|
@ -1197,7 +1198,7 @@ void ol_txrx_vdev_register(ol_txrx_vdev_handle vdev,
|
|||
struct ol_txrx_ops *txrx_ops)
|
||||
{
|
||||
vdev->osif_dev = osif_vdev;
|
||||
txrx_ops->tx.tx = vdev->tx = OL_TX_LL;
|
||||
vdev->rx = txrx_ops->rx.rx;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1355,18 +1356,19 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
|
|||
{
|
||||
struct ol_rx_cached_buf *cache_buf;
|
||||
QDF_STATUS ret;
|
||||
ol_rx_callback_fp data_rx = NULL;
|
||||
void *cds_ctx = cds_get_global_context();
|
||||
ol_txrx_rx_fp data_rx = NULL;
|
||||
|
||||
if (qdf_atomic_inc_return(&peer->flush_in_progress) > 1) {
|
||||
qdf_atomic_dec(&peer->flush_in_progress);
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_assert(cds_ctx);
|
||||
qdf_assert(peer->vdev);
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
|
||||
if (peer->state >= ol_txrx_peer_state_conn)
|
||||
data_rx = peer->osif_rx;
|
||||
data_rx = peer->vdev->rx;
|
||||
else
|
||||
drop = true;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
|
@ -1381,7 +1383,7 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
|
|||
qdf_nbuf_free(cache_buf->buf);
|
||||
} else {
|
||||
/* Flush the cached frames to HDD */
|
||||
ret = data_rx(cds_ctx, cache_buf->buf, peer->local_id);
|
||||
ret = data_rx(peer->vdev->osif_dev, cache_buf->buf);
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
qdf_nbuf_free(cache_buf->buf);
|
||||
}
|
||||
|
|
@ -1498,8 +1500,7 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
|
|||
for (i = 0; i < MAX_NUM_PEER_ID_PER_PEER; i++)
|
||||
peer->peer_ids[i] = HTT_INVALID_PEER;
|
||||
|
||||
|
||||
peer->osif_rx = NULL;
|
||||
peer->vdev->rx = NULL;
|
||||
qdf_spinlock_create(&peer->peer_info_lock);
|
||||
qdf_spinlock_create(&peer->bufq_lock);
|
||||
|
||||
|
|
@ -3143,12 +3144,11 @@ void ol_txrx_clear_stats(uint16_t value)
|
|||
static void ol_rx_data_cb(struct ol_txrx_peer_t *peer,
|
||||
qdf_nbuf_t buf_list)
|
||||
{
|
||||
void *cds_ctx = cds_get_global_context();
|
||||
qdf_nbuf_t buf, next_buf;
|
||||
QDF_STATUS ret;
|
||||
ol_rx_callback_fp data_rx = NULL;
|
||||
ol_txrx_rx_fp data_rx = NULL;
|
||||
|
||||
if (qdf_unlikely(!cds_ctx))
|
||||
if (qdf_unlikely(!peer->vdev))
|
||||
goto free_buf;
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
|
|
@ -3156,7 +3156,8 @@ static void ol_rx_data_cb(struct ol_txrx_peer_t *peer,
|
|||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
goto free_buf;
|
||||
}
|
||||
data_rx = peer->osif_rx;
|
||||
|
||||
data_rx = peer->vdev->rx;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
qdf_spin_lock_bh(&peer->bufq_lock);
|
||||
|
|
@ -3171,7 +3172,7 @@ static void ol_rx_data_cb(struct ol_txrx_peer_t *peer,
|
|||
while (buf) {
|
||||
next_buf = qdf_nbuf_queue_next(buf);
|
||||
qdf_nbuf_set_next(buf, NULL); /* Add NULL terminator */
|
||||
ret = data_rx(cds_ctx, buf, peer->local_id);
|
||||
ret = data_rx(peer->vdev->osif_dev, buf);
|
||||
if (ret != QDF_STATUS_SUCCESS) {
|
||||
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "Frame Rx to HDD failed");
|
||||
qdf_nbuf_free(buf);
|
||||
|
|
@ -3204,7 +3205,7 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer,
|
|||
* T2H MSG running on SIRQ context,
|
||||
* IPA kernel module API should not be called on SIRQ CTXT */
|
||||
qdf_nbuf_t buf, next_buf;
|
||||
ol_rx_callback_fp data_rx = NULL;
|
||||
ol_txrx_rx_fp data_rx = NULL;
|
||||
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if ((!peer) || (!pdev)) {
|
||||
|
|
@ -3212,9 +3213,11 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer,
|
|||
goto drop_rx_buf;
|
||||
}
|
||||
|
||||
qdf_assert(peer->vdev);
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
if (peer->state >= ol_txrx_peer_state_conn)
|
||||
data_rx = peer->osif_rx;
|
||||
data_rx = peer->vdev->rx;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
/*
|
||||
|
|
@ -3291,13 +3294,11 @@ drop_rx_buf:
|
|||
|
||||
/**
|
||||
* ol_txrx_register_peer() - register peer
|
||||
* @rxcb: rx callback
|
||||
* @sta_desc: sta descriptor
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS ol_txrx_register_peer(ol_rx_callback_fp rxcb,
|
||||
struct ol_txrx_desc_type *sta_desc)
|
||||
QDF_STATUS ol_txrx_register_peer(struct ol_txrx_desc_type *sta_desc)
|
||||
{
|
||||
struct ol_txrx_peer_t *peer;
|
||||
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
|
@ -3320,7 +3321,6 @@ QDF_STATUS ol_txrx_register_peer(ol_rx_callback_fp rxcb,
|
|||
return QDF_STATUS_E_FAULT;
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
peer->osif_rx = rxcb;
|
||||
peer->state = ol_txrx_peer_state_conn;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
|
|
@ -3379,7 +3379,7 @@ QDF_STATUS ol_txrx_clear_peer(uint8_t sta_id)
|
|||
ol_txrx_flush_rx_frames(peer, 1);
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
peer->osif_rx = NULL;
|
||||
peer->vdev->rx = NULL;
|
||||
peer->state = ol_txrx_peer_state_disc;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ struct ol_txrx_vdev_t {
|
|||
struct ol_txrx_peer_t *last_real_peer; /* last real peer created for
|
||||
this vdev (not "self"
|
||||
pseudo-peer) */
|
||||
ol_txrx_tx_fp tx; /* transmit function used by this vdev */
|
||||
ol_txrx_rx_fp rx; /* receive function used by this vdev */
|
||||
|
||||
struct {
|
||||
/*
|
||||
|
|
@ -918,7 +918,6 @@ struct ol_txrx_peer_t {
|
|||
*/
|
||||
enum ol_txrx_peer_state state;
|
||||
qdf_spinlock_t peer_info_lock;
|
||||
ol_rx_callback_fp osif_rx;
|
||||
qdf_spinlock_t bufq_lock;
|
||||
struct list_head cached_bufq;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,9 +46,8 @@ QDF_STATUS hdd_softap_init_tx_rx_sta(hdd_adapter_t *pAdapter,
|
|||
struct qdf_mac_addr *pmacAddrSTA);
|
||||
QDF_STATUS hdd_softap_deinit_tx_rx_sta(hdd_adapter_t *pAdapter,
|
||||
uint8_t STAId);
|
||||
QDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
|
||||
qdf_nbuf_t rxBufChain,
|
||||
uint8_t staId);
|
||||
|
||||
QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBufChain);
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS hdd_softap_rx_mul_packet_cbk(void *cds_context,
|
||||
qdf_nbuf_t rx_buf_list, uint8_t staId);
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@
|
|||
|
||||
int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
void hdd_tx_timeout(struct net_device *dev);
|
||||
|
||||
QDF_STATUS hdd_init_tx_rx(hdd_adapter_t *pAdapter);
|
||||
QDF_STATUS hdd_deinit_tx_rx(hdd_adapter_t *pAdapter);
|
||||
QDF_STATUS hdd_rx_packet_cbk(void *cds_context, qdf_nbuf_t rxBufChain,
|
||||
uint8_t staId);
|
||||
QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf);
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS hdd_rx_mul_packet_cbk(void *cds_context,
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
#include "sme_power_save_api.h"
|
||||
#include "ol_txrx_ctrl_api.h"
|
||||
#include "ol_txrx_types.h"
|
||||
#include "ol_txrx.h"
|
||||
|
||||
/* These are needed to recognize WPA and RSN suite types */
|
||||
#define HDD_WPA_OUI_SIZE 4
|
||||
|
|
@ -1269,6 +1270,7 @@ static QDF_STATUS hdd_roam_register_sta(hdd_adapter_t *pAdapter,
|
|||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
struct ol_txrx_desc_type staDesc = { 0 };
|
||||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
struct ol_txrx_ops txrx_ops;
|
||||
|
||||
if (NULL == pBssDesc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -1291,8 +1293,8 @@ static QDF_STATUS hdd_roam_register_sta(hdd_adapter_t *pAdapter,
|
|||
staDesc.is_wapi_supported = 0;
|
||||
#endif /* FEATURE_WLAN_WAPI */
|
||||
|
||||
qdf_status = ol_txrx_register_peer(hdd_rx_packet_cbk,
|
||||
&staDesc);
|
||||
qdf_status = ol_txrx_register_peer(&staDesc);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
hddLog(LOGW,
|
||||
"ol_txrx_register_peer() failed to register. Status=%d [0x%08X]",
|
||||
|
|
@ -1300,6 +1302,13 @@ static QDF_STATUS hdd_roam_register_sta(hdd_adapter_t *pAdapter,
|
|||
return qdf_status;
|
||||
}
|
||||
|
||||
/* Register the vdev transmit and receive functions */
|
||||
qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
|
||||
txrx_ops.rx.rx = hdd_rx_packet_cbk;
|
||||
ol_txrx_vdev_register(
|
||||
ol_txrx_get_vdev_from_vdev_id(pAdapter->sessionId),
|
||||
pAdapter, &txrx_ops);
|
||||
|
||||
if (!pRoamInfo->fAuthRequired) {
|
||||
/*
|
||||
* Connections that do not need Upper layer auth, transition
|
||||
|
|
@ -2836,6 +2845,7 @@ QDF_STATUS hdd_roam_register_tdlssta(hdd_adapter_t *pAdapter,
|
|||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
struct ol_txrx_desc_type staDesc = { 0 };
|
||||
struct ol_txrx_ops txrx_ops;
|
||||
|
||||
/*
|
||||
* TDLS sta in BSS should be set as STA type TDLS and STA MAC should
|
||||
|
|
@ -2849,14 +2859,20 @@ QDF_STATUS hdd_roam_register_tdlssta(hdd_adapter_t *pAdapter,
|
|||
|
||||
|
||||
/* Register the Station with TL... */
|
||||
qdf_status = ol_txrx_register_peer(hdd_rx_packet_cbk,
|
||||
&staDesc);
|
||||
qdf_status = ol_txrx_register_peer(&staDesc);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
hddLog(LOGE, FL("ol_txrx_register_peer() failed to register. Status=%d [0x%08X]"),
|
||||
qdf_status, qdf_status);
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/* Register the vdev transmit and receive functions */
|
||||
qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
|
||||
txrx_ops.rx.rx = hdd_rx_packet_cbk;
|
||||
ol_txrx_vdev_register(
|
||||
ol_txrx_get_vdev_from_vdev_id(pAdapter->sessionId),
|
||||
pAdapter, &txrx_ops);
|
||||
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "wlan_tgt_def_config.h"
|
||||
#include "sch_api.h"
|
||||
#include "wma_api.h"
|
||||
#include "ol_txrx.h"
|
||||
|
||||
/* Structure definitions for WLAN_SET_DOT11P_CHANNEL_SCHED */
|
||||
#define AIFSN_MIN (2)
|
||||
|
|
@ -246,6 +247,7 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
|
|||
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
uint8_t peer_id;
|
||||
struct ol_txrx_ops txrx_ops;
|
||||
|
||||
qdf_status = ol_txrx_register_ocb_peer(hdd_ctx->pcds_context,
|
||||
adapter->macAddressCurrent.bytes,
|
||||
|
|
@ -260,14 +262,20 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
|
|||
sta_desc.sta_id = peer_id;
|
||||
sta_desc.is_qos_enabled = 1;
|
||||
|
||||
qdf_status = ol_txrx_register_peer(hdd_rx_packet_cbk,
|
||||
&sta_desc);
|
||||
qdf_status = ol_txrx_register_peer(&sta_desc);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
hddLog(LOGE, FL("Failed to register. Status= %d [0x%08X]"),
|
||||
qdf_status, qdf_status);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Register the vdev transmit and receive functions */
|
||||
qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
|
||||
txrx_ops.rx.rx = hdd_rx_packet_cbk;
|
||||
ol_txrx_vdev_register(
|
||||
ol_txrx_get_vdev_from_vdev_id(adapter->sessionId),
|
||||
adapter, &txrx_ops);
|
||||
|
||||
if (pHddStaCtx->conn_info.staId[0] != 0 &&
|
||||
pHddStaCtx->conn_info.staId[0] != peer_id) {
|
||||
hddLog(LOGE, FL("The ID for the OCB station has changed."));
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include <net/ieee80211_radiotap.h>
|
||||
#include <cds_sched.h>
|
||||
#include <wlan_hdd_napi.h>
|
||||
#include <ol_txrx.h>
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
#include <wlan_hdd_ipa.h>
|
||||
|
|
@ -489,9 +490,8 @@ QDF_STATUS hdd_softap_deinit_tx_rx_sta(hdd_adapter_t *pAdapter, uint8_t STAId)
|
|||
|
||||
/**
|
||||
* hdd_softap_rx_packet_cbk() - Receive packet handler
|
||||
* @cds_context: pointer to CDS context
|
||||
* @context: pointer to HDD context
|
||||
* @rxBuf: pointer to rx qdf_nbuf
|
||||
* @staId: Station Id
|
||||
*
|
||||
* Receive callback registered with TL. TL will call this to notify
|
||||
* the HDD when one or more packets were received for a registered
|
||||
|
|
@ -500,8 +500,7 @@ QDF_STATUS hdd_softap_deinit_tx_rx_sta(hdd_adapter_t *pAdapter, uint8_t STAId)
|
|||
* Return: QDF_STATUS_E_FAILURE if any errors encountered,
|
||||
* QDF_STATUS_SUCCESS otherwise
|
||||
*/
|
||||
QDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
|
||||
qdf_nbuf_t rxBuf, uint8_t staId)
|
||||
QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
|
||||
{
|
||||
hdd_adapter_t *pAdapter = NULL;
|
||||
int rxstat;
|
||||
|
|
@ -513,24 +512,24 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
|
|||
#endif /* QCA_PKT_PROTO_TRACE */
|
||||
|
||||
/* Sanity check on inputs */
|
||||
if ((NULL == cds_context) || (NULL == rxBuf)) {
|
||||
if (unlikely((NULL == context) || (NULL == rxBuf))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Null params being passed", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pHddCtx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
if (NULL == pHddCtx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is Null", __func__);
|
||||
pAdapter = (hdd_adapter_t *)context;
|
||||
if (unlikely(WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_FATAL,
|
||||
"Magic cookie(%x) for adapter sanity verification is invalid",
|
||||
pAdapter->magic);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pAdapter = pHddCtx->sta_to_adapter[staId];
|
||||
if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
hddLog(LOGE,
|
||||
FL("invalid adapter %p or adapter has invalid magic"),
|
||||
pAdapter);
|
||||
pHddCtx = pAdapter->pHddCtx;
|
||||
if (unlikely(NULL == pHddCtx)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is Null", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
|
@ -541,7 +540,7 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
|
|||
|
||||
skb->dev = pAdapter->dev;
|
||||
|
||||
if (skb->dev == NULL) {
|
||||
if (unlikely(skb->dev == NULL)) {
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: ERROR!!Invalid netdevice", __func__);
|
||||
|
|
@ -667,6 +666,7 @@ QDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
|
|||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
struct ol_txrx_desc_type staDesc = { 0 };
|
||||
hdd_context_t *pHddCtx = pAdapter->pHddCtx;
|
||||
struct ol_txrx_ops txrx_ops;
|
||||
|
||||
/*
|
||||
* Clean up old entry if it is not cleaned up properly
|
||||
|
|
@ -692,10 +692,7 @@ QDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
|
|||
"HDD SOFTAP register TL QoS_enabled=%d",
|
||||
staDesc.is_qos_enabled);
|
||||
|
||||
|
||||
qdf_status =
|
||||
ol_txrx_register_peer(hdd_softap_rx_packet_cbk,
|
||||
&staDesc);
|
||||
qdf_status = ol_txrx_register_peer(&staDesc);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"SOFTAP ol_txrx_register_peer() failed to register. Status= %d [0x%08X]",
|
||||
|
|
@ -703,6 +700,13 @@ QDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
|
|||
return qdf_status;
|
||||
}
|
||||
|
||||
/* Register the vdev transmit and receive functions */
|
||||
qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
|
||||
txrx_ops.rx.rx = hdd_softap_rx_packet_cbk;
|
||||
ol_txrx_vdev_register(
|
||||
ol_txrx_get_vdev_from_vdev_id(pAdapter->sessionId),
|
||||
pAdapter, &txrx_ops);
|
||||
|
||||
/* if ( WPA ), tell TL to go to 'connected' and after keys come to the
|
||||
* driver then go to 'authenticated'. For all other authentication
|
||||
* types (those that do not require upper layer authentication) we can
|
||||
|
|
|
|||
|
|
@ -641,9 +641,8 @@ QDF_STATUS hdd_deinit_tx_rx(hdd_adapter_t *pAdapter)
|
|||
|
||||
/**
|
||||
* hdd_rx_packet_cbk() - Receive packet handler
|
||||
* @cds_context: pointer to CDS context
|
||||
* @context: pointer to HDD context
|
||||
* @rxBuf: pointer to rx qdf_nbuf
|
||||
* @staId: Station Id
|
||||
*
|
||||
* Receive callback registered with TL. TL will call this to notify
|
||||
* the HDD when one or more packets were received for a registered
|
||||
|
|
@ -652,7 +651,7 @@ QDF_STATUS hdd_deinit_tx_rx(hdd_adapter_t *pAdapter)
|
|||
* Return: QDF_STATUS_E_FAILURE if any errors encountered,
|
||||
* QDF_STATUS_SUCCESS otherwise
|
||||
*/
|
||||
QDF_STATUS hdd_rx_packet_cbk(void *cds_context, qdf_nbuf_t rxBuf, uint8_t staId)
|
||||
QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
|
||||
{
|
||||
hdd_adapter_t *pAdapter = NULL;
|
||||
hdd_context_t *pHddCtx = NULL;
|
||||
|
|
@ -665,37 +664,31 @@ QDF_STATUS hdd_rx_packet_cbk(void *cds_context, qdf_nbuf_t rxBuf, uint8_t staId)
|
|||
unsigned int cpu_index;
|
||||
|
||||
/* Sanity check on inputs */
|
||||
if ((NULL == cds_context) || (NULL == rxBuf)) {
|
||||
if (unlikely((NULL == context) || (NULL == rxBuf))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Null params being passed", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pHddCtx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
if (NULL == pHddCtx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is Null", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pAdapter = pHddCtx->sta_to_adapter[staId];
|
||||
if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
hddLog(LOGE,
|
||||
FL("invalid adapter %p or adapter has invalid magic"),
|
||||
pAdapter);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
cpu_index = wlan_hdd_get_cpu();
|
||||
|
||||
skb = (struct sk_buff *)rxBuf;
|
||||
|
||||
if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) {
|
||||
pAdapter = (hdd_adapter_t *)context;
|
||||
if (unlikely(WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_FATAL,
|
||||
"Magic cookie(%x) for adapter sanity verification is invalid",
|
||||
pAdapter->magic);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pHddCtx = pAdapter->pHddCtx;
|
||||
if (unlikely(NULL == pHddCtx)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is Null", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
cpu_index = wlan_hdd_get_cpu();
|
||||
|
||||
skb = (struct sk_buff *)rxBuf;
|
||||
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
if ((pHddStaCtx->conn_info.proxyARPService) &&
|
||||
cfg80211_is_gratuitous_arp_unsolicited_na(skb)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue