qcacld-3.0: Make hif_opaque_softc as global HIF Context
Rename ol_softc to hif_opaque_softc.
Change-Id: I48f6e4b6eb04ccfa2050cca052e1ad67a66e3479
CRs-Fixed: 967765
diff --git a/core/bmi/src/bmi.c b/core/bmi/src/bmi.c
index 11e380a..782792f 100644
--- a/core/bmi/src/bmi.c
+++ b/core/bmi/src/bmi.c
@@ -59,7 +59,7 @@
CDF_STATUS bmi_init(struct ol_context *ol_ctx)
{
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
cdf_device_t cdf_dev = ol_ctx->cdf_dev;
if (!scn) {
@@ -148,7 +148,7 @@
struct ol_context *ol_ctx)
{
int status = 0;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
uint8_t *bmi_rsp_buff = info->bmi_rsp_buff;
@@ -199,7 +199,7 @@
uint8_t data[10], out[10];
uint32_t address;
int32_t ret;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
if (NO_BMI)
return CDF_STATUS_SUCCESS; /* no BMI for Q6 bring up */
@@ -232,7 +232,7 @@
CDF_STATUS bmi_read_soc_register(uint32_t address, uint32_t *param,
struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t offset, param_len;
@@ -277,7 +277,7 @@
CDF_STATUS bmi_write_soc_register(uint32_t address, uint32_t param,
struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t offset;
@@ -326,7 +326,7 @@
uint32_t offset;
uint32_t remaining, txlen;
const uint32_t header = sizeof(cid) + sizeof(length);
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
cdf_dma_addr_t cmd = info->bmi_cmd_da;
@@ -374,7 +374,7 @@
}
CDF_STATUS bmi_sign_stream_start(uint32_t address, uint8_t *buffer,
- uint32_t length, struct ol_bmi_context *ol_ctx)
+ uint32_t length, struct ol_context *ol_ctx)
{
uint32_t cid;
int status;
@@ -382,7 +382,7 @@
const uint32_t header = sizeof(cid) + sizeof(address) + sizeof(length);
uint8_t aligned_buf[BMI_DATASZ_MAX + 4];
uint8_t *src;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
uint32_t remaining, txlen;
@@ -446,7 +446,7 @@
uint32_t cid;
int status;
uint32_t offset;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
cdf_dma_addr_t cmd = info->bmi_cmd_da;
diff --git a/core/bmi/src/bmi_1.c b/core/bmi/src/bmi_1.c
index 375e8f9..331d1db 100644
--- a/core/bmi/src/bmi_1.c
+++ b/core/bmi/src/bmi_1.c
@@ -34,7 +34,7 @@
bmi_read_memory(uint32_t address,
uint8_t *buffer, uint32_t length, struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t offset;
@@ -109,7 +109,7 @@
CDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length,
struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t offset;
@@ -184,7 +184,7 @@
CDF_STATUS
bmi_execute(uint32_t address, A_UINT32 *param, struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t offset;
@@ -246,7 +246,7 @@
CDF_STATUS
bmi_firmware_download(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
CDF_STATUS status;
struct bmi_target_info targ_info;
struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
@@ -285,7 +285,7 @@
CDF_STATUS bmi_done_local(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
int status;
uint32_t cid;
struct bmi_info *info;
diff --git a/core/bmi/src/bmi_2.c b/core/bmi/src/bmi_2.c
index 3782d5d..79de973 100644
--- a/core/bmi/src/bmi_2.c
+++ b/core/bmi/src/bmi_2.c
@@ -36,7 +36,7 @@
CDF_STATUS
bmi_no_command(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t length;
@@ -80,7 +80,7 @@
CDF_STATUS
bmi_done_local(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t length;
@@ -143,11 +143,8 @@
return CDF_STATUS_SUCCESS;
}
-CDF_STATUS
-bmi_write_memory(uint32_t address,
- uint8_t *buffer,
- uint32_t length,
- struct ol_context *ol_ctx)
+CDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length,
+ struct ol_context *ol_ctx)
{
uint32_t cid;
int status;
@@ -158,7 +155,7 @@
const uint32_t header = sizeof(cid) + sizeof(address) + sizeof(length);
uint8_t aligned_buffer[BMI_DATASZ_MAX];
uint8_t *src;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
uint8_t *bmi_rsp_buff = info->bmi_rsp_buff;
@@ -227,7 +224,7 @@
bmi_read_memory(uint32_t address, uint8_t *buffer,
uint32_t length, struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint8_t ret = 0;
@@ -302,7 +299,7 @@
CDF_STATUS
bmi_execute(uint32_t address, uint32_t *param, struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t cid;
int status;
uint32_t length;
@@ -354,7 +351,7 @@
uint32_t offset;
uint32_t length;
uint8_t ret = 0;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_info *info = GET_BMI_CONTEXT(ol_ctx);
uint8_t *bmi_cmd_buff = info->bmi_cmd_buff;
uint8_t *bmi_rsp_buff = info->bmi_rsp_buff;
@@ -412,7 +409,7 @@
static CDF_STATUS bmi_enable(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct bmi_target_info targ_info;
struct image_desc_info image_desc_info;
CDF_STATUS status;
@@ -466,7 +463,6 @@
CDF_STATUS bmi_firmware_download(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
CDF_STATUS status;
if (NO_BMI)
diff --git a/core/bmi/src/i_bmi.h b/core/bmi/src/i_bmi.h
index f6bcbb4..caef15d 100644
--- a/core/bmi/src/i_bmi.h
+++ b/core/bmi/src/i_bmi.h
@@ -159,7 +159,7 @@
uint8_t *cal_in_flash;
cdf_device_t cdf_dev;
cdf_work_t ramdump_work;
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
struct targetdef_t {
struct targetdef_s *targetdef;
} tgt_def;
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index 5fc5ad3..0b04d51 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -136,7 +136,7 @@
__ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file,
uint32_t address, bool compressed)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
int status = EOK;
const char *filename = NULL;
const struct firmware *fw_entry;
@@ -503,7 +503,7 @@
static inline void ol_get_ramdump_mem(struct ramdump_info *info) { }
#endif
-int ol_copy_ramdump(struct ol_softc *scn)
+int ol_copy_ramdump(struct hif_opaque_softc *scn)
{
int ret = -1;
@@ -535,7 +535,7 @@
uint32_t target_type;
struct hif_target_info *tgt_info;
struct ol_context *ol_ctx = data;
- struct ol_softc *ramdump_scn = ol_ctx->scn;
+ struct hif_opaque_softc *ramdump_scn = ol_ctx->scn;
if (!ramdump_scn) {
BMI_ERR("%s:Ramdump_scn is null:", __func__);
@@ -601,7 +601,7 @@
static DECLARE_WORK(fw_indication_work, fw_indication_work_handler);
-void ol_schedule_fw_indication_work(struct ol_softc *scn)
+void ol_schedule_fw_indication_work(struct hif_opaque_softc *scn)
{
schedule_work(&fw_indication_work);
}
@@ -610,7 +610,7 @@
void ol_target_failure(void *instance, CDF_STATUS status)
{
struct ol_context *ol_ctx = instance;
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
tp_wma_handle wma = cds_get_context(CDF_MODULE_ID_WMA);
struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx);
int ret;
@@ -670,7 +670,7 @@
struct cnss_platform_cap cap;
int ret;
#endif
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx);
uint32_t target_type = tgt_info->target_type;
@@ -814,7 +814,7 @@
}
static int
-ol_check_dataset_patch(struct ol_softc *scn, uint32_t *address)
+ol_check_dataset_patch(struct hif_opaque_softc *scn, uint32_t *address)
{
/* Check if patch file needed for this target type/version. */
return 0;
@@ -888,7 +888,7 @@
CDF_STATUS ol_patch_pll_switch(struct ol_context *ol_ctx)
{
- struct ol_softc *hif = ol_ctx->scn;
+ struct hif_opaque_softc *hif = ol_ctx->scn;
CDF_STATUS status = CDF_STATUS_SUCCESS;
uint32_t addr = 0;
uint32_t reg_val = 0;
@@ -1205,7 +1205,7 @@
CDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct hif_opaque_softc *scn = ol_ctx->scn;
uint32_t param, address = 0;
int status = !EOK;
CDF_STATUS ret;
@@ -1385,7 +1385,7 @@
return status;
}
-int ol_diag_read(struct ol_softc *scn, uint8_t *buffer,
+int ol_diag_read(struct hif_opaque_softc *scn, uint8_t *buffer,
uint32_t pos, size_t count)
{
int result = 0;
@@ -1457,7 +1457,7 @@
return section_len;
}
-static int ol_diag_read_reg_loc(struct ol_softc *scn, uint8_t *buffer,
+static int ol_diag_read_reg_loc(struct hif_opaque_softc *scn, uint8_t *buffer,
uint32_t buffer_len)
{
int i, len, section_len, fill_len;
@@ -1523,7 +1523,7 @@
return result;
}
-void ol_dump_target_memory(struct ol_softc *scn, void *memory_block)
+void ol_dump_target_memory(struct hif_opaque_softc *scn, void *memory_block)
{
char *buffer_loc = memory_block;
u_int32_t section_count = 0;
@@ -1560,7 +1560,7 @@
static int ol_target_coredump(void *inst, void *memory_block,
uint32_t block_len)
{
- struct ol_softc *scn = (struct ol_softc *)inst;
+ struct hif_opaque_softc *scn = (struct hif_opaque_softc *)inst;
int8_t *buffer_loc = memory_block;
int result = 0;
int ret = 0;
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index de193fa..d54bfca 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -173,7 +173,7 @@
cdf_device_t cdf_ctx;
HTC_INIT_INFO htcInfo;
struct ol_context *ol_ctx;
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
void *HTCHandle;
hdd_context_t *pHddCtx;
diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c
index 3346896..f63ee4d 100644
--- a/core/dp/txrx/ol_tx.c
+++ b/core/dp/txrx/ol_tx.c
@@ -694,8 +694,8 @@
static inline cdf_nbuf_t
ol_tx_ll_wrapper(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
{
- struct ol_softc *hif_device =
- (struct ol_softc *)cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *hif_device =
+ (struct hif_opaque_softc *)cds_get_context(CDF_MODULE_ID_HIF);
if (cdf_likely(hif_device && hif_is_fastpath_mode_enabled(hif_device)))
msdu_list = ol_tx_ll_fast(vdev, msdu_list);
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 00bb205..be7623e 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -283,8 +283,8 @@
*
* Return: void
*/
-static inline void
-setup_fastpath_ce_handles(struct ol_softc *osc, struct ol_txrx_pdev_t *pdev)
+static inline void setup_fastpath_ce_handles(struct hif_opaque_softc *osc,
+ struct ol_txrx_pdev_t *pdev)
{
/*
* Before the HTT attach, set up the CE handles
@@ -296,8 +296,8 @@
}
#else /* not WLAN_FEATURE_FASTPATH */
-static inline void
-setup_fastpath_ce_handles(struct ol_softc *osc, struct ol_txrx_pdev_t *pdev)
+static inline void setup_fastpath_ce_handles(struct hif_opaque_softc *osc,
+ struct ol_txrx_pdev_t *pdev)
{
}
#endif /* WLAN_FEATURE_FASTPATH */
@@ -500,7 +500,7 @@
uint16_t fail_idx = 0;
int ret = 0;
uint16_t desc_pool_size;
- struct ol_softc *osc = cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *osc = cds_get_context(CDF_MODULE_ID_HIF);
uint16_t desc_element_size = sizeof(union ol_tx_desc_list_elem_t);
union ol_tx_desc_list_elem_t *c_element;
@@ -959,7 +959,7 @@
void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force)
{
int i;
- struct ol_softc *osc = cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *osc = cds_get_context(CDF_MODULE_ID_HIF);
/*checking to ensure txrx pdev structure is not NULL */
if (!pdev) {
@@ -3415,8 +3415,8 @@
*/
void ol_register_lro_flush_cb(void (handler)(void *), void *data)
{
- struct ol_softc *hif_device =
- (struct ol_softc *)cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *hif_device =
+ (struct hif_opaque_softc *)cds_get_context(CDF_MODULE_ID_HIF);
struct ol_txrx_pdev_t *pdev = cds_get_context(CDF_MODULE_ID_TXRX);
pdev->lro_info.lro_flush_cb = handler;
@@ -3436,8 +3436,8 @@
*/
void ol_deregister_lro_flush_cb(void)
{
- struct ol_softc *hif_device =
- (struct ol_softc *)cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *hif_device =
+ (struct hif_opaque_softc *)cds_get_context(CDF_MODULE_ID_HIF);
struct ol_txrx_pdev_t *pdev = cds_get_context(CDF_MODULE_ID_TXRX);
hif_lro_flush_cb_deregister(hif_device);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index af3d07e..8a292a3 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -7020,7 +7020,7 @@
*/
static void hdd_update_hif_config(hdd_context_t *hdd_ctx)
{
- struct ol_softc *scn = cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *scn = cds_get_context(CDF_MODULE_ID_HIF);
struct hif_config_info cfg;
if (!scn)
diff --git a/core/hdd/src/wlan_hdd_napi.c b/core/hdd/src/wlan_hdd_napi.c
index 229e65a..9ff7671 100644
--- a/core/hdd/src/wlan_hdd_napi.c
+++ b/core/hdd/src/wlan_hdd_napi.c
@@ -54,7 +54,7 @@
struct qca_napi_data *hdd_napi_get_all(void)
{
struct qca_napi_data *rp = NULL;
- struct ol_softc *hif;
+ struct hif_opaque_softc *hif;
NAPI_DEBUG("-->\n");
@@ -103,7 +103,7 @@
*/
int hdd_napi_create(void)
{
- struct ol_softc *hif_ctx;
+ struct hif_opaque_softc *hif_ctx;
uint8_t ul, dl;
int ul_polled, dl_polled;
int rc = 0;
@@ -164,7 +164,7 @@
NAPI_DEBUG("--> (force=%d)\n", force);
if (hdd_napi_map) {
- struct ol_softc *hif_ctx;
+ struct hif_opaque_softc *hif_ctx;
hif_ctx = cds_get_context(CDF_MODULE_ID_HIF);
if (unlikely(NULL == hif_ctx))
@@ -207,7 +207,7 @@
*/
int hdd_napi_enabled(int id)
{
- struct ol_softc *hif;
+ struct hif_opaque_softc *hif;
int rc = 0; /* NOT enabled */
hif = cds_get_context(CDF_MODULE_ID_HIF);
@@ -239,7 +239,7 @@
int hdd_napi_event(enum qca_napi_event event, void *data)
{
int rc = -EFAULT; /* assume err */
- struct ol_softc *hif;
+ struct hif_opaque_softc *hif;
NAPI_DEBUG("-->(event=%d, aux=%p)\n", event, data);
diff --git a/core/utils/epping/src/epping_main.c b/core/utils/epping/src/epping_main.c
index 68e03ea..1171134 100644
--- a/core/utils/epping/src/epping_main.c
+++ b/core/utils/epping/src/epping_main.c
@@ -179,7 +179,7 @@
cds_context_type *p_cds_context = NULL;
cdf_device_t cdf_ctx;
HTC_INIT_INFO htcInfo;
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
tSirMacAddr adapter_macAddr;
struct hif_target_info *tgt_info;
struct ol_context *ol_ctx;
diff --git a/core/utils/pktlog/include/pktlog_ac.h b/core/utils/pktlog/include/pktlog_ac.h
index ade4102..e2d895a 100644
--- a/core/utils/pktlog/include/pktlog_ac.h
+++ b/core/utils/pktlog/include/pktlog_ac.h
@@ -59,24 +59,24 @@
/* Opaque softc */
struct ol_ath_generic_softc_t;
typedef struct ol_ath_generic_softc_t *ol_ath_generic_softc_handle;
-extern void pktlog_disable_adapter_logging(struct ol_softc *scn);
-extern int pktlog_alloc_buf(struct ol_softc *scn);
-extern void pktlog_release_buf(struct ol_softc *scn);
+extern void pktlog_disable_adapter_logging(struct hif_opaque_softc *scn);
+extern int pktlog_alloc_buf(struct hif_opaque_softc *scn);
+extern void pktlog_release_buf(struct hif_opaque_softc *scn);
ssize_t pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos,
struct ath_pktlog_info *pl_info, bool *read_complete);
int pktlog_send_per_pkt_stats_to_user(void);
struct ol_pl_arch_dep_funcs {
- void (*pktlog_init)(struct ol_softc *scn);
- int (*pktlog_enable)(struct ol_softc *scn, int32_t log_state);
- int (*pktlog_setsize)(struct ol_softc *scn, int32_t log_state);
- int (*pktlog_disable)(struct ol_softc *scn);
+ void (*pktlog_init)(struct hif_opaque_softc *scn);
+ int (*pktlog_enable)(struct hif_opaque_softc *scn, int32_t log_state);
+ int (*pktlog_setsize)(struct hif_opaque_softc *scn, int32_t log_state);
+ int (*pktlog_disable)(struct hif_opaque_softc *scn);
};
struct ol_pl_os_dep_funcs {
- int (*pktlog_attach)(struct ol_softc *scn);
- void (*pktlog_detach)(struct ol_softc *scn);
+ int (*pktlog_attach)(struct hif_opaque_softc *scn);
+ void (*pktlog_detach)(struct hif_opaque_softc *scn);
};
struct ath_pktlog_wmi_params {
@@ -118,10 +118,10 @@
*/
void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data);
-void pktlog_init(struct ol_softc *scn);
-int pktlog_enable(struct ol_softc *scn, int32_t log_state);
-int pktlog_setsize(struct ol_softc *scn, int32_t log_state);
-int pktlog_disable(struct ol_softc *scn);
+void pktlog_init(struct hif_opaque_softc *scn);
+int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state);
+int pktlog_setsize(struct hif_opaque_softc *scn, int32_t log_state);
+int pktlog_disable(struct hif_opaque_softc *scn);
int pktlogmod_init(void *context);
void pktlogmod_exit(void *context);
@@ -142,19 +142,19 @@
#else /* REMOVE_PKT_LOG */
#define ol_pktlog_attach(_scn) ({ (void)_scn; })
#define ol_pktlog_detach(_scn) ({ (void)_scn; })
-static inline void pktlog_init(struct ol_softc *scn)
+static inline void pktlog_init(struct hif_opaque_softc *scn)
{
return;
}
-static int pktlog_enable(struct ol_softc *scn, int32_t log_state)
+static int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
{
return 0;
}
-static int pktlog_setsize(struct ol_softc *scn, int32_t log_state)
+static int pktlog_setsize(struct hif_opaque_softc *scn, int32_t log_state)
{
return 0;
}
-static int pktlog_disable(struct ol_softc *scn)
+static int pktlog_disable(struct hif_opaque_softc *scn)
{
return 0;
}
diff --git a/core/utils/pktlog/include/pktlog_ac_api.h b/core/utils/pktlog/include/pktlog_ac_api.h
index 04b32f7..c63c4aa 100644
--- a/core/utils/pktlog/include/pktlog_ac_api.h
+++ b/core/utils/pktlog/include/pktlog_ac_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -42,11 +42,11 @@
typedef struct ol_pktlog_dev_t *ol_pktlog_dev_handle;
/**
- * @typedef ol_softc_handle
- * @brief opaque handle for ol_softc
+ * @typedef hif_opaque_softc_handle
+ * @brief opaque handle for hif_opaque_softc
*/
-struct ol_softc;
-typedef struct ol_softc *ol_softc_handle;
+struct hif_opaque_softc;
+typedef struct hif_opaque_softc *hif_opaque_softc_handle;
/**
* @typedef net_device_handle
@@ -55,9 +55,10 @@
struct net_device;
typedef struct net_device *net_device_handle;
-void ol_pl_set_name(ol_softc_handle scn, net_device_handle dev);
+void ol_pl_set_name(hif_opaque_softc_handle scn, net_device_handle dev);
-void ol_pl_sethandle(ol_pktlog_dev_handle *pl_handle, ol_softc_handle scn);
+void ol_pl_sethandle(ol_pktlog_dev_handle *pl_handle,
+ hif_opaque_softc_handle scn);
/* Packet log state information */
#ifndef _PKTLOG_INFO
diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c
index cfc12bc..a514ea3 100644
--- a/core/utils/pktlog/linux_ac.c
+++ b/core/utils/pktlog/linux_ac.c
@@ -74,8 +74,8 @@
static struct proc_dir_entry *g_pktlog_pde;
-static int pktlog_attach(struct ol_softc *sc);
-static void pktlog_detach(struct ol_softc *sc);
+static int pktlog_attach(struct hif_opaque_softc *sc);
+static void pktlog_detach(struct hif_opaque_softc *sc);
static int pktlog_open(struct inode *i, struct file *f);
static int pktlog_release(struct inode *i, struct file *f);
static int pktlog_mmap(struct file *f, struct vm_area_struct *vma);
@@ -93,7 +93,7 @@
* Linux implementation of helper functions
*/
-static struct ol_pktlog_dev_t *get_pl_handle(struct ol_softc *scn)
+static struct ol_pktlog_dev_t *get_pl_handle(struct hif_opaque_softc *scn)
{
ol_txrx_pdev_handle pdev_txrx_handle;
pdev_txrx_handle = cds_get_context(CDF_MODULE_ID_TXRX);
@@ -102,7 +102,7 @@
return pdev_txrx_handle->pl_dev;
}
-void ol_pl_set_name(ol_softc_handle scn, net_device_handle dev)
+void ol_pl_set_name(hif_opaque_softc_handle scn, net_device_handle dev)
{
ol_txrx_pdev_handle pdev_txrx_handle;
pdev_txrx_handle = cds_get_context(CDF_MODULE_ID_TXRX);
@@ -110,14 +110,14 @@
pdev_txrx_handle->pl_dev->name = dev->name;
}
-void pktlog_disable_adapter_logging(struct ol_softc *scn)
+void pktlog_disable_adapter_logging(struct hif_opaque_softc *scn)
{
struct ol_pktlog_dev_t *pl_dev = get_pl_handle(scn);
if (pl_dev)
pl_dev->pl_info->log_state = 0;
}
-int pktlog_alloc_buf(struct ol_softc *scn)
+int pktlog_alloc_buf(struct hif_opaque_softc *scn)
{
uint32_t page_cnt;
unsigned long vaddr;
@@ -159,7 +159,7 @@
return 0;
}
-void pktlog_release_buf(struct ol_softc *scn)
+void pktlog_release_buf(struct hif_opaque_softc *scn)
{
unsigned long page_cnt;
unsigned long vaddr;
@@ -214,7 +214,7 @@
return -EINVAL;
}
- pl_dev = get_pl_handle((struct ol_softc *)scn);
+ pl_dev = get_pl_handle((struct hif_opaque_softc *)scn);
if (!pl_dev) {
printk("%s: Invalid pktlog context\n", __func__);
@@ -229,8 +229,8 @@
ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer,
lenp, ppos);
if (ret == 0)
- ret = pl_dev->pl_funcs->pktlog_enable((struct ol_softc
- *)scn, enable);
+ ret = pl_dev->pl_funcs->pktlog_enable(
+ (struct hif_opaque_softc *)scn, enable);
else
printk(PKTLOG_TAG "%s:proc_dointvec failed\n",
__func__);
@@ -269,7 +269,7 @@
return -EINVAL;
}
- pl_dev = get_pl_handle((struct ol_softc *)scn);
+ pl_dev = get_pl_handle((struct hif_opaque_softc *)scn);
if (!pl_dev) {
printk("%s: Invalid pktlog handle\n", __func__);
@@ -284,8 +284,8 @@
ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer,
lenp, ppos);
if (ret == 0)
- ret = pl_dev->pl_funcs->pktlog_setsize((struct ol_softc
- *)scn, size);
+ ret = pl_dev->pl_funcs->pktlog_setsize(
+ (struct hif_opaque_softc *)scn, size);
} else {
size = get_pktlog_bufsize(pl_dev);
ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer,
@@ -299,7 +299,7 @@
}
/* Register sysctl table */
-static int pktlog_sysctl_register(struct ol_softc *scn)
+static int pktlog_sysctl_register(struct hif_opaque_softc *scn)
{
struct ol_pktlog_dev_t *pl_dev = get_pl_handle(scn);
struct ath_pktlog_info_lnx *pl_info_lnx;
@@ -403,7 +403,7 @@
* Initialize logging for system or adapter
* Parameter scn should be NULL for system wide logging
*/
-static int pktlog_attach(struct ol_softc *scn)
+static int pktlog_attach(struct hif_opaque_softc *scn)
{
struct ol_pktlog_dev_t *pl_dev;
struct ath_pktlog_info_lnx *pl_info_lnx;
@@ -488,7 +488,7 @@
}
}
-static void pktlog_detach(struct ol_softc *scn)
+static void pktlog_detach(struct hif_opaque_softc *scn)
{
struct ol_pktlog_dev_t *pl_dev = (struct ol_pktlog_dev_t *)
get_pl_handle(scn);
@@ -1008,7 +1008,9 @@
}
/* Attach packet log */
- if ((ret = pktlog_attach((struct ol_softc *)context)))
+ ret = pktlog_attach((struct hif_opaque_softc *)context);
+
+ if (ret)
goto attach_fail;
return ret;
@@ -1021,7 +1023,7 @@
void pktlogmod_exit(void *context)
{
- struct ol_softc *scn = (struct ol_softc *)context;
+ struct hif_opaque_softc *scn = (struct hif_opaque_softc *)context;
struct ol_pktlog_dev_t *pl_dev;
if (!scn)
diff --git a/core/utils/pktlog/pktlog_ac.c b/core/utils/pktlog/pktlog_ac.c
index 3025a7c..1632adb 100644
--- a/core/utils/pktlog/pktlog_ac.c
+++ b/core/utils/pktlog/pktlog_ac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -64,7 +64,8 @@
.pl_funcs = &ol_pl_funcs,
};
-void ol_pl_sethandle(ol_pktlog_dev_handle *pl_handle, struct ol_softc *scn)
+void ol_pl_sethandle(ol_pktlog_dev_handle *pl_handle,
+ struct hif_opaque_softc *scn)
{
ol_pl_dev.scn = (ol_ath_generic_softc_handle) scn;
*pl_handle = &ol_pl_dev;
@@ -99,8 +100,8 @@
return A_OK;
}
-static inline A_STATUS
-pktlog_enable_tgt(struct ol_softc *_scn, uint32_t log_state)
+static inline A_STATUS pktlog_enable_tgt(struct hif_opaque_softc *_scn,
+ uint32_t log_state)
{
uint32_t types = 0;
@@ -261,7 +262,7 @@
return A_OK;
}
-int pktlog_disable(struct ol_softc *scn)
+int pktlog_disable(struct hif_opaque_softc *scn)
{
struct ol_txrx_pdev_t *txrx_pdev =
cds_get_context(CDF_MODULE_ID_TXRX);
@@ -289,7 +290,7 @@
return 0;
}
-void pktlog_init(struct ol_softc *scn)
+void pktlog_init(struct hif_opaque_softc *scn)
{
struct ath_pktlog_info *pl_info;
ol_txrx_pdev_handle pdev_txrx_handle;
@@ -325,7 +326,7 @@
PKTLOG_RCUPDATE_SUBSCRIBER.callback = pktlog_callback;
}
-int pktlog_enable(struct ol_softc *scn, int32_t log_state)
+int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
{
struct ol_pktlog_dev_t *pl_dev;
struct ath_pktlog_info *pl_info;
@@ -410,7 +411,7 @@
return 0;
}
-int pktlog_setsize(struct ol_softc *scn, int32_t size)
+int pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
{
ol_txrx_pdev_handle pdev_txrx_handle =
cds_get_context(CDF_MODULE_ID_TXRX);
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 06f7010..72b412f 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -3541,7 +3541,7 @@
wmi_buf_t buf;
int32_t len;
int ret;
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
int host_credits;
int wmi_pending_cmds;
#ifdef CONFIG_CNSS
@@ -6536,7 +6536,7 @@
wmi_pdev_suspend_cmd_fixed_param *cmd;
wmi_buf_t wmibuf;
uint32_t len = sizeof(*cmd);
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
int ret;
#ifdef CONFIG_CNSS
tpAniSirGlobal pmac = cds_get_context(CDF_MODULE_ID_PE);
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index aa07912..f92a6c7 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -158,7 +158,7 @@
struct hif_target_info *tgt_info;
struct wma_ini_config *cfg = wma_get_ini_handle(wma);
uint8_t max_no_of_peers = cfg ? cfg->max_no_of_peers : MIN_NO_OF_PEERS;
- struct ol_softc *scn = cds_get_context(CDF_MODULE_ID_HIF);
+ struct hif_opaque_softc *scn = cds_get_context(CDF_MODULE_ID_HIF);
if (!scn) {
WMA_LOGE("%s: Invalid wma handle", __func__);
@@ -4605,7 +4605,7 @@
void wma_set_wifi_start_packet_stats(void *wma_handle,
struct sir_wifi_start_log *start_log)
{
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
uint32_t log_state;
if (!start_log) {
diff --git a/core/wmi/wmi_unified.c b/core/wmi/wmi_unified.c
index 6ebc2ca..e57c461 100644
--- a/core/wmi/wmi_unified.c
+++ b/core/wmi/wmi_unified.c
@@ -796,7 +796,7 @@
{
HTC_PACKET *pkt;
A_STATUS status;
- struct ol_softc *scn;
+ struct hif_opaque_softc *scn;
uint16_t htc_tag = 0;
if (wmi_get_runtime_pm_inprogress(wmi_handle)) {