fix gcc compiler warning in wifi driver

This commit is contained in:
rajkosto 2010-09-29 08:47:30 +02:00 committed by Jon Benson
parent baec40b8ca
commit 8784a1dc59

View File

@ -360,7 +360,8 @@ osl_pktfree_static(osl_t *osh, void *p, bool send)
for (i = 0; i < MAX_STATIC_PKT_NUM*2; i++)
{
if (p == bcm_static_skb->skb_4k[i])
if ( (i < MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_4k[i]) ||
(i >= MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_8k[i-MAX_STATIC_PKT_NUM]) )
{
down(&bcm_static_skb->osl_pkt_sem);
bcm_static_skb->pkt_use[i] = 0;