diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-24 10:41:34 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-06 16:24:26 -0500 |
commit | 7626cf19713464dbad96abba3f375771447925e6 (patch) | |
tree | d57dfef0e46e7e8a0449a72b6c5ab4c18461d3bd /drivers/net/wireless/brcm80211/brcmsmac | |
parent | 5f34608fa2acbfef5a06d0072a978c9943c28a2d (diff) |
brcmsmac: export firmware version to ethtool
This exports the firmware version in use to userspace through ethtool.
root@OpenWrt:/# ethtool -i wlan0
firmware-version: 610.812
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 8ef02dca8f8c..0c8e998bfb1e 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -7810,9 +7810,14 @@ void brcms_c_init(struct brcms_c_info *wlc, bool mute_tx) | |||
7810 | 7810 | ||
7811 | /* read the ucode version if we have not yet done so */ | 7811 | /* read the ucode version if we have not yet done so */ |
7812 | if (wlc->ucode_rev == 0) { | 7812 | if (wlc->ucode_rev == 0) { |
7813 | wlc->ucode_rev = | 7813 | u16 rev; |
7814 | brcms_b_read_shm(wlc->hw, M_BOM_REV_MAJOR) << NBITS(u16); | 7814 | u16 patch; |
7815 | wlc->ucode_rev |= brcms_b_read_shm(wlc->hw, M_BOM_REV_MINOR); | 7815 | |
7816 | rev = brcms_b_read_shm(wlc->hw, M_BOM_REV_MAJOR); | ||
7817 | patch = brcms_b_read_shm(wlc->hw, M_BOM_REV_MINOR); | ||
7818 | wlc->ucode_rev = (rev << NBITS(u16)) | patch; | ||
7819 | snprintf(wlc->wiphy->fw_version, | ||
7820 | sizeof(wlc->wiphy->fw_version), "%u.%u", rev, patch); | ||
7816 | } | 7821 | } |
7817 | 7822 | ||
7818 | /* ..now really unleash hell (allow the MAC out of suspend) */ | 7823 | /* ..now really unleash hell (allow the MAC out of suspend) */ |