Magellan Linux

Annotation of /trunk/zydas/patches/zd1211-driver-r32-wep256.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years, 1 month ago) by niro
File size: 3034 byte(s)
-import

1 niro 153 * finding or making jordens@debian.org--zd1211/zd1211--integration--0--patch-7
2     * finding or making jordens@debian.org--zd1211/zd1211--integration--0--patch-8
3     * computing changeset
4     A {arch}/zd1211/zd1211--integration/zd1211--integration--0/jordens@debian.org--zd1211/patch-log/patch-8
5     M src/zd1205.c
6     * changeset report
7     * modified files
8    
9     --- orig/src/zd1205.c
10     +++ mod/src/zd1205.c
11     @@ -5636,8 +5636,10 @@
12    
13     #define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) )
14    
15     -#define MAX_KEY_SIZE 13
16     -#define MIN_KEY_SIZE 5
17     +#define WEP256_KEY_SIZE 29
18     +#define WEP128_KEY_SIZE 13
19     +#define WEP64_KEY_SIZE 5
20     +#define MAX_KEY_SIZE WEP256_KEY_SIZE
21    
22     static int
23     zd1205_ioctl_setiwencode(struct net_device *dev, struct iw_point *erq, char *key)
24     @@ -5653,26 +5655,32 @@
25     // ZD1211DEBUG(1, "index = %d\n", index);
26     // ZD1211DEBUG(1, "erq->length = %d\n", erq->length);
27    
28     - if (erq->length > MAX_KEY_SIZE)
29     - return -EINVAL;
30     -
31     if ((index < 0) || (index >= 4))
32     index = current_index;
33    
34     - /* Set the length */
35     - if (erq->length > MIN_KEY_SIZE) {
36     - pSetting->WepKeyLen = MAX_KEY_SIZE;
37     + /* Set the length */
38     + switch (erq->length)
39     + {
40     + case WEP64_KEY_SIZE:
41     + pSetting->WepKeyLen = WEP64_KEY_SIZE;
42     + pSetting->EncryMode = WEP64;
43     + break;
44     + case WEP128_KEY_SIZE:
45     + pSetting->WepKeyLen = WEP128_KEY_SIZE;
46     pSetting->EncryMode = WEP128;
47     - } else {
48     - // if (erq->length > 0){
49     - pSetting->WepKeyLen = MIN_KEY_SIZE;
50     + break;
51     + case WEP256_KEY_SIZE:
52     + pSetting->WepKeyLen = WEP64_KEY_SIZE;
53     pSetting->EncryMode = WEP64;
54     + break;
55     + default:
56     + return -EINVAL;
57     + }
58     // }
59     // else {
60     // pSetting->WepKeyLen = 0; /* Disable the key */
61     // pSetting->EncryMode = NO_WEP;
62     // }
63     - }
64    
65     /* Check if the key is not marked as invalid */
66     if (!(erq->flags & IW_ENCODE_NOKEY)) { // for command: key xxxxxxxxxx [n]
67     @@ -5794,7 +5802,7 @@
68     /* Copy the key to the user buffer */
69    
70     erq->length = pSetting->WepKeyLen;
71     - if (erq->length > 16)
72     + if (erq->length > MAX_KEY_SIZE)
73     {
74     erq->length = 0;
75    
76     @@ -6393,9 +6401,10 @@
77     range->min_frag = 256;
78     range->max_frag = 2346;
79     range->max_encoding_tokens = NUM_WEPKEYS;
80     - range->num_encoding_sizes = 2;
81     + range->num_encoding_sizes = 3;
82     range->encoding_size[0] = 5;
83     range->encoding_size[1] = 13;
84     + range->encoding_size[2] = 29;
85    
86     // XXX what about num_bitrates/throughput?
87     range->num_bitrates = 0;
88    
89    
90    
91     * added files
92    
93    

Properties

Name Value
svn:executable *