summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/ipw2x00
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/intel/ipw2x00')
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2100.c20
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2200.c23
-rw-r--r--drivers/net/wireless/intel/ipw2x00/libipw.h2
3 files changed, 12 insertions, 33 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 0812db8936..b6636002c7 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -317,8 +317,6 @@ static int ipw2100_get_firmware(struct ipw2100_priv *priv,
struct ipw2100_fw *fw);
static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf,
size_t max);
-static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf,
- size_t max);
static void ipw2100_release_firmware(struct ipw2100_priv *priv,
struct ipw2100_fw *fw);
static int ipw2100_ucode_download(struct ipw2100_priv *priv,
@@ -5894,17 +5892,14 @@ static void ipw_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
struct ipw2100_priv *priv = libipw_priv(dev);
- char fw_ver[64], ucode_ver[64];
+ char fw_ver[64];
strscpy(info->driver, DRV_NAME, sizeof(info->driver));
strscpy(info->version, DRV_VERSION, sizeof(info->version));
ipw2100_get_fwversion(priv, fw_ver, sizeof(fw_ver));
- ipw2100_get_ucodeversion(priv, ucode_ver, sizeof(ucode_ver));
-
- snprintf(info->fw_version, sizeof(info->fw_version), "%s:%d:%s",
- fw_ver, priv->eeprom_version, ucode_ver);
+ strscpy(info->fw_version, fw_ver, sizeof(info->fw_version));
strscpy(info->bus_info, pci_name(priv->pci_dev),
sizeof(info->bus_info));
}
@@ -8406,17 +8401,6 @@ static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf,
return tmp;
}
-static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf,
- size_t max)
-{
- u32 ver;
- u32 len = sizeof(ver);
- /* microcode version is a 32 bit integer */
- if (ipw2100_get_ordinal(priv, IPW_ORD_UCODE_VERSION, &ver, &len))
- return -EIO;
- return snprintf(buf, max, "%08X", ver);
-}
-
/*
* On exit, the firmware will have been freed from the fw list
*/
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 820100cac4..eed9ef17bc 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -9656,31 +9656,30 @@ static int ipw_wx_get_wireless_mode(struct net_device *dev,
mutex_lock(&priv->mutex);
switch (priv->ieee->mode) {
case IEEE_A:
- strncpy(extra, "802.11a (1)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11a (1)", MAX_WX_STRING);
break;
case IEEE_B:
- strncpy(extra, "802.11b (2)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11b (2)", MAX_WX_STRING);
break;
case IEEE_A | IEEE_B:
- strncpy(extra, "802.11ab (3)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11ab (3)", MAX_WX_STRING);
break;
case IEEE_G:
- strncpy(extra, "802.11g (4)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11g (4)", MAX_WX_STRING);
break;
case IEEE_A | IEEE_G:
- strncpy(extra, "802.11ag (5)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11ag (5)", MAX_WX_STRING);
break;
case IEEE_B | IEEE_G:
- strncpy(extra, "802.11bg (6)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11bg (6)", MAX_WX_STRING);
break;
case IEEE_A | IEEE_B | IEEE_G:
- strncpy(extra, "802.11abg (7)", MAX_WX_STRING);
+ strscpy_pad(extra, "802.11abg (7)", MAX_WX_STRING);
break;
default:
- strncpy(extra, "unknown", MAX_WX_STRING);
+ strscpy_pad(extra, "unknown", MAX_WX_STRING);
break;
}
- extra[MAX_WX_STRING - 1] = '\0';
IPW_DEBUG_WX("PRIV GET MODE: %s\n", extra);
@@ -10378,7 +10377,6 @@ static void ipw_ethtool_get_drvinfo(struct net_device *dev,
{
struct ipw_priv *p = libipw_priv(dev);
char vers[64];
- char date[32];
u32 len;
strscpy(info->driver, DRV_NAME, sizeof(info->driver));
@@ -10386,11 +10384,8 @@ static void ipw_ethtool_get_drvinfo(struct net_device *dev,
len = sizeof(vers);
ipw_get_ordinal(p, IPW_ORD_STAT_FW_VERSION, vers, &len);
- len = sizeof(date);
- ipw_get_ordinal(p, IPW_ORD_STAT_FW_DATE, date, &len);
- snprintf(info->fw_version, sizeof(info->fw_version), "%s (%s)",
- vers, date);
+ strscpy(info->fw_version, vers, sizeof(info->fw_version));
strscpy(info->bus_info, pci_name(p->pci_dev),
sizeof(info->bus_info));
}
diff --git a/drivers/net/wireless/intel/ipw2x00/libipw.h b/drivers/net/wireless/intel/ipw2x00/libipw.h
index bec7bc2737..9065ca5b02 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw.h
+++ b/drivers/net/wireless/intel/ipw2x00/libipw.h
@@ -488,7 +488,7 @@ struct libipw_txb {
u8 reserved;
u16 frag_size;
u16 payload_size;
- struct sk_buff *fragments[];
+ struct sk_buff *fragments[] __counted_by(nr_frags);
};
/* SWEEP TABLE ENTRIES NUMBER */