|
@@ -187,23 +187,16 @@ static int mlx_transmit ( struct net_device *netdev,
|
187
|
187
|
struct io_buffer *iobuf ) {
|
188
|
188
|
struct ibhdr *ibhdr = iobuf->data;
|
189
|
189
|
|
190
|
|
- DBG ( "Sending packet:\n" );
|
191
|
|
- // DBG_HD ( iobuf->data, iob_len ( iobuf ) );
|
192
|
|
-
|
193
|
|
- DBG ( "Peer:\n" );
|
194
|
|
- DBG_HD ( &ibhdr->peer[0], IB_ALEN );
|
195
|
|
- DBG ( "Bcast:\n" );
|
196
|
|
- DBG_HD ( &ib_broadcast[0], IB_ALEN );
|
197
|
|
-
|
198
|
190
|
iob_pull ( iobuf, sizeof ( *ibhdr ) );
|
199
|
191
|
|
200
|
192
|
if ( memcmp ( ibhdr->peer, ib_broadcast, IB_ALEN ) == 0 ) {
|
201
|
193
|
printf ( "Sending broadcast packet\n" );
|
202
|
|
- return send_bcast_packet ( ibhdr->proto, iobuf->data,
|
203
|
|
- iob_len ( iobuf ) );
|
|
194
|
+ return send_bcast_packet ( ntohs ( ibhdr->proto ),
|
|
195
|
+ iobuf->data, iob_len ( iobuf ) );
|
204
|
196
|
} else {
|
205
|
197
|
printf ( "Sending unicast packet\n" );
|
206
|
|
- return send_ucast_packet ( ibhdr->peer, ibhdr->proto,
|
|
198
|
+ return send_ucast_packet ( ibhdr->peer,
|
|
199
|
+ ntohs ( ibhdr->proto ),
|
207
|
200
|
iobuf->data, iob_len ( iobuf ) );
|
208
|
201
|
}
|
209
|
202
|
}
|