PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
- nwi->os_context.hif_critical_section = (void *)&g_linux_wlan->hif_cs;
nwi->os_context.os_private = (void *)nic;
nwi->os_context.tx_buffer_size = LINUX_TX_SIZE;
nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs;
* host interface functions
**/
wilc_hif_func_t hif_func;
- struct mutex *hif_lock;
/**
* configuration interface functions
static inline void acquire_bus(BUS_ACQUIRE_T acquire)
{
- mutex_lock(g_wlan.hif_lock);
+ mutex_lock(&g_linux_wlan->hif_cs);
#ifndef WILC_OPTIMIZE_SLEEP_INT
if (genuChipPSstate != CHIP_WAKEDUP)
#endif
if (release == RELEASE_ALLOW_SLEEP)
chip_allow_sleep();
#endif
- mutex_unlock(g_wlan.hif_lock);
+ mutex_unlock(&g_linux_wlan->hif_cs);
}
/********************************************
*
**/
memcpy((void *)&g_wlan.os_func, (void *)&inp->os_func, sizeof(wilc_wlan_os_func_t));
memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t));
- g_wlan.hif_lock = inp->os_context.hif_critical_section;
g_wlan.txq_lock = inp->os_context.txq_critical_section;
g_wlan.tx_buffer_size = inp->os_context.tx_buffer_size;
u32 reg;
/*Reset WILC_CHANGING_VIR_IF register to allow adding futrue keys to CE H/W*/
- mutex_lock((&g_wlan)->hif_lock);
+ mutex_lock(&g_linux_wlan->hif_cs);
ret = (&g_wlan)->hif_func.hif_read_reg(WILC_CHANGING_VIR_IF, ®);
if (!ret) {
PRINT_ER("Error while Reading reg WILC_CHANGING_VIR_IF\n");
if (!ret) {
PRINT_ER("Error while writing reg WILC_CHANGING_VIR_IF\n");
}
- mutex_unlock((&g_wlan)->hif_lock);
+ mutex_unlock(&g_linux_wlan->hif_cs);
return ret;
}