aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-05-10 05:14:11 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-05 08:58:24 -0400
commit283e8c425f6eab2002457c27a5182869bb414771 (patch)
tree71eda248df68ff702dfe1741ca2a82dec931dc8a /drivers
parent7140df6e51ecca70e8963f18e9836e62090221c2 (diff)
wl18xx: print the PHY firmware version from the private static data
The wl18xx firmware writes the PHY firmware version in the static data. Add an operation to parse the static data and print the PHY firmware version when booting. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c13
-rw-r--r--drivers/net/wireless/ti/wl18xx/wl18xx.h6
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index 24673e37a1dd..8262a4f7a10f 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -1016,6 +1016,17 @@ static int wl18xx_debugfs_init(struct wl1271 *wl, struct dentry *rootdir)
1016 return wl18xx_debugfs_add_files(wl, rootdir); 1016 return wl18xx_debugfs_add_files(wl, rootdir);
1017} 1017}
1018 1018
1019static int wl18xx_handle_static_data(struct wl1271 *wl,
1020 struct wl1271_static_data *static_data)
1021{
1022 struct wl18xx_static_data_priv *static_data_priv =
1023 (struct wl18xx_static_data_priv *) static_data->priv;
1024
1025 wl1271_info("PHY firmware version: %s", static_data_priv->phy_version);
1026
1027 return 0;
1028}
1029
1019static struct wlcore_ops wl18xx_ops = { 1030static struct wlcore_ops wl18xx_ops = {
1020 .identify_chip = wl18xx_identify_chip, 1031 .identify_chip = wl18xx_identify_chip,
1021 .boot = wl18xx_boot, 1032 .boot = wl18xx_boot,
@@ -1037,6 +1048,7 @@ static struct wlcore_ops wl18xx_ops = {
1037 .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask, 1048 .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask,
1038 .get_mac = wl18xx_get_mac, 1049 .get_mac = wl18xx_get_mac,
1039 .debugfs_init = wl18xx_debugfs_init, 1050 .debugfs_init = wl18xx_debugfs_init,
1051 .handle_static_data = wl18xx_handle_static_data,
1040}; 1052};
1041 1053
1042/* HT cap appropriate for wide channels */ 1054/* HT cap appropriate for wide channels */
@@ -1092,6 +1104,7 @@ int __devinit wl18xx_probe(struct platform_device *pdev)
1092 wl->hw_min_ht_rate = WL18XX_CONF_HW_RXTX_RATE_MCS0; 1104 wl->hw_min_ht_rate = WL18XX_CONF_HW_RXTX_RATE_MCS0;
1093 wl->fw_status_priv_len = sizeof(struct wl18xx_fw_status_priv); 1105 wl->fw_status_priv_len = sizeof(struct wl18xx_fw_status_priv);
1094 wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); 1106 wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics);
1107 wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv);
1095 memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap)); 1108 memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap));
1096 if (ht_mode_param && !strcmp(ht_mode_param, "mimo")) 1109 if (ht_mode_param && !strcmp(ht_mode_param, "mimo"))
1097 memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap, 1110 memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap,
diff --git a/drivers/net/wireless/ti/wl18xx/wl18xx.h b/drivers/net/wireless/ti/wl18xx/wl18xx.h
index 75abb5b48c6e..34e202bc2bb3 100644
--- a/drivers/net/wireless/ti/wl18xx/wl18xx.h
+++ b/drivers/net/wireless/ti/wl18xx/wl18xx.h
@@ -56,6 +56,12 @@ struct wl18xx_fw_status_priv {
56 u8 padding[2]; 56 u8 padding[2];
57}; 57};
58 58
59#define WL18XX_PHY_VERSION_MAX_LEN 20
60
61struct wl18xx_static_data_priv {
62 char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
63};
64
59struct wl18xx_clk_cfg { 65struct wl18xx_clk_cfg {
60 u32 n; 66 u32 n;
61 u32 m; 67 u32 m;