diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-04-25 16:31:22 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-06-01 15:11:52 +0300 |
commit | ade983307453cf6043454dd9ac08abab5193d704 (patch) | |
tree | e58aaad38840f810aa0aafc0144f5ae72ba33a28 /drivers | |
parent | ab1ef141161c158360fab671e72226cffb5f9774 (diff) | |
download | linux-ade983307453cf6043454dd9ac08abab5193d704.tar.gz linux-ade983307453cf6043454dd9ac08abab5193d704.tar.bz2 linux-ade983307453cf6043454dd9ac08abab5193d704.zip |
wireless: ath6kl: re-use native helper to parse MAC
There is native mac_pton() function which helps to parse MAC.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index fe38b836cb26..dbfd17d0a5fa 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -1240,20 +1240,14 @@ static ssize_t ath6kl_force_roam_write(struct file *file, char buf[20]; size_t len; u8 bssid[ETH_ALEN]; - int i; - int addr[ETH_ALEN]; len = min(count, sizeof(buf) - 1); if (copy_from_user(buf, user_buf, len)) return -EFAULT; buf[len] = '\0'; - if (sscanf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", - &addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) - != ETH_ALEN) + if (!mac_pton(buf, bssid)) return -EINVAL; - for (i = 0; i < ETH_ALEN; i++) - bssid[i] = addr[i]; ret = ath6kl_wmi_force_roam_cmd(ar->wmi, bssid); if (ret) |