diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
commit | 64960848abd18d0bcde3f53ffa7ed0b631e6b25d (patch) | |
tree | 8424a1c550a98ce09f127425fde9b7b5f2f5027a /drivers/net/wireless | |
parent | 2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff) | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/airo.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a441aad922c2..3b7ab20a5c54 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -5162,13 +5162,6 @@ static void proc_SSID_on_close(struct inode *inode, struct file *file) | |||
5162 | enable_MAC(ai, 1); | 5162 | enable_MAC(ai, 1); |
5163 | } | 5163 | } |
5164 | 5164 | ||
5165 | static inline u8 hexVal(char c) { | ||
5166 | if (c>='0' && c<='9') return c -= '0'; | ||
5167 | if (c>='a' && c<='f') return c -= 'a'-10; | ||
5168 | if (c>='A' && c<='F') return c -= 'A'-10; | ||
5169 | return 0; | ||
5170 | } | ||
5171 | |||
5172 | static void proc_APList_on_close( struct inode *inode, struct file *file ) { | 5165 | static void proc_APList_on_close( struct inode *inode, struct file *file ) { |
5173 | struct proc_data *data = (struct proc_data *)file->private_data; | 5166 | struct proc_data *data = (struct proc_data *)file->private_data; |
5174 | struct proc_dir_entry *dp = PDE(inode); | 5167 | struct proc_dir_entry *dp = PDE(inode); |
@@ -5188,11 +5181,11 @@ static void proc_APList_on_close( struct inode *inode, struct file *file ) { | |||
5188 | switch(j%3) { | 5181 | switch(j%3) { |
5189 | case 0: | 5182 | case 0: |
5190 | APList_rid.ap[i][j/3]= | 5183 | APList_rid.ap[i][j/3]= |
5191 | hexVal(data->wbuffer[j+i*6*3])<<4; | 5184 | hex_to_bin(data->wbuffer[j+i*6*3])<<4; |
5192 | break; | 5185 | break; |
5193 | case 1: | 5186 | case 1: |
5194 | APList_rid.ap[i][j/3]|= | 5187 | APList_rid.ap[i][j/3]|= |
5195 | hexVal(data->wbuffer[j+i*6*3]); | 5188 | hex_to_bin(data->wbuffer[j+i*6*3]); |
5196 | break; | 5189 | break; |
5197 | } | 5190 | } |
5198 | } | 5191 | } |
@@ -5340,10 +5333,10 @@ static void proc_wepkey_on_close( struct inode *inode, struct file *file ) { | |||
5340 | for( i = 0; i < 16*3 && data->wbuffer[i+j]; i++ ) { | 5333 | for( i = 0; i < 16*3 && data->wbuffer[i+j]; i++ ) { |
5341 | switch(i%3) { | 5334 | switch(i%3) { |
5342 | case 0: | 5335 | case 0: |
5343 | key[i/3] = hexVal(data->wbuffer[i+j])<<4; | 5336 | key[i/3] = hex_to_bin(data->wbuffer[i+j])<<4; |
5344 | break; | 5337 | break; |
5345 | case 1: | 5338 | case 1: |
5346 | key[i/3] |= hexVal(data->wbuffer[i+j]); | 5339 | key[i/3] |= hex_to_bin(data->wbuffer[i+j]); |
5347 | break; | 5340 | break; |
5348 | } | 5341 | } |
5349 | } | 5342 | } |