wireless-tools key on bug
wireless-tools 27+28pre13-0bpo1 running with kernel 2.4 causes the
SIOCSIWENCODE ioctl to fail when implemented as an iw_handler in
kernel 2.4 when "iwconfig <iface> key on" is processed. The message is:
Error for wireless request "Set Encode" (8B2A) :
SET failed on device ra0 ; Argument list too long.
The reason is that 27+28pre13-0bpo1 causes the length field of the
encoding structure provided to the driver to have a value of 64. This
is greater than IW_ENCODING_TOKEN_MAX in this kernel so
ioctl_standard_call() in net/core/wireless.c fails with E2BIG.
Dropping back to wireless-tools 27-2, I find that the length field is
only set to 32 when "iwconfig <iface> key on" is processed. This is
exactly the value of IW_ENCODING_TOKEN_MAX in the 2.4 kernel. So no
problem is caused.
Since kernel 2.6.16 has IW_ENCODING_TOKEN_MAX set to 64, could there
be a little environmental confusion here?
Here is abridged and commented debug output from a modified version of
the Ralink 2500 driver downloaded from Sourceforge:
# wireless-tools 27+28pre13-0bpo1
# iwconfig ra0 key off
rt2500: SIOCSIWENCODE (pointer=00000000,length=0,flags=0x8800)
rt2500: --- Key[0] cf:42:06:cf:99:1e:ab:8d:2c:ab:13:cd:51
# iwconfig ra0 key on
rt2500: SIOCSIWENCODE (pointer=bffff710,length=64,flags=0x2000)
rt2500: --- Key[0] cc:79:01:40:50:f0:17:40:01:00:00:00:00
# wireless-tools 27-2
# iwconfig ra0 key off
rt2500: SIOCSIWENCODE (pointer=00000000,length=0,flags=0x8800)
rt2500: --- Key[0] cf:42:06:cf:99:1e:ab:8d:2c:ab:13:cd:51
# iwconfig ra0 key on
rt2500: SIOCSIWENCODE (pointer=bffff730,length=32,flags=0x2000)
rt2500: --- Key[0] 74:70:01:40:c0:9a:02:40:6c:00:00:00:f6
--
Bryan
___ ___
/__/ / / /__/
/ \o \_/o / \o
Reply to: