Changed return values from prism2sta_txframe() and fixed dev->tbusy handling

in netdev_hard_start_xmit().
This commit is contained in:
mark 2000-01-28 06:42:52 +00:00
parent b6561fde70
commit fb2da14e18
2 changed files with 6 additions and 5 deletions

View File

@ -368,6 +368,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
} else if ( txresult == 1 ) {
/* success, no more avail */
WLAN_LOG_DEBUG0(3, "txframe success, no more bufs\n");
netdev->tbusy = 1;
result = 0;
} else if ( txresult == 2 ) {
/* alloc failure, drop frame */
@ -379,7 +380,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
/* buffer full or queue busy */
WLAN_LOG_DEBUG0(3, "txframe returned full or busy\n");
result = 1;
netdev->tbusy = 0;
netdev->tbusy = 1;
/* p80211pb_free(pb); driver's responsibility */
}
}

View File

@ -393,7 +393,7 @@ dmpmem(&txdesc, sizeof(txdesc));
priv->txfid,
sizeof(txdesc),
result);
result = 2;
result = 3;
goto failed;
}
@ -417,7 +417,7 @@ dmpmem(pb->p80211buf + WLAN_HDR_A3_LEN, pb->p80211buflen - WLAN_HDR_A3_LEN);
sizeof(txdesc),
pb->p80211buflen - WLAN_HDR_A3_LEN,
result);
result = 2;
result = 3;
goto failed;
}
}
@ -441,7 +441,7 @@ dmpmem(pb->p80211_payload, pb->p80211_payloadlen);
sizeof(txdesc) + pb->p80211buflen - WLAN_HDR_A3_LEN,
pb->p80211_payloadlen,
result);
result = 2;
result = 3;
goto failed;
}
@ -454,7 +454,7 @@ dmpmem(pb->p80211_payload, pb->p80211_payloadlen);
result = 2;
goto failed;
}
result = 0;
result = 1; /* indicate we haven't any buffers, txcomplete will clear */
failed:
p80211pb_free(pb);