226 |
|
* Ask add-on for ethernet hardware address |
227 |
|
*/ |
228 |
|
|
229 |
< |
void AO_get_ethernet_address(uint8 *addr) |
229 |
> |
void AO_get_ethernet_address(uint32 arg) |
230 |
|
{ |
231 |
+ |
uint8 *addr = Mac2HostAddr(arg); |
232 |
|
if (net_open) { |
233 |
|
OTCopy48BitAddress(net_buffer_ptr->ether_addr, addr); |
234 |
|
} else { |
247 |
|
* Tell add-on to enable multicast address |
248 |
|
*/ |
249 |
|
|
250 |
< |
void AO_enable_multicast(uint8 *addr) |
250 |
> |
void AO_enable_multicast(uint32 addr) |
251 |
|
{ |
252 |
|
D(bug("AO_enable_multicast\n")); |
253 |
|
if (net_open) { |
255 |
|
if (p->cmd & IN_USE) { |
256 |
|
D(bug("WARNING: couldn't enable multicast address\n")); |
257 |
|
} else { |
258 |
< |
memcpy(p->data, addr, 6); |
258 |
> |
Mac2host_memcpy(p->data, addr, 6); |
259 |
|
p->length = 6; |
260 |
|
p->cmd = IN_USE | (ADD_MULTICAST << 8); |
261 |
|
wr_pos = (wr_pos + 1) % WRITE_PACKET_COUNT; |
269 |
|
* Tell add-on to disable multicast address |
270 |
|
*/ |
271 |
|
|
272 |
< |
void AO_disable_multicast(uint8 *addr) |
272 |
> |
void AO_disable_multicast(uint32 addr) |
273 |
|
{ |
274 |
|
D(bug("AO_disable_multicast\n")); |
275 |
|
if (net_open) { |
277 |
|
if (p->cmd & IN_USE) { |
278 |
|
D(bug("WARNING: couldn't enable multicast address\n")); |
279 |
|
} else { |
280 |
< |
memcpy(p->data, addr, 6); |
280 |
> |
Mac2host_memcpy(p->data, addr, 6); |
281 |
|
p->length = 6; |
282 |
|
p->cmd = IN_USE | (REMOVE_MULTICAST << 8); |
283 |
|
wr_pos = (wr_pos + 1) % WRITE_PACKET_COUNT; |
292 |
|
* Tell add-on to transmit one packet |
293 |
|
*/ |
294 |
|
|
295 |
< |
void AO_transmit_packet(mblk_t *mp) |
295 |
> |
void AO_transmit_packet(uint32 mp_arg) |
296 |
|
{ |
297 |
|
D(bug("AO_transmit_packet\n")); |
298 |
|
if (net_open) { |
307 |
|
// Copy packet to buffer |
308 |
|
uint8 *start; |
309 |
|
uint8 *bp = start = p->data; |
310 |
+ |
mblk_t *mp = Mac2HostAddr(mp_arg); |
311 |
|
while (mp) { |
312 |
|
uint32 size = mp->b_wptr - mp->b_rptr; |
313 |
|
memcpy(bp, mp->b_rptr, size); |