void *txq_lock;
struct semaphore *txq_add_to_head_lock;
- void *txq_spinlock;
unsigned long txq_spinlock_flags;
struct txq_entry_t *txq_head;
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
if (p->txq_head) {
tqe = p->txq_head;
p->txq_head = tqe->next;
} else {
tqe = NULL;
}
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
return tqe;
}
{
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
if (p->txq_head == NULL) {
tqe->next = NULL;
p->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries);
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
/**
* wake up TX queue
if (p->os_func.os_wait(p->txq_add_to_head_lock, CFG_PKTS_TIMEOUT))
return -1;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
if (p->txq_head == NULL) {
tqe->next = NULL;
p->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries);
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
up(p->txq_add_to_head_lock);
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
return 0;
}
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
eth_hdr_ptr = &buffer[0];
h_proto = ntohs(*((unsigned short *)ð_hdr_ptr[12]));
} else {
ret = 0;
}
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
return ret;
}
u32 Dropped = 0;
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
- spin_lock_irqsave(p->txq_spinlock, p->txq_spinlock_flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, p->txq_spinlock_flags);
for (i = PendingAcks_arrBase; i < (PendingAcks_arrBase + Pending_Acks); i++) {
if (Pending_Acks_info[i].ack_num < Acks_keep_track_info[Pending_Acks_info[i].Session_index].Bigger_Ack_num) {
struct txq_entry_t *tqe;
PendingAcks_arrBase = 0;
- spin_unlock_irqrestore(p->txq_spinlock, p->txq_spinlock_flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock,
+ p->txq_spinlock_flags);
while (Dropped > 0) {
/*consume the semaphore count of the removed packet*/
struct txq_entry_t *tqe;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
tqe = p->txq_head;
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
return tqe;
static struct txq_entry_t *wilc_wlan_txq_get_next(struct txq_entry_t *tqe)
{
- wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
unsigned long flags;
- spin_lock_irqsave(p->txq_spinlock, flags);
+ spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
tqe = tqe->next;
- spin_unlock_irqrestore(p->txq_spinlock, flags);
+ spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
return tqe;
g_wlan.txq_add_to_head_lock = inp->os_context.txq_add_to_head_critical_section;
- g_wlan.txq_spinlock = inp->os_context.txq_spin_lock;
-
g_wlan.rxq_lock = inp->os_context.rxq_critical_section;
g_wlan.txq_wait = inp->os_context.txq_wait_event;
g_wlan.cfg_wait = inp->os_context.cfg_wait_event;