mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge "qcacld-3.0: Enable Napier monitor mode configuration" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
fcabc08635
3 changed files with 36 additions and 2 deletions
|
|
@ -120,6 +120,7 @@
|
|||
#include "os_if_nan.h"
|
||||
#include "nan_public_structs.h"
|
||||
#include "wlan_reg_ucfg_api.h"
|
||||
#include "wlan_hdd_rx_monitor.h"
|
||||
|
||||
#ifdef CNSS_GENL
|
||||
#include <net/cnss_nl.h>
|
||||
|
|
@ -1701,6 +1702,10 @@ static int __hdd_mon_open(struct net_device *dev)
|
|||
ENTER_DEV(dev);
|
||||
hdd_mon_mode_ether_setup(dev);
|
||||
ret = hdd_set_mon_rx_cb(dev);
|
||||
|
||||
if (!ret)
|
||||
ret = hdd_enable_monitor_mode(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,3 +118,26 @@ void hdd_monitor_set_rx_monitor_cb(struct ol_txrx_ops *txrx,
|
|||
{
|
||||
txrx->rx.mon = rx_monitor_cb;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_enable_monitor_mode() - Enable monitor mode
|
||||
* @dev: Pointer to the net_device structure
|
||||
*
|
||||
* This function invokes cdp interface API to enable
|
||||
* monitor mode configuration on the hardware. In this
|
||||
* case sends HTT messages to FW to setup hardware rings
|
||||
*
|
||||
* Return: 0 for success; non-zero for failure
|
||||
*/
|
||||
int hdd_enable_monitor_mode(struct net_device *dev)
|
||||
{
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
return cdp_set_monitor_mode(soc,
|
||||
(struct cdp_vdev *)cdp_get_vdev_from_vdev_id(soc,
|
||||
(struct cdp_pdev *)pdev, adapter->sessionId), false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,12 +37,18 @@ void hdd_monitor_set_rx_monitor_cb(struct ol_txrx_ops *txrx,
|
|||
void hdd_rx_monitor_callback(ol_osif_vdev_handle vdev,
|
||||
qdf_nbuf_t mpdu,
|
||||
void *rx_status);
|
||||
|
||||
int hdd_enable_monitor_mode(struct net_device *dev);
|
||||
#else
|
||||
static void hdd_monitor_set_rx_monitor_cb(struct ol_txrx_ops *txrx,
|
||||
static inline void hdd_monitor_set_rx_monitor_cb(struct ol_txrx_ops *txrx,
|
||||
ol_txrx_rx_mon_fp rx_monitor_cb){ }
|
||||
static void hdd_rx_monitor_callback(ol_osif_vdev_handle vdev,
|
||||
static inline void hdd_rx_monitor_callback(ol_osif_vdev_handle vdev,
|
||||
qdf_nbuf_t mpdu,
|
||||
void *rx_status){ }
|
||||
static inline int hdd_enable_monitor_mode(struct net_device *dev)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif /* CONFIG_LITHIUM */
|
||||
|
||||
#endif /* __WLAN_HDD_RX_MONITOR_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue