aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 13:07:15 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:01 -0400
commitcad9d9b17a4ab80da1593de004a1163b359de268 (patch)
tree8cd17f24d4d962af83c84165ae01874d50158e38
parentb20c520763a6fe1aabde27f6ba017a67f22f90d5 (diff)
[PATCH] libertas: remove adapter->txrate
The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command, but there was no code in the driver that ever issued this command. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/libertas/cmd.c7
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c3
-rw-r--r--drivers/net/wireless/libertas/dev.h1
-rw-r--r--drivers/net/wireless/libertas/wext.c2
4 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 2a5defe011e7..0da013f3b0d8 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1368,13 +1368,6 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1368 S_DS_GEN); 1368 S_DS_GEN);
1369 ret = 0; 1369 ret = 0;
1370 break; 1370 break;
1371 case CMD_802_11_TX_RATE_QUERY:
1372 cmdptr->command = cpu_to_le16(CMD_802_11_TX_RATE_QUERY);
1373 cmdptr->size = cpu_to_le16(sizeof(struct cmd_tx_rate_query) +
1374 S_DS_GEN);
1375 adapter->txrate = 0;
1376 ret = 0;
1377 break;
1378 default: 1371 default:
1379 lbs_deb_host("PREP_CMD: unknown command 0x%04x\n", cmd_no); 1372 lbs_deb_host("PREP_CMD: unknown command 0x%04x\n", cmd_no);
1380 ret = -1; 1373 ret = -1;
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index affb1eeb6a5e..e91d819555eb 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -702,9 +702,6 @@ static inline int handle_cmd_response(u16 respcmd,
702 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.mesh, 702 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.mesh,
703 sizeof(resp->params.mesh)); 703 sizeof(resp->params.mesh));
704 break; 704 break;
705 case CMD_RET(CMD_802_11_TX_RATE_QUERY):
706 priv->adapter->txrate = resp->params.txrate.txrate;
707 break;
708 default: 705 default:
709 lbs_deb_host("CMD_RESP: unknown cmd response 0x%04x\n", 706 lbs_deb_host("CMD_RESP: unknown cmd response 0x%04x\n",
710 resp->command); 707 resp->command);
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index aad92ded730e..9e18f012333c 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -376,7 +376,6 @@ struct _wlan_adapter {
376 376
377 struct cmd_ds_802_11_get_log logmsg; 377 struct cmd_ds_802_11_get_log logmsg;
378 378
379 u16 txrate;
380 u32 linkmode; 379 u32 linkmode;
381 u32 radiomode; 380 u32 radiomode;
382 u8 fw_ready; 381 u8 fw_ready;
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 7d14f9c2aff6..1fb0f91e538a 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -949,7 +949,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
949 priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure); 949 priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure);
950 950
951 /* Calculate quality */ 951 /* Calculate quality */
952 priv->wstats.qual.qual = min_t(u32, quality, 100); 952 priv->wstats.qual.qual = min_t(u8, quality, 100);
953 priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; 953 priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
954 stats_valid = 1; 954 stats_valid = 1;
955 955