libertas: remove lbs_get_fwversion()
PATCH 1/1 libertas: remove lbs_get_fwversion()
It was used only at one place anyway.
Signed-off-by Holger Schurig <[email protected]>
drivers/net/wireless/libertas/ethtool.c +5 -4
@@ -24,13 +24,14 @@ static void lbs_ethtool_get_drvinfo(stru struct ethtool_drvinfo *info) {struct lbs_private *priv = (struct lbs_private *) dev->priv; -char fwver[32 ]; - -lbs_get_fwversion (priv, fwver,sizeof (fwver) -1 ); +snprintf (info->fw_version,32 ,"%u.%u.%u.p%u" , + priv->fwrelease >>24 &0xff , + priv->fwrelease >>16 &0xff , + priv->fwrelease >>8 &0xff , + priv->fwrelease &0xff );strcpy (info->driver,"libertas" );strcpy (info->version, lbs_driver_version); -strcpy (info->fw_version, fwver); }/* All 8388 parts have 16KiB EEPROM size at the time of writing.
drivers/net/wireless/libertas/decl.h +0 -3
@@ -37,9 +37,6 @@ void lbs_notify_command_response(structint lbs_set_radio_control (struct lbs_private *priv);u32 lbs_fw_index_to_data_rate (u8 index);u8 lbs_data_rate_to_fw_index (u32 rate); -void lbs_get_fwversion (struct lbs_private *priv, -char *fwversion, -int maxlen);/** The proc fs interface */ int lbs_process_command_response (struct lbs_private *priv,u8 *data,u32 len);
drivers/net/wireless/libertas/wext.c +0 -17
@@ -2060,23 +2060,6 @@ static int lbs_set_wap(struct net_devicereturn ret; } -void lbs_get_fwversion (struct lbs_private *priv,char *fwversion,int maxlen) -{ -char fwver[32 ]; - -mutex_lock (&priv->lock); - -sprintf (fwver,"%u.%u.%u.p%u" , - priv->fwrelease >>24 &0xff , - priv->fwrelease >>16 &0xff , - priv->fwrelease >>8 &0xff , - priv->fwrelease &0xff ); - -mutex_unlock (&priv->lock); -snprintf (fwversion, maxlen, fwver); -} - -/* * iwconfig settable callbacks */
Quoted 3 lines · Holger Schurig
It was used only at one place anyway.
Signed-off-by Holger Schurig <[email protected]>
Acked-by Dan Williams <[email protected]>
Quoted 65 lines
Index:
wireless-testing/drivers/net/wireless/libertas/ethtool.c
===================================================================drivers/net/wireless/libertas/ethtool.c +5
-4@@ -24,13 +24,14 @@ static void lbs_ethtool_get_drvinfo(stru struct ethtool_drvinfo *info) {struct lbs_private *priv = (struct lbs_private *) dev->priv; -char fwver[32 ]; - -lbs_get_fwversion (priv, fwver,sizeof (fwver) -1 ); +snprintf (info->fw_version,32 ,"%u.%u.%u.p%u" , + priv->fwrelease >>24 &0xff , + priv->fwrelease >>16 &0xff , + priv->fwrelease >>8 &0xff , + priv->fwrelease &0xff );strcpy (info->driver,"libertas" );strcpy (info->version, lbs_driver_version); -strcpy (info->fw_version, fwver); }/* All 8388 parts have 16KiB EEPROM size at the time of writing. Index:
wireless-testing/drivers/net/wireless/libertas/decl.h
===================================================================drivers/net/wireless/libertas/decl.h +0
-3@@ -37,9 +37,6 @@ void lbs_notify_command_response(structint lbs_set_radio_control (struct lbs_private *priv);u32 lbs_fw_index_to_data_rate (u8 index);u8 lbs_data_rate_to_fw_index (u32 rate); -void lbs_get_fwversion (struct lbs_private *priv, -char *fwversion, -int maxlen);/** The proc fs interface */ int lbs_process_command_response (struct lbs_private *priv,u8 *data,u32 len);Index:
wireless-testing/drivers/net/wireless/libertas/wext.c
===================================================================drivers/net/wireless/libertas/wext.c +0
-17@@ -2060,23 +2060,6 @@ static int lbs_set_wap(struct net_devicereturn ret; } -void lbs_get_fwversion (struct lbs_private *priv,char *fwversion,int maxlen) -{ -char fwver[32 ]; - -mutex_lock (&priv->lock); - -sprintf (fwver,"%u.%u.%u.p%u" , - priv->fwrelease >>24 &0xff , - priv->fwrelease >>16 &0xff , - priv->fwrelease >>8 &0xff , - priv->fwrelease &0xff ); - -mutex_unlock (&priv->lock); -snprintf (fwversion, maxlen, fwver); -} - -/* * iwconfig settable callbacks */