u16 headroom;
struct hip4_smapper_descriptor *desc;
struct hip4_smapper_control *control;
- unsigned long flags;
struct slsi_skb_cb *cb = slsi_skb_cb_get(skb_fapi);
control = &(hip->hip_priv->smapper_control);
- spin_lock_irqsave(&control->smapper_lock, flags);
desc = (struct hip4_smapper_descriptor *)skb_fapi->data;
bank_num = desc->bank_num;
skb_put(skb, len);
cb->skb_addr = skb;
SLSI_DBG4_NODEV(SLSI_SMAPPER, "Consumed Bank %d Entry %d Len %d SKB smapper: 0x%p, SKB fapi %p\n", bank_num, entry, len, skb, skb_fapi);
- spin_unlock_irqrestore(&control->smapper_lock, flags);
return 0;
error:
/* RX is broken.....*/
- spin_unlock_irqrestore(&control->smapper_lock, flags);
return -EIO;
}
struct sk_buff *skb;
struct slsi_skb_cb *cb = slsi_skb_cb_get(skb_fapi);
struct hip4_smapper_control *control;
- unsigned long flags;
control = &(hip->hip_priv->smapper_control);
- spin_lock_irqsave(&control->smapper_lock, flags);
skb = (struct sk_buff *)cb->skb_addr;
if (!skb) {
SLSI_DBG4_NODEV(SLSI_SMAPPER, "NULL SKB smapper\n");
- spin_unlock_irqrestore(&control->smapper_lock, flags);
return NULL;
}
SLSI_DBG4_NODEV(SLSI_SMAPPER, "Get SKB smapper: 0x%p, SKB fapi 0x%p\n", skb, skb_fapi);
- spin_unlock_irqrestore(&control->smapper_lock, flags);
return skb->data;
}
struct sk_buff *skb;
struct slsi_skb_cb *cb = slsi_skb_cb_get(skb_fapi);
struct hip4_smapper_control *control;
- unsigned long flags;
control = &(hip->hip_priv->smapper_control);
- spin_lock_irqsave(&control->smapper_lock, flags);
skb = (struct sk_buff *)cb->skb_addr;
SLSI_DBG4_NODEV(SLSI_SMAPPER, "Get SKB smapper: 0x%p, SKB fapi 0x%p\n", skb, skb_fapi);
cb->free_ma_unitdat = true;
slsi_kfree_skb(skb_fapi);
- spin_unlock_irqrestore(&control->smapper_lock, flags);
return skb;
}