qcacmn: Modify vendor command handler to accept vdev

The Spectral module uses the first vdev of a pdev for scanning.
For MCL platforms all the vdevs are associated with a single pdev
and this may cause a mismatch between the vdev intended by user and
the vdev used by driver. To avoid this MCL platforms pass a reference
to vdev on which Spectral scan is triggered. WIN platforms
can continue to use the old approach of using the first vdev of a
pdev by passing NULL for vdev to vendor command handlers.

CRS-Fixed: 2725777
Change-Id: I1a7278bdcbcc2b706aa292b33c17546190dac082
This commit is contained in:
Edayilliam Jayadev
2020-07-09 19:39:04 +05:30
zatwierdzone przez snandini
rodzic b43c68dedf
commit 6c76bce586
3 zmienionych plików z 68 dodań i 52 usunięć

Wyświetl plik

@@ -161,31 +161,6 @@ enum spectral_msg_type {
SPECTRAL_MSG_TYPE_MAX,
};
/**
* enum wlan_cfg80211_spectral_vendorcmd_handler_idx - Indices to cfg80211
* spectral vendor command handlers
* @SPECTRAL_SCAN_START_HANDLER_IDX: Index to SPECTRAL_SCAN_START handler
* @SPECTRAL_SCAN_STOP_HANDLER_IDX: Index to SPECTRAL_SCAN_STOP handler
* @SPECTRAL_SCAN_GET_CONFIG_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_CONFIG
* handler
* @SPECTRAL_SCAN_GET_DIAG_STATS_HANDLER_IDX: Index to
* SPECTRAL_SCAN_GET_DIAG_STATS handler
* @SPECTRAL_SCAN_GET_CAP_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_CAP handler
* @SPECTRAL_SCAN_GET_STATUS_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_STATUS
* handler
* @SPECTRAL_SCAN_VENDOR_CMD_HANDLER_MAX: Number of cfg80211 spectral
* vendor command handlers supported
*/
enum wlan_cfg80211_spectral_vendorcmd_handler_idx {
SPECTRAL_SCAN_START_HANDLER_IDX,
SPECTRAL_SCAN_STOP_HANDLER_IDX,
SPECTRAL_SCAN_GET_CONFIG_HANDLER_IDX,
SPECTRAL_SCAN_GET_DIAG_STATS_HANDLER_IDX,
SPECTRAL_SCAN_GET_CAP_HANDLER_IDX,
SPECTRAL_SCAN_GET_STATUS_HANDLER_IDX,
SPECTRAL_SCAN_VENDOR_CMD_HANDLER_MAX,
};
/**
* enum spectral_debug - Spectral debug level
* @DEBUG_SPECTRAL: Minimal SPECTRAL debug
@@ -242,6 +217,55 @@ enum spectral_dma_debug {
SPECTRAL_DMA_BUFFER_DEBUG,
};
struct wiphy;
/**
* struct spectral_cfg80211_vendor_cmd_handlers - Spectral vendor command
* handlers
* @wlan_cfg80211_spectral_scan_start: start scan handler
* @wlan_cfg80211_spectral_scan_stop: stop scan handler
* @wlan_cfg80211_spectral_scan_get_config: get config handler
* @wlan_cfg80211_spectral_scan_get_diag_stats: get diag stats handler
* @wlan_cfg80211_spectral_scan_get_cap: get capability handler
* @wlan_cfg80211_spectral_scan_get_status: get status handler
*/
struct spectral_cfg80211_vendor_cmd_handlers {
int (*wlan_cfg80211_spectral_scan_start)(struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
int (*wlan_cfg80211_spectral_scan_stop)(struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
int (*wlan_cfg80211_spectral_scan_get_config)(
struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
int (*wlan_cfg80211_spectral_scan_get_diag_stats)(
struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
int (*wlan_cfg80211_spectral_scan_get_cap)(
struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
int (*wlan_cfg80211_spectral_scan_get_status)(
struct wiphy *wiphy,
struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev,
const void *data,
int data_len);
};
/**
* struct spectral_cp_param - Spectral control path data structure which
* contains parameter and its value