Added a test for empty stack/queue that's independent of tbusy.

This commit is contained in:
mark 2001-07-04 15:18:31 +00:00
parent 78d525a653
commit 0abe3ec4ee
1 changed files with 11 additions and 0 deletions

View File

@ -595,6 +595,7 @@ dmpmem(pb->ethbuf, pb->ethbuflen);
/* Since tbusy is set whenever the stack is empty, there should
* always be something on the stack if we get to this point.
* [MSM]: NOT TRUE!!!!! so I added the test of fid below.
*/
/* Allocate FID */
@ -604,6 +605,10 @@ dmpmem(pb->ethbuf, pb->ethbuflen);
fid = txfid_queue_remove(priv);
#endif
if ( fid == 0 ) { /* stack or queue was empty */
return 4;
}
/* Copy descriptor part to FID */
#if defined(DDESC)
printk(KERN_DEBUG "Desc[0] - [%d]: \n", sizeof(txdesc));
@ -620,6 +625,8 @@ dmpmem(&txdesc, sizeof(txdesc));
fid,
sizeof(txdesc),
result);
/* put the fid back in the queue */
txfid_queue_add(priv, fid);
result = 3;
goto failed;
}
@ -644,6 +651,8 @@ dmpmem(pb->p80211buf + WLAN_HDR_A3_LEN, pb->p80211buflen - WLAN_HDR_A3_LEN);
sizeof(txdesc),
pb->p80211buflen - WLAN_HDR_A3_LEN,
result);
/* put the fid back in the queue */
txfid_queue_add(priv, fid);
result = 3;
goto failed;
}
@ -668,6 +677,8 @@ dmpmem(pb->p80211_payload, pb->p80211_payloadlen);
sizeof(txdesc) + pb->p80211buflen - WLAN_HDR_A3_LEN,
pb->p80211_payloadlen,
result);
/* put the fid back in the queue */
txfid_queue_add(priv, fid);
result = 3;
goto failed;
}