ioctls for token ring (2.3.x)

Adam Fritzler (mid@auk.cx)
Thu, 23 Dec 1999 06:46:56 +0000 (UTC)


Are ioctls broken for token ring? The function I register in
dev->do_ioctl never seems to get called by ifconfig.

I'd like to be able to add the feature of changing my cards' MAC address
using ifconfig without resorting to adding a module parameter to do so at
insmod time. This is for the TMS380 token ring driver. Several cards can
be supported chipset-wise, but they can cannot be _used_ because I don't
have EEPROM-reading routines written specifically for them (yet), and
therefore they load and initialize with a zeroed MAC. The only thing
needed to get them working is manually setting the MAC address to
something reasonable, usually by adding stuff to the driver to set it.

I could just add a module parameter, but that gets tricky to handle when
your driver supports multiple cards (specifically, how to answer: which
card gets the passed-in parameters?). If I could support it with
ifconfig, it would would be simple: Just insmod, "ifconfig tr0 hw tr
xx:xx:xx:xx:xx:xx", and then "ifconfig tr0 x.x.x.x". (Granted, you can't
change the MAC address once the adapter has been opened, but its fine just
after you insmod.)

I've read through the net-tools/ifconfig source, and it uses the
SIOCSIFHWADDR ioctl to set the hardware address. I have that code all
implemented, its just that the ioctl function is never getting called.

Suggestions? This is 2.3.28 (I should upgrade...) and CVS net-tools.

af

PS: Token ring people might be interested....

tms380tr.c: v1.04 22/12/1999 by Christoph Goos, Adam Fritzler
tr0: Madge Smart 16/4 BM PCI Mk2 Ringnode (Abyss)
tr0: IO: 0xe400 IRQ: 11
tr0: SEEPROM: ring speed: 16Mb/sec
tr0: SEEPROM: adapter RAM: 512kb
tr0: Ring Station Address: 00:00:f6:af:8e:23

Thanks to Madge/Olicom for donated cards and info! Cardbus and ISA
support is next. Then hopefully Olicom's OC-3540 100/16/4 card (anybody
have an extra token ring switch? :)

---
  Adam Fritzler
  { mid@auk.cx, afritz@iname.com}
    http://www.auk.cx/~mid/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/