qcacmn: Add changes for coexistence of WIN/ MCL TLV implementation
Add changes to allow coexistence of WIN/ MCL TLV implementation through use of CONFIG_MCL flag and change of MACRO names. Change-Id: I6868c288a43fd3afb19c84b8a9d4ef0dfbee5c94 Acked-by: prgandhi@qti.qualcomm.com CRs-Fixed: 1008872
This commit is contained in:

committed by
qcabuildsw

parent
77aa5857fa
commit
810141a664
@@ -36,7 +36,9 @@
|
|||||||
#include <osdep.h>
|
#include <osdep.h>
|
||||||
#include "a_types.h"
|
#include "a_types.h"
|
||||||
#include "ol_defines.h"
|
#include "ol_defines.h"
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
#include "wmi.h"
|
#include "wmi.h"
|
||||||
|
#endif
|
||||||
#include "htc_api.h"
|
#include "htc_api.h"
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
|
|
||||||
@@ -123,7 +125,7 @@ void *wmi_unified_attach(void *scn_handle,
|
|||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
|
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
|
||||||
void *header, uint32_t vdev_id, uint32_t chanfreq);
|
void *header, uint32_t vdev_id, uint32_t chanfreq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,7 +173,7 @@ void wmi_buf_free(wmi_buf_t net_buf);
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
|
wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
|
||||||
WMI_CMD_ID cmd_id);
|
uint32_t cmd_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_unified_register_event_handler() - WMI event handler
|
* wmi_unified_register_event_handler() - WMI event handler
|
||||||
@@ -648,7 +650,7 @@ QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
|
|||||||
#ifndef WMI_NON_TLV_SUPPORT
|
#ifndef WMI_NON_TLV_SUPPORT
|
||||||
QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
|
||||||
WMI_PKTLOG_EVENT pktlog_event,
|
WMI_PKTLOG_EVENT pktlog_event,
|
||||||
WMI_CMD_ID cmd_id);
|
uint32_t cmd_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
|
||||||
@@ -762,10 +764,12 @@ QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
|
|||||||
QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
|
||||||
void *evt_buf);
|
void *evt_buf);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
|
||||||
wmi_resource_config *res_cfg,
|
wmi_resource_config *res_cfg,
|
||||||
uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
|
uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
|
||||||
bool action);
|
bool action);
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_saved_init_cmd(void *wmi_hdl);
|
QDF_STATUS wmi_unified_send_saved_init_cmd(void *wmi_hdl);
|
||||||
|
|
||||||
|
@@ -28,7 +28,8 @@
|
|||||||
#include <osdep.h>
|
#include <osdep.h>
|
||||||
#include "a_types.h"
|
#include "a_types.h"
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
|
#include "legacy/wmi.h"
|
||||||
|
#include "legacy/wmi_unified.h"
|
||||||
#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */
|
#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */
|
||||||
|
|
||||||
QDF_STATUS send_vdev_create_cmd_non_tlv(wmi_unified_t wmi_handle,
|
QDF_STATUS send_vdev_create_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#ifndef _WMI_UNIFIED_PARAM_H_
|
#ifndef _WMI_UNIFIED_PARAM_H_
|
||||||
#define _WMI_UNIFIED_PARAM_H_
|
#define _WMI_UNIFIED_PARAM_H_
|
||||||
#include "wmi_unified.h"
|
|
||||||
#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
|
#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
|
||||||
#define WMI_MAC_MAX_SSID_LENGTH 32
|
#define WMI_MAC_MAX_SSID_LENGTH 32
|
||||||
#define WMI_SCAN_MAX_NUM_SSID 0x0A
|
#define WMI_SCAN_MAX_NUM_SSID 0x0A
|
||||||
@@ -281,15 +280,15 @@ enum wmi_dwelltime_adaptive_mode {
|
|||||||
#define MAX_NUM_CHAN 128
|
#define MAX_NUM_CHAN 128
|
||||||
|
|
||||||
/* WME stream classes */
|
/* WME stream classes */
|
||||||
#define WMI_AC_BE 0 /* best effort */
|
#define WMI_HOST_AC_BE 0 /* best effort */
|
||||||
#define WMI_AC_BK 1 /* background */
|
#define WMI_HOST_AC_BK 1 /* background */
|
||||||
#define WMI_AC_VI 2 /* video */
|
#define WMI_HOST_AC_VI 2 /* video */
|
||||||
#define WMI_AC_VO 3 /* voice */
|
#define WMI_HOST_AC_VO 3 /* voice */
|
||||||
#define WMI_TID_TO_AC(_tid) (\
|
#define WMI_TID_TO_AC(_tid) (\
|
||||||
(((_tid) == 0) || ((_tid) == 3)) ? WMI_AC_BE : \
|
(((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
|
||||||
(((_tid) == 1) || ((_tid) == 2)) ? WMI_AC_BK : \
|
(((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
|
||||||
(((_tid) == 4) || ((_tid) == 5)) ? WMI_AC_VI : \
|
(((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
|
||||||
WMI_AC_VO)
|
WMI_HOST_AC_VO)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct vdev_create_params - vdev create cmd parameter
|
* struct vdev_create_params - vdev create cmd parameter
|
||||||
@@ -804,6 +803,16 @@ typedef struct {
|
|||||||
uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
|
uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
|
||||||
} target_rate_set;
|
} target_rate_set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
|
||||||
|
* @mac_addr31to0: upper 4 bytes of MAC address
|
||||||
|
* @mac_addr47to32: lower 2 bytes of MAC address
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
uint32_t mac_addr31to0;
|
||||||
|
uint32_t mac_addr47to32;
|
||||||
|
} wmi_host_mac_addr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct peer_assoc_params - peer assoc cmd parameter
|
* struct peer_assoc_params - peer assoc cmd parameter
|
||||||
* @peer_macaddr: peer mac address
|
* @peer_macaddr: peer mac address
|
||||||
@@ -852,7 +861,7 @@ typedef struct {
|
|||||||
* @peer_mac: Peer mac address
|
* @peer_mac: Peer mac address
|
||||||
*/
|
*/
|
||||||
struct peer_assoc_params {
|
struct peer_assoc_params {
|
||||||
wmi_mac_addr peer_macaddr;
|
wmi_host_mac_addr peer_macaddr;
|
||||||
uint32_t vdev_id;
|
uint32_t vdev_id;
|
||||||
uint32_t peer_new_assoc;
|
uint32_t peer_new_assoc;
|
||||||
uint32_t peer_associd;
|
uint32_t peer_associd;
|
||||||
@@ -867,13 +876,8 @@ struct peer_assoc_params {
|
|||||||
uint32_t peer_vht_caps;
|
uint32_t peer_vht_caps;
|
||||||
uint32_t peer_phymode;
|
uint32_t peer_phymode;
|
||||||
uint32_t peer_ht_info[2];
|
uint32_t peer_ht_info[2];
|
||||||
#ifndef WMI_NON_TLV_SUPPORT
|
|
||||||
wmi_rate_set peer_legacy_rates;
|
|
||||||
wmi_rate_set peer_ht_rates;
|
|
||||||
#else
|
|
||||||
target_rate_set peer_legacy_rates;
|
target_rate_set peer_legacy_rates;
|
||||||
target_rate_set peer_ht_rates;
|
target_rate_set peer_ht_rates;
|
||||||
#endif
|
|
||||||
uint32_t rx_max_rate;
|
uint32_t rx_max_rate;
|
||||||
uint32_t rx_mcs_set;
|
uint32_t rx_mcs_set;
|
||||||
uint32_t tx_max_rate;
|
uint32_t tx_max_rate;
|
||||||
@@ -1052,9 +1056,27 @@ struct scan_stop_params {
|
|||||||
* @chan_info: pointer to wmi channel info
|
* @chan_info: pointer to wmi channel info
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_MCL
|
#ifdef CONFIG_MCL
|
||||||
|
/* TODO: This needs clean-up based on how its processed. */
|
||||||
|
typedef struct {
|
||||||
|
/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
|
||||||
|
uint32_t tlv_header;
|
||||||
|
/** primary 20 MHz channel frequency in mhz */
|
||||||
|
uint32_t mhz;
|
||||||
|
/** Center frequency 1 in MHz*/
|
||||||
|
uint32_t band_center_freq1;
|
||||||
|
/** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
|
||||||
|
uint32_t band_center_freq2;
|
||||||
|
/** channel info described below */
|
||||||
|
uint32_t info;
|
||||||
|
/** contains min power, max power, reg power and reg class id. */
|
||||||
|
uint32_t reg_info_1;
|
||||||
|
/** contains antennamax */
|
||||||
|
uint32_t reg_info_2;
|
||||||
|
} wmi_channel_param;
|
||||||
|
|
||||||
struct scan_chan_list_params {
|
struct scan_chan_list_params {
|
||||||
uint8_t num_scan_chans;
|
uint8_t num_scan_chans;
|
||||||
wmi_channel *chan_info;
|
wmi_channel_param *chan_info;
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
/**
|
/**
|
||||||
@@ -1362,8 +1384,8 @@ enum wmi_peer_rate_report_cond_phy_type {
|
|||||||
* @delta_min: rate min delta
|
* @delta_min: rate min delta
|
||||||
*/
|
*/
|
||||||
struct report_rate_delta {
|
struct report_rate_delta {
|
||||||
A_UINT32 percent; /* in unit of 12.5% */
|
uint32_t percent; /* in unit of 12.5% */
|
||||||
A_UINT32 delta_min; /* in unit of Mbps */
|
uint32_t delta_min; /* in unit of Mbps */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1379,14 +1401,14 @@ struct report_rate_per_phy {
|
|||||||
* Any of these two conditions or both of
|
* Any of these two conditions or both of
|
||||||
* them can be set.
|
* them can be set.
|
||||||
*/
|
*/
|
||||||
A_UINT32 cond_flags;
|
uint32_t cond_flags;
|
||||||
struct report_rate_delta delta;
|
struct report_rate_delta delta;
|
||||||
/*
|
/*
|
||||||
* In unit of Mbps. There are at most 4 thresholds
|
* In unit of Mbps. There are at most 4 thresholds
|
||||||
* If the threshold count is less than 4, set zero to
|
* If the threshold count is less than 4, set zero to
|
||||||
* the one following the last threshold
|
* the one following the last threshold
|
||||||
*/
|
*/
|
||||||
A_UINT32 report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
|
uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1397,9 +1419,9 @@ struct report_rate_per_phy {
|
|||||||
* @report_per_phy: report per phy type
|
* @report_per_phy: report per phy type
|
||||||
*/
|
*/
|
||||||
struct wmi_peer_rate_report_params {
|
struct wmi_peer_rate_report_params {
|
||||||
A_UINT32 rate_report_enable;
|
uint32_t rate_report_enable;
|
||||||
A_UINT32 backoff_time; /* in unit of msecond */
|
uint32_t backoff_time; /* in unit of msecond */
|
||||||
A_UINT32 timer_period; /* in unit of msecond */
|
uint32_t timer_period; /* in unit of msecond */
|
||||||
/*
|
/*
|
||||||
*In the following field, the array index means the phy type,
|
*In the following field, the array index means the phy type,
|
||||||
* please see enum wmi_peer_rate_report_cond_phy_type for detail
|
* please see enum wmi_peer_rate_report_cond_phy_type for detail
|
||||||
@@ -1615,6 +1637,33 @@ struct mobility_domain_info {
|
|||||||
uint16_t mobility_domain;
|
uint16_t mobility_domain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
|
||||||
|
|
||||||
|
/* This TLV will be filled only in case roam offload
|
||||||
|
* for wpa2-psk/okc/ese/11r is enabled */
|
||||||
|
typedef struct {
|
||||||
|
/*
|
||||||
|
* TLV tag and len; tag equals
|
||||||
|
* WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
|
||||||
|
*/
|
||||||
|
uint32_t tlv_header;
|
||||||
|
uint32_t rssi_cat_gap; /* gap for every category bucket */
|
||||||
|
uint32_t prefer_5g; /* prefer select 5G candidate */
|
||||||
|
uint32_t select_5g_margin;
|
||||||
|
uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
|
||||||
|
uint32_t capability;
|
||||||
|
uint32_t ht_caps_info;
|
||||||
|
uint32_t ampdu_param;
|
||||||
|
uint32_t ht_ext_cap;
|
||||||
|
uint32_t ht_txbf;
|
||||||
|
uint32_t asel_cap;
|
||||||
|
uint32_t qos_enabled;
|
||||||
|
uint32_t qos_caps;
|
||||||
|
uint32_t wmm_caps;
|
||||||
|
/* since this is 4 byte aligned, we don't declare it as tlv array */
|
||||||
|
uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
|
||||||
|
} roam_offload_param;
|
||||||
|
|
||||||
/* struct roam_offload_scan_params - structure
|
/* struct roam_offload_scan_params - structure
|
||||||
* containing roaming offload scan parameters
|
* containing roaming offload scan parameters
|
||||||
* @is_roam_req_valid: flag to tell whether roam req
|
* @is_roam_req_valid: flag to tell whether roam req
|
||||||
@@ -1663,7 +1712,7 @@ struct roam_offload_scan_params {
|
|||||||
/* THis is not available in non tlv target.
|
/* THis is not available in non tlv target.
|
||||||
* please remove this and replace with a host based
|
* please remove this and replace with a host based
|
||||||
* structure */
|
* structure */
|
||||||
wmi_roam_offload_tlv_param roam_offload_params;
|
roam_offload_param roam_offload_params;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4132,16 +4181,6 @@ typedef struct {
|
|||||||
uint32_t num_chan_stats;
|
uint32_t num_chan_stats;
|
||||||
} wmi_host_stats_event;
|
} wmi_host_stats_event;
|
||||||
|
|
||||||
/**
|
|
||||||
* struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
|
|
||||||
* @mac_addr31to0: upper 4 bytes of MAC address
|
|
||||||
* @mac_addr47to32: lower 2 bytes of MAC address
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
uint32_t mac_addr31to0;
|
|
||||||
uint32_t mac_addr47to32;
|
|
||||||
} wmi_host_mac_addr;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wmi_host_peer_extd_stats - peer extd stats event structure
|
* struct wmi_host_peer_extd_stats - peer extd stats event structure
|
||||||
* @peer_macaddr: Peer mac address
|
* @peer_macaddr: Peer mac address
|
||||||
@@ -4907,6 +4946,7 @@ typedef enum {
|
|||||||
wmi_vdev_param_rtscts_rate,
|
wmi_vdev_param_rtscts_rate,
|
||||||
wmi_vdev_param_mcc_rtscts_protection_enable,
|
wmi_vdev_param_mcc_rtscts_protection_enable,
|
||||||
wmi_vdev_param_mcc_broadcast_probe_enable,
|
wmi_vdev_param_mcc_broadcast_probe_enable,
|
||||||
|
wmi_vdev_param_capabilities,
|
||||||
|
|
||||||
wmi_vdev_param_max,
|
wmi_vdev_param_max,
|
||||||
} wmi_conv_vdev_param_id;
|
} wmi_conv_vdev_param_id;
|
||||||
|
@@ -33,8 +33,6 @@
|
|||||||
#define _WMI_UNIFIED_PRIV_H_
|
#define _WMI_UNIFIED_PRIV_H_
|
||||||
#include <osdep.h>
|
#include <osdep.h>
|
||||||
#include "a_types.h"
|
#include "a_types.h"
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified.h"
|
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
#include "qdf_atomic.h"
|
#include "qdf_atomic.h"
|
||||||
|
|
||||||
@@ -627,10 +625,12 @@ QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
|
|||||||
QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct vdev_ie_info_param *ie_info);
|
struct vdev_ie_info_param *ie_info);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
QDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
|
||||||
wmi_resource_config *res_cfg,
|
wmi_resource_config *res_cfg,
|
||||||
uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
|
uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
|
||||||
bool action);
|
bool action);
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
|
QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
|
||||||
|
|
||||||
@@ -1154,7 +1154,7 @@ struct wmi_unified {
|
|||||||
qdf_atomic_t pending_cmds;
|
qdf_atomic_t pending_cmds;
|
||||||
HTC_ENDPOINT_ID wmi_endpoint_id;
|
HTC_ENDPOINT_ID wmi_endpoint_id;
|
||||||
uint16_t max_msg_len;
|
uint16_t max_msg_len;
|
||||||
WMI_EVT_ID event_id[WMI_UNIFIED_MAX_EVENT];
|
uint32_t event_id[WMI_UNIFIED_MAX_EVENT];
|
||||||
wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
|
wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
|
||||||
enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
|
enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
|
||||||
uint32_t max_event_idx;
|
uint32_t max_event_idx;
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
#include <osdep.h>
|
#include <osdep.h>
|
||||||
#include "a_types.h"
|
#include "a_types.h"
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
|
#include "wmi.h"
|
||||||
|
#include "wmi_unified.h"
|
||||||
#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */
|
#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */
|
||||||
|
|
||||||
QDF_STATUS send_vdev_create_cmd_tlv(wmi_unified_t wmi_handle,
|
QDF_STATUS send_vdev_create_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
@@ -37,12 +37,62 @@
|
|||||||
#include "htc_api.h"
|
#include "htc_api.h"
|
||||||
#include "htc_api.h"
|
#include "htc_api.h"
|
||||||
#include "dbglog_host.h"
|
#include "dbglog_host.h"
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
#include "wmi_unified_priv.h"
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
|
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
|
|
||||||
|
/* This check for CONFIG_WIN temporary added due to redeclaration compilation
|
||||||
|
error in MCL. Error is caused due to inclusion of wmi.h in wmi_unified_api.h
|
||||||
|
which gets included here through ol_if_athvar.h. Eventually it is expected that
|
||||||
|
wmi.h will be removed from wmi_unified_api.h after cleanup, which will need
|
||||||
|
WMI_CMD_HDR to be defined here. */
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
|
/* Copied from wmi.h */
|
||||||
|
#undef MS
|
||||||
|
#define MS(_v, _f) (((_v) & _f##_MASK) >> _f##_LSB)
|
||||||
|
#undef SM
|
||||||
|
#define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
|
||||||
|
#undef WO
|
||||||
|
#define WO(_f) ((_f##_OFFSET) >> 2)
|
||||||
|
|
||||||
|
#undef GET_FIELD
|
||||||
|
#define GET_FIELD(_addr, _f) MS(*((A_UINT32 *)(_addr) + WO(_f)), _f)
|
||||||
|
#undef SET_FIELD
|
||||||
|
#define SET_FIELD(_addr, _f, _val) \
|
||||||
|
(*((A_UINT32 *)(_addr) + WO(_f)) = \
|
||||||
|
(*((A_UINT32 *)(_addr) + WO(_f)) & ~_f##_MASK) | SM(_val, _f))
|
||||||
|
|
||||||
|
#define WMI_GET_FIELD(_msg_buf, _msg_type, _f) \
|
||||||
|
GET_FIELD(_msg_buf, _msg_type ## _ ## _f)
|
||||||
|
|
||||||
|
#define WMI_SET_FIELD(_msg_buf, _msg_type, _f, _val) \
|
||||||
|
SET_FIELD(_msg_buf, _msg_type ## _ ## _f, _val)
|
||||||
|
|
||||||
|
#define WMI_EP_APASS 0x0
|
||||||
|
#define WMI_EP_LPASS 0x1
|
||||||
|
#define WMI_EP_SENSOR 0x2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* * Control Path
|
||||||
|
* */
|
||||||
|
typedef PREPACK struct {
|
||||||
|
A_UINT32 commandId:24,
|
||||||
|
reserved:2, /* used for WMI endpoint ID */
|
||||||
|
plt_priv:6; /* platform private */
|
||||||
|
} POSTPACK WMI_CMD_HDR; /* used for commands and events */
|
||||||
|
|
||||||
|
#define WMI_CMD_HDR_COMMANDID_LSB 0
|
||||||
|
#define WMI_CMD_HDR_COMMANDID_MASK 0x00ffffff
|
||||||
|
#define WMI_CMD_HDR_COMMANDID_OFFSET 0x00000000
|
||||||
|
#define WMI_CMD_HDR_WMI_ENDPOINTID_MASK 0x03000000
|
||||||
|
#define WMI_CMD_HDR_WMI_ENDPOINTID_OFFSET 24
|
||||||
|
#define WMI_CMD_HDR_PLT_PRIV_LSB 24
|
||||||
|
#define WMI_CMD_HDR_PLT_PRIV_MASK 0xff000000
|
||||||
|
#define WMI_CMD_HDR_PLT_PRIV_OFFSET 0x00000000
|
||||||
|
/* end of copy wmi.h */
|
||||||
|
#endif /* CONFIG_WIN */
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0))
|
||||||
/* TODO Cleanup this backported function */
|
/* TODO Cleanup this backported function */
|
||||||
int qcacld_bp_seq_printf(struct seq_file *m, const char *f, ...)
|
int qcacld_bp_seq_printf(struct seq_file *m, const char *f, ...)
|
||||||
@@ -241,7 +291,7 @@ uint32_t wmi_mgmt_log_max_entry = WMI_MGMT_EVENT_DEBUG_MAX_ENTRY;
|
|||||||
uint32_t wmi_record_max_length = WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH;
|
uint32_t wmi_record_max_length = WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH;
|
||||||
uint32_t wmi_display_size = 100;
|
uint32_t wmi_display_size = 100;
|
||||||
|
|
||||||
static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command);
|
static uint8_t *wmi_id_to_name(uint32_t wmi_command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_log_init() - Initialize WMI event logging
|
* wmi_log_init() - Initialize WMI event logging
|
||||||
@@ -898,7 +948,7 @@ static QDF_STATUS wmi_debugfs_init(wmi_unified_t wmi_handle)
|
|||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
|
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
|
||||||
void *header, uint32_t vdev_id, uint32_t chanfreq)
|
void *header, uint32_t vdev_id, uint32_t chanfreq)
|
||||||
{
|
{
|
||||||
qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);
|
qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);
|
||||||
@@ -920,7 +970,7 @@ void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
|
|||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
static void wmi_debugfs_remove(wmi_unified_t wmi_handle) { }
|
static void wmi_debugfs_remove(wmi_unified_t wmi_handle) { }
|
||||||
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
|
void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
|
||||||
void *header, uint32_t vdev_id, uint32_t chanfreq) { }
|
void *header, uint32_t vdev_id, uint32_t chanfreq) { }
|
||||||
#endif /*WMI_INTERFACE_EVENT_LOGGING */
|
#endif /*WMI_INTERFACE_EVENT_LOGGING */
|
||||||
|
|
||||||
@@ -1007,7 +1057,7 @@ uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WMI_NON_TLV_SUPPORT
|
#ifndef WMI_NON_TLV_SUPPORT
|
||||||
static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command)
|
static uint8_t *wmi_id_to_name(uint32_t wmi_command)
|
||||||
{
|
{
|
||||||
switch (wmi_command) {
|
switch (wmi_command) {
|
||||||
/* initialize the wlan sub system */
|
/* initialize the wlan sub system */
|
||||||
@@ -1590,13 +1640,13 @@ static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command)
|
|||||||
return "Invalid WMI cmd";
|
return "Invalid WMI cmd";
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void wma_log_cmd_id(WMI_CMD_ID cmd_id)
|
static inline void wma_log_cmd_id(uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
WMI_LOGD("Send WMI command:%s command_id:%d",
|
WMI_LOGD("Send WMI command:%s command_id:%d",
|
||||||
wmi_id_to_name(cmd_id), cmd_id);
|
wmi_id_to_name(cmd_id), cmd_id);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command)
|
static uint8_t *wmi_id_to_name(uint32_t wmi_command)
|
||||||
{
|
{
|
||||||
return "Invalid WMI cmd";
|
return "Invalid WMI cmd";
|
||||||
}
|
}
|
||||||
@@ -1610,7 +1660,7 @@ static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command)
|
|||||||
* Return: true if the command is part of the suspend resume sequence.
|
* Return: true if the command is part of the suspend resume sequence.
|
||||||
*/
|
*/
|
||||||
#ifndef WMI_NON_TLV_SUPPORT
|
#ifndef WMI_NON_TLV_SUPPORT
|
||||||
static bool wmi_is_runtime_pm_cmd(WMI_CMD_ID cmd_id)
|
static bool wmi_is_runtime_pm_cmd(uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
switch (cmd_id) {
|
switch (cmd_id) {
|
||||||
case WMI_WOW_ENABLE_CMDID:
|
case WMI_WOW_ENABLE_CMDID:
|
||||||
@@ -1634,7 +1684,7 @@ static bool wmi_is_runtime_pm_cmd(WMI_CMD_ID cmd_id)
|
|||||||
*
|
*
|
||||||
* Return: true if the command is part of the resume sequence.
|
* Return: true if the command is part of the resume sequence.
|
||||||
*/
|
*/
|
||||||
static bool wmi_is_pm_resume_cmd(WMI_CMD_ID cmd_id)
|
static bool wmi_is_pm_resume_cmd(uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
switch (cmd_id) {
|
switch (cmd_id) {
|
||||||
case WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID:
|
case WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID:
|
||||||
@@ -1646,11 +1696,11 @@ static bool wmi_is_pm_resume_cmd(WMI_CMD_ID cmd_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static bool wmi_is_runtime_pm_cmd(WMI_CMD_ID cmd_id)
|
static bool wmi_is_runtime_pm_cmd(uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
static bool wmi_is_pm_resume_cmd(WMI_CMD_ID cmd_id)
|
static bool wmi_is_pm_resume_cmd(uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1666,7 +1716,7 @@ static bool wmi_is_pm_resume_cmd(WMI_CMD_ID cmd_id)
|
|||||||
* Return: 0 on success
|
* Return: 0 on success
|
||||||
*/
|
*/
|
||||||
int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t len,
|
int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t len,
|
||||||
WMI_CMD_ID cmd_id)
|
uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
HTC_PACKET *pkt;
|
HTC_PACKET *pkt;
|
||||||
A_STATUS status;
|
A_STATUS status;
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include "a_debug.h"
|
#include "a_debug.h"
|
||||||
#include "ol_if_athvar.h"
|
#include "ol_if_athvar.h"
|
||||||
#include "ol_defines.h"
|
#include "ol_defines.h"
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
#include "wmi_unified_priv.h"
|
||||||
#include "wmi_unified_param.h"
|
#include "wmi_unified_param.h"
|
||||||
|
|
||||||
@@ -2313,7 +2312,7 @@ wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
|
|||||||
#ifndef WMI_NON_TLV_SUPPORT
|
#ifndef WMI_NON_TLV_SUPPORT
|
||||||
QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
|
||||||
WMI_PKTLOG_EVENT pktlog_event,
|
WMI_PKTLOG_EVENT pktlog_event,
|
||||||
WMI_CMD_ID cmd_id)
|
uint32_t cmd_id)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
@@ -2902,7 +2901,7 @@ QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
|
|||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
/**
|
/**
|
||||||
* wmi_unified_send_init_cmd() - wmi init command
|
* wmi_unified_send_init_cmd() - wmi init command
|
||||||
* @wmi_handle: pointer to wmi handle
|
* @wmi_handle: pointer to wmi handle
|
||||||
@@ -2928,7 +2927,7 @@ QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
|
|||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* wmi_unified_send_saved_init_cmd() - wmi init command
|
* wmi_unified_send_saved_init_cmd() - wmi init command
|
||||||
* @wmi_handle: pointer to wmi handle
|
* @wmi_handle: pointer to wmi handle
|
||||||
|
@@ -31,11 +31,12 @@
|
|||||||
#include "a_debug.h"
|
#include "a_debug.h"
|
||||||
#include "ol_if_athvar.h"
|
#include "ol_if_athvar.h"
|
||||||
#include "ol_defines.h"
|
#include "ol_defines.h"
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified_api.h"
|
#include "wmi_unified_api.h"
|
||||||
#include "wmi_unified_priv.h"
|
#include "wmi_unified_priv.h"
|
||||||
|
|
||||||
#ifdef WMI_NON_TLV_SUPPORT
|
#ifdef WMI_NON_TLV_SUPPORT
|
||||||
|
#include "legacy/wmi.h"
|
||||||
|
#include "legacy/wmi_unified.h"
|
||||||
/**
|
/**
|
||||||
* send_vdev_create_cmd_non_tlv() - send VDEV create command to fw
|
* send_vdev_create_cmd_non_tlv() - send VDEV create command to fw
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
|
@@ -1608,7 +1608,7 @@ QDF_STATUS send_scan_chan_list_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
wmi_scan_chan_list_cmd_fixed_param *cmd;
|
wmi_scan_chan_list_cmd_fixed_param *cmd;
|
||||||
int i;
|
int i;
|
||||||
uint8_t *buf_ptr;
|
uint8_t *buf_ptr;
|
||||||
wmi_channel *chan_info, *tchan_info;
|
wmi_channel_param *chan_info, *tchan_info;
|
||||||
uint16_t len = sizeof(*cmd) + WMI_TLV_HDR_SIZE;
|
uint16_t len = sizeof(*cmd) + WMI_TLV_HDR_SIZE;
|
||||||
|
|
||||||
len += sizeof(wmi_channel) * chan_list->num_scan_chans;
|
len += sizeof(wmi_channel) * chan_list->num_scan_chans;
|
||||||
@@ -1632,7 +1632,8 @@ QDF_STATUS send_scan_chan_list_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
WMITLV_SET_HDR((buf_ptr + sizeof(wmi_scan_chan_list_cmd_fixed_param)),
|
WMITLV_SET_HDR((buf_ptr + sizeof(wmi_scan_chan_list_cmd_fixed_param)),
|
||||||
WMITLV_TAG_ARRAY_STRUC,
|
WMITLV_TAG_ARRAY_STRUC,
|
||||||
sizeof(wmi_channel) * chan_list->num_scan_chans);
|
sizeof(wmi_channel) * chan_list->num_scan_chans);
|
||||||
chan_info = (wmi_channel *) (buf_ptr + sizeof(*cmd) + WMI_TLV_HDR_SIZE);
|
chan_info = (wmi_channel_param *)
|
||||||
|
(buf_ptr + sizeof(*cmd) + WMI_TLV_HDR_SIZE);
|
||||||
tchan_info = chan_list->chan_info;
|
tchan_info = chan_list->chan_info;
|
||||||
|
|
||||||
for (i = 0; i < chan_list->num_scan_chans; ++i) {
|
for (i = 0; i < chan_list->num_scan_chans; ++i) {
|
||||||
@@ -9024,7 +9025,7 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
|||||||
tgt_res_cfg->num_ocb_schedules;
|
tgt_res_cfg->num_ocb_schedules;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
/**
|
/**
|
||||||
* send_init_cmd_tlv() - wmi init command
|
* send_init_cmd_tlv() - wmi init command
|
||||||
* @wmi_handle: pointer to wmi handle
|
* @wmi_handle: pointer to wmi handle
|
||||||
@@ -9144,7 +9145,7 @@ QDF_STATUS send_init_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* send_saved_init_cmd_tlv() - wmi init command
|
* send_saved_init_cmd_tlv() - wmi init command
|
||||||
* @wmi_handle: pointer to wmi handle
|
* @wmi_handle: pointer to wmi handle
|
||||||
@@ -11970,7 +11971,9 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_update_tdls_peer_state_cmd = send_update_tdls_peer_state_cmd_tlv,
|
.send_update_tdls_peer_state_cmd = send_update_tdls_peer_state_cmd_tlv,
|
||||||
.send_process_fw_mem_dump_cmd = send_process_fw_mem_dump_cmd_tlv,
|
.send_process_fw_mem_dump_cmd = send_process_fw_mem_dump_cmd_tlv,
|
||||||
.send_process_set_ie_info_cmd = send_process_set_ie_info_cmd_tlv,
|
.send_process_set_ie_info_cmd = send_process_set_ie_info_cmd_tlv,
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
.send_init_cmd = send_init_cmd_tlv,
|
.send_init_cmd = send_init_cmd_tlv,
|
||||||
|
#endif
|
||||||
.save_fw_version_cmd = save_fw_version_cmd_tlv,
|
.save_fw_version_cmd = save_fw_version_cmd_tlv,
|
||||||
.check_and_update_fw_version =
|
.check_and_update_fw_version =
|
||||||
check_and_update_fw_version_cmd_tlv,
|
check_and_update_fw_version_cmd_tlv,
|
||||||
|
Reference in New Issue
Block a user