summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-12-11 12:42:16 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:06:42 -0800
commit6e66f03ff78b23d845920739373b1561c546b13f (patch)
treec190caf119aedbcc07d6020226dfd4637ef44970 /drivers/net/wireless/libertas/cmdresp.c
parenta8bdcd71fd33e4a919f9f0cb32207c644b70853f (diff)
libertas: convert GET_HW_SPEC to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 91136697f697..671e323764c8 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -145,69 +145,6 @@ static int lbs_ret_reg_access(struct lbs_private *priv,
return ret;
}
-static int lbs_ret_get_hw_spec(struct lbs_private *priv,
- struct cmd_ds_command *resp)
-{
- u32 i;
- struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
- int ret = 0;
- DECLARE_MAC_BUF(mac);
-
- lbs_deb_enter(LBS_DEB_CMD);
-
- priv->fwcapinfo = le32_to_cpu(hwspec->fwcapinfo);
-
- memcpy(priv->fwreleasenumber, hwspec->fwreleasenumber, 4);
-
- lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n",
- priv->fwreleasenumber[2], priv->fwreleasenumber[1],
- priv->fwreleasenumber[0], priv->fwreleasenumber[3]);
- lbs_deb_cmd("GET_HW_SPEC: MAC addr %s\n",
- print_mac(mac, hwspec->permanentaddr));
- lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n",
- hwspec->hwifversion, hwspec->version);
-
- /* Clamp region code to 8-bit since FW spec indicates that it should
- * only ever be 8-bit, even though the field size is 16-bit. Some firmware
- * returns non-zero high 8 bits here.
- */
- priv->regioncode = le16_to_cpu(hwspec->regioncode) & 0xFF;
-
- for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
- /* use the region code to search for the index */
- if (priv->regioncode == lbs_region_code_to_index[i]) {
- break;
- }
- }
-
- /* if it's unidentified region code, use the default (USA) */
- if (i >= MRVDRV_MAX_REGION_CODE) {
- priv->regioncode = 0x10;
- lbs_pr_info("unidentified region code; using the default (USA)\n");
- }
-
- if (priv->current_addr[0] == 0xff)
- memmove(priv->current_addr, hwspec->permanentaddr, ETH_ALEN);
-
- memcpy(priv->dev->dev_addr, priv->current_addr, ETH_ALEN);
- if (priv->mesh_dev)
- memcpy(priv->mesh_dev->dev_addr, priv->current_addr, ETH_ALEN);
-
- if (lbs_set_regiontable(priv, priv->regioncode, 0)) {
- ret = -1;
- goto done;
- }
-
- if (lbs_set_universaltable(priv, 0)) {
- ret = -1;
- goto done;
- }
-
-done:
- lbs_deb_enter_args(LBS_DEB_CMD, "ret %d", ret);
- return ret;
-}
-
static int lbs_ret_802_11_sleep_params(struct lbs_private *priv,
struct cmd_ds_command *resp)
{
@@ -569,10 +506,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
ret = lbs_ret_reg_access(priv, respcmd, resp);
break;
- case CMD_RET(CMD_GET_HW_SPEC):
- ret = lbs_ret_get_hw_spec(priv, resp);
- break;
-
case CMD_RET(CMD_802_11_SCAN):
ret = lbs_ret_80211_scan(priv, resp);
break;