On Wed, May 26, 2004 at 10:34:21PM -0500, Robert Denier wrote:
> I was trying to add in an iwpriv command to activate/deactivate the
> advanced encryption I was working on per Pavel Roskins suggestion some
> time ago. To begin with I was trying to create a couple new iwpriv
> commands it would recognise as valid and do something. So far I get
>
> root-mID8Yq4hNOo@xxxxxxxxxxxxxxxx wireless # iwpriv eth1
> eth1 Available private ioctl :
> force_reset (8BE0) : set 0 & get 0
> card_reset (8BE1) : set 0 & get 0
> set_port3 (8BE2) : set 1 int & get 0
> get_port3 (8BE3) : set 0 & get 1 int
> set_preamble (8BE4) : set 1 int & get 0
> get_preamble (8BE5) : set 0 & get 1 int
> set_ibssport (8BE6) : set 1 int & get 0
> get_ibssport (8BE7) : set 0 & get 1 int
> get_rid (8BE9) : set 0 & get 1024 byte
> ses_on (8BF0) : set 0 & get 0
> ses_off (8BF1) : set 0 & get 0
>
> root-mID8Yq4hNOo@xxxxxxxxxxxxxxxx wireless # iwpriv eth1 ses_on
> Interface doesn't accept private ioctl...
> ses_on (8BF0): Operation not supported
Hrm, that's a bit odd.
> with the following changes to a recently downloaded orinoco.c
It doesn't really matter in this case, but in general please always
use diff -u, it's much more readable.
> 4610,4611d4609
> < { SIOCIWFIRSTPRIV + 0x10, 0, 0, "ses_on" },
> < { SIOCIWFIRSTPRIV + 0x11, 0, 0, "ses_off" },
> 4678,4682d4675
> <
> < void fooboo(void){
> < printk("something.\n");
> < }
> <
> 4694,4696c4687
> < (iw_handler) orinoco_ioctl_getrid, /*
> SIOCIWFIRSTPRIV + 9 */
> < (iw_handler) fooboo, /* SIOCIWFIRSTPRIV + 10 */
> < (iw_handler) fooboo /* SIOCIWFIRSTPRIV + 11 */
> > (iw_handler) orinoco_ioctl_getrid /*
> SIOCIWFIRSTPRIV + 9 */
> 5026,5038d5016
> <
> < /* New -- RD */
> < case SIOCIWFIRSTPRIV + 0x10: /* ses_on */
> < {
> < printk("ses: Ses functions enabled.\n");
> < }
> < break;
> < case SIOCIWFIRSTPRIV + 0x11: /* ses_off */
> < {
> < printk("ses: Ses functions disabled.\n");
> < }
> < break;
> <
>
>
> I am probably missing something obvious, but I don't see it right now..
Several points not directly relevant to what's going wrong:
- Looks like you're using an older version of the driver.
You'd be better off working with the latest version which uses a new
interface for listing the ioctl commands. I can't remember how things
worked there, maybe you need to explicitly set the err variable, it
may be initialized to EOPNOTSUPP which would explain the error you're
seeing.
- a ses_get and ses_set pair would be more normal than
separate on and off commands.
- Be aware even numbered iwpriv commands are privleged (root
only) and odd numbered ones are not (I think that's a stupid
interface, but there you go).
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
|