diff options
author | Kalle Valo <kalle.valo@iki.fi> | 2009-09-24 14:02:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:46 -0400 |
commit | fe348cb628e6a78cc1e82fe64404c9a304ed9c12 (patch) | |
tree | 8e4eed26f43bd848e91366578e54e2f2b230c611 /drivers/net/wireless/at76c50x-usb.c | |
parent | dfce95f51fe34fa18c87a7d0bea53594b9bf1b9a (diff) |
at76c50x-usb: set firmware and hardware version in wiphy
Set firmware and hardware version in wiphy so that user space can access
it.
(Modification from original in favor of cfg80211 ethtool support. -- JWL)
Cc: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/at76c50x-usb.c')
-rw-r--r-- | drivers/net/wireless/at76c50x-usb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c index 8e1a55dec351..e559dc960552 100644 --- a/drivers/net/wireless/at76c50x-usb.c +++ b/drivers/net/wireless/at76c50x-usb.c | |||
@@ -2217,6 +2217,8 @@ static struct ieee80211_supported_band at76_supported_band = { | |||
2217 | static int at76_init_new_device(struct at76_priv *priv, | 2217 | static int at76_init_new_device(struct at76_priv *priv, |
2218 | struct usb_interface *interface) | 2218 | struct usb_interface *interface) |
2219 | { | 2219 | { |
2220 | struct wiphy *wiphy; | ||
2221 | size_t len; | ||
2220 | int ret; | 2222 | int ret; |
2221 | 2223 | ||
2222 | /* set up the endpoint information */ | 2224 | /* set up the endpoint information */ |
@@ -2254,6 +2256,7 @@ static int at76_init_new_device(struct at76_priv *priv, | |||
2254 | priv->device_unplugged = 0; | 2256 | priv->device_unplugged = 0; |
2255 | 2257 | ||
2256 | /* mac80211 initialisation */ | 2258 | /* mac80211 initialisation */ |
2259 | wiphy = priv->hw->wiphy; | ||
2257 | priv->hw->wiphy->max_scan_ssids = 1; | 2260 | priv->hw->wiphy->max_scan_ssids = 1; |
2258 | priv->hw->wiphy->max_scan_ie_len = 0; | 2261 | priv->hw->wiphy->max_scan_ie_len = 0; |
2259 | priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 2262 | priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); |
@@ -2265,6 +2268,13 @@ static int at76_init_new_device(struct at76_priv *priv, | |||
2265 | SET_IEEE80211_DEV(priv->hw, &interface->dev); | 2268 | SET_IEEE80211_DEV(priv->hw, &interface->dev); |
2266 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); | 2269 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); |
2267 | 2270 | ||
2271 | len = sizeof(wiphy->fw_version); | ||
2272 | snprintf(wiphy->fw_version, len, "%d.%d.%d-%d", | ||
2273 | priv->fw_version.major, priv->fw_version.minor, | ||
2274 | priv->fw_version.patch, priv->fw_version.build); | ||
2275 | |||
2276 | wiphy->hw_version = priv->board_type; | ||
2277 | |||
2268 | ret = ieee80211_register_hw(priv->hw); | 2278 | ret = ieee80211_register_hw(priv->hw); |
2269 | if (ret) { | 2279 | if (ret) { |
2270 | printk(KERN_ERR "cannot register mac80211 hw (status %d)!\n", | 2280 | printk(KERN_ERR "cannot register mac80211 hw (status %d)!\n", |