Browse Source

Transmit the buffer contents, not the buffer descriptor...

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
79f64eea55
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/drivers/net/pnic.c

+ 4
- 2
src/drivers/net/pnic.c View File

134
 		if ( qlen == 0 )
134
 		if ( qlen == 0 )
135
 			break;
135
 			break;
136
 		pkb = alloc_pkb ( ETH_FRAME_LEN );
136
 		pkb = alloc_pkb ( ETH_FRAME_LEN );
137
-		if ( ! pkb )
137
+		if ( ! pkb ) {
138
+			printf ( "could not allocate buffer\n" );
138
 			break;
139
 			break;
140
+		}
139
 		if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
141
 		if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
140
 				    pkb->data, ETH_FRAME_LEN, &length )
142
 				    pkb->data, ETH_FRAME_LEN, &length )
141
 		     != PNIC_STATUS_OK ) {
143
 		     != PNIC_STATUS_OK ) {
153
 static int pnic_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
155
 static int pnic_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
154
 	struct pnic *pnic = netdev->priv;
156
 	struct pnic *pnic = netdev->priv;
155
 
157
 
156
-	pnic_command ( pnic, PNIC_CMD_XMIT, pkb, pkb_len ( pkb ),
158
+	pnic_command ( pnic, PNIC_CMD_XMIT, pkb->data, pkb_len ( pkb ),
157
 		       NULL, 0, NULL );
159
 		       NULL, 0, NULL );
158
 	free_pkb ( pkb );
160
 	free_pkb ( pkb );
159
 	return 0;
161
 	return 0;

Loading…
Cancel
Save