aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c15
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
5165static 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
5172static void proc_APList_on_close( struct inode *inode, struct file *file ) { 5165static 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 }