summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/cisco
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-11-27 18:29:31 +0200
committerKalle Valo <kvalo@codeaurora.org>2015-11-30 14:59:28 +0200
commitb31fa550241d1fdd62e298c843c8f08a55bd57ff (patch)
treecd33b6947046fdbd830d5c1ca9f5421b6c7815ca /drivers/net/wireless/cisco
parent7941c2129a4bc189e17e3188a7d315d946caa1d6 (diff)
downloadop-kernel-dev-b31fa550241d1fdd62e298c843c8f08a55bd57ff.zip
op-kernel-dev-b31fa550241d1fdd62e298c843c8f08a55bd57ff.tar.gz
wireless: airo: re-use mac_pton()
mac_pton() converts 6-byte MAC / BSSID to binary format. Change an open coded variant by the generic one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/cisco')
-rw-r--r--drivers/net/wireless/cisco/airo.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
index 17c40f0..d2353f6 100644
--- a/drivers/net/wireless/cisco/airo.c
+++ b/drivers/net/wireless/cisco/airo.c
@@ -5137,21 +5137,9 @@ static void proc_APList_on_close( struct inode *inode, struct file *file ) {
memset(APList_rid, 0, sizeof(*APList_rid));
APList_rid->len = cpu_to_le16(sizeof(*APList_rid));
- for( i = 0; i < 4 && data->writelen >= (i+1)*6*3; i++ ) {
- int j;
- for( j = 0; j < 6*3 && data->wbuffer[j+i*6*3]; j++ ) {
- switch(j%3) {
- case 0:
- APList_rid->ap[i][j/3]=
- hex_to_bin(data->wbuffer[j+i*6*3])<<4;
- break;
- case 1:
- APList_rid->ap[i][j/3]|=
- hex_to_bin(data->wbuffer[j+i*6*3]);
- break;
- }
- }
- }
+ for (i = 0; i < 4 && data->writelen >= (i + 1) * 6 * 3; i++)
+ mac_pton(data->wbuffer + i * 6 * 3, APList_rid->ap[i]);
+
disable_MAC(ai, 1);
writeAPListRid(ai, APList_rid, 1);
enable_MAC(ai, 1);
OpenPOWER on IntegriCloud