nwi->os_context.txq_add_to_head_critical_section = (void *)&g_linux_wlan->txq_add_to_head_cs;
 
-       nwi->os_context.txq_wait_event = (void *)&g_linux_wlan->txq_event;
-
 #if defined(MEMORY_STATIC)
        nwi->os_context.rx_buffer_size = LINUX_RX_SIZE;
 #endif
 
        struct txq_entry_t *txq_head;
        struct txq_entry_t *txq_tail;
        int txq_entries;
-       void *txq_wait;
        int txq_exit;
 
        /**
         **/
        PRINT_D(TX_DBG, "Wake the txq_handling\n");
 
-       up(p->txq_wait);
+       up(&g_linux_wlan->txq_event);
 }
 
 static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe)
        /**
         *      wake up TX queue
         **/
-       up(p->txq_wait);
+       up(&g_linux_wlan->txq_event);
        PRINT_D(TX_DBG, "Wake up the txq_handler\n");
 
        return 0;
 
        while (Dropped > 0) {
                /*consume the semaphore count of the removed packet*/
-               p->os_func.os_wait(p->txq_wait, 1);
+               p->os_func.os_wait(&g_linux_wlan->txq_event, 1);
                Dropped--;
        }
 
 
        g_wlan.txq_add_to_head_lock = inp->os_context.txq_add_to_head_critical_section;
 
-       g_wlan.txq_wait = inp->os_context.txq_wait_event;
        g_wlan.cfg_wait = inp->os_context.cfg_wait_event;
        g_wlan.tx_buffer_size = inp->os_context.tx_buffer_size;
 #if defined (MEMORY_STATIC)