From: Kalle Valo Date: Mon, 13 Jun 2011 09:08:28 +0000 (+0300) Subject: ath6kl: export firmware version to user space X-Git-Tag: MMI-PSA29.97-13-9~18845^2~543 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e59f0aa71f5d2fdc144259ad80d050c02c3dc14c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ath6kl: export firmware version to user space cfg80211 exports wiphy->fw_version to user space via ethtool interface. The obligatory screenshot: $ sudo ethtool -i wlan0 driver: ath6kl_hifdev version: 2.6.39-rc4+ firmware-version: 3:1:1:149 bus-info: mmc0:0001:1 $ Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index aa97efc0e4ef..499b7a90e941 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -4133,6 +4133,13 @@ ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver) ar->arVersion.wlan_ver = sw_ver; ar->arVersion.abi_ver = abi_ver; + snprintf(ar->wdev->wiphy->fw_version, sizeof(ar->wdev->wiphy->fw_version), + "%u:%u:%u:%u", + (ar->arVersion.wlan_ver & 0xf0000000) >> 28, + (ar->arVersion.wlan_ver & 0x0f000000) >> 24, + (ar->arVersion.wlan_ver & 0x00ff0000) >> 16, + (ar->arVersion.wlan_ver & 0x0000ffff)); + /* Indicate to the waiting thread that the ready event was received */ ar->arWmiReady = true; wake_up(&arEvent);